Skip to content

The open alternative to Salesforce, designed for AI.

Moving queries into dedicated files (#1210)

Weiko24e5132029fb
diff --git a/front/src/generated/graphql.tsx b/front/src/generated/graphql.tsx
index 7f6964ea015..d2e7f225527 100644
--- a/front/src/generated/graphql.tsx
+++ b/front/src/generated/graphql.tsx
@@ -2637,16 +2637,17 @@ export type WorkspaceUpdateInput = {
workspaceMember?: InputMaybe<WorkspaceMemberUpdateManyWithoutWorkspaceNestedInput>;
};
-export type CreateCommentMutationVariables = Exact<{
- commentId: Scalars['String'];
- commentText: Scalars['String'];
- authorId: Scalars['String'];
+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 };
+
+export type AddActivityTargetsOnActivityMutationVariables = Exact<{
activityId: Scalars['String'];
- createdAt: Scalars['DateTime'];
+ activityTargetInputs: Array<ActivityTargetCreateManyActivityInput> | ActivityTargetCreateManyActivityInput;
}>;
-export type CreateCommentMutation = { __typename?: 'Mutation', createOneComment: { __typename?: 'Comment', id: string, createdAt: string, body: string, activityId?: string | null, author: { __typename?: 'User', id: string, displayName: string, firstName?: string | null, lastName?: string | null, avatarUrl?: string | null } } };
+export type AddActivityTargetsOnActivityMutation = { __typename?: 'Mutation', updateOneActivity: { __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 CreateActivityMutationVariables = Exact<{
data: ActivityCreateInput;
@@ -2655,71 +2656,70 @@ export type CreateActivityMutationVariables = Exact<{
export type CreateActivityMutation = { __typename?: 'Mutation', createOneActivity: { __typename?: 'Activity', id: string, createdAt: string, updatedAt: string, authorId: string, type: ActivityType, activityTargets?: Array<{ __typename?: 'ActivityTarget', id: string, createdAt: string, updatedAt: string, activityId: string, companyId?: string | null, personId?: string | null }> | null, comments?: Array<{ __typename?: 'Comment', id: string, createdAt: string, updatedAt: string, body: string, author: { __typename?: 'User', id: string } }> | 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 GetActivitiesByTargetsQueryVariables = Exact<{
- activityTargetIds: Array<Scalars['String']> | Scalars['String'];
- orderBy?: InputMaybe<Array<ActivityOrderByWithRelationInput> | ActivityOrderByWithRelationInput>;
+export type CreateCommentMutationVariables = Exact<{
+ commentId: Scalars['String'];
+ commentText: Scalars['String'];
+ authorId: Scalars['String'];
+ activityId: Scalars['String'];
+ createdAt: Scalars['DateTime'];
}>;
-export type GetActivitiesByTargetsQuery = { __typename?: 'Query', findManyActivities: Array<{ __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 CreateCommentMutation = { __typename?: 'Mutation', createOneComment: { __typename?: 'Comment', id: string, createdAt: string, body: string, activityId?: string | null, author: { __typename?: 'User', id: string, displayName: string, firstName?: string | null, lastName?: string | null, avatarUrl?: string | null } } };
-export type GetActivitiesQueryVariables = Exact<{
- where: ActivityWhereInput;
- orderBy?: InputMaybe<Array<ActivityOrderByWithRelationInput> | ActivityOrderByWithRelationInput>;
+export type DeleteActivityMutationVariables = Exact<{
+ activityId: Scalars['String'];
}>;
-export type GetActivitiesQuery = { __typename?: 'Query', findManyActivities: Array<{ __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 DeleteActivityMutation = { __typename?: 'Mutation', deleteManyActivities: { __typename?: 'AffectedRows', count: number } };
-export type GetActivityQueryVariables = Exact<{
+export type RemoveActivityTargetsOnActivityMutationVariables = Exact<{
activityId: Scalars['String'];
+ activityTargetIds: Array<Scalars['String']> | Scalars['String'];
}>;
-export type GetActivityQuery = { __typename?: 'Query', findManyActivities: Array<{ __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 RemoveActivityTargetsOnActivityMutation = { __typename?: 'Mutation', updateOneActivity: { __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 AddActivityTargetsOnActivityMutationVariables = Exact<{
- activityId: Scalars['String'];
- activityTargetInputs: Array<ActivityTargetCreateManyActivityInput> | ActivityTargetCreateManyActivityInput;
+export type UpdateActivityMutationVariables = Exact<{
+ where: ActivityWhereUniqueInput;
+ data: ActivityUpdateInput;
}>;
-export type AddActivityTargetsOnActivityMutation = { __typename?: 'Mutation', updateOneActivity: { __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 UpdateActivityMutation = { __typename?: 'Mutation', updateOneActivity: { __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 } };
-export type RemoveActivityTargetsOnActivityMutationVariables = Exact<{
+export type UploadAttachmentMutationVariables = Exact<{
+ file: Scalars['Upload'];
activityId: Scalars['String'];
- activityTargetIds: Array<Scalars['String']> | Scalars['String'];
}>;
-export type RemoveActivityTargetsOnActivityMutation = { __typename?: 'Mutation', updateOneActivity: { __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 UploadAttachmentMutation = { __typename?: 'Mutation', uploadAttachment: string };
-export type DeleteActivityMutationVariables = Exact<{
- activityId: Scalars['String'];
+export type GetActivitiesQueryVariables = Exact<{
+ where: ActivityWhereInput;
+ orderBy?: InputMaybe<Array<ActivityOrderByWithRelationInput> | ActivityOrderByWithRelationInput>;
}>;
-export type DeleteActivityMutation = { __typename?: 'Mutation', deleteManyActivities: { __typename?: 'AffectedRows', count: number } };
-
-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 };
+export type GetActivitiesQuery = { __typename?: 'Query', findManyActivities: Array<{ __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 UpdateActivityMutationVariables = Exact<{
- where: ActivityWhereUniqueInput;
- data: ActivityUpdateInput;
+export type GetActivitiesByTargetsQueryVariables = Exact<{
+ activityTargetIds: Array<Scalars['String']> | Scalars['String'];
+ orderBy?: InputMaybe<Array<ActivityOrderByWithRelationInput> | ActivityOrderByWithRelationInput>;
}>;
-export type UpdateActivityMutation = { __typename?: 'Mutation', updateOneActivity: { __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 } };
+export type GetActivitiesByTargetsQuery = { __typename?: 'Query', findManyActivities: Array<{ __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 UploadAttachmentMutationVariables = Exact<{
- file: Scalars['Upload'];
+export type GetActivityQueryVariables = Exact<{
activityId: Scalars['String'];
}>;
-export type UploadAttachmentMutation = { __typename?: 'Mutation', uploadAttachment: string };
+export type GetActivityQuery = { __typename?: 'Query', findManyActivities: Array<{ __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 CreateEventMutationVariables = Exact<{
type: Scalars['String'];
@@ -2729,12 +2729,7 @@ export type CreateEventMutationVariables = Exact<{
export type CreateEventMutation = { __typename?: 'Mutation', createEvent: { __typename?: 'Analytics', success: boolean } };
-export type CheckUserExistsQueryVariables = Exact<{
- email: Scalars['String'];
-}>;
-
-
-export type CheckUserExistsQuery = { __typename?: 'Query', checkUserExists: { __typename?: 'UserExists', exists: boolean } };
+export type UserQueryFragmentFragment = { __typename?: 'User', id: string, email: string, displayName: string, firstName?: string | null, lastName?: 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 } } | null, settings: { __typename?: 'UserSettings', id: string, colorScheme: ColorScheme, locale: string } };
export type ChallengeMutationVariables = Exact<{
email: Scalars['String'];
@@ -2744,6 +2739,20 @@ export type ChallengeMutationVariables = Exact<{
export type ChallengeMutation = { __typename?: 'Mutation', challenge: { __typename?: 'LoginToken', loginToken: { __typename?: 'AuthToken', expiresAt: string, token: string } } };
+export type ImpersonateMutationVariables = Exact<{
+ userId: Scalars['String'];
+}>;
+
+
+export type ImpersonateMutation = { __typename?: 'Mutation', impersonate: { __typename?: 'Verify', user: { __typename?: 'User', id: string, email: string, displayName: string, firstName?: string | null, lastName?: 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 } } | null, settings: { __typename?: 'UserSettings', id: string, colorScheme: ColorScheme, locale: string } }, tokens: { __typename?: 'AuthTokenPair', accessToken: { __typename?: 'AuthToken', token: string, expiresAt: string }, refreshToken: { __typename?: 'AuthToken', token: string, expiresAt: string } } } };
+
+export type RenewTokenMutationVariables = Exact<{
+ refreshToken: Scalars['String'];
+}>;
+
+
+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 SignUpMutationVariables = Exact<{
email: Scalars['String'];
password: Scalars['String'];
@@ -2760,24 +2769,41 @@ export type VerifyMutationVariables = Exact<{
export type VerifyMutation = { __typename?: 'Mutation', verify: { __typename?: 'Verify', user: { __typename?: 'User', id: string, email: string, displayName: string, firstName?: string | null, lastName?: 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 } } | null, settings: { __typename?: 'UserSettings', id: string, colorScheme: ColorScheme, locale: string } }, tokens: { __typename?: 'AuthTokenPair', accessToken: { __typename?: 'AuthToken', token: string, expiresAt: string }, refreshToken: { __typename?: 'AuthToken', token: string, expiresAt: string } } } };
-export type RenewTokenMutationVariables = Exact<{
- refreshToken: Scalars['String'];
+export type CheckUserExistsQueryVariables = Exact<{
+ email: Scalars['String'];
}>;
-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 CheckUserExistsQuery = { __typename?: 'Query', checkUserExists: { __typename?: 'UserExists', exists: boolean } };
-export type ImpersonateMutationVariables = Exact<{
- userId: Scalars['String'];
+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, id: string, name: string, accountOwner?: { __typename?: 'User', id: string, email: string, displayName: string, avatarUrl?: string | null } | null };
+
+export type DeleteManyCompaniesMutationVariables = Exact<{
+ ids?: InputMaybe<Array<Scalars['String']> | Scalars['String']>;
}>;
-export type ImpersonateMutation = { __typename?: 'Mutation', impersonate: { __typename?: 'Verify', user: { __typename?: 'User', id: string, email: string, displayName: string, firstName?: string | null, lastName?: 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 } } | null, settings: { __typename?: 'UserSettings', id: string, colorScheme: ColorScheme, locale: string } }, tokens: { __typename?: 'AuthTokenPair', accessToken: { __typename?: 'AuthToken', token: string, expiresAt: string }, refreshToken: { __typename?: 'AuthToken', token: string, expiresAt: string } } } };
+export type DeleteManyCompaniesMutation = { __typename?: 'Mutation', deleteManyCompany: { __typename?: 'AffectedRows', count: number } };
-export type GetClientConfigQueryVariables = Exact<{ [key: string]: never; }>;
+export type InsertOneCompanyMutationVariables = Exact<{
+ data: CompanyCreateInput;
+}>;
-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 InsertOneCompanyMutation = { __typename?: 'Mutation', createOneCompany: { __typename?: 'Company', address: string, createdAt: string, domainName: string, employees?: number | null, linkedinUrl?: string | null, id: string, name: string, accountOwner?: { __typename?: 'User', id: string, email: string, displayName: string, avatarUrl?: string | null } | null } };
+
+export type UpdateOneCompanyMutationVariables = Exact<{
+ where: CompanyWhereUniqueInput;
+ data: CompanyUpdateInput;
+}>;
+
+
+export type UpdateOneCompanyMutation = { __typename?: 'Mutation', updateOneCompany?: { __typename?: 'Company', address: string, createdAt: string, domainName: string, employees?: number | null, linkedinUrl?: string | null, id: string, name: string, accountOwner?: { __typename?: 'User', id: string, email: string, displayName: string, avatarUrl?: string | null } | null } | null };
export type GetCompaniesQueryVariables = Exact<{
orderBy?: InputMaybe<Array<CompanyOrderByWithRelationInput> | CompanyOrderByWithRelationInput>;
@@ -2794,55 +2820,70 @@ export type GetCompanyQueryVariables = Exact<{
export type GetCompanyQuery = { __typename?: 'Query', findUniqueCompany: { __typename?: 'Company', id: string, domainName: string, name: string, createdAt: string, address: string, linkedinUrl?: string | null, 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 CompanyFieldsFragmentFragment = { __typename?: 'Company', address: string, createdAt: string, domainName: string, employees?: number | null, linkedinUrl?: string | null, id: string, name: string, accountOwner?: { __typename?: 'User', id: string, email: string, displayName: string, avatarUrl?: string | null } | null };
-
-export type UpdateOneCompanyMutationVariables = Exact<{
- where: CompanyWhereUniqueInput;
- data: CompanyUpdateInput;
+export type DeleteFavoriteMutationVariables = Exact<{
+ where: FavoriteWhereInput;
}>;
-export type UpdateOneCompanyMutation = { __typename?: 'Mutation', updateOneCompany?: { __typename?: 'Company', address: string, createdAt: string, domainName: string, employees?: number | null, linkedinUrl?: string | null, id: string, name: string, accountOwner?: { __typename?: 'User', id: string, email: string, displayName: string, avatarUrl?: string | null } | null } | null };
+export type DeleteFavoriteMutation = { __typename?: 'Mutation', deleteFavorite: { __typename?: 'Favorite', id: string } };
-export type InsertOneCompanyMutationVariables = Exact<{
- data: CompanyCreateInput;
+export type InsertCompanyFavoriteMutationVariables = Exact<{
+ data: FavoriteMutationForCompanyArgs;
}>;
-export type InsertOneCompanyMutation = { __typename?: 'Mutation', createOneCompany: { __typename?: 'Company', address: string, createdAt: string, domainName: string, employees?: number | null, linkedinUrl?: string | null, id: string, name: string, accountOwner?: { __typename?: 'User', id: string, email: string, displayName: string, avatarUrl?: string | null } | null } };
+export type InsertCompanyFavoriteMutation = { __typename?: 'Mutation', createFavoriteForCompany: { __typename?: 'Favorite', id: string, company?: { __typename?: 'Company', id: string, name: string, domainName: string } | null } };
-export type DeleteManyCompaniesMutationVariables = Exact<{
- ids?: InputMaybe<Array<Scalars['String']> | Scalars['String']>;
+export type InsertPersonFavoriteMutationVariables = Exact<{
+ data: FavoriteMutationForPersonArgs;
}>;
-export type DeleteManyCompaniesMutation = { __typename?: 'Mutation', deleteManyCompany: { __typename?: 'AffectedRows', count: number } };
+export type InsertPersonFavoriteMutation = { __typename?: 'Mutation', createFavoriteForPerson: { __typename?: 'Favorite', id: string, person?: { __typename?: 'Person', id: string, firstName?: string | null, lastName?: string | null, displayName: string } | null } };
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 InsertPersonFavoriteMutationVariables = Exact<{
- data: FavoriteMutationForPersonArgs;
+export type InsertPersonFragmentFragment = { __typename?: 'Person', id: string, firstName?: string | null, lastName?: string | null, displayName: string, createdAt: string };
+
+export type DeleteManyPersonMutationVariables = Exact<{
+ ids?: InputMaybe<Array<Scalars['String']> | Scalars['String']>;
}>;
-export type InsertPersonFavoriteMutation = { __typename?: 'Mutation', createFavoriteForPerson: { __typename?: 'Favorite', id: string, person?: { __typename?: 'Person', id: string, firstName?: string | null, lastName?: string | null, displayName: string } | null } };
+export type DeleteManyPersonMutation = { __typename?: 'Mutation', deleteManyPerson: { __typename?: 'AffectedRows', count: number } };
-export type InsertCompanyFavoriteMutationVariables = Exact<{
- data: FavoriteMutationForCompanyArgs;
+export type InsertOnePersonMutationVariables = Exact<{
+ data: PersonCreateInput;
}>;
-export type InsertCompanyFavoriteMutation = { __typename?: 'Mutation', createFavoriteForCompany: { __typename?: 'Favorite', id: string, company?: { __typename?: 'Company', id: string, name: string, domainName: string } | null } };
+export type InsertOnePersonMutation = { __typename?: 'Mutation', createOnePerson: { __typename?: 'Person', id: string, firstName?: string | null, lastName?: string | null, displayName: string, createdAt: string } };
-export type DeleteFavoriteMutationVariables = Exact<{
- where: FavoriteWhereInput;
+export type RemovePersonPictureMutationVariables = Exact<{
+ where: PersonWhereUniqueInput;
}>;
-export type DeleteFavoriteMutation = { __typename?: 'Mutation', deleteFavorite: { __typename?: 'Favorite', id: string } };
+export type RemovePersonPictureMutation = { __typename?: 'Mutation', updateOnePerson?: { __typename?: 'Person', id: string, avatarUrl?: string | null } | null };
+
+export type UpdateOnePersonMutationVariables = Exact<{
+ where: PersonWhereUniqueInput;
+ data: PersonUpdateInput;
+}>;
+
+
+export type UpdateOnePersonMutation = { __typename?: 'Mutation', updateOnePerson?: { __typename?: 'Person', id: string, city?: 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 UploadPersonPictureMutationVariables = Exact<{
+ id: Scalars['String'];
+ file: Scalars['Upload'];
+}>;
+
+
+export type UploadPersonPictureMutation = { __typename?: 'Mutation', uploadPersonPicture: string };
export type GetPeopleQueryVariables = Exact<{
orderBy?: InputMaybe<Array<PersonOrderByWithRelationInput> | PersonOrderByWithRelationInput>;
@@ -2853,26 +2894,26 @@ 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 GetPersonPhoneByIdQueryVariables = Exact<{
+export type GetPersonQueryVariables = Exact<{
id: Scalars['String'];
}>;
-export type GetPersonPhoneByIdQuery = { __typename?: 'Query', person: { __typename?: 'Person', id: string, phone?: string | null } };
+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 GetPersonEmailByIdQueryVariables = Exact<{
+export type GetPersonCityByIdQueryVariables = Exact<{
id: Scalars['String'];
}>;
-export type GetPersonEmailByIdQuery = { __typename?: 'Query', person: { __typename?: 'Person', id: string, email?: string | null } };
+export type GetPersonCityByIdQuery = { __typename?: 'Query', person: { __typename?: 'Person', id: string, city?: string | null } };
-export type GetPersonNamesAndCommentCountByIdQueryVariables = Exact<{
+export type GetPersonCommentCountByIdQueryVariables = Exact<{
id: Scalars['String'];
}>;
-export type GetPersonNamesAndCommentCountByIdQuery = { __typename?: 'Query', person: { __typename?: 'Person', id: string, firstName?: string | null, lastName?: string | null, displayName: string, _activityCount: number } };
+export type GetPersonCommentCountByIdQuery = { __typename?: 'Query', person: { __typename?: 'Person', id: string, _activityCount: number } };
export type GetPersonCompanyByIdQueryVariables = Exact<{
id: Scalars['String'];
@@ -2881,13 +2922,6 @@ export type GetPersonCompanyByIdQueryVariables = Exact<{
export type GetPersonCompanyByIdQuery = { __typename?: 'Query', person: { __typename?: 'Person', id: string, company?: { __typename?: 'Company', id: string, name: string, domainName: string } | null } };
-export type GetPersonCommentCountByIdQueryVariables = Exact<{
- id: Scalars['String'];
-}>;
-
-
-export type GetPersonCommentCountByIdQuery = { __typename?: 'Query', person: { __typename?: 'Person', id: string, _activityCount: number } };
-
export type GetPersonCreatedAtByIdQueryVariables = Exact<{
id: Scalars['String'];
}>;
@@ -2895,65 +2929,67 @@ export type GetPersonCreatedAtByIdQueryVariables = Exact<{
export type GetPersonCreatedAtByIdQuery = { __typename?: 'Query', person: { __typename?: 'Person', id: string, createdAt: string } };
-export type GetPersonCityByIdQueryVariables = Exact<{
+export type GetPersonEmailByIdQueryVariables = Exact<{
id: Scalars['String'];
}>;
-export type GetPersonCityByIdQuery = { __typename?: 'Query', person: { __typename?: 'Person', id: string, city?: string | null } };
+export type GetPersonEmailByIdQuery = { __typename?: 'Query', person: { __typename?: 'Person', id: string, email?: string | null } };
-export type GetPersonQueryVariables = Exact<{
+export type GetPersonNamesAndCommentCountByIdQueryVariables = 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 GetPersonNamesAndCommentCountByIdQuery = { __typename?: 'Query', person: { __typename?: 'Person', id: string, firstName?: string | null, lastName?: string | null, displayName: string, _activityCount: number } };
-export type UpdateOnePersonMutationVariables = Exact<{
- where: PersonWhereUniqueInput;
- data: PersonUpdateInput;
+export type GetPersonPhoneByIdQueryVariables = Exact<{
+ id: Scalars['String'];
}>;
-export type UpdateOnePersonMutation = { __typename?: 'Mutation', updateOnePerson?: { __typename?: 'Person', id: string, city?: 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 InsertPersonFragmentFragment = { __typename?: 'Person', id: string, firstName?: string | null, lastName?: string | null, displayName: string, createdAt: string };
+export type GetPersonPhoneByIdQuery = { __typename?: 'Query', person: { __typename?: 'Person', id: string, phone?: string | null } };
-export type InsertOnePersonMutationVariables = Exact<{
- data: PersonCreateInput;
+export type CreateOneCompanyPipelineProgressMutationVariables = Exact<{
+ uuid: Scalars['String'];
+ companyId: Scalars['String'];
+ pipelineId: Scalars['String'];
+ pipelineStageId: Scalars['String'];
}>;
-export type InsertOnePersonMutation = { __typename?: 'Mutation', createOnePerson: { __typename?: 'Person', id: string, firstName?: string | null, lastName?: string | null, displayName: string, createdAt: string } };
+export type CreateOneCompanyPipelineProgressMutation = { __typename?: 'Mutation', createOnePipelineProgress: { __typename?: 'PipelineProgress', id: string } };
-export type DeleteManyPersonMutationVariables = Exact<{
+export type DeleteManyPipelineProgressMutationVariables = Exact<{
ids?: InputMaybe<Array<Scalars['String']> | Scalars['String']>;
}>;
-export type DeleteManyPersonMutation = { __typename?: 'Mutation', deleteManyPerson: { __typename?: 'AffectedRows', count: number } };
+export type DeleteManyPipelineProgressMutation = { __typename?: 'Mutation', deleteManyPipelineProgress: { __typename?: 'AffectedRows', count: number } };
-export type UploadPersonPictureMutationVariables = Exact<{
- id: Scalars['String'];
- file: Scalars['Upload'];
+export type UpdateOnePipelineProgressMutationVariables = Exact<{
+ data: PipelineProgressUpdateInput;
+ where: PipelineProgressWhereUniqueInput;
}>;
-export type UploadPersonPictureMutation = { __typename?: 'Mutation', uploadPersonPicture: string };
+export type UpdateOnePipelineProgressMutation = { __typename?: 'Mutation', updateOnePipelineProgress?: { __typename?: 'PipelineProgress', id: string, amount?: number | null, closeDate?: string | null, probability?: number | null, pointOfContact?: { __typename?: 'Person', id: string } | null } | null };
-export type RemovePersonPictureMutationVariables = Exact<{
- where: PersonWhereUniqueInput;
+export type UpdateOnePipelineProgressStageMutationVariables = Exact<{
+ id?: InputMaybe<Scalars['String']>;
+ pipelineStageId?: InputMaybe<Scalars['String']>;
}>;
-export type RemovePersonPictureMutation = { __typename?: 'Mutation', updateOnePerson?: { __typename?: 'Person', id: string, avatarUrl?: string | null } | null };
+export type UpdateOnePipelineProgressStageMutation = { __typename?: 'Mutation', updateOnePipelineProgress?: { __typename?: 'PipelineProgress', id: string } | null };
-export type GetPipelinesQueryVariables = Exact<{
- where?: InputMaybe<PipelineWhereInput>;
+export type UpdatePipelineStageMutationVariables = Exact<{
+ id?: InputMaybe<Scalars['String']>;
+ data: PipelineStageUpdateInput;
}>;
-export type GetPipelinesQuery = { __typename?: 'Query', findManyPipeline: Array<{ __typename?: 'Pipeline', id: string, name: string, pipelineProgressableType: PipelineProgressableType, pipelineStages?: Array<{ __typename?: 'PipelineStage', id: string, name: string, color: string, index?: number | null }> | null }> };
+export type UpdatePipelineStageMutation = { __typename?: 'Mutation', updateOnePipelineStage?: { __typename?: 'PipelineStage', id: string, name: string, color: string } | null };
export type GetPipelineProgressQueryVariables = Exact<{
where?: InputMaybe<PipelineProgressWhereInput>;
@@ -2963,46 +2999,30 @@ export type GetPipelineProgressQueryVariables = Exact<{
export type GetPipelineProgressQuery = { __typename?: 'Query', findManyPipelineProgress: Array<{ __typename?: 'PipelineProgress', id: string, pipelineStageId: string, companyId?: string | null, personId?: string | null, amount?: number | null, closeDate?: string | null, pointOfContactId?: string | null, probability?: number | null, pointOfContact?: { __typename?: 'Person', id: string, firstName?: string | null, lastName?: string | null, displayName: string, avatarUrl?: string | null } | null }> };
-export type DeleteManyPipelineProgressMutationVariables = Exact<{
- ids?: InputMaybe<Array<Scalars['String']> | Scalars['String']>;
-}>;
-
-
-export type DeleteManyPipelineProgressMutation = { __typename?: 'Mutation', deleteManyPipelineProgress: { __typename?: 'AffectedRows', count: number } };
-
-export type UpdatePipelineStageMutationVariables = Exact<{
- id?: InputMaybe<Scalars['String']>;
- data: PipelineStageUpdateInput;
-}>;
-
-
-export type UpdatePipelineStageMutation = { __typename?: 'Mutation', updateOnePipelineStage?: { __typename?: 'PipelineStage', id: string, name: string, color: string } | null };
-
-export type UpdateOnePipelineProgressMutationVariables = Exact<{
- data: PipelineProgressUpdateInput;
- where: PipelineProgressWhereUniqueInput;
+export type GetPipelinesQueryVariables = Exact<{
+ where?: InputMaybe<PipelineWhereInput>;
}>;
-export type UpdateOnePipelineProgressMutation = { __typename?: 'Mutation', updateOnePipelineProgress?: { __typename?: 'PipelineProgress', id: string, amount?: number | null, closeDate?: string | null, probability?: number | null, pointOfContact?: { __typename?: 'Person', id: string } | null } | null };
+export type GetPipelinesQuery = { __typename?: 'Query', findManyPipeline: Array<{ __typename?: 'Pipeline', id: string, name: string, pipelineProgressableType: PipelineProgressableType, pipelineStages?: Array<{ __typename?: 'PipelineStage', id: string, name: string, color: string, index?: number | null }> | null }> };
-export type UpdateOnePipelineProgressStageMutationVariables = Exact<{
- id?: InputMaybe<Scalars['String']>;
- pipelineStageId?: InputMaybe<Scalars['String']>;
+export type SearchActivityQueryVariables = Exact<{
+ where?: InputMaybe<ActivityWhereInput>;
+ limit?: InputMaybe<Scalars['Int']>;
+ orderBy?: InputMaybe<Array<ActivityOrderByWithRelationInput> | ActivityOrderByWithRelationInput>;
}>;
-export type UpdateOnePipelineProgressStageMutation = { __typename?: 'Mutation', updateOnePipelineProgress?: { __typename?: 'PipelineProgress', id: string } | null };
+export type SearchActivityQuery = { __typename?: 'Query', searchResults: Array<{ __typename?: 'Activity', id: string, title?: string | null, body?: string | null }> };
-export type CreateOneCompanyPipelineProgressMutationVariables = Exact<{
- uuid: Scalars['String'];
- companyId: Scalars['String'];
- pipelineId: Scalars['String'];
- pipelineStageId: Scalars['String'];
+export type SearchCompanyQueryVariables = Exact<{
+ where?: InputMaybe<CompanyWhereInput>;
+ limit?: InputMaybe<Scalars['Int']>;
+ orderBy?: InputMaybe<Array<CompanyOrderByWithRelationInput> | CompanyOrderByWithRelationInput>;
}>;
-export type CreateOneCompanyPipelineProgressMutation = { __typename?: 'Mutation', createOnePipelineProgress: { __typename?: 'PipelineProgress', id: string } };
+export type SearchCompanyQuery = { __typename?: 'Query', searchResults: Array<{ __typename?: 'Company', address: string, createdAt: string, domainName: string, employees?: number | null, linkedinUrl?: string | null, id: string, name: string, accountOwner?: { __typename?: 'User', id: string, email: string, displayName: string, avatarUrl?: string | null } | null }> };
export type SearchPeopleQueryVariables = Exact<{
where?: InputMaybe<PersonWhereInput>;
@@ -3022,46 +3042,17 @@ 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 EmptyQueryQueryVariables = Exact<{ [key: string]: never; }>;
-
-
-export type EmptyQueryQuery = { __typename?: 'Query', searchResults: Array<{ __typename?: 'User', id: string }> };
-
-export type SearchCompanyQueryVariables = Exact<{
- where?: InputMaybe<CompanyWhereInput>;
- limit?: InputMaybe<Scalars['Int']>;
- orderBy?: InputMaybe<Array<CompanyOrderByWithRelationInput> | CompanyOrderByWithRelationInput>;
-}>;
-
-
-export type SearchCompanyQuery = { __typename?: 'Query', searchResults: Array<{ __typename?: 'Company', address: string, createdAt: string, domainName: string, employees?: number | null, linkedinUrl?: string | null, id: string, name: string, accountOwner?: { __typename?: 'User', id: string, email: string, displayName: string, avatarUrl?: string | null } | null }> };
-
-export type SearchActivityQueryVariables = Exact<{
- where?: InputMaybe<ActivityWhereInput>;
- limit?: InputMaybe<Scalars['Int']>;
- orderBy?: InputMaybe<Array<ActivityOrderByWithRelationInput> | ActivityOrderByWithRelationInput>;
-}>;
-
-
-export type SearchActivityQuery = { __typename?: 'Query', searchResults: Array<{ __typename?: 'Activity', id: string, title?: string | null, body?: string | null }> };
-
-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, 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 } } | null, settings: { __typename?: 'UserSettings', id: string, locale: string, colorScheme: ColorScheme } } };
-
-export type GetUsersQueryVariables = Exact<{ [key: string]: never; }>;
+export type DeleteUserAccountMutationVariables = Exact<{ [key: string]: never; }>;
-export type GetUsersQuery = { __typename?: 'Query', findManyUser: Array<{ __typename?: 'User', id: string, email: string, displayName: string, firstName?: string | null, lastName?: string | null }> };
+export type DeleteUserAccountMutation = { __typename?: 'Mutation', deleteUserAccount: { __typename?: 'User', id: string } };
-export type UpdateUserMutationVariables = Exact<{
- data: UserUpdateInput;
+export type RemoveProfilePictureMutationVariables = Exact<{
where: UserWhereUniqueInput;
}>;
-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 RemoveProfilePictureMutation = { __typename?: 'Mutation', updateUser: { __typename?: 'User', id: string, avatarUrl?: string | null } };
export type UpdateAllowImpersonationMutationVariables = Exact<{
allowImpersonation: Scalars['Boolean'];
@@ -3077,17 +3068,23 @@ export type UploadProfilePictureMutationVariables = Exact<{
export type UploadProfilePictureMutation = { __typename?: 'Mutation', uploadProfilePicture: string };
-export type RemoveProfilePictureMutationVariables = Exact<{
+export type UpdateUserMutationVariables = Exact<{
+ data: UserUpdateInput;
where: UserWhereUniqueInput;
}>;
-export type RemoveProfilePictureMutation = { __typename?: 'Mutation', updateUser: { __typename?: 'User', id: string, 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 DeleteUserAccountMutationVariables = Exact<{ [key: string]: never; }>;
+export type GetCurrentUserQueryVariables = Exact<{ [key: string]: never; }>;
-export type DeleteUserAccountMutation = { __typename?: 'Mutation', deleteUserAccount: { __typename?: 'User', id: string } };
+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 } } | null, settings: { __typename?: 'UserSettings', id: string, locale: string, colorScheme: ColorScheme } } };
+
+export type GetUsersQueryVariables = Exact<{ [key: string]: never; }>;
+
+
+export type GetUsersQuery = { __typename?: 'Query', findManyUser: Array<{ __typename?: 'User', id: string, email: string, displayName: string, firstName?: string | null, lastName?: string | null }> };
export type CreateViewFieldsMutationVariables = Exact<{
data: Array<ViewFieldCreateManyInput> | ViewFieldCreateManyInput;
@@ -3110,6 +3107,22 @@ export type DeleteViewSortsMutationVariables = Exact<{
export type DeleteViewSortsMutation = { __typename?: 'Mutation', deleteManyViewSort: { __typename?: 'AffectedRows', count: number } };
+export type UpdateViewFieldMutationVariables = Exact<{
+ data: ViewFieldUpdateInput;
+ where: ViewFieldWhereUniqueInput;
+}>;
+
+
+export type UpdateViewFieldMutation = { __typename?: 'Mutation', updateOneViewField: { __typename?: 'ViewField', id: string, fieldName: string, isVisible: boolean, sizeInPx: number, index: number } };
+
+export type UpdateViewSortMutationVariables = Exact<{
+ data: ViewSortUpdateInput;
+ where: ViewSortWhereUniqueInput;
+}>;
+
+
+export type UpdateViewSortMutation = { __typename?: 'Mutation', viewSort: { __typename?: 'ViewSort', direction: ViewSortDirection, key: string, name: string } };
+
export type GetViewFieldsQueryVariables = Exact<{
where?: InputMaybe<ViewFieldWhereInput>;
orderBy?: InputMaybe<Array<ViewFieldOrderByWithRelationInput> | ViewFieldOrderByWithRelationInput>;
@@ -3125,33 +3138,22 @@ export type GetViewSortsQueryVariables = Exact<{
export type GetViewSortsQuery = { __typename?: 'Query', viewSorts: Array<{ __typename?: 'ViewSort', direction: ViewSortDirection, key: string, name: string }> };
-export type UpdateViewFieldMutationVariables = Exact<{
- data: ViewFieldUpdateInput;
- where: ViewFieldWhereUniqueInput;
-}>;
-
-
-export type UpdateViewFieldMutation = { __typename?: 'Mutation', updateOneViewField: { __typename?: 'ViewField', id: string, fieldName: string, isVisible: boolean, sizeInPx: number, index: number } };
-
-export type UpdateViewSortMutationVariables = Exact<{
- data: ViewSortUpdateInput;
- where: ViewSortWhereUniqueInput;
-}>;
+export type DeleteCurrentWorkspaceMutationVariables = Exact<{ [key: string]: never; }>;
-export type UpdateViewSortMutation = { __typename?: 'Mutation', viewSort: { __typename?: 'ViewSort', direction: ViewSortDirection, key: string, name: string } };
+export type DeleteCurrentWorkspaceMutation = { __typename?: 'Mutation', deleteCurrentWorkspace: { __typename?: 'Workspace', id: string } };
-export type GetWorkspaceMembersQueryVariables = Exact<{ [key: string]: never; }>;
+export type RemoveWorkspaceLogoMutationVariables = Exact<{ [key: string]: never; }>;
-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 RemoveWorkspaceLogoMutation = { __typename?: 'Mutation', updateWorkspace: { __typename?: 'Workspace', id: string } };
-export type GetWorkspaceFromInviteHashQueryVariables = Exact<{
- inviteHash: Scalars['String'];
+export type RemoveWorkspaceMemberMutationVariables = Exact<{
+ where: WorkspaceMemberWhereUniqueInput;
}>;
-export type GetWorkspaceFromInviteHashQuery = { __typename?: 'Query', findWorkspaceFromInviteHash: { __typename?: 'Workspace', id: string, displayName?: string | null, logo?: string | null } };
+export type RemoveWorkspaceMemberMutation = { __typename?: 'Mutation', deleteWorkspaceMember: { __typename?: 'WorkspaceMember', id: string } };
export type UpdateWorkspaceMutationVariables = Exact<{
data: WorkspaceUpdateInput;
@@ -3167,22 +3169,17 @@ export type UploadWorkspaceLogoMutationVariables = Exact<{
export type UploadWorkspaceLogoMutation = { __typename?: 'Mutation', uploadWorkspaceLogo: string };
-export type RemoveWorkspaceLogoMutationVariables = Exact<{ [key: string]: never; }>;
-
-
-export type RemoveWorkspaceLogoMutation = { __typename?: 'Mutation', updateWorkspace: { __typename?: 'Workspace', id: string } };
-
-export type RemoveWorkspaceMemberMutationVariables = Exact<{
- where: WorkspaceMemberWhereUniqueInput;
+export type GetWorkspaceFromInviteHashQueryVariables = Exact<{
+ inviteHash: Scalars['String'];
}>;
-export type RemoveWorkspaceMemberMutation = { __typename?: 'Mutation', deleteWorkspaceMember: { __typename?: 'WorkspaceMember', id: string } };
+export type GetWorkspaceFromInviteHashQuery = { __typename?: 'Query', findWorkspaceFromInviteHash: { __typename?: 'Workspace', id: string, displayName?: string | null, logo?: string | null } };
-export type DeleteCurrentWorkspaceMutationVariables = Exact<{ [key: string]: never; }>;
+export type GetWorkspaceMembersQueryVariables = Exact<{ [key: string]: never; }>;
-export type DeleteCurrentWorkspaceMutation = { __typename?: 'Mutation', deleteCurrentWorkspace: { __typename?: 'Workspace', id: string } };
+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 const ActivityQueryFragmentFragmentDoc = gql`
fragment ActivityQueryFragment on Activity {
@@ -3252,6 +3249,33 @@ export const ActivityUpdatePartsFragmentDoc = gql`
}
}
`;
+export const UserQueryFragmentFragmentDoc = gql`
+ fragment UserQueryFragment on User {
+ id
+ email
+ displayName
+ firstName
+ lastName
+ canImpersonate
+ supportUserHash
+ workspaceMember {
+ id
+ allowImpersonation
+ workspace {
+ id
+ domainName
+ displayName
+ logo
+ inviteHash
+ }
+ }
+ settings {
+ id
+ colorScheme
+ locale
+ }
+}
+ `;
export const CompanyFieldsFragmentFragmentDoc = gql`
fragment CompanyFieldsFragment on Company {
accountOwner {
@@ -3278,55 +3302,52 @@ export const InsertPersonFragmentFragmentDoc = gql`
createdAt
}
`;
-export const CreateCommentDocument = gql`
- mutation CreateComment($commentId: String!, $commentText: String!, $authorId: String!, $activityId: String!, $createdAt: DateTime!) {
- createOneComment(
- data: {id: $commentId, createdAt: $createdAt, body: $commentText, author: {connect: {id: $authorId}}, activity: {connect: {id: $activityId}}}
+export const AddActivityTargetsOnActivityDocument = gql`
+ mutation AddActivityTargetsOnActivity($activityId: String!, $activityTargetInputs: [ActivityTargetCreateManyActivityInput!]!) {
+ updateOneActivity(
+ where: {id: $activityId}
+ data: {activityTargets: {createMany: {data: $activityTargetInputs}}}
) {
id
createdAt
- body
- author {
+ updatedAt
+ activityTargets {
id
- displayName
- firstName
- lastName
- avatarUrl
+ createdAt
+ updatedAt
+ companyId
+ personId
}
- activityId
}
}
`;
-export type CreateCommentMutationFn = Apollo.MutationFunction<CreateCommentMutation, CreateCommentMutationVariables>;
+export type AddActivityTargetsOnActivityMutationFn = Apollo.MutationFunction<AddActivityTargetsOnActivityMutation, AddActivityTargetsOnActivityMutationVariables>;
/**
- * __useCreateCommentMutation__
+ * __useAddActivityTargetsOnActivityMutation__
*
- * To run a mutation, you first call `useCreateCommentMutation` within a React component and pass it any options that fit your needs.
- * When your component renders, `useCreateCommentMutation` returns a tuple that includes:
+ * To run a mutation, you first call `useAddActivityTargetsOnActivityMutation` within a React component and pass it any options that fit your needs.
+ * When your component renders, `useAddActivityTargetsOnActivityMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
- * const [createCommentMutation, { data, loading, error }] = useCreateCommentMutation({
+ * const [addActivityTargetsOnActivityMutation, { data, loading, error }] = useAddActivityTargetsOnActivityMutation({
* variables: {
- * commentId: // value for 'commentId'
- * commentText: // value for 'commentText'
- * authorId: // value for 'authorId'
* activityId: // value for 'activityId'
- * createdAt: // value for 'createdAt'
+ * activityTargetInputs: // value for 'activityTargetInputs'
* },
* });
*/
-export function useCreateCommentMutation(baseOptions?: Apollo.MutationHookOptions<CreateCommentMutation, CreateCommentMutationVariables>) {
+export function useAddActivityTargetsOnActivityMutation(baseOptions?: Apollo.MutationHookOptions<AddActivityTargetsOnActivityMutation, AddActivityTargetsOnActivityMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
- return Apollo.useMutation<CreateCommentMutation, CreateCommentMutationVariables>(CreateCommentDocument, options);
+ return Apollo.useMutation<AddActivityTargetsOnActivityMutation, AddActivityTargetsOnActivityMutationVariables>(AddActivityTargetsOnActivityDocument, options);
}
-export type CreateCommentMutationHookResult = ReturnType<typeof useCreateCommentMutation>;
-export type CreateCommentMutationResult = Apollo.MutationResult<CreateCommentMutation>;
-export type CreateCommentMutationOptions = Apollo.BaseMutationOptions<CreateCommentMutation, CreateCommentMutationVariables>;
+export type AddActivityTargetsOnActivityMutationHookResult = ReturnType<typeof useAddActivityTargetsOnActivityMutation>;
+export type AddActivityTargetsOnActivityMutationResult = Apollo.MutationResult<AddActivityTargetsOnActivityMutation>;
+export type AddActivityTargetsOnActivityMutationOptions = Apollo.BaseMutationOptions<AddActivityTargetsOnActivityMutation, AddActivityTargetsOnActivityMutationVariables>;
export const CreateActivityDocument = gql`
mutation CreateActivity($data: ActivityCreateInput!) {
createOneActivity(data: $data) {
@@ -3381,162 +3402,88 @@ export function useCreateActivityMutation(baseOptions?: Apollo.MutationHookOptio
export type CreateActivityMutationHookResult = ReturnType<typeof useCreateActivityMutation>;
export type CreateActivityMutationResult = Apollo.MutationResult<CreateActivityMutation>;
export type CreateActivityMutationOptions = Apollo.BaseMutationOptions<CreateActivityMutation, CreateActivityMutationVariables>;
-export const GetActivitiesByTargetsDocument = gql`
- query GetActivitiesByTargets($activityTargetIds: [String!]!, $orderBy: [ActivityOrderByWithRelationInput!]) {
- findManyActivities(
- orderBy: $orderBy
- where: {activityTargets: {some: {OR: [{personId: {in: $activityTargetIds}}, {companyId: {in: $activityTargetIds}}]}}}
+export const CreateCommentDocument = gql`
+ mutation CreateComment($commentId: String!, $commentText: String!, $authorId: String!, $activityId: String!, $createdAt: DateTime!) {
+ createOneComment(
+ data: {id: $commentId, createdAt: $createdAt, body: $commentText, author: {connect: {id: $authorId}}, activity: {connect: {id: $activityId}}}
) {
- ...ActivityQueryFragment
+ id
+ createdAt
+ body
+ author {
+ id
+ displayName
+ firstName
+ lastName
+ avatarUrl
+ }
+ activityId
}
}
- ${ActivityQueryFragmentFragmentDoc}`;
+ `;
+export type CreateCommentMutationFn = Apollo.MutationFunction<CreateCommentMutation, CreateCommentMutationVariables>;
/**
- * __useGetActivitiesByTargetsQuery__
+ * __useCreateCommentMutation__
*
- * To run a query within a React component, call `useGetActivitiesByTargetsQuery` and pass it any options that fit your needs.
- * When your component renders, `useGetActivitiesByTargetsQuery` returns an object from Apollo Client that contains loading, error, and data properties
- * you can use to render your UI.
+ * To run a mutation, you first call `useCreateCommentMutation` within a React component and pass it any options that fit your needs.
+ * When your component renders, `useCreateCommentMutation` returns a tuple that includes:
+ * - A mutate function that you can call at any time to execute the mutation
+ * - An object with fields that represent the current status of the mutation's execution
*
- * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
+ * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
- * const { data, loading, error } = useGetActivitiesByTargetsQuery({
+ * const [createCommentMutation, { data, loading, error }] = useCreateCommentMutation({
* variables: {
- * activityTargetIds: // value for 'activityTargetIds'
- * orderBy: // value for 'orderBy'
+ * commentId: // value for 'commentId'
+ * commentText: // value for 'commentText'
+ * authorId: // value for 'authorId'
+ * activityId: // value for 'activityId'
+ * createdAt: // value for 'createdAt'
* },
* });
*/
-export function useGetActivitiesByTargetsQuery(baseOptions: Apollo.QueryHookOptions<GetActivitiesByTargetsQuery, GetActivitiesByTargetsQueryVariables>) {
+export function useCreateCommentMutation(baseOptions?: Apollo.MutationHookOptions<CreateCommentMutation, CreateCommentMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
- return Apollo.useQuery<GetActivitiesByTargetsQuery, GetActivitiesByTargetsQueryVariables>(GetActivitiesByTargetsDocument, options);
+ return Apollo.useMutation<CreateCommentMutation, CreateCommentMutationVariables>(CreateCommentDocument, options);
}
-export function useGetActivitiesByTargetsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetActivitiesByTargetsQuery, GetActivitiesByTargetsQueryVariables>) {
- const options = {...defaultOptions, ...baseOptions}
- return Apollo.useLazyQuery<GetActivitiesByTargetsQuery, GetActivitiesByTargetsQueryVariables>(GetActivitiesByTargetsDocument, options);
- }
-export type GetActivitiesByTargetsQueryHookResult = ReturnType<typeof useGetActivitiesByTargetsQuery>;
-export type GetActivitiesByTargetsLazyQueryHookResult = ReturnType<typeof useGetActivitiesByTargetsLazyQuery>;
-export type GetActivitiesByTargetsQueryResult = Apollo.QueryResult<GetActivitiesByTargetsQuery, GetActivitiesByTargetsQueryVariables>;
-export const GetActivitiesDocument = gql`
- query GetActivities($where: ActivityWhereInput!, $orderBy: [ActivityOrderByWithRelationInput!]) {
- findManyActivities(orderBy: $orderBy, where: $where) {
- ...ActivityQueryFragment
- }
-}
- ${ActivityQueryFragmentFragmentDoc}`;
-
-/**
- * __useGetActivitiesQuery__
- *
- * To run a query within a React component, call `useGetActivitiesQuery` and pass it any options that fit your needs.
- * When your component renders, `useGetActivitiesQuery` returns an object from Apollo Client that contains loading, error, and data properties
- * you can use to render your UI.
- *
- * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
- *
- * @example
- * const { data, loading, error } = useGetActivitiesQuery({
- * variables: {
- * where: // value for 'where'
- * orderBy: // value for 'orderBy'
- * },
- * });
- */
-export function useGetActivitiesQuery(baseOptions: Apollo.QueryHookOptions<GetActivitiesQuery, GetActivitiesQueryVariables>) {
- const options = {...defaultOptions, ...baseOptions}
- return Apollo.useQuery<GetActivitiesQuery, GetActivitiesQueryVariables>(GetActivitiesDocument, options);
- }
-export function useGetActivitiesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetActivitiesQuery, GetActivitiesQueryVariables>) {
- const options = {...defaultOptions, ...baseOptions}
- return Apollo.useLazyQuery<GetActivitiesQuery, GetActivitiesQueryVariables>(GetActivitiesDocument, options);
- }
-export type GetActivitiesQueryHookResult = ReturnType<typeof useGetActivitiesQuery>;
-export type GetActivitiesLazyQueryHookResult = ReturnType<typeof useGetActivitiesLazyQuery>;
-export type GetActivitiesQueryResult = Apollo.QueryResult<GetActivitiesQuery, GetActivitiesQueryVariables>;
-export const GetActivityDocument = gql`
- query GetActivity($activityId: String!) {
- findManyActivities(where: {id: {equals: $activityId}}) {
- ...ActivityQueryFragment
- }
-}
- ${ActivityQueryFragmentFragmentDoc}`;
-
-/**
- * __useGetActivityQuery__
- *
- * To run a query within a React component, call `useGetActivityQuery` and pass it any options that fit your needs.
- * When your component renders, `useGetActivityQuery` returns an object from Apollo Client that contains loading, error, and data properties
- * you can use to render your UI.
- *
- * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
- *
- * @example
- * const { data, loading, error } = useGetActivityQuery({
- * variables: {
- * activityId: // value for 'activityId'
- * },
- * });
- */
-export function useGetActivityQuery(baseOptions: Apollo.QueryHookOptions<GetActivityQuery, GetActivityQueryVariables>) {
- const options = {...defaultOptions, ...baseOptions}
- return Apollo.useQuery<GetActivityQuery, GetActivityQueryVariables>(GetActivityDocument, options);
- }
-export function useGetActivityLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetActivityQuery, GetActivityQueryVariables>) {
- const options = {...defaultOptions, ...baseOptions}
- return Apollo.useLazyQuery<GetActivityQuery, GetActivityQueryVariables>(GetActivityDocument, options);
- }
-export type GetActivityQueryHookResult = ReturnType<typeof useGetActivityQuery>;
-export type GetActivityLazyQueryHookResult = ReturnType<typeof useGetActivityLazyQuery>;
-export type GetActivityQueryResult = Apollo.QueryResult<GetActivityQuery, GetActivityQueryVariables>;
-export const AddActivityTargetsOnActivityDocument = gql`
- mutation AddActivityTargetsOnActivity($activityId: String!, $activityTargetInputs: [ActivityTargetCreateManyActivityInput!]!) {
- updateOneActivity(
- where: {id: $activityId}
- data: {activityTargets: {createMany: {data: $activityTargetInputs}}}
- ) {
- id
- createdAt
- updatedAt
- activityTargets {
- id
- createdAt
- updatedAt
- companyId
- personId
- }
+export type CreateCommentMutationHookResult = ReturnType<typeof useCreateCommentMutation>;
+export type CreateCommentMutationResult = Apollo.MutationResult<CreateCommentMutation>;
+export type CreateCommentMutationOptions = Apollo.BaseMutationOptions<CreateCommentMutation, CreateCommentMutationVariables>;
+export const DeleteActivityDocument = gql`
+ mutation DeleteActivity($activityId: String!) {
+ deleteManyActivities(where: {id: {equals: $activityId}}) {
+ count
}
}
`;
-export type AddActivityTargetsOnActivityMutationFn = Apollo.MutationFunction<AddActivityTargetsOnActivityMutation, AddActivityTargetsOnActivityMutationVariables>;
+export type DeleteActivityMutationFn = Apollo.MutationFunction<DeleteActivityMutation, DeleteActivityMutationVariables>;
/**
- * __useAddActivityTargetsOnActivityMutation__
+ * __useDeleteActivityMutation__
*
- * To run a mutation, you first call `useAddActivityTargetsOnActivityMutation` within a React component and pass it any options that fit your needs.
- * When your component renders, `useAddActivityTargetsOnActivityMutation` returns a tuple that includes:
+ * To run a mutation, you first call `useDeleteActivityMutation` within a React component and pass it any options that fit your needs.
+ * When your component renders, `useDeleteActivityMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
- * const [addActivityTargetsOnActivityMutation, { data, loading, error }] = useAddActivityTargetsOnActivityMutation({
+ * const [deleteActivityMutation, { data, loading, error }] = useDeleteActivityMutation({
* variables: {
* activityId: // value for 'activityId'
- * activityTargetInputs: // value for 'activityTargetInputs'
* },
* });
*/
-export function useAddActivityTargetsOnActivityMutation(baseOptions?: Apollo.MutationHookOptions<AddActivityTargetsOnActivityMutation, AddActivityTargetsOnActivityMutationVariables>) {
+export function useDeleteActivityMutation(baseOptions?: Apollo.MutationHookOptions<DeleteActivityMutation, DeleteActivityMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
- return Apollo.useMutation<AddActivityTargetsOnActivityMutation, AddActivityTargetsOnActivityMutationVariables>(AddActivityTargetsOnActivityDocument, options);
+ return Apollo.useMutation<DeleteActivityMutation, DeleteActivityMutationVariables>(DeleteActivityDocument, options);
}
-export type AddActivityTargetsOnActivityMutationHookResult = ReturnType<typeof useAddActivityTargetsOnActivityMutation>;
-export type AddActivityTargetsOnActivityMutationResult = Apollo.MutationResult<AddActivityTargetsOnActivityMutation>;
-export type AddActivityTargetsOnActivityMutationOptions = Apollo.BaseMutationOptions<AddActivityTargetsOnActivityMutation, AddActivityTargetsOnActivityMutationVariables>;
+export type DeleteActivityMutationHookResult = ReturnType<typeof useDeleteActivityMutation>;
+export type DeleteActivityMutationResult = Apollo.MutationResult<DeleteActivityMutation>;
+export type DeleteActivityMutationOptions = Apollo.BaseMutationOptions<DeleteActivityMutation, DeleteActivityMutationVariables>;
export const RemoveActivityTargetsOnActivityDocument = gql`
mutation RemoveActivityTargetsOnActivity($activityId: String!, $activityTargetIds: [String!]!) {
updateOneActivity(
@@ -3583,39 +3530,6 @@ export function useRemoveActivityTargetsOnActivityMutation(baseOptions?: Apollo.
export type RemoveActivityTargetsOnActivityMutationHookResult = ReturnType<typeof useRemoveActivityTargetsOnActivityMutation>;
export type RemoveActivityTargetsOnActivityMutationResult = Apollo.MutationResult<RemoveActivityTargetsOnActivityMutation>;
export type RemoveActivityTargetsOnActivityMutationOptions = Apollo.BaseMutationOptions<RemoveActivityTargetsOnActivityMutation, RemoveActivityTargetsOnActivityMutationVariables>;
-export const DeleteActivityDocument = gql`
- mutation DeleteActivity($activityId: String!) {
- deleteManyActivities(where: {id: {equals: $activityId}}) {
- count
- }
-}
- `;
-export type DeleteActivityMutationFn = Apollo.MutationFunction<DeleteActivityMutation, DeleteActivityMutationVariables>;
-
-/**
- * __useDeleteActivityMutation__
- *
- * To run a mutation, you first call `useDeleteActivityMutation` within a React component and pass it any options that fit your needs.
- * When your component renders, `useDeleteActivityMutation` returns a tuple that includes:
- * - A mutate function that you can call at any time to execute the mutation
- * - An object with fields that represent the current status of the mutation's execution
- *
- * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
- *
- * @example
- * const [deleteActivityMutation, { data, loading, error }] = useDeleteActivityMutation({
- * variables: {
- * activityId: // value for 'activityId'
- * },
- * });
- */
-export function useDeleteActivityMutation(baseOptions?: Apollo.MutationHookOptions<DeleteActivityMutation, DeleteActivityMutationVariables>) {
- const options = {...defaultOptions, ...baseOptions}
- return Apollo.useMutation<DeleteActivityMutation, DeleteActivityMutationVariables>(DeleteActivityDocument, options);
- }
-export type DeleteActivityMutationHookResult = ReturnType<typeof useDeleteActivityMutation>;
-export type DeleteActivityMutationResult = Apollo.MutationResult<DeleteActivityMutation>;
-export type DeleteActivityMutationOptions = Apollo.BaseMutationOptions<DeleteActivityMutation, DeleteActivityMutationVariables>;
export const UpdateActivityDocument = gql`
mutation UpdateActivity($where: ActivityWhereUniqueInput!, $data: ActivityUpdateInput!) {
updateOneActivity(where: $where, data: $data) {
@@ -3682,119 +3596,153 @@ export function useUploadAttachmentMutation(baseOptions?: Apollo.MutationHookOpt
export type UploadAttachmentMutationHookResult = ReturnType<typeof useUploadAttachmentMutation>;
export type UploadAttachmentMutationResult = Apollo.MutationResult<UploadAttachmentMutation>;
export type UploadAttachmentMutationOptions = Apollo.BaseMutationOptions<UploadAttachmentMutation, UploadAttachmentMutationVariables>;
-export const CreateEventDocument = gql`
- mutation CreateEvent($type: String!, $data: JSON!) {
- createEvent(type: $type, data: $data) {
- success
+export const GetActivitiesDocument = gql`
+ query GetActivities($where: ActivityWhereInput!, $orderBy: [ActivityOrderByWithRelationInput!]) {
+ findManyActivities(orderBy: $orderBy, where: $where) {
+ ...ActivityQueryFragment
}
}
- `;
-export type CreateEventMutationFn = Apollo.MutationFunction<CreateEventMutation, CreateEventMutationVariables>;
+ ${ActivityQueryFragmentFragmentDoc}`;
/**
- * __useCreateEventMutation__
+ * __useGetActivitiesQuery__
*
- * To run a mutation, you first call `useCreateEventMutation` within a React component and pass it any options that fit your needs.
- * When your component renders, `useCreateEventMutation` returns a tuple that includes:
- * - A mutate function that you can call at any time to execute the mutation
- * - An object with fields that represent the current status of the mutation's execution
+ * To run a query within a React component, call `useGetActivitiesQuery` and pass it any options that fit your needs.
+ * When your component renders, `useGetActivitiesQuery` returns an object from Apollo Client that contains loading, error, and data properties
+ * you can use to render your UI.
*
- * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
+ * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
*
* @example
- * const [createEventMutation, { data, loading, error }] = useCreateEventMutation({
+ * const { data, loading, error } = useGetActivitiesQuery({
* variables: {
- * type: // value for 'type'
- * data: // value for 'data'
+ * where: // value for 'where'
+ * orderBy: // value for 'orderBy'
* },
* });
*/
-export function useCreateEventMutation(baseOptions?: Apollo.MutationHookOptions<CreateEventMutation, CreateEventMutationVariables>) {
+export function useGetActivitiesQuery(baseOptions: Apollo.QueryHookOptions<GetActivitiesQuery, GetActivitiesQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
- return Apollo.useMutation<CreateEventMutation, CreateEventMutationVariables>(CreateEventDocument, options);
+ return Apollo.useQuery<GetActivitiesQuery, GetActivitiesQueryVariables>(GetActivitiesDocument, options);
}
-export type CreateEventMutationHookResult = ReturnType<typeof useCreateEventMutation>;
-export type CreateEventMutationResult = Apollo.MutationResult<CreateEventMutation>;
-export type CreateEventMutationOptions = Apollo.BaseMutationOptions<CreateEventMutation, CreateEventMutationVariables>;
-export const CheckUserExistsDocument = gql`
- query CheckUserExists($email: String!) {
- checkUserExists(email: $email) {
- exists
+export function useGetActivitiesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetActivitiesQuery, GetActivitiesQueryVariables>) {
+ const options = {...defaultOptions, ...baseOptions}
+ return Apollo.useLazyQuery<GetActivitiesQuery, GetActivitiesQueryVariables>(GetActivitiesDocument, options);
+ }
+export type GetActivitiesQueryHookResult = ReturnType<typeof useGetActivitiesQuery>;
+export type GetActivitiesLazyQueryHookResult = ReturnType<typeof useGetActivitiesLazyQuery>;
+export type GetActivitiesQueryResult = Apollo.QueryResult<GetActivitiesQuery, GetActivitiesQueryVariables>;
+export const GetActivitiesByTargetsDocument = gql`
+ query GetActivitiesByTargets($activityTargetIds: [String!]!, $orderBy: [ActivityOrderByWithRelationInput!]) {
+ findManyActivities(
+ orderBy: $orderBy
+ where: {activityTargets: {some: {OR: [{personId: {in: $activityTargetIds}}, {companyId: {in: $activityTargetIds}}]}}}
+ ) {
+ ...ActivityQueryFragment
}
}
- `;
+ ${ActivityQueryFragmentFragmentDoc}`;
/**
- * __useCheckUserExistsQuery__
+ * __useGetActivitiesByTargetsQuery__
*
- * To run a query within a React component, call `useCheckUserExistsQuery` and pass it any options that fit your needs.
- * When your component renders, `useCheckUserExistsQuery` returns an object from Apollo Client that contains loading, error, and data properties
+ * To run a query within a React component, call `useGetActivitiesByTargetsQuery` and pass it any options that fit your needs.
+ * When your component renders, `useGetActivitiesByTargetsQuery` returns an object from Apollo Client that contains loading, error, and data properties
* you can use to render your UI.
*
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
*
* @example
- * const { data, loading, error } = useCheckUserExistsQuery({
+ * const { data, loading, error } = useGetActivitiesByTargetsQuery({
* variables: {
- * email: // value for 'email'
+ * activityTargetIds: // value for 'activityTargetIds'
+ * orderBy: // value for 'orderBy'
* },
* });
*/
-export function useCheckUserExistsQuery(baseOptions: Apollo.QueryHookOptions<CheckUserExistsQuery, CheckUserExistsQueryVariables>) {
+export function useGetActivitiesByTargetsQuery(baseOptions: Apollo.QueryHookOptions<GetActivitiesByTargetsQuery, GetActivitiesByTargetsQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
- return Apollo.useQuery<CheckUserExistsQuery, CheckUserExistsQueryVariables>(CheckUserExistsDocument, options);
+ return Apollo.useQuery<GetActivitiesByTargetsQuery, GetActivitiesByTargetsQueryVariables>(GetActivitiesByTargetsDocument, options);
}
-export function useCheckUserExistsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<CheckUserExistsQuery, CheckUserExistsQueryVariables>) {
+export function useGetActivitiesByTargetsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetActivitiesByTargetsQuery, GetActivitiesByTargetsQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
- return Apollo.useLazyQuery<CheckUserExistsQuery, CheckUserExistsQueryVariables>(CheckUserExistsDocument, options);
+ return Apollo.useLazyQuery<GetActivitiesByTargetsQuery, GetActivitiesByTargetsQueryVariables>(GetActivitiesByTargetsDocument, options);
}
-export type CheckUserExistsQueryHookResult = ReturnType<typeof useCheckUserExistsQuery>;
-export type CheckUserExistsLazyQueryHookResult = ReturnType<typeof useCheckUserExistsLazyQuery>;
-export type CheckUserExistsQueryResult = Apollo.QueryResult<CheckUserExistsQuery, CheckUserExistsQueryVariables>;
-export const ChallengeDocument = gql`
- mutation Challenge($email: String!, $password: String!) {
- challenge(email: $email, password: $password) {
- loginToken {
- expiresAt
- token
- }
+export type GetActivitiesByTargetsQueryHookResult = ReturnType<typeof useGetActivitiesByTargetsQuery>;
+export type GetActivitiesByTargetsLazyQueryHookResult = ReturnType<typeof useGetActivitiesByTargetsLazyQuery>;
+export type GetActivitiesByTargetsQueryResult = Apollo.QueryResult<GetActivitiesByTargetsQuery, GetActivitiesByTargetsQueryVariables>;
+export const GetActivityDocument = gql`
+ query GetActivity($activityId: String!) {
+ findManyActivities(where: {id: {equals: $activityId}}) {
+ ...ActivityQueryFragment
}
}
- `;
-export type ChallengeMutationFn = Apollo.MutationFunction<ChallengeMutation, ChallengeMutationVariables>;
+ ${ActivityQueryFragmentFragmentDoc}`;
/**
- * __useChallengeMutation__
- *
- * To run a mutation, you first call `useChallengeMutation` within a React component and pass it any options that fit your needs.
- * When your component renders, `useChallengeMutation` returns a tuple that includes:
- * - A mutate function that you can call at any time to execute the mutation
- * - An object with fields that represent the current status of the mutation's execution
+ * __useGetActivityQuery__
+ *
+ * To run a query within a React component, call `useGetActivityQuery` and pass it any options that fit your needs.
+ * When your component renders, `useGetActivityQuery` returns an object from Apollo Client that contains loading, error, and data properties
+ * you can use to render your UI.
+ *
+ * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
+ *
+ * @example
+ * const { data, loading, error } = useGetActivityQuery({
+ * variables: {
+ * activityId: // value for 'activityId'
+ * },
+ * });
+ */
+export function useGetActivityQuery(baseOptions: Apollo.QueryHookOptions<GetActivityQuery, GetActivityQueryVariables>) {
+ const options = {...defaultOptions, ...baseOptions}
+ return Apollo.useQuery<GetActivityQuery, GetActivityQueryVariables>(GetActivityDocument, options);
+ }
+export function useGetActivityLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetActivityQuery, GetActivityQueryVariables>) {
+ const options = {...defaultOptions, ...baseOptions}
+ return Apollo.useLazyQuery<GetActivityQuery, GetActivityQueryVariables>(GetActivityDocument, options);
+ }
+export type GetActivityQueryHookResult = ReturnType<typeof useGetActivityQuery>;
+export type GetActivityLazyQueryHookResult = ReturnType<typeof useGetActivityLazyQuery>;
+export type GetActivityQueryResult = Apollo.QueryResult<GetActivityQuery, GetActivityQueryVariables>;
+export const CreateEventDocument = gql`
+ mutation CreateEvent($type: String!, $data: JSON!) {
+ createEvent(type: $type, data: $data) {
+ success
+ }
+}
+ `;
+export type CreateEventMutationFn = Apollo.MutationFunction<CreateEventMutation, CreateEventMutationVariables>;
+
+/**
+ * __useCreateEventMutation__
+ *
+ * To run a mutation, you first call `useCreateEventMutation` within a React component and pass it any options that fit your needs.
+ * When your component renders, `useCreateEventMutation` returns a tuple that includes:
+ * - A mutate function that you can call at any time to execute the mutation
+ * - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
- * const [challengeMutation, { data, loading, error }] = useChallengeMutation({
+ * const [createEventMutation, { data, loading, error }] = useCreateEventMutation({
* variables: {
- * email: // value for 'email'
- * password: // value for 'password'
+ * type: // value for 'type'
+ * data: // value for 'data'
* },
* });
*/
-export function useChallengeMutation(baseOptions?: Apollo.MutationHookOptions<ChallengeMutation, ChallengeMutationVariables>) {
+export function useCreateEventMutation(baseOptions?: Apollo.MutationHookOptions<CreateEventMutation, CreateEventMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
- return Apollo.useMutation<ChallengeMutation, ChallengeMutationVariables>(ChallengeDocument, options);
+ return Apollo.useMutation<CreateEventMutation, CreateEventMutationVariables>(CreateEventDocument, options);
}
-export type ChallengeMutationHookResult = ReturnType<typeof useChallengeMutation>;
-export type ChallengeMutationResult = Apollo.MutationResult<ChallengeMutation>;
-export type ChallengeMutationOptions = Apollo.BaseMutationOptions<ChallengeMutation, ChallengeMutationVariables>;
-export const SignUpDocument = gql`
- mutation SignUp($email: String!, $password: String!, $workspaceInviteHash: String) {
- signUp(
- email: $email
- password: $password
- workspaceInviteHash: $workspaceInviteHash
- ) {
+export type CreateEventMutationHookResult = ReturnType<typeof useCreateEventMutation>;
+export type CreateEventMutationResult = Apollo.MutationResult<CreateEventMutation>;
+export type CreateEventMutationOptions = Apollo.BaseMutationOptions<CreateEventMutation, CreateEventMutationVariables>;
+export const ChallengeDocument = gql`
+ mutation Challenge($email: String!, $password: String!) {
+ challenge(email: $email, password: $password) {
loginToken {
expiresAt
token
@@ -3802,61 +3750,38 @@ export const SignUpDocument = gql`
}
}
`;
-export type SignUpMutationFn = Apollo.MutationFunction<SignUpMutation, SignUpMutationVariables>;
+export type ChallengeMutationFn = Apollo.MutationFunction<ChallengeMutation, ChallengeMutationVariables>;
/**
- * __useSignUpMutation__
+ * __useChallengeMutation__
*
- * To run a mutation, you first call `useSignUpMutation` within a React component and pass it any options that fit your needs.
- * When your component renders, `useSignUpMutation` returns a tuple that includes:
+ * To run a mutation, you first call `useChallengeMutation` within a React component and pass it any options that fit your needs.
+ * When your component renders, `useChallengeMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
- * const [signUpMutation, { data, loading, error }] = useSignUpMutation({
+ * const [challengeMutation, { data, loading, error }] = useChallengeMutation({
* variables: {
* email: // value for 'email'
* password: // value for 'password'
- * workspaceInviteHash: // value for 'workspaceInviteHash'
* },
* });
*/
-export function useSignUpMutation(baseOptions?: Apollo.MutationHookOptions<SignUpMutation, SignUpMutationVariables>) {
+export function useChallengeMutation(baseOptions?: Apollo.MutationHookOptions<ChallengeMutation, ChallengeMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
- return Apollo.useMutation<SignUpMutation, SignUpMutationVariables>(SignUpDocument, options);
+ return Apollo.useMutation<ChallengeMutation, ChallengeMutationVariables>(ChallengeDocument, options);
}
-export type SignUpMutationHookResult = ReturnType<typeof useSignUpMutation>;
-export type SignUpMutationResult = Apollo.MutationResult<SignUpMutation>;
-export type SignUpMutationOptions = Apollo.BaseMutationOptions<SignUpMutation, SignUpMutationVariables>;
-export const VerifyDocument = gql`
- mutation Verify($loginToken: String!) {
- verify(loginToken: $loginToken) {
+export type ChallengeMutationHookResult = ReturnType<typeof useChallengeMutation>;
+export type ChallengeMutationResult = Apollo.MutationResult<ChallengeMutation>;
+export type ChallengeMutationOptions = Apollo.BaseMutationOptions<ChallengeMutation, ChallengeMutationVariables>;
+export const ImpersonateDocument = gql`
+ mutation Impersonate($userId: String!) {
+ impersonate(userId: $userId) {
user {
- id
- email
- displayName
- firstName
- lastName
- canImpersonate
- supportUserHash
- workspaceMember {
- id
- allowImpersonation
- workspace {
- id
- domainName
- displayName
- logo
- inviteHash
- }
- }
- settings {
- id
- colorScheme
- locale
- }
+ ...UserQueryFragment
}
tokens {
accessToken {
@@ -3870,33 +3795,33 @@ export const VerifyDocument = gql`
}
}
}
- `;
-export type VerifyMutationFn = Apollo.MutationFunction<VerifyMutation, VerifyMutationVariables>;
+ ${UserQueryFragmentFragmentDoc}`;
+export type ImpersonateMutationFn = Apollo.MutationFunction<ImpersonateMutation, ImpersonateMutationVariables>;
/**
- * __useVerifyMutation__
+ * __useImpersonateMutation__
*
- * To run a mutation, you first call `useVerifyMutation` within a React component and pass it any options that fit your needs.
- * When your component renders, `useVerifyMutation` returns a tuple that includes:
+ * To run a mutation, you first call `useImpersonateMutation` within a React component and pass it any options that fit your needs.
+ * When your component renders, `useImpersonateMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
- * const [verifyMutation, { data, loading, error }] = useVerifyMutation({
+ * const [impersonateMutation, { data, loading, error }] = useImpersonateMutation({
* variables: {
- * loginToken: // value for 'loginToken'
+ * userId: // value for 'userId'
* },
* });
*/
-export function useVerifyMutation(baseOptions?: Apollo.MutationHookOptions<VerifyMutation, VerifyMutationVariables>) {
+export function useImpersonateMutation(baseOptions?: Apollo.MutationHookOptions<ImpersonateMutation, ImpersonateMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
- return Apollo.useMutation<VerifyMutation, VerifyMutationVariables>(VerifyDocument, options);
+ return Apollo.useMutation<ImpersonateMutation, ImpersonateMutationVariables>(ImpersonateDocument, options);
}
-export type VerifyMutationHookResult = ReturnType<typeof useVerifyMutation>;
-export type VerifyMutationResult = Apollo.MutationResult<VerifyMutation>;
-export type VerifyMutationOptions = Apollo.BaseMutationOptions<VerifyMutation, VerifyMutationVariables>;
+export type ImpersonateMutationHookResult = ReturnType<typeof useImpersonateMutation>;
+export type ImpersonateMutationResult = Apollo.MutationResult<ImpersonateMutation>;
+export type ImpersonateMutationOptions = Apollo.BaseMutationOptions<ImpersonateMutation, ImpersonateMutationVariables>;
export const RenewTokenDocument = gql`
mutation RenewToken($refreshToken: String!) {
renewToken(refreshToken: $refreshToken) {
@@ -3939,33 +3864,53 @@ export function useRenewTokenMutation(baseOptions?: Apollo.MutationHookOptions<R
export type RenewTokenMutationHookResult = ReturnType<typeof useRenewTokenMutation>;
export type RenewTokenMutationResult = Apollo.MutationResult<RenewTokenMutation>;
export type RenewTokenMutationOptions = Apollo.BaseMutationOptions<RenewTokenMutation, RenewTokenMutationVariables>;
-export const ImpersonateDocument = gql`
- mutation Impersonate($userId: String!) {
- impersonate(userId: $userId) {
- user {
- id
- email
- displayName
- firstName
- lastName
- canImpersonate
- supportUserHash
- workspaceMember {
- id
- allowImpersonation
- workspace {
- id
- domainName
- displayName
- logo
- inviteHash
- }
- }
- settings {
- id
- colorScheme
- locale
+export const SignUpDocument = gql`
+ mutation SignUp($email: String!, $password: String!, $workspaceInviteHash: String) {
+ signUp(
+ email: $email
+ password: $password
+ workspaceInviteHash: $workspaceInviteHash
+ ) {
+ loginToken {
+ expiresAt
+ token
+ }
+ }
+}
+ `;
+export type SignUpMutationFn = Apollo.MutationFunction<SignUpMutation, SignUpMutationVariables>;
+
+/**
+ * __useSignUpMutation__
+ *
+ * To run a mutation, you first call `useSignUpMutation` within a React component and pass it any options that fit your needs.
+ * When your component renders, `useSignUpMutation` returns a tuple that includes:
+ * - A mutate function that you can call at any time to execute the mutation
+ * - An object with fields that represent the current status of the mutation's execution
+ *
+ * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
+ *
+ * @example
+ * const [signUpMutation, { data, loading, error }] = useSignUpMutation({
+ * variables: {
+ * email: // value for 'email'
+ * password: // value for 'password'
+ * workspaceInviteHash: // value for 'workspaceInviteHash'
+ * },
+ * });
+ */
+export function useSignUpMutation(baseOptions?: Apollo.MutationHookOptions<SignUpMutation, SignUpMutationVariables>) {
+ const options = {...defaultOptions, ...baseOptions}
+ return Apollo.useMutation<SignUpMutation, SignUpMutationVariables>(SignUpDocument, options);
}
+export type SignUpMutationHookResult = ReturnType<typeof useSignUpMutation>;
+export type SignUpMutationResult = Apollo.MutationResult<SignUpMutation>;
+export type SignUpMutationOptions = Apollo.BaseMutationOptions<SignUpMutation, SignUpMutationVariables>;
+export const VerifyDocument = gql`
+ mutation Verify($loginToken: String!) {
+ verify(loginToken: $loginToken) {
+ user {
+ ...UserQueryFragment
}
tokens {
accessToken {
@@ -3979,33 +3924,68 @@ export const ImpersonateDocument = gql`
}
}
}
- `;
-export type ImpersonateMutationFn = Apollo.MutationFunction<ImpersonateMutation, ImpersonateMutationVariables>;
+ ${UserQueryFragmentFragmentDoc}`;
+export type VerifyMutationFn = Apollo.MutationFunction<VerifyMutation, VerifyMutationVariables>;
/**
- * __useImpersonateMutation__
+ * __useVerifyMutation__
*
- * To run a mutation, you first call `useImpersonateMutation` within a React component and pass it any options that fit your needs.
- * When your component renders, `useImpersonateMutation` returns a tuple that includes:
+ * To run a mutation, you first call `useVerifyMutation` within a React component and pass it any options that fit your needs.
+ * When your component renders, `useVerifyMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
- * const [impersonateMutation, { data, loading, error }] = useImpersonateMutation({
+ * const [verifyMutation, { data, loading, error }] = useVerifyMutation({
* variables: {
- * userId: // value for 'userId'
+ * loginToken: // value for 'loginToken'
* },
* });
*/
-export function useImpersonateMutation(baseOptions?: Apollo.MutationHookOptions<ImpersonateMutation, ImpersonateMutationVariables>) {
+export function useVerifyMutation(baseOptions?: Apollo.MutationHookOptions<VerifyMutation, VerifyMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
- return Apollo.useMutation<ImpersonateMutation, ImpersonateMutationVariables>(ImpersonateDocument, options);
+ return Apollo.useMutation<VerifyMutation, VerifyMutationVariables>(VerifyDocument, options);
}
-export type ImpersonateMutationHookResult = ReturnType<typeof useImpersonateMutation>;
-export type ImpersonateMutationResult = Apollo.MutationResult<ImpersonateMutation>;
-export type ImpersonateMutationOptions = Apollo.BaseMutationOptions<ImpersonateMutation, ImpersonateMutationVariables>;
+export type VerifyMutationHookResult = ReturnType<typeof useVerifyMutation>;
+export type VerifyMutationResult = Apollo.MutationResult<VerifyMutation>;
+export type VerifyMutationOptions = Apollo.BaseMutationOptions<VerifyMutation, VerifyMutationVariables>;
+export const CheckUserExistsDocument = gql`
+ query CheckUserExists($email: String!) {
+ checkUserExists(email: $email) {
+ exists
+ }
+}
+ `;
+
+/**
+ * __useCheckUserExistsQuery__
+ *
+ * To run a query within a React component, call `useCheckUserExistsQuery` and pass it any options that fit your needs.
+ * When your component renders, `useCheckUserExistsQuery` returns an object from Apollo Client that contains loading, error, and data properties
+ * you can use to render your UI.
+ *
+ * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
+ *
+ * @example
+ * const { data, loading, error } = useCheckUserExistsQuery({
+ * variables: {
+ * email: // value for 'email'
+ * },
+ * });
+ */
+export function useCheckUserExistsQuery(baseOptions: Apollo.QueryHookOptions<CheckUserExistsQuery, CheckUserExistsQueryVariables>) {
+ const options = {...defaultOptions, ...baseOptions}
+ return Apollo.useQuery<CheckUserExistsQuery, CheckUserExistsQueryVariables>(CheckUserExistsDocument, options);
+ }
+export function useCheckUserExistsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<CheckUserExistsQuery, CheckUserExistsQueryVariables>) {
+ const options = {...defaultOptions, ...baseOptions}
+ return Apollo.useLazyQuery<CheckUserExistsQuery, CheckUserExistsQueryVariables>(CheckUserExistsDocument, options);
+ }
+export type CheckUserExistsQueryHookResult = ReturnType<typeof useCheckUserExistsQuery>;
+export type CheckUserExistsLazyQueryHookResult = ReturnType<typeof useCheckUserExistsLazyQuery>;
+export type CheckUserExistsQueryResult = Apollo.QueryResult<CheckUserExistsQuery, CheckUserExistsQueryVariables>;
export const GetClientConfigDocument = gql`
query GetClientConfig {
clientConfig {
@@ -4053,19 +4033,119 @@ export function useGetClientConfigLazyQuery(baseOptions?: Apollo.LazyQueryHookOp
export type GetClientConfigQueryHookResult = ReturnType<typeof useGetClientConfigQuery>;
export type GetClientConfigLazyQueryHookResult = ReturnType<typeof useGetClientConfigLazyQuery>;
export type GetClientConfigQueryResult = Apollo.QueryResult<GetClientConfigQuery, GetClientConfigQueryVariables>;
-export const GetCompaniesDocument = gql`
- query GetCompanies($orderBy: [CompanyOrderByWithRelationInput!], $where: CompanyWhereInput) {
- companies: findManyCompany(orderBy: $orderBy, where: $where) {
- id
- domainName
- name
- createdAt
- address
- linkedinUrl
- employees
- _activityCount
- accountOwner {
- id
+export const DeleteManyCompaniesDocument = gql`
+ mutation DeleteManyCompanies($ids: [String!]) {
+ deleteManyCompany(where: {id: {in: $ids}}) {
+ count
+ }
+}
+ `;
+export type DeleteManyCompaniesMutationFn = Apollo.MutationFunction<DeleteManyCompaniesMutation, DeleteManyCompaniesMutationVariables>;
+
+/**
+ * __useDeleteManyCompaniesMutation__
+ *
+ * To run a mutation, you first call `useDeleteManyCompaniesMutation` within a React component and pass it any options that fit your needs.
+ * When your component renders, `useDeleteManyCompaniesMutation` returns a tuple that includes:
+ * - A mutate function that you can call at any time to execute the mutation
+ * - An object with fields that represent the current status of the mutation's execution
+ *
+ * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
+ *
+ * @example
+ * const [deleteManyCompaniesMutation, { data, loading, error }] = useDeleteManyCompaniesMutation({
+ * variables: {
+ * ids: // value for 'ids'
+ * },
+ * });
+ */
+export function useDeleteManyCompaniesMutation(baseOptions?: Apollo.MutationHookOptions<DeleteManyCompaniesMutation, DeleteManyCompaniesMutationVariables>) {
+ const options = {...defaultOptions, ...baseOptions}
+ return Apollo.useMutation<DeleteManyCompaniesMutation, DeleteManyCompaniesMutationVariables>(DeleteManyCompaniesDocument, options);
+ }
+export type DeleteManyCompaniesMutationHookResult = ReturnType<typeof useDeleteManyCompaniesMutation>;
+export type DeleteManyCompaniesMutationResult = Apollo.MutationResult<DeleteManyCompaniesMutation>;
+export type DeleteManyCompaniesMutationOptions = Apollo.BaseMutationOptions<DeleteManyCompaniesMutation, DeleteManyCompaniesMutationVariables>;
+export const InsertOneCompanyDocument = gql`
+ mutation InsertOneCompany($data: CompanyCreateInput!) {
+ createOneCompany(data: $data) {
+ ...CompanyFieldsFragment
+ }
+}
+ ${CompanyFieldsFragmentFragmentDoc}`;
+export type InsertOneCompanyMutationFn = Apollo.MutationFunction<InsertOneCompanyMutation, InsertOneCompanyMutationVariables>;
+
+/**
+ * __useInsertOneCompanyMutation__
+ *
+ * To run a mutation, you first call `useInsertOneCompanyMutation` within a React component and pass it any options that fit your needs.
+ * When your component renders, `useInsertOneCompanyMutation` returns a tuple that includes:
+ * - A mutate function that you can call at any time to execute the mutation
+ * - An object with fields that represent the current status of the mutation's execution
+ *
+ * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
+ *
+ * @example
+ * const [insertOneCompanyMutation, { data, loading, error }] = useInsertOneCompanyMutation({
+ * variables: {
+ * data: // value for 'data'
+ * },
+ * });
+ */
+export function useInsertOneCompanyMutation(baseOptions?: Apollo.MutationHookOptions<InsertOneCompanyMutation, InsertOneCompanyMutationVariables>) {
+ const options = {...defaultOptions, ...baseOptions}
+ return Apollo.useMutation<InsertOneCompanyMutation, InsertOneCompanyMutationVariables>(InsertOneCompanyDocument, options);
+ }
+export type InsertOneCompanyMutationHookResult = ReturnType<typeof useInsertOneCompanyMutation>;
+export type InsertOneCompanyMutationResult = Apollo.MutationResult<InsertOneCompanyMutation>;
+export type InsertOneCompanyMutationOptions = Apollo.BaseMutationOptions<InsertOneCompanyMutation, InsertOneCompanyMutationVariables>;
+export const UpdateOneCompanyDocument = gql`
+ mutation UpdateOneCompany($where: CompanyWhereUniqueInput!, $data: CompanyUpdateInput!) {
+ updateOneCompany(data: $data, where: $where) {
+ ...CompanyFieldsFragment
+ }
+}
+ ${CompanyFieldsFragmentFragmentDoc}`;
+export type UpdateOneCompanyMutationFn = Apollo.MutationFunction<UpdateOneCompanyMutation, UpdateOneCompanyMutationVariables>;
+
+/**
+ * __useUpdateOneCompanyMutation__
+ *
+ * To run a mutation, you first call `useUpdateOneCompanyMutation` within a React component and pass it any options that fit your needs.
+ * When your component renders, `useUpdateOneCompanyMutation` returns a tuple that includes:
+ * - A mutate function that you can call at any time to execute the mutation
+ * - An object with fields that represent the current status of the mutation's execution
+ *
+ * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
+ *
+ * @example
+ * const [updateOneCompanyMutation, { data, loading, error }] = useUpdateOneCompanyMutation({
+ * variables: {
+ * where: // value for 'where'
+ * data: // value for 'data'
+ * },
+ * });
+ */
+export function useUpdateOneCompanyMutation(baseOptions?: Apollo.MutationHookOptions<UpdateOneCompanyMutation, UpdateOneCompanyMutationVariables>) {
+ const options = {...defaultOptions, ...baseOptions}
+ return Apollo.useMutation<UpdateOneCompanyMutation, UpdateOneCompanyMutationVariables>(UpdateOneCompanyDocument, options);
+ }
+export type UpdateOneCompanyMutationHookResult = ReturnType<typeof useUpdateOneCompanyMutation>;
+export type UpdateOneCompanyMutationResult = Apollo.MutationResult<UpdateOneCompanyMutation>;
+export type UpdateOneCompanyMutationOptions = Apollo.BaseMutationOptions<UpdateOneCompanyMutation, UpdateOneCompanyMutationVariables>;
+export const GetCompaniesDocument = gql`
+ query GetCompanies($orderBy: [CompanyOrderByWithRelationInput!], $where: CompanyWhereInput) {
+ companies: findManyCompany(orderBy: $orderBy, where: $where) {
+ id
+ domainName
+ name
+ createdAt
+ address
+ linkedinUrl
+ employees
+ _activityCount
+ accountOwner {
+ id
email
displayName
firstName
@@ -4161,106 +4241,116 @@ export function useGetCompanyLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions
export type GetCompanyQueryHookResult = ReturnType<typeof useGetCompanyQuery>;
export type GetCompanyLazyQueryHookResult = ReturnType<typeof useGetCompanyLazyQuery>;
export type GetCompanyQueryResult = Apollo.QueryResult<GetCompanyQuery, GetCompanyQueryVariables>;
-export const UpdateOneCompanyDocument = gql`
- mutation UpdateOneCompany($where: CompanyWhereUniqueInput!, $data: CompanyUpdateInput!) {
- updateOneCompany(data: $data, where: $where) {
- ...CompanyFieldsFragment
+export const DeleteFavoriteDocument = gql`
+ mutation DeleteFavorite($where: FavoriteWhereInput!) {
+ deleteFavorite(where: $where) {
+ id
}
}
- ${CompanyFieldsFragmentFragmentDoc}`;
-export type UpdateOneCompanyMutationFn = Apollo.MutationFunction<UpdateOneCompanyMutation, UpdateOneCompanyMutationVariables>;
+ `;
+export type DeleteFavoriteMutationFn = Apollo.MutationFunction<DeleteFavoriteMutation, DeleteFavoriteMutationVariables>;
/**
- * __useUpdateOneCompanyMutation__
+ * __useDeleteFavoriteMutation__
*
- * To run a mutation, you first call `useUpdateOneCompanyMutation` within a React component and pass it any options that fit your needs.
- * When your component renders, `useUpdateOneCompanyMutation` returns a tuple that includes:
+ * To run a mutation, you first call `useDeleteFavoriteMutation` within a React component and pass it any options that fit your needs.
+ * When your component renders, `useDeleteFavoriteMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
- * const [updateOneCompanyMutation, { data, loading, error }] = useUpdateOneCompanyMutation({
+ * const [deleteFavoriteMutation, { data, loading, error }] = useDeleteFavoriteMutation({
* variables: {
* where: // value for 'where'
- * data: // value for 'data'
* },
* });
*/
-export function useUpdateOneCompanyMutation(baseOptions?: Apollo.MutationHookOptions<UpdateOneCompanyMutation, UpdateOneCompanyMutationVariables>) {
+export function useDeleteFavoriteMutation(baseOptions?: Apollo.MutationHookOptions<DeleteFavoriteMutation, DeleteFavoriteMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
- return Apollo.useMutation<UpdateOneCompanyMutation, UpdateOneCompanyMutationVariables>(UpdateOneCompanyDocument, options);
+ return Apollo.useMutation<DeleteFavoriteMutation, DeleteFavoriteMutationVariables>(DeleteFavoriteDocument, options);
}
-export type UpdateOneCompanyMutationHookResult = ReturnType<typeof useUpdateOneCompanyMutation>;
-export type UpdateOneCompanyMutationResult = Apollo.MutationResult<UpdateOneCompanyMutation>;
-export type UpdateOneCompanyMutationOptions = Apollo.BaseMutationOptions<UpdateOneCompanyMutation, UpdateOneCompanyMutationVariables>;
-export const InsertOneCompanyDocument = gql`
- mutation InsertOneCompany($data: CompanyCreateInput!) {
- createOneCompany(data: $data) {
- ...CompanyFieldsFragment
+export type DeleteFavoriteMutationHookResult = ReturnType<typeof useDeleteFavoriteMutation>;
+export type DeleteFavoriteMutationResult = Apollo.MutationResult<DeleteFavoriteMutation>;
+export type DeleteFavoriteMutationOptions = Apollo.BaseMutationOptions<DeleteFavoriteMutation, DeleteFavoriteMutationVariables>;
+export const InsertCompanyFavoriteDocument = gql`
+ mutation InsertCompanyFavorite($data: FavoriteMutationForCompanyArgs!) {
+ createFavoriteForCompany(data: $data) {
+ id
+ company {
+ id
+ name
+ domainName
+ }
}
}
- ${CompanyFieldsFragmentFragmentDoc}`;
-export type InsertOneCompanyMutationFn = Apollo.MutationFunction<InsertOneCompanyMutation, InsertOneCompanyMutationVariables>;
+ `;
+export type InsertCompanyFavoriteMutationFn = Apollo.MutationFunction<InsertCompanyFavoriteMutation, InsertCompanyFavoriteMutationVariables>;
/**
- * __useInsertOneCompanyMutation__
+ * __useInsertCompanyFavoriteMutation__
*
- * To run a mutation, you first call `useInsertOneCompanyMutation` within a React component and pass it any options that fit your needs.
- * When your component renders, `useInsertOneCompanyMutation` returns a tuple that includes:
+ * To run a mutation, you first call `useInsertCompanyFavoriteMutation` within a React component and pass it any options that fit your needs.
+ * When your component renders, `useInsertCompanyFavoriteMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
- * const [insertOneCompanyMutation, { data, loading, error }] = useInsertOneCompanyMutation({
+ * const [insertCompanyFavoriteMutation, { data, loading, error }] = useInsertCompanyFavoriteMutation({
* variables: {
* data: // value for 'data'
* },
* });
*/
-export function useInsertOneCompanyMutation(baseOptions?: Apollo.MutationHookOptions<InsertOneCompanyMutation, InsertOneCompanyMutationVariables>) {
+export function useInsertCompanyFavoriteMutation(baseOptions?: Apollo.MutationHookOptions<InsertCompanyFavoriteMutation, InsertCompanyFavoriteMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
- return Apollo.useMutation<InsertOneCompanyMutation, InsertOneCompanyMutationVariables>(InsertOneCompanyDocument, options);
+ return Apollo.useMutation<InsertCompanyFavoriteMutation, InsertCompanyFavoriteMutationVariables>(InsertCompanyFavoriteDocument, options);
}
-export type InsertOneCompanyMutationHookResult = ReturnType<typeof useInsertOneCompanyMutation>;
-export type InsertOneCompanyMutationResult = Apollo.MutationResult<InsertOneCompanyMutation>;
-export type InsertOneCompanyMutationOptions = Apollo.BaseMutationOptions<InsertOneCompanyMutation, InsertOneCompanyMutationVariables>;
-export const DeleteManyCompaniesDocument = gql`
- mutation DeleteManyCompanies($ids: [String!]) {
- deleteManyCompany(where: {id: {in: $ids}}) {
- count
+export type InsertCompanyFavoriteMutationHookResult = ReturnType<typeof useInsertCompanyFavoriteMutation>;
+export type InsertCompanyFavoriteMutationResult = Apollo.MutationResult<InsertCompanyFavoriteMutation>;
+export type InsertCompanyFavoriteMutationOptions = Apollo.BaseMutationOptions<InsertCompanyFavoriteMutation, InsertCompanyFavoriteMutationVariables>;
+export const InsertPersonFavoriteDocument = gql`
+ mutation InsertPersonFavorite($data: FavoriteMutationForPersonArgs!) {
+ createFavoriteForPerson(data: $data) {
+ id
+ person {
+ id
+ firstName
+ lastName
+ displayName
+ }
}
}
`;
-export type DeleteManyCompaniesMutationFn = Apollo.MutationFunction<DeleteManyCompaniesMutation, DeleteManyCompaniesMutationVariables>;
+export type InsertPersonFavoriteMutationFn = Apollo.MutationFunction<InsertPersonFavoriteMutation, InsertPersonFavoriteMutationVariables>;
/**
- * __useDeleteManyCompaniesMutation__
+ * __useInsertPersonFavoriteMutation__
*
- * To run a mutation, you first call `useDeleteManyCompaniesMutation` within a React component and pass it any options that fit your needs.
- * When your component renders, `useDeleteManyCompaniesMutation` returns a tuple that includes:
+ * To run a mutation, you first call `useInsertPersonFavoriteMutation` within a React component and pass it any options that fit your needs.
+ * When your component renders, `useInsertPersonFavoriteMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
- * const [deleteManyCompaniesMutation, { data, loading, error }] = useDeleteManyCompaniesMutation({
+ * const [insertPersonFavoriteMutation, { data, loading, error }] = useInsertPersonFavoriteMutation({
* variables: {
- * ids: // value for 'ids'
+ * data: // value for 'data'
* },
* });
*/
-export function useDeleteManyCompaniesMutation(baseOptions?: Apollo.MutationHookOptions<DeleteManyCompaniesMutation, DeleteManyCompaniesMutationVariables>) {
+export function useInsertPersonFavoriteMutation(baseOptions?: Apollo.MutationHookOptions<InsertPersonFavoriteMutation, InsertPersonFavoriteMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
- return Apollo.useMutation<DeleteManyCompaniesMutation, DeleteManyCompaniesMutationVariables>(DeleteManyCompaniesDocument, options);
+ return Apollo.useMutation<InsertPersonFavoriteMutation, InsertPersonFavoriteMutationVariables>(InsertPersonFavoriteDocument, options);
}
-export type DeleteManyCompaniesMutationHookResult = ReturnType<typeof useDeleteManyCompaniesMutation>;
-export type DeleteManyCompaniesMutationResult = Apollo.MutationResult<DeleteManyCompaniesMutation>;
-export type DeleteManyCompaniesMutationOptions = Apollo.BaseMutationOptions<DeleteManyCompaniesMutation, DeleteManyCompaniesMutationVariables>;
+export type InsertPersonFavoriteMutationHookResult = ReturnType<typeof useInsertPersonFavoriteMutation>;
+export type InsertPersonFavoriteMutationResult = Apollo.MutationResult<InsertPersonFavoriteMutation>;
+export type InsertPersonFavoriteMutationOptions = Apollo.BaseMutationOptions<InsertPersonFavoriteMutation, InsertPersonFavoriteMutationVariables>;
export const GetFavoritesDocument = gql`
query GetFavorites {
findFavorites {
@@ -4311,116 +4401,187 @@ export function useGetFavoritesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptio
export type GetFavoritesQueryHookResult = ReturnType<typeof useGetFavoritesQuery>;
export type GetFavoritesLazyQueryHookResult = ReturnType<typeof useGetFavoritesLazyQuery>;
export type GetFavoritesQueryResult = Apollo.QueryResult<GetFavoritesQuery, GetFavoritesQueryVariables>;
-export const InsertPersonFavoriteDocument = gql`
- mutation InsertPersonFavorite($data: FavoriteMutationForPersonArgs!) {
- createFavoriteForPerson(data: $data) {
- id
- person {
- id
- firstName
- lastName
- displayName
- }
+export const DeleteManyPersonDocument = gql`
+ mutation DeleteManyPerson($ids: [String!]) {
+ deleteManyPerson(where: {id: {in: $ids}}) {
+ count
}
}
`;
-export type InsertPersonFavoriteMutationFn = Apollo.MutationFunction<InsertPersonFavoriteMutation, InsertPersonFavoriteMutationVariables>;
+export type DeleteManyPersonMutationFn = Apollo.MutationFunction<DeleteManyPersonMutation, DeleteManyPersonMutationVariables>;
/**
- * __useInsertPersonFavoriteMutation__
+ * __useDeleteManyPersonMutation__
*
- * To run a mutation, you first call `useInsertPersonFavoriteMutation` within a React component and pass it any options that fit your needs.
- * When your component renders, `useInsertPersonFavoriteMutation` returns a tuple that includes:
+ * To run a mutation, you first call `useDeleteManyPersonMutation` within a React component and pass it any options that fit your needs.
+ * When your component renders, `useDeleteManyPersonMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
- * const [insertPersonFavoriteMutation, { data, loading, error }] = useInsertPersonFavoriteMutation({
+ * const [deleteManyPersonMutation, { data, loading, error }] = useDeleteManyPersonMutation({
* variables: {
- * data: // value for 'data'
+ * ids: // value for 'ids'
* },
* });
*/
-export function useInsertPersonFavoriteMutation(baseOptions?: Apollo.MutationHookOptions<InsertPersonFavoriteMutation, InsertPersonFavoriteMutationVariables>) {
+export function useDeleteManyPersonMutation(baseOptions?: Apollo.MutationHookOptions<DeleteManyPersonMutation, DeleteManyPersonMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
- return Apollo.useMutation<InsertPersonFavoriteMutation, InsertPersonFavoriteMutationVariables>(InsertPersonFavoriteDocument, options);
+ return Apollo.useMutation<DeleteManyPersonMutation, DeleteManyPersonMutationVariables>(DeleteManyPersonDocument, options);
}
-export type InsertPersonFavoriteMutationHookResult = ReturnType<typeof useInsertPersonFavoriteMutation>;
-export type InsertPersonFavoriteMutationResult = Apollo.MutationResult<InsertPersonFavoriteMutation>;
-export type InsertPersonFavoriteMutationOptions = Apollo.BaseMutationOptions<InsertPersonFavoriteMutation, InsertPersonFavoriteMutationVariables>;
-export const InsertCompanyFavoriteDocument = gql`
- mutation InsertCompanyFavorite($data: FavoriteMutationForCompanyArgs!) {
- createFavoriteForCompany(data: $data) {
- id
- company {
- id
- name
- domainName
- }
+export type DeleteManyPersonMutationHookResult = ReturnType<typeof useDeleteManyPersonMutation>;
+export type DeleteManyPersonMutationResult = Apollo.MutationResult<DeleteManyPersonMutation>;
+export type DeleteManyPersonMutationOptions = Apollo.BaseMutationOptions<DeleteManyPersonMutation, DeleteManyPersonMutationVariables>;
+export const InsertOnePersonDocument = gql`
+ mutation InsertOnePerson($data: PersonCreateInput!) {
+ createOnePerson(data: $data) {
+ ...InsertPersonFragment
}
}
- `;
-export type InsertCompanyFavoriteMutationFn = Apollo.MutationFunction<InsertCompanyFavoriteMutation, InsertCompanyFavoriteMutationVariables>;
+ ${InsertPersonFragmentFragmentDoc}`;
+export type InsertOnePersonMutationFn = Apollo.MutationFunction<InsertOnePersonMutation, InsertOnePersonMutationVariables>;
/**
- * __useInsertCompanyFavoriteMutation__
+ * __useInsertOnePersonMutation__
*
- * To run a mutation, you first call `useInsertCompanyFavoriteMutation` within a React component and pass it any options that fit your needs.
- * When your component renders, `useInsertCompanyFavoriteMutation` returns a tuple that includes:
+ * To run a mutation, you first call `useInsertOnePersonMutation` within a React component and pass it any options that fit your needs.
+ * When your component renders, `useInsertOnePersonMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
- * const [insertCompanyFavoriteMutation, { data, loading, error }] = useInsertCompanyFavoriteMutation({
+ * const [insertOnePersonMutation, { data, loading, error }] = useInsertOnePersonMutation({
* variables: {
* data: // value for 'data'
* },
* });
*/
-export function useInsertCompanyFavoriteMutation(baseOptions?: Apollo.MutationHookOptions<InsertCompanyFavoriteMutation, InsertCompanyFavoriteMutationVariables>) {
+export function useInsertOnePersonMutation(baseOptions?: Apollo.MutationHookOptions<InsertOnePersonMutation, InsertOnePersonMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
- return Apollo.useMutation<InsertCompanyFavoriteMutation, InsertCompanyFavoriteMutationVariables>(InsertCompanyFavoriteDocument, options);
+ return Apollo.useMutation<InsertOnePersonMutation, InsertOnePersonMutationVariables>(InsertOnePersonDocument, options);
}
-export type InsertCompanyFavoriteMutationHookResult = ReturnType<typeof useInsertCompanyFavoriteMutation>;
-export type InsertCompanyFavoriteMutationResult = Apollo.MutationResult<InsertCompanyFavoriteMutation>;
-export type InsertCompanyFavoriteMutationOptions = Apollo.BaseMutationOptions<InsertCompanyFavoriteMutation, InsertCompanyFavoriteMutationVariables>;
-export const DeleteFavoriteDocument = gql`
- mutation DeleteFavorite($where: FavoriteWhereInput!) {
- deleteFavorite(where: $where) {
+export type InsertOnePersonMutationHookResult = ReturnType<typeof useInsertOnePersonMutation>;
+export type InsertOnePersonMutationResult = Apollo.MutationResult<InsertOnePersonMutation>;
+export type InsertOnePersonMutationOptions = Apollo.BaseMutationOptions<InsertOnePersonMutation, InsertOnePersonMutationVariables>;
+export const RemovePersonPictureDocument = gql`
+ mutation RemovePersonPicture($where: PersonWhereUniqueInput!) {
+ updateOnePerson(data: {avatarUrl: null}, where: $where) {
id
+ avatarUrl
}
}
`;
-export type DeleteFavoriteMutationFn = Apollo.MutationFunction<DeleteFavoriteMutation, DeleteFavoriteMutationVariables>;
+export type RemovePersonPictureMutationFn = Apollo.MutationFunction<RemovePersonPictureMutation, RemovePersonPictureMutationVariables>;
/**
- * __useDeleteFavoriteMutation__
+ * __useRemovePersonPictureMutation__
*
- * To run a mutation, you first call `useDeleteFavoriteMutation` within a React component and pass it any options that fit your needs.
- * When your component renders, `useDeleteFavoriteMutation` returns a tuple that includes:
+ * To run a mutation, you first call `useRemovePersonPictureMutation` within a React component and pass it any options that fit your needs.
+ * When your component renders, `useRemovePersonPictureMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
- * const [deleteFavoriteMutation, { data, loading, error }] = useDeleteFavoriteMutation({
+ * const [removePersonPictureMutation, { data, loading, error }] = useRemovePersonPictureMutation({
* variables: {
* where: // value for 'where'
* },
* });
*/
-export function useDeleteFavoriteMutation(baseOptions?: Apollo.MutationHookOptions<DeleteFavoriteMutation, DeleteFavoriteMutationVariables>) {
+export function useRemovePersonPictureMutation(baseOptions?: Apollo.MutationHookOptions<RemovePersonPictureMutation, RemovePersonPictureMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
- return Apollo.useMutation<DeleteFavoriteMutation, DeleteFavoriteMutationVariables>(DeleteFavoriteDocument, options);
+ return Apollo.useMutation<RemovePersonPictureMutation, RemovePersonPictureMutationVariables>(RemovePersonPictureDocument, options);
}
-export type DeleteFavoriteMutationHookResult = ReturnType<typeof useDeleteFavoriteMutation>;
-export type DeleteFavoriteMutationResult = Apollo.MutationResult<DeleteFavoriteMutation>;
-export type DeleteFavoriteMutationOptions = Apollo.BaseMutationOptions<DeleteFavoriteMutation, DeleteFavoriteMutationVariables>;
+export type RemovePersonPictureMutationHookResult = ReturnType<typeof useRemovePersonPictureMutation>;
+export type RemovePersonPictureMutationResult = Apollo.MutationResult<RemovePersonPictureMutation>;
+export type RemovePersonPictureMutationOptions = Apollo.BaseMutationOptions<RemovePersonPictureMutation, RemovePersonPictureMutationVariables>;
+export const UpdateOnePersonDocument = gql`
+ mutation UpdateOnePerson($where: PersonWhereUniqueInput!, $data: PersonUpdateInput!) {
+ updateOnePerson(data: $data, where: $where) {
+ id
+ city
+ company {
+ domainName
+ name
+ id
+ }
+ email
+ jobTitle
+ linkedinUrl
+ xUrl
+ firstName
+ lastName
+ displayName
+ phone
+ createdAt
+ }
+}
+ `;
+export type UpdateOnePersonMutationFn = Apollo.MutationFunction<UpdateOnePersonMutation, UpdateOnePersonMutationVariables>;
+
+/**
+ * __useUpdateOnePersonMutation__
+ *
+ * To run a mutation, you first call `useUpdateOnePersonMutation` within a React component and pass it any options that fit your needs.
+ * When your component renders, `useUpdateOnePersonMutation` returns a tuple that includes:
+ * - A mutate function that you can call at any time to execute the mutation
+ * - An object with fields that represent the current status of the mutation's execution
+ *
+ * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
+ *
+ * @example
+ * const [updateOnePersonMutation, { data, loading, error }] = useUpdateOnePersonMutation({
+ * variables: {
+ * where: // value for 'where'
+ * data: // value for 'data'
+ * },
+ * });
+ */
+export function useUpdateOnePersonMutation(baseOptions?: Apollo.MutationHookOptions<UpdateOnePersonMutation, UpdateOnePersonMutationVariables>) {
+ const options = {...defaultOptions, ...baseOptions}
+ return Apollo.useMutation<UpdateOnePersonMutation, UpdateOnePersonMutationVariables>(UpdateOnePersonDocument, options);
+ }
+export type UpdateOnePersonMutationHookResult = ReturnType<typeof useUpdateOnePersonMutation>;
+export type UpdateOnePersonMutationResult = Apollo.MutationResult<UpdateOnePersonMutation>;
+export type UpdateOnePersonMutationOptions = Apollo.BaseMutationOptions<UpdateOnePersonMutation, UpdateOnePersonMutationVariables>;
+export const UploadPersonPictureDocument = gql`
+ mutation UploadPersonPicture($id: String!, $file: Upload!) {
+ uploadPersonPicture(id: $id, file: $file)
+}
+ `;
+export type UploadPersonPictureMutationFn = Apollo.MutationFunction<UploadPersonPictureMutation, UploadPersonPictureMutationVariables>;
+
+/**
+ * __useUploadPersonPictureMutation__
+ *
+ * To run a mutation, you first call `useUploadPersonPictureMutation` within a React component and pass it any options that fit your needs.
+ * When your component renders, `useUploadPersonPictureMutation` returns a tuple that includes:
+ * - A mutate function that you can call at any time to execute the mutation
+ * - An object with fields that represent the current status of the mutation's execution
+ *
+ * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
+ *
+ * @example
+ * const [uploadPersonPictureMutation, { data, loading, error }] = useUploadPersonPictureMutation({
+ * variables: {
+ * id: // value for 'id'
+ * file: // value for 'file'
+ * },
+ * });
+ */
+export function useUploadPersonPictureMutation(baseOptions?: Apollo.MutationHookOptions<UploadPersonPictureMutation, UploadPersonPictureMutationVariables>) {
+ const options = {...defaultOptions, ...baseOptions}
+ return Apollo.useMutation<UploadPersonPictureMutation, UploadPersonPictureMutationVariables>(UploadPersonPictureDocument, options);
+ }
+export type UploadPersonPictureMutationHookResult = ReturnType<typeof useUploadPersonPictureMutation>;
+export type UploadPersonPictureMutationResult = Apollo.MutationResult<UploadPersonPictureMutation>;
+export type UploadPersonPictureMutationOptions = Apollo.BaseMutationOptions<UploadPersonPictureMutation, UploadPersonPictureMutationVariables>;
export const GetPeopleDocument = gql`
query GetPeople($orderBy: [PersonOrderByWithRelationInput!], $where: PersonWhereInput, $limit: Int) {
people: findManyPerson(orderBy: $orderBy, where: $where, take: $limit) {
@@ -4475,117 +4636,139 @@ export function useGetPeopleLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<
export type GetPeopleQueryHookResult = ReturnType<typeof useGetPeopleQuery>;
export type GetPeopleLazyQueryHookResult = ReturnType<typeof useGetPeopleLazyQuery>;
export type GetPeopleQueryResult = Apollo.QueryResult<GetPeopleQuery, GetPeopleQueryVariables>;
-export const GetPersonPhoneByIdDocument = gql`
- query GetPersonPhoneById($id: String!) {
- person: findUniquePerson(id: $id) {
+export const GetPersonDocument = gql`
+ query GetPerson($id: String!) {
+ findUniquePerson(id: $id) {
id
+ firstName
+ lastName
+ displayName
+ email
+ createdAt
+ city
+ jobTitle
+ linkedinUrl
+ xUrl
+ avatarUrl
phone
+ _activityCount
+ company {
+ id
+ name
+ domainName
+ }
+ Favorite {
+ id
+ person {
+ id
+ }
+ company {
+ id
+ }
+ }
}
}
`;
/**
- * __useGetPersonPhoneByIdQuery__
+ * __useGetPersonQuery__
*
- * To run a query within a React component, call `useGetPersonPhoneByIdQuery` and pass it any options that fit your needs.
- * When your component renders, `useGetPersonPhoneByIdQuery` returns an object from Apollo Client that contains loading, error, and data properties
+ * To run a query within a React component, call `useGetPersonQuery` and pass it any options that fit your needs.
+ * When your component renders, `useGetPersonQuery` returns an object from Apollo Client that contains loading, error, and data properties
* you can use to render your UI.
*
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
*
* @example
- * const { data, loading, error } = useGetPersonPhoneByIdQuery({
+ * const { data, loading, error } = useGetPersonQuery({
* variables: {
* id: // value for 'id'
* },
* });
*/
-export function useGetPersonPhoneByIdQuery(baseOptions: Apollo.QueryHookOptions<GetPersonPhoneByIdQuery, GetPersonPhoneByIdQueryVariables>) {
+export function useGetPersonQuery(baseOptions: Apollo.QueryHookOptions<GetPersonQuery, GetPersonQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
- return Apollo.useQuery<GetPersonPhoneByIdQuery, GetPersonPhoneByIdQueryVariables>(GetPersonPhoneByIdDocument, options);
+ return Apollo.useQuery<GetPersonQuery, GetPersonQueryVariables>(GetPersonDocument, options);
}
-export function useGetPersonPhoneByIdLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetPersonPhoneByIdQuery, GetPersonPhoneByIdQueryVariables>) {
+export function useGetPersonLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetPersonQuery, GetPersonQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
- return Apollo.useLazyQuery<GetPersonPhoneByIdQuery, GetPersonPhoneByIdQueryVariables>(GetPersonPhoneByIdDocument, options);
+ return Apollo.useLazyQuery<GetPersonQuery, GetPersonQueryVariables>(GetPersonDocument, options);
}
-export type GetPersonPhoneByIdQueryHookResult = ReturnType<typeof useGetPersonPhoneByIdQuery>;
-export type GetPersonPhoneByIdLazyQueryHookResult = ReturnType<typeof useGetPersonPhoneByIdLazyQuery>;
-export type GetPersonPhoneByIdQueryResult = Apollo.QueryResult<GetPersonPhoneByIdQuery, GetPersonPhoneByIdQueryVariables>;
-export const GetPersonEmailByIdDocument = gql`
- query GetPersonEmailById($id: String!) {
+export type GetPersonQueryHookResult = ReturnType<typeof useGetPersonQuery>;
+export type GetPersonLazyQueryHookResult = ReturnType<typeof useGetPersonLazyQuery>;
+export type GetPersonQueryResult = Apollo.QueryResult<GetPersonQuery, GetPersonQueryVariables>;
+export const GetPersonCityByIdDocument = gql`
+ query GetPersonCityById($id: String!) {
person: findUniquePerson(id: $id) {
id
- email
+ city
}
}
`;
/**
- * __useGetPersonEmailByIdQuery__
+ * __useGetPersonCityByIdQuery__
*
- * To run a query within a React component, call `useGetPersonEmailByIdQuery` and pass it any options that fit your needs.
- * When your component renders, `useGetPersonEmailByIdQuery` returns an object from Apollo Client that contains loading, error, and data properties
+ * To run a query within a React component, call `useGetPersonCityByIdQuery` and pass it any options that fit your needs.
+ * When your component renders, `useGetPersonCityByIdQuery` returns an object from Apollo Client that contains loading, error, and data properties
* you can use to render your UI.
*
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
*
* @example
- * const { data, loading, error } = useGetPersonEmailByIdQuery({
+ * const { data, loading, error } = useGetPersonCityByIdQuery({
* variables: {
* id: // value for 'id'
* },
* });
*/
-export function useGetPersonEmailByIdQuery(baseOptions: Apollo.QueryHookOptions<GetPersonEmailByIdQuery, GetPersonEmailByIdQueryVariables>) {
+export function useGetPersonCityByIdQuery(baseOptions: Apollo.QueryHookOptions<GetPersonCityByIdQuery, GetPersonCityByIdQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
- return Apollo.useQuery<GetPersonEmailByIdQuery, GetPersonEmailByIdQueryVariables>(GetPersonEmailByIdDocument, options);
+ return Apollo.useQuery<GetPersonCityByIdQuery, GetPersonCityByIdQueryVariables>(GetPersonCityByIdDocument, options);
}
-export function useGetPersonEmailByIdLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetPersonEmailByIdQuery, GetPersonEmailByIdQueryVariables>) {
+export function useGetPersonCityByIdLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetPersonCityByIdQuery, GetPersonCityByIdQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
- return Apollo.useLazyQuery<GetPersonEmailByIdQuery, GetPersonEmailByIdQueryVariables>(GetPersonEmailByIdDocument, options);
+ return Apollo.useLazyQuery<GetPersonCityByIdQuery, GetPersonCityByIdQueryVariables>(GetPersonCityByIdDocument, options);
}
-export type GetPersonEmailByIdQueryHookResult = ReturnType<typeof useGetPersonEmailByIdQuery>;
-export type GetPersonEmailByIdLazyQueryHookResult = ReturnType<typeof useGetPersonEmailByIdLazyQuery>;
-export type GetPersonEmailByIdQueryResult = Apollo.QueryResult<GetPersonEmailByIdQuery, GetPersonEmailByIdQueryVariables>;
-export const GetPersonNamesAndCommentCountByIdDocument = gql`
- query GetPersonNamesAndCommentCountById($id: String!) {
+export type GetPersonCityByIdQueryHookResult = ReturnType<typeof useGetPersonCityByIdQuery>;
+export type GetPersonCityByIdLazyQueryHookResult = ReturnType<typeof useGetPersonCityByIdLazyQuery>;
+export type GetPersonCityByIdQueryResult = Apollo.QueryResult<GetPersonCityByIdQuery, GetPersonCityByIdQueryVariables>;
+export const GetPersonCommentCountByIdDocument = gql`
+ query GetPersonCommentCountById($id: String!) {
person: findUniquePerson(id: $id) {
id
- firstName
- lastName
- displayName
_activityCount
}
}
`;
/**
- * __useGetPersonNamesAndCommentCountByIdQuery__
+ * __useGetPersonCommentCountByIdQuery__
*
- * To run a query within a React component, call `useGetPersonNamesAndCommentCountByIdQuery` and pass it any options that fit your needs.
- * When your component renders, `useGetPersonNamesAndCommentCountByIdQuery` returns an object from Apollo Client that contains loading, error, and data properties
+ * To run a query within a React component, call `useGetPersonCommentCountByIdQuery` and pass it any options that fit your needs.
+ * When your component renders, `useGetPersonCommentCountByIdQuery` returns an object from Apollo Client that contains loading, error, and data properties
* you can use to render your UI.
*
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
*
* @example
- * const { data, loading, error } = useGetPersonNamesAndCommentCountByIdQuery({
+ * const { data, loading, error } = useGetPersonCommentCountByIdQuery({
* variables: {
* id: // value for 'id'
* },
* });
*/
-export function useGetPersonNamesAndCommentCountByIdQuery(baseOptions: Apollo.QueryHookOptions<GetPersonNamesAndCommentCountByIdQuery, GetPersonNamesAndCommentCountByIdQueryVariables>) {
+export function useGetPersonCommentCountByIdQuery(baseOptions: Apollo.QueryHookOptions<GetPersonCommentCountByIdQuery, GetPersonCommentCountByIdQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
- return Apollo.useQuery<GetPersonNamesAndCommentCountByIdQuery, GetPersonNamesAndCommentCountByIdQueryVariables>(GetPersonNamesAndCommentCountByIdDocument, options);
+ return Apollo.useQuery<GetPersonCommentCountByIdQuery, GetPersonCommentCountByIdQueryVariables>(GetPersonCommentCountByIdDocument, options);
}
-export function useGetPersonNamesAndCommentCountByIdLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetPersonNamesAndCommentCountByIdQuery, GetPersonNamesAndCommentCountByIdQueryVariables>) {
+export function useGetPersonCommentCountByIdLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetPersonCommentCountByIdQuery, GetPersonCommentCountByIdQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
- return Apollo.useLazyQuery<GetPersonNamesAndCommentCountByIdQuery, GetPersonNamesAndCommentCountByIdQueryVariables>(GetPersonNamesAndCommentCountByIdDocument, options);
+ return Apollo.useLazyQuery<GetPersonCommentCountByIdQuery, GetPersonCommentCountByIdQueryVariables>(GetPersonCommentCountByIdDocument, options);
}
-export type GetPersonNamesAndCommentCountByIdQueryHookResult = ReturnType<typeof useGetPersonNamesAndCommentCountByIdQuery>;
-export type GetPersonNamesAndCommentCountByIdLazyQueryHookResult = ReturnType<typeof useGetPersonNamesAndCommentCountByIdLazyQuery>;
-export type GetPersonNamesAndCommentCountByIdQueryResult = Apollo.QueryResult<GetPersonNamesAndCommentCountByIdQuery, GetPersonNamesAndCommentCountByIdQueryVariables>;
+export type GetPersonCommentCountByIdQueryHookResult = ReturnType<typeof useGetPersonCommentCountByIdQuery>;
+export type GetPersonCommentCountByIdLazyQueryHookResult = ReturnType<typeof useGetPersonCommentCountByIdLazyQuery>;
+export type GetPersonCommentCountByIdQueryResult = Apollo.QueryResult<GetPersonCommentCountByIdQuery, GetPersonCommentCountByIdQueryVariables>;
export const GetPersonCompanyByIdDocument = gql`
query GetPersonCompanyById($id: String!) {
person: findUniquePerson(id: $id) {
@@ -4626,53 +4809,17 @@ export function useGetPersonCompanyByIdLazyQuery(baseOptions?: Apollo.LazyQueryH
export type GetPersonCompanyByIdQueryHookResult = ReturnType<typeof useGetPersonCompanyByIdQuery>;
export type GetPersonCompanyByIdLazyQueryHookResult = ReturnType<typeof useGetPersonCompanyByIdLazyQuery>;
export type GetPersonCompanyByIdQueryResult = Apollo.QueryResult<GetPersonCompanyByIdQuery, GetPersonCompanyByIdQueryVariables>;
-export const GetPersonCommentCountByIdDocument = gql`
- query GetPersonCommentCountById($id: String!) {
+export const GetPersonCreatedAtByIdDocument = gql`
+ query GetPersonCreatedAtById($id: String!) {
person: findUniquePerson(id: $id) {
id
- _activityCount
+ createdAt
}
}
`;
/**
- * __useGetPersonCommentCountByIdQuery__
- *
- * To run a query within a React component, call `useGetPersonCommentCountByIdQuery` and pass it any options that fit your needs.
- * When your component renders, `useGetPersonCommentCountByIdQuery` returns an object from Apollo Client that contains loading, error, and data properties
- * you can use to render your UI.
- *
- * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
- *
- * @example
- * const { data, loading, error } = useGetPersonCommentCountByIdQuery({
- * variables: {
- * id: // value for 'id'
- * },
- * });
- */
-export function useGetPersonCommentCountByIdQuery(baseOptions: Apollo.QueryHookOptions<GetPersonCommentCountByIdQuery, GetPersonCommentCountByIdQueryVariables>) {
- const options = {...defaultOptions, ...baseOptions}
- return Apollo.useQuery<GetPersonCommentCountByIdQuery, GetPersonCommentCountByIdQueryVariables>(GetPersonCommentCountByIdDocument, options);
- }
-export function useGetPersonCommentCountByIdLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetPersonCommentCountByIdQuery, GetPersonCommentCountByIdQueryVariables>) {
- const options = {...defaultOptions, ...baseOptions}
- return Apollo.useLazyQuery<GetPersonCommentCountByIdQuery, GetPersonCommentCountByIdQueryVariables>(GetPersonCommentCountByIdDocument, options);
- }
-export type GetPersonCommentCountByIdQueryHookResult = ReturnType<typeof useGetPersonCommentCountByIdQuery>;
-export type GetPersonCommentCountByIdLazyQueryHookResult = ReturnType<typeof useGetPersonCommentCountByIdLazyQuery>;
-export type GetPersonCommentCountByIdQueryResult = Apollo.QueryResult<GetPersonCommentCountByIdQuery, GetPersonCommentCountByIdQueryVariables>;
-export const GetPersonCreatedAtByIdDocument = gql`
- query GetPersonCreatedAtById($id: String!) {
- person: findUniquePerson(id: $id) {
- id
- createdAt
- }
-}
- `;
-
-/**
- * __useGetPersonCreatedAtByIdQuery__
+ * __useGetPersonCreatedAtByIdQuery__
*
* To run a query within a React component, call `useGetPersonCreatedAtByIdQuery` and pass it any options that fit your needs.
* When your component renders, `useGetPersonCreatedAtByIdQuery` returns an object from Apollo Client that contains loading, error, and data properties
@@ -4698,377 +4845,155 @@ export function useGetPersonCreatedAtByIdLazyQuery(baseOptions?: Apollo.LazyQuer
export type GetPersonCreatedAtByIdQueryHookResult = ReturnType<typeof useGetPersonCreatedAtByIdQuery>;
export type GetPersonCreatedAtByIdLazyQueryHookResult = ReturnType<typeof useGetPersonCreatedAtByIdLazyQuery>;
export type GetPersonCreatedAtByIdQueryResult = Apollo.QueryResult<GetPersonCreatedAtByIdQuery, GetPersonCreatedAtByIdQueryVariables>;
-export const GetPersonCityByIdDocument = gql`
- query GetPersonCityById($id: String!) {
+export const GetPersonEmailByIdDocument = gql`
+ query GetPersonEmailById($id: String!) {
person: findUniquePerson(id: $id) {
id
- city
+ email
}
}
`;
/**
- * __useGetPersonCityByIdQuery__
+ * __useGetPersonEmailByIdQuery__
*
- * To run a query within a React component, call `useGetPersonCityByIdQuery` and pass it any options that fit your needs.
- * When your component renders, `useGetPersonCityByIdQuery` returns an object from Apollo Client that contains loading, error, and data properties
+ * To run a query within a React component, call `useGetPersonEmailByIdQuery` and pass it any options that fit your needs.
+ * When your component renders, `useGetPersonEmailByIdQuery` returns an object from Apollo Client that contains loading, error, and data properties
* you can use to render your UI.
*
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
*
* @example
- * const { data, loading, error } = useGetPersonCityByIdQuery({
+ * const { data, loading, error } = useGetPersonEmailByIdQuery({
* variables: {
* id: // value for 'id'
* },
* });
*/
-export function useGetPersonCityByIdQuery(baseOptions: Apollo.QueryHookOptions<GetPersonCityByIdQuery, GetPersonCityByIdQueryVariables>) {
+export function useGetPersonEmailByIdQuery(baseOptions: Apollo.QueryHookOptions<GetPersonEmailByIdQuery, GetPersonEmailByIdQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
- return Apollo.useQuery<GetPersonCityByIdQuery, GetPersonCityByIdQueryVariables>(GetPersonCityByIdDocument, options);
+ return Apollo.useQuery<GetPersonEmailByIdQuery, GetPersonEmailByIdQueryVariables>(GetPersonEmailByIdDocument, options);
}
-export function useGetPersonCityByIdLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetPersonCityByIdQuery, GetPersonCityByIdQueryVariables>) {
+export function useGetPersonEmailByIdLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetPersonEmailByIdQuery, GetPersonEmailByIdQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
- return Apollo.useLazyQuery<GetPersonCityByIdQuery, GetPersonCityByIdQueryVariables>(GetPersonCityByIdDocument, options);
+ return Apollo.useLazyQuery<GetPersonEmailByIdQuery, GetPersonEmailByIdQueryVariables>(GetPersonEmailByIdDocument, options);
}
-export type GetPersonCityByIdQueryHookResult = ReturnType<typeof useGetPersonCityByIdQuery>;
-export type GetPersonCityByIdLazyQueryHookResult = ReturnType<typeof useGetPersonCityByIdLazyQuery>;
-export type GetPersonCityByIdQueryResult = Apollo.QueryResult<GetPersonCityByIdQuery, GetPersonCityByIdQueryVariables>;
-export const GetPersonDocument = gql`
- query GetPerson($id: String!) {
- findUniquePerson(id: $id) {
+export type GetPersonEmailByIdQueryHookResult = ReturnType<typeof useGetPersonEmailByIdQuery>;
+export type GetPersonEmailByIdLazyQueryHookResult = ReturnType<typeof useGetPersonEmailByIdLazyQuery>;
+export type GetPersonEmailByIdQueryResult = Apollo.QueryResult<GetPersonEmailByIdQuery, GetPersonEmailByIdQueryVariables>;
+export const GetPersonNamesAndCommentCountByIdDocument = gql`
+ query GetPersonNamesAndCommentCountById($id: String!) {
+ person: findUniquePerson(id: $id) {
id
firstName
lastName
displayName
- email
- createdAt
- city
- jobTitle
- linkedinUrl
- xUrl
- avatarUrl
- phone
_activityCount
- company {
- id
- name
- domainName
- }
- Favorite {
- id
- person {
- id
- }
- company {
- id
- }
- }
}
}
`;
/**
- * __useGetPersonQuery__
+ * __useGetPersonNamesAndCommentCountByIdQuery__
*
- * To run a query within a React component, call `useGetPersonQuery` and pass it any options that fit your needs.
- * When your component renders, `useGetPersonQuery` returns an object from Apollo Client that contains loading, error, and data properties
+ * To run a query within a React component, call `useGetPersonNamesAndCommentCountByIdQuery` and pass it any options that fit your needs.
+ * When your component renders, `useGetPersonNamesAndCommentCountByIdQuery` returns an object from Apollo Client that contains loading, error, and data properties
* you can use to render your UI.
*
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
*
* @example
- * const { data, loading, error } = useGetPersonQuery({
+ * const { data, loading, error } = useGetPersonNamesAndCommentCountByIdQuery({
* variables: {
* id: // value for 'id'
* },
* });
*/
-export function useGetPersonQuery(baseOptions: Apollo.QueryHookOptions<GetPersonQuery, GetPersonQueryVariables>) {
+export function useGetPersonNamesAndCommentCountByIdQuery(baseOptions: Apollo.QueryHookOptions<GetPersonNamesAndCommentCountByIdQuery, GetPersonNamesAndCommentCountByIdQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
- return Apollo.useQuery<GetPersonQuery, GetPersonQueryVariables>(GetPersonDocument, options);
+ return Apollo.useQuery<GetPersonNamesAndCommentCountByIdQuery, GetPersonNamesAndCommentCountByIdQueryVariables>(GetPersonNamesAndCommentCountByIdDocument, options);
}
-export function useGetPersonLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetPersonQuery, GetPersonQueryVariables>) {
+export function useGetPersonNamesAndCommentCountByIdLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetPersonNamesAndCommentCountByIdQuery, GetPersonNamesAndCommentCountByIdQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
- return Apollo.useLazyQuery<GetPersonQuery, GetPersonQueryVariables>(GetPersonDocument, options);
+ return Apollo.useLazyQuery<GetPersonNamesAndCommentCountByIdQuery, GetPersonNamesAndCommentCountByIdQueryVariables>(GetPersonNamesAndCommentCountByIdDocument, options);
}
-export type GetPersonQueryHookResult = ReturnType<typeof useGetPersonQuery>;
-export type GetPersonLazyQueryHookResult = ReturnType<typeof useGetPersonLazyQuery>;
-export type GetPersonQueryResult = Apollo.QueryResult<GetPersonQuery, GetPersonQueryVariables>;
-export const UpdateOnePersonDocument = gql`
- mutation UpdateOnePerson($where: PersonWhereUniqueInput!, $data: PersonUpdateInput!) {
- updateOnePerson(data: $data, where: $where) {
+export type GetPersonNamesAndCommentCountByIdQueryHookResult = ReturnType<typeof useGetPersonNamesAndCommentCountByIdQuery>;
+export type GetPersonNamesAndCommentCountByIdLazyQueryHookResult = ReturnType<typeof useGetPersonNamesAndCommentCountByIdLazyQuery>;
+export type GetPersonNamesAndCommentCountByIdQueryResult = Apollo.QueryResult<GetPersonNamesAndCommentCountByIdQuery, GetPersonNamesAndCommentCountByIdQueryVariables>;
+export const GetPersonPhoneByIdDocument = gql`
+ query GetPersonPhoneById($id: String!) {
+ person: findUniquePerson(id: $id) {
id
- city
- company {
- domainName
- name
- id
- }
- email
- jobTitle
- linkedinUrl
- xUrl
- firstName
- lastName
- displayName
phone
- createdAt
}
}
`;
-export type UpdateOnePersonMutationFn = Apollo.MutationFunction<UpdateOnePersonMutation, UpdateOnePersonMutationVariables>;
/**
- * __useUpdateOnePersonMutation__
- *
- * To run a mutation, you first call `useUpdateOnePersonMutation` within a React component and pass it any options that fit your needs.
- * When your component renders, `useUpdateOnePersonMutation` returns a tuple that includes:
- * - A mutate function that you can call at any time to execute the mutation
- * - An object with fields that represent the current status of the mutation's execution
- *
- * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
- *
- * @example
- * const [updateOnePersonMutation, { data, loading, error }] = useUpdateOnePersonMutation({
- * variables: {
- * where: // value for 'where'
- * data: // value for 'data'
- * },
- * });
- */
-export function useUpdateOnePersonMutation(baseOptions?: Apollo.MutationHookOptions<UpdateOnePersonMutation, UpdateOnePersonMutationVariables>) {
- const options = {...defaultOptions, ...baseOptions}
- return Apollo.useMutation<UpdateOnePersonMutation, UpdateOnePersonMutationVariables>(UpdateOnePersonDocument, options);
- }
-export type UpdateOnePersonMutationHookResult = ReturnType<typeof useUpdateOnePersonMutation>;
-export type UpdateOnePersonMutationResult = Apollo.MutationResult<UpdateOnePersonMutation>;
-export type UpdateOnePersonMutationOptions = Apollo.BaseMutationOptions<UpdateOnePersonMutation, UpdateOnePersonMutationVariables>;
-export const InsertOnePersonDocument = gql`
- mutation InsertOnePerson($data: PersonCreateInput!) {
- createOnePerson(data: $data) {
- ...InsertPersonFragment
- }
-}
- ${InsertPersonFragmentFragmentDoc}`;
-export type InsertOnePersonMutationFn = Apollo.MutationFunction<InsertOnePersonMutation, InsertOnePersonMutationVariables>;
-
-/**
- * __useInsertOnePersonMutation__
- *
- * To run a mutation, you first call `useInsertOnePersonMutation` within a React component and pass it any options that fit your needs.
- * When your component renders, `useInsertOnePersonMutation` returns a tuple that includes:
- * - A mutate function that you can call at any time to execute the mutation
- * - An object with fields that represent the current status of the mutation's execution
- *
- * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
- *
- * @example
- * const [insertOnePersonMutation, { data, loading, error }] = useInsertOnePersonMutation({
- * variables: {
- * data: // value for 'data'
- * },
- * });
- */
-export function useInsertOnePersonMutation(baseOptions?: Apollo.MutationHookOptions<InsertOnePersonMutation, InsertOnePersonMutationVariables>) {
- const options = {...defaultOptions, ...baseOptions}
- return Apollo.useMutation<InsertOnePersonMutation, InsertOnePersonMutationVariables>(InsertOnePersonDocument, options);
- }
-export type InsertOnePersonMutationHookResult = ReturnType<typeof useInsertOnePersonMutation>;
-export type InsertOnePersonMutationResult = Apollo.MutationResult<InsertOnePersonMutation>;
-export type InsertOnePersonMutationOptions = Apollo.BaseMutationOptions<InsertOnePersonMutation, InsertOnePersonMutationVariables>;
-export const DeleteManyPersonDocument = gql`
- mutation DeleteManyPerson($ids: [String!]) {
- deleteManyPerson(where: {id: {in: $ids}}) {
- count
- }
-}
- `;
-export type DeleteManyPersonMutationFn = Apollo.MutationFunction<DeleteManyPersonMutation, DeleteManyPersonMutationVariables>;
-
-/**
- * __useDeleteManyPersonMutation__
- *
- * To run a mutation, you first call `useDeleteManyPersonMutation` within a React component and pass it any options that fit your needs.
- * When your component renders, `useDeleteManyPersonMutation` returns a tuple that includes:
- * - A mutate function that you can call at any time to execute the mutation
- * - An object with fields that represent the current status of the mutation's execution
- *
- * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
- *
- * @example
- * const [deleteManyPersonMutation, { data, loading, error }] = useDeleteManyPersonMutation({
- * variables: {
- * ids: // value for 'ids'
- * },
- * });
- */
-export function useDeleteManyPersonMutation(baseOptions?: Apollo.MutationHookOptions<DeleteManyPersonMutation, DeleteManyPersonMutationVariables>) {
- const options = {...defaultOptions, ...baseOptions}
- return Apollo.useMutation<DeleteManyPersonMutation, DeleteManyPersonMutationVariables>(DeleteManyPersonDocument, options);
- }
-export type DeleteManyPersonMutationHookResult = ReturnType<typeof useDeleteManyPersonMutation>;
-export type DeleteManyPersonMutationResult = Apollo.MutationResult<DeleteManyPersonMutation>;
-export type DeleteManyPersonMutationOptions = Apollo.BaseMutationOptions<DeleteManyPersonMutation, DeleteManyPersonMutationVariables>;
-export const UploadPersonPictureDocument = gql`
- mutation UploadPersonPicture($id: String!, $file: Upload!) {
- uploadPersonPicture(id: $id, file: $file)
-}
- `;
-export type UploadPersonPictureMutationFn = Apollo.MutationFunction<UploadPersonPictureMutation, UploadPersonPictureMutationVariables>;
-
-/**
- * __useUploadPersonPictureMutation__
- *
- * To run a mutation, you first call `useUploadPersonPictureMutation` within a React component and pass it any options that fit your needs.
- * When your component renders, `useUploadPersonPictureMutation` returns a tuple that includes:
- * - A mutate function that you can call at any time to execute the mutation
- * - An object with fields that represent the current status of the mutation's execution
- *
- * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
- *
- * @example
- * const [uploadPersonPictureMutation, { data, loading, error }] = useUploadPersonPictureMutation({
- * variables: {
- * id: // value for 'id'
- * file: // value for 'file'
- * },
- * });
- */
-export function useUploadPersonPictureMutation(baseOptions?: Apollo.MutationHookOptions<UploadPersonPictureMutation, UploadPersonPictureMutationVariables>) {
- const options = {...defaultOptions, ...baseOptions}
- return Apollo.useMutation<UploadPersonPictureMutation, UploadPersonPictureMutationVariables>(UploadPersonPictureDocument, options);
- }
-export type UploadPersonPictureMutationHookResult = ReturnType<typeof useUploadPersonPictureMutation>;
-export type UploadPersonPictureMutationResult = Apollo.MutationResult<UploadPersonPictureMutation>;
-export type UploadPersonPictureMutationOptions = Apollo.BaseMutationOptions<UploadPersonPictureMutation, UploadPersonPictureMutationVariables>;
-export const RemovePersonPictureDocument = gql`
- mutation RemovePersonPicture($where: PersonWhereUniqueInput!) {
- updateOnePerson(data: {avatarUrl: null}, where: $where) {
- id
- avatarUrl
- }
-}
- `;
-export type RemovePersonPictureMutationFn = Apollo.MutationFunction<RemovePersonPictureMutation, RemovePersonPictureMutationVariables>;
-
-/**
- * __useRemovePersonPictureMutation__
- *
- * To run a mutation, you first call `useRemovePersonPictureMutation` within a React component and pass it any options that fit your needs.
- * When your component renders, `useRemovePersonPictureMutation` returns a tuple that includes:
- * - A mutate function that you can call at any time to execute the mutation
- * - An object with fields that represent the current status of the mutation's execution
- *
- * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
- *
- * @example
- * const [removePersonPictureMutation, { data, loading, error }] = useRemovePersonPictureMutation({
- * variables: {
- * where: // value for 'where'
- * },
- * });
- */
-export function useRemovePersonPictureMutation(baseOptions?: Apollo.MutationHookOptions<RemovePersonPictureMutation, RemovePersonPictureMutationVariables>) {
- const options = {...defaultOptions, ...baseOptions}
- return Apollo.useMutation<RemovePersonPictureMutation, RemovePersonPictureMutationVariables>(RemovePersonPictureDocument, options);
- }
-export type RemovePersonPictureMutationHookResult = ReturnType<typeof useRemovePersonPictureMutation>;
-export type RemovePersonPictureMutationResult = Apollo.MutationResult<RemovePersonPictureMutation>;
-export type RemovePersonPictureMutationOptions = Apollo.BaseMutationOptions<RemovePersonPictureMutation, RemovePersonPictureMutationVariables>;
-export const GetPipelinesDocument = gql`
- query GetPipelines($where: PipelineWhereInput) {
- findManyPipeline(where: $where) {
- id
- name
- pipelineProgressableType
- pipelineStages {
- id
- name
- color
- index
- }
- }
-}
- `;
-
-/**
- * __useGetPipelinesQuery__
+ * __useGetPersonPhoneByIdQuery__
*
- * To run a query within a React component, call `useGetPipelinesQuery` and pass it any options that fit your needs.
- * When your component renders, `useGetPipelinesQuery` returns an object from Apollo Client that contains loading, error, and data properties
+ * To run a query within a React component, call `useGetPersonPhoneByIdQuery` and pass it any options that fit your needs.
+ * When your component renders, `useGetPersonPhoneByIdQuery` returns an object from Apollo Client that contains loading, error, and data properties
* you can use to render your UI.
*
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
*
* @example
- * const { data, loading, error } = useGetPipelinesQuery({
+ * const { data, loading, error } = useGetPersonPhoneByIdQuery({
* variables: {
- * where: // value for 'where'
+ * id: // value for 'id'
* },
* });
*/
-export function useGetPipelinesQuery(baseOptions?: Apollo.QueryHookOptions<GetPipelinesQuery, GetPipelinesQueryVariables>) {
+export function useGetPersonPhoneByIdQuery(baseOptions: Apollo.QueryHookOptions<GetPersonPhoneByIdQuery, GetPersonPhoneByIdQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
- return Apollo.useQuery<GetPipelinesQuery, GetPipelinesQueryVariables>(GetPipelinesDocument, options);
+ return Apollo.useQuery<GetPersonPhoneByIdQuery, GetPersonPhoneByIdQueryVariables>(GetPersonPhoneByIdDocument, options);
}
-export function useGetPipelinesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetPipelinesQuery, GetPipelinesQueryVariables>) {
+export function useGetPersonPhoneByIdLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetPersonPhoneByIdQuery, GetPersonPhoneByIdQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
- return Apollo.useLazyQuery<GetPipelinesQuery, GetPipelinesQueryVariables>(GetPipelinesDocument, options);
+ return Apollo.useLazyQuery<GetPersonPhoneByIdQuery, GetPersonPhoneByIdQueryVariables>(GetPersonPhoneByIdDocument, options);
}
-export type GetPipelinesQueryHookResult = ReturnType<typeof useGetPipelinesQuery>;
-export type GetPipelinesLazyQueryHookResult = ReturnType<typeof useGetPipelinesLazyQuery>;
-export type GetPipelinesQueryResult = Apollo.QueryResult<GetPipelinesQuery, GetPipelinesQueryVariables>;
-export const GetPipelineProgressDocument = gql`
- query GetPipelineProgress($where: PipelineProgressWhereInput, $orderBy: [PipelineProgressOrderByWithRelationInput!]) {
- findManyPipelineProgress(where: $where, orderBy: $orderBy) {
+export type GetPersonPhoneByIdQueryHookResult = ReturnType<typeof useGetPersonPhoneByIdQuery>;
+export type GetPersonPhoneByIdLazyQueryHookResult = ReturnType<typeof useGetPersonPhoneByIdLazyQuery>;
+export type GetPersonPhoneByIdQueryResult = Apollo.QueryResult<GetPersonPhoneByIdQuery, GetPersonPhoneByIdQueryVariables>;
+export const CreateOneCompanyPipelineProgressDocument = gql`
+ mutation CreateOneCompanyPipelineProgress($uuid: String!, $companyId: String!, $pipelineId: String!, $pipelineStageId: String!) {
+ createOnePipelineProgress(
+ data: {id: $uuid, company: {connect: {id: $companyId}}, pipeline: {connect: {id: $pipelineId}}, pipelineStage: {connect: {id: $pipelineStageId}}}
+ ) {
id
- pipelineStageId
- companyId
- personId
- amount
- closeDate
- pointOfContactId
- pointOfContact {
- id
- firstName
- lastName
- displayName
- avatarUrl
- }
- probability
}
}
`;
+export type CreateOneCompanyPipelineProgressMutationFn = Apollo.MutationFunction<CreateOneCompanyPipelineProgressMutation, CreateOneCompanyPipelineProgressMutationVariables>;
/**
- * __useGetPipelineProgressQuery__
+ * __useCreateOneCompanyPipelineProgressMutation__
*
- * To run a query within a React component, call `useGetPipelineProgressQuery` and pass it any options that fit your needs.
- * When your component renders, `useGetPipelineProgressQuery` returns an object from Apollo Client that contains loading, error, and data properties
- * you can use to render your UI.
+ * To run a mutation, you first call `useCreateOneCompanyPipelineProgressMutation` within a React component and pass it any options that fit your needs.
+ * When your component renders, `useCreateOneCompanyPipelineProgressMutation` returns a tuple that includes:
+ * - A mutate function that you can call at any time to execute the mutation
+ * - An object with fields that represent the current status of the mutation's execution
*
- * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
+ * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
- * const { data, loading, error } = useGetPipelineProgressQuery({
+ * const [createOneCompanyPipelineProgressMutation, { data, loading, error }] = useCreateOneCompanyPipelineProgressMutation({
* variables: {
- * where: // value for 'where'
- * orderBy: // value for 'orderBy'
+ * uuid: // value for 'uuid'
+ * companyId: // value for 'companyId'
+ * pipelineId: // value for 'pipelineId'
+ * pipelineStageId: // value for 'pipelineStageId'
* },
* });
*/
-export function useGetPipelineProgressQuery(baseOptions?: Apollo.QueryHookOptions<GetPipelineProgressQuery, GetPipelineProgressQueryVariables>) {
+export function useCreateOneCompanyPipelineProgressMutation(baseOptions?: Apollo.MutationHookOptions<CreateOneCompanyPipelineProgressMutation, CreateOneCompanyPipelineProgressMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
- return Apollo.useQuery<GetPipelineProgressQuery, GetPipelineProgressQueryVariables>(GetPipelineProgressDocument, options);
+ return Apollo.useMutation<CreateOneCompanyPipelineProgressMutation, CreateOneCompanyPipelineProgressMutationVariables>(CreateOneCompanyPipelineProgressDocument, options);
}
-export function useGetPipelineProgressLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetPipelineProgressQuery, GetPipelineProgressQueryVariables>) {
- const options = {...defaultOptions, ...baseOptions}
- return Apollo.useLazyQuery<GetPipelineProgressQuery, GetPipelineProgressQueryVariables>(GetPipelineProgressDocument, options);
- }
-export type GetPipelineProgressQueryHookResult = ReturnType<typeof useGetPipelineProgressQuery>;
-export type GetPipelineProgressLazyQueryHookResult = ReturnType<typeof useGetPipelineProgressLazyQuery>;
-export type GetPipelineProgressQueryResult = Apollo.QueryResult<GetPipelineProgressQuery, GetPipelineProgressQueryVariables>;
+export type CreateOneCompanyPipelineProgressMutationHookResult = ReturnType<typeof useCreateOneCompanyPipelineProgressMutation>;
+export type CreateOneCompanyPipelineProgressMutationResult = Apollo.MutationResult<CreateOneCompanyPipelineProgressMutation>;
+export type CreateOneCompanyPipelineProgressMutationOptions = Apollo.BaseMutationOptions<CreateOneCompanyPipelineProgressMutation, CreateOneCompanyPipelineProgressMutationVariables>;
export const DeleteManyPipelineProgressDocument = gql`
mutation DeleteManyPipelineProgress($ids: [String!]) {
deleteManyPipelineProgress(where: {id: {in: $ids}}) {
@@ -5102,42 +5027,6 @@ export function useDeleteManyPipelineProgressMutation(baseOptions?: Apollo.Mutat
export type DeleteManyPipelineProgressMutationHookResult = ReturnType<typeof useDeleteManyPipelineProgressMutation>;
export type DeleteManyPipelineProgressMutationResult = Apollo.MutationResult<DeleteManyPipelineProgressMutation>;
export type DeleteManyPipelineProgressMutationOptions = Apollo.BaseMutationOptions<DeleteManyPipelineProgressMutation, DeleteManyPipelineProgressMutationVariables>;
-export const UpdatePipelineStageDocument = gql`
- mutation UpdatePipelineStage($id: String, $data: PipelineStageUpdateInput!) {
- updateOnePipelineStage(where: {id: $id}, data: $data) {
- id
- name
- color
- }
-}
- `;
-export type UpdatePipelineStageMutationFn = Apollo.MutationFunction<UpdatePipelineStageMutation, UpdatePipelineStageMutationVariables>;
-
-/**
- * __useUpdatePipelineStageMutation__
- *
- * To run a mutation, you first call `useUpdatePipelineStageMutation` within a React component and pass it any options that fit your needs.
- * When your component renders, `useUpdatePipelineStageMutation` returns a tuple that includes:
- * - A mutate function that you can call at any time to execute the mutation
- * - An object with fields that represent the current status of the mutation's execution
- *
- * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
- *
- * @example
- * const [updatePipelineStageMutation, { data, loading, error }] = useUpdatePipelineStageMutation({
- * variables: {
- * id: // value for 'id'
- * data: // value for 'data'
- * },
- * });
- */
-export function useUpdatePipelineStageMutation(baseOptions?: Apollo.MutationHookOptions<UpdatePipelineStageMutation, UpdatePipelineStageMutationVariables>) {
- const options = {...defaultOptions, ...baseOptions}
- return Apollo.useMutation<UpdatePipelineStageMutation, UpdatePipelineStageMutationVariables>(UpdatePipelineStageDocument, options);
- }
-export type UpdatePipelineStageMutationHookResult = ReturnType<typeof useUpdatePipelineStageMutation>;
-export type UpdatePipelineStageMutationResult = Apollo.MutationResult<UpdatePipelineStageMutation>;
-export type UpdatePipelineStageMutationOptions = Apollo.BaseMutationOptions<UpdatePipelineStageMutation, UpdatePipelineStageMutationVariables>;
export const UpdateOnePipelineProgressDocument = gql`
mutation UpdateOnePipelineProgress($data: PipelineProgressUpdateInput!, $where: PipelineProgressWhereUniqueInput!) {
updateOnePipelineProgress(where: $where, data: $data) {
@@ -5215,165 +5104,178 @@ export function useUpdateOnePipelineProgressStageMutation(baseOptions?: Apollo.M
export type UpdateOnePipelineProgressStageMutationHookResult = ReturnType<typeof useUpdateOnePipelineProgressStageMutation>;
export type UpdateOnePipelineProgressStageMutationResult = Apollo.MutationResult<UpdateOnePipelineProgressStageMutation>;
export type UpdateOnePipelineProgressStageMutationOptions = Apollo.BaseMutationOptions<UpdateOnePipelineProgressStageMutation, UpdateOnePipelineProgressStageMutationVariables>;
-export const CreateOneCompanyPipelineProgressDocument = gql`
- mutation CreateOneCompanyPipelineProgress($uuid: String!, $companyId: String!, $pipelineId: String!, $pipelineStageId: String!) {
- createOnePipelineProgress(
- data: {id: $uuid, company: {connect: {id: $companyId}}, pipeline: {connect: {id: $pipelineId}}, pipelineStage: {connect: {id: $pipelineStageId}}}
- ) {
+export const UpdatePipelineStageDocument = gql`
+ mutation UpdatePipelineStage($id: String, $data: PipelineStageUpdateInput!) {
+ updateOnePipelineStage(where: {id: $id}, data: $data) {
id
+ name
+ color
}
}
`;
-export type CreateOneCompanyPipelineProgressMutationFn = Apollo.MutationFunction<CreateOneCompanyPipelineProgressMutation, CreateOneCompanyPipelineProgressMutationVariables>;
+export type UpdatePipelineStageMutationFn = Apollo.MutationFunction<UpdatePipelineStageMutation, UpdatePipelineStageMutationVariables>;
/**
- * __useCreateOneCompanyPipelineProgressMutation__
+ * __useUpdatePipelineStageMutation__
*
- * To run a mutation, you first call `useCreateOneCompanyPipelineProgressMutation` within a React component and pass it any options that fit your needs.
- * When your component renders, `useCreateOneCompanyPipelineProgressMutation` returns a tuple that includes:
+ * To run a mutation, you first call `useUpdatePipelineStageMutation` within a React component and pass it any options that fit your needs.
+ * When your component renders, `useUpdatePipelineStageMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
- * const [createOneCompanyPipelineProgressMutation, { data, loading, error }] = useCreateOneCompanyPipelineProgressMutation({
+ * const [updatePipelineStageMutation, { data, loading, error }] = useUpdatePipelineStageMutation({
* variables: {
- * uuid: // value for 'uuid'
- * companyId: // value for 'companyId'
- * pipelineId: // value for 'pipelineId'
- * pipelineStageId: // value for 'pipelineStageId'
+ * id: // value for 'id'
+ * data: // value for 'data'
* },
* });
*/
-export function useCreateOneCompanyPipelineProgressMutation(baseOptions?: Apollo.MutationHookOptions<CreateOneCompanyPipelineProgressMutation, CreateOneCompanyPipelineProgressMutationVariables>) {
+export function useUpdatePipelineStageMutation(baseOptions?: Apollo.MutationHookOptions<UpdatePipelineStageMutation, UpdatePipelineStageMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
- return Apollo.useMutation<CreateOneCompanyPipelineProgressMutation, CreateOneCompanyPipelineProgressMutationVariables>(CreateOneCompanyPipelineProgressDocument, options);
+ return Apollo.useMutation<UpdatePipelineStageMutation, UpdatePipelineStageMutationVariables>(UpdatePipelineStageDocument, options);
}
-export type CreateOneCompanyPipelineProgressMutationHookResult = ReturnType<typeof useCreateOneCompanyPipelineProgressMutation>;
-export type CreateOneCompanyPipelineProgressMutationResult = Apollo.MutationResult<CreateOneCompanyPipelineProgressMutation>;
-export type CreateOneCompanyPipelineProgressMutationOptions = Apollo.BaseMutationOptions<CreateOneCompanyPipelineProgressMutation, CreateOneCompanyPipelineProgressMutationVariables>;
-export const SearchPeopleDocument = gql`
- query SearchPeople($where: PersonWhereInput, $limit: Int, $orderBy: [PersonOrderByWithRelationInput!]) {
- searchResults: findManyPerson(where: $where, take: $limit, orderBy: $orderBy) {
+export type UpdatePipelineStageMutationHookResult = ReturnType<typeof useUpdatePipelineStageMutation>;
+export type UpdatePipelineStageMutationResult = Apollo.MutationResult<UpdatePipelineStageMutation>;
+export type UpdatePipelineStageMutationOptions = Apollo.BaseMutationOptions<UpdatePipelineStageMutation, UpdatePipelineStageMutationVariables>;
+export const GetPipelineProgressDocument = gql`
+ query GetPipelineProgress($where: PipelineProgressWhereInput, $orderBy: [PipelineProgressOrderByWithRelationInput!]) {
+ findManyPipelineProgress(where: $where, orderBy: $orderBy) {
id
- phone
- email
- city
- firstName
- lastName
- displayName
- avatarUrl
- createdAt
+ pipelineStageId
+ companyId
+ personId
+ amount
+ closeDate
+ pointOfContactId
+ pointOfContact {
+ id
+ firstName
+ lastName
+ displayName
+ avatarUrl
+ }
+ probability
}
}
`;
/**
- * __useSearchPeopleQuery__
+ * __useGetPipelineProgressQuery__
*
- * To run a query within a React component, call `useSearchPeopleQuery` and pass it any options that fit your needs.
- * When your component renders, `useSearchPeopleQuery` returns an object from Apollo Client that contains loading, error, and data properties
+ * To run a query within a React component, call `useGetPipelineProgressQuery` and pass it any options that fit your needs.
+ * When your component renders, `useGetPipelineProgressQuery` returns an object from Apollo Client that contains loading, error, and data properties
* you can use to render your UI.
*
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
*
* @example
- * const { data, loading, error } = useSearchPeopleQuery({
+ * const { data, loading, error } = useGetPipelineProgressQuery({
* variables: {
* where: // value for 'where'
- * limit: // value for 'limit'
* orderBy: // value for 'orderBy'
* },
* });
*/
-export function useSearchPeopleQuery(baseOptions?: Apollo.QueryHookOptions<SearchPeopleQuery, SearchPeopleQueryVariables>) {
+export function useGetPipelineProgressQuery(baseOptions?: Apollo.QueryHookOptions<GetPipelineProgressQuery, GetPipelineProgressQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
- return Apollo.useQuery<SearchPeopleQuery, SearchPeopleQueryVariables>(SearchPeopleDocument, options);
+ return Apollo.useQuery<GetPipelineProgressQuery, GetPipelineProgressQueryVariables>(GetPipelineProgressDocument, options);
}
-export function useSearchPeopleLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<SearchPeopleQuery, SearchPeopleQueryVariables>) {
+export function useGetPipelineProgressLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetPipelineProgressQuery, GetPipelineProgressQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
- return Apollo.useLazyQuery<SearchPeopleQuery, SearchPeopleQueryVariables>(SearchPeopleDocument, options);
+ return Apollo.useLazyQuery<GetPipelineProgressQuery, GetPipelineProgressQueryVariables>(GetPipelineProgressDocument, options);
}
-export type SearchPeopleQueryHookResult = ReturnType<typeof useSearchPeopleQuery>;
-export type SearchPeopleLazyQueryHookResult = ReturnType<typeof useSearchPeopleLazyQuery>;
-export type SearchPeopleQueryResult = Apollo.QueryResult<SearchPeopleQuery, SearchPeopleQueryVariables>;
-export const SearchUserDocument = gql`
- query SearchUser($where: UserWhereInput, $limit: Int, $orderBy: [UserOrderByWithRelationInput!]) {
- searchResults: findManyUser(where: $where, take: $limit, orderBy: $orderBy) {
+export type GetPipelineProgressQueryHookResult = ReturnType<typeof useGetPipelineProgressQuery>;
+export type GetPipelineProgressLazyQueryHookResult = ReturnType<typeof useGetPipelineProgressLazyQuery>;
+export type GetPipelineProgressQueryResult = Apollo.QueryResult<GetPipelineProgressQuery, GetPipelineProgressQueryVariables>;
+export const GetPipelinesDocument = gql`
+ query GetPipelines($where: PipelineWhereInput) {
+ findManyPipeline(where: $where) {
id
- email
- displayName
- firstName
- lastName
- avatarUrl
+ name
+ pipelineProgressableType
+ pipelineStages {
+ id
+ name
+ color
+ index
+ }
}
}
`;
/**
- * __useSearchUserQuery__
+ * __useGetPipelinesQuery__
*
- * To run a query within a React component, call `useSearchUserQuery` and pass it any options that fit your needs.
- * When your component renders, `useSearchUserQuery` returns an object from Apollo Client that contains loading, error, and data properties
+ * To run a query within a React component, call `useGetPipelinesQuery` and pass it any options that fit your needs.
+ * When your component renders, `useGetPipelinesQuery` returns an object from Apollo Client that contains loading, error, and data properties
* you can use to render your UI.
*
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
*
* @example
- * const { data, loading, error } = useSearchUserQuery({
+ * const { data, loading, error } = useGetPipelinesQuery({
* variables: {
* where: // value for 'where'
- * limit: // value for 'limit'
- * orderBy: // value for 'orderBy'
* },
* });
*/
-export function useSearchUserQuery(baseOptions?: Apollo.QueryHookOptions<SearchUserQuery, SearchUserQueryVariables>) {
+export function useGetPipelinesQuery(baseOptions?: Apollo.QueryHookOptions<GetPipelinesQuery, GetPipelinesQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
- return Apollo.useQuery<SearchUserQuery, SearchUserQueryVariables>(SearchUserDocument, options);
+ return Apollo.useQuery<GetPipelinesQuery, GetPipelinesQueryVariables>(GetPipelinesDocument, options);
}
-export function useSearchUserLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<SearchUserQuery, SearchUserQueryVariables>) {
+export function useGetPipelinesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetPipelinesQuery, GetPipelinesQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
- return Apollo.useLazyQuery<SearchUserQuery, SearchUserQueryVariables>(SearchUserDocument, options);
+ return Apollo.useLazyQuery<GetPipelinesQuery, GetPipelinesQueryVariables>(GetPipelinesDocument, options);
}
-export type SearchUserQueryHookResult = ReturnType<typeof useSearchUserQuery>;
-export type SearchUserLazyQueryHookResult = ReturnType<typeof useSearchUserLazyQuery>;
-export type SearchUserQueryResult = Apollo.QueryResult<SearchUserQuery, SearchUserQueryVariables>;
-export const EmptyQueryDocument = gql`
- query EmptyQuery {
- searchResults: findManyUser {
+export type GetPipelinesQueryHookResult = ReturnType<typeof useGetPipelinesQuery>;
+export type GetPipelinesLazyQueryHookResult = ReturnType<typeof useGetPipelinesLazyQuery>;
+export type GetPipelinesQueryResult = Apollo.QueryResult<GetPipelinesQuery, GetPipelinesQueryVariables>;
+export const SearchActivityDocument = gql`
+ query SearchActivity($where: ActivityWhereInput, $limit: Int, $orderBy: [ActivityOrderByWithRelationInput!]) {
+ searchResults: findManyActivities(
+ where: $where
+ take: $limit
+ orderBy: $orderBy
+ ) {
id
+ title
+ body
}
}
`;
/**
- * __useEmptyQueryQuery__
+ * __useSearchActivityQuery__
*
- * To run a query within a React component, call `useEmptyQueryQuery` and pass it any options that fit your needs.
- * When your component renders, `useEmptyQueryQuery` returns an object from Apollo Client that contains loading, error, and data properties
+ * To run a query within a React component, call `useSearchActivityQuery` and pass it any options that fit your needs.
+ * When your component renders, `useSearchActivityQuery` returns an object from Apollo Client that contains loading, error, and data properties
* you can use to render your UI.
*
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
*
* @example
- * const { data, loading, error } = useEmptyQueryQuery({
+ * const { data, loading, error } = useSearchActivityQuery({
* variables: {
+ * where: // value for 'where'
+ * limit: // value for 'limit'
+ * orderBy: // value for 'orderBy'
* },
* });
*/
-export function useEmptyQueryQuery(baseOptions?: Apollo.QueryHookOptions<EmptyQueryQuery, EmptyQueryQueryVariables>) {
+export function useSearchActivityQuery(baseOptions?: Apollo.QueryHookOptions<SearchActivityQuery, SearchActivityQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
- return Apollo.useQuery<EmptyQueryQuery, EmptyQueryQueryVariables>(EmptyQueryDocument, options);
+ return Apollo.useQuery<SearchActivityQuery, SearchActivityQueryVariables>(SearchActivityDocument, options);
}
-export function useEmptyQueryLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<EmptyQueryQuery, EmptyQueryQueryVariables>) {
+export function useSearchActivityLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<SearchActivityQuery, SearchActivityQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
- return Apollo.useLazyQuery<EmptyQueryQuery, EmptyQueryQueryVariables>(EmptyQueryDocument, options);
+ return Apollo.useLazyQuery<SearchActivityQuery, SearchActivityQueryVariables>(SearchActivityDocument, options);
}
-export type EmptyQueryQueryHookResult = ReturnType<typeof useEmptyQueryQuery>;
-export type EmptyQueryLazyQueryHookResult = ReturnType<typeof useEmptyQueryLazyQuery>;
-export type EmptyQueryQueryResult = Apollo.QueryResult<EmptyQueryQuery, EmptyQueryQueryVariables>;
+export type SearchActivityQueryHookResult = ReturnType<typeof useSearchActivityQuery>;
+export type SearchActivityLazyQueryHookResult = ReturnType<typeof useSearchActivityLazyQuery>;
+export type SearchActivityQueryResult = Apollo.QueryResult<SearchActivityQuery, SearchActivityQueryVariables>;
export const SearchCompanyDocument = gql`
query SearchCompany($where: CompanyWhereInput, $limit: Int, $orderBy: [CompanyOrderByWithRelationInput!]) {
searchResults: findManyCompany(where: $where, take: $limit, orderBy: $orderBy) {
@@ -5411,31 +5313,33 @@ export function useSearchCompanyLazyQuery(baseOptions?: Apollo.LazyQueryHookOpti
export type SearchCompanyQueryHookResult = ReturnType<typeof useSearchCompanyQuery>;
export type SearchCompanyLazyQueryHookResult = ReturnType<typeof useSearchCompanyLazyQuery>;
export type SearchCompanyQueryResult = Apollo.QueryResult<SearchCompanyQuery, SearchCompanyQueryVariables>;
-export const SearchActivityDocument = gql`
- query SearchActivity($where: ActivityWhereInput, $limit: Int, $orderBy: [ActivityOrderByWithRelationInput!]) {
- searchResults: findManyActivities(
- where: $where
- take: $limit
- orderBy: $orderBy
- ) {
+export const SearchPeopleDocument = gql`
+ query SearchPeople($where: PersonWhereInput, $limit: Int, $orderBy: [PersonOrderByWithRelationInput!]) {
+ searchResults: findManyPerson(where: $where, take: $limit, orderBy: $orderBy) {
id
- title
- body
+ phone
+ email
+ city
+ firstName
+ lastName
+ displayName
+ avatarUrl
+ createdAt
}
}
`;
/**
- * __useSearchActivityQuery__
+ * __useSearchPeopleQuery__
*
- * To run a query within a React component, call `useSearchActivityQuery` and pass it any options that fit your needs.
- * When your component renders, `useSearchActivityQuery` returns an object from Apollo Client that contains loading, error, and data properties
+ * To run a query within a React component, call `useSearchPeopleQuery` and pass it any options that fit your needs.
+ * When your component renders, `useSearchPeopleQuery` returns an object from Apollo Client that contains loading, error, and data properties
* you can use to render your UI.
*
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
*
* @example
- * const { data, loading, error } = useSearchActivityQuery({
+ * const { data, loading, error } = useSearchPeopleQuery({
* variables: {
* where: // value for 'where'
* limit: // value for 'limit'
@@ -5443,166 +5347,125 @@ export const SearchActivityDocument = gql`
* },
* });
*/
-export function useSearchActivityQuery(baseOptions?: Apollo.QueryHookOptions<SearchActivityQuery, SearchActivityQueryVariables>) {
+export function useSearchPeopleQuery(baseOptions?: Apollo.QueryHookOptions<SearchPeopleQuery, SearchPeopleQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
- return Apollo.useQuery<SearchActivityQuery, SearchActivityQueryVariables>(SearchActivityDocument, options);
+ return Apollo.useQuery<SearchPeopleQuery, SearchPeopleQueryVariables>(SearchPeopleDocument, options);
}
-export function useSearchActivityLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<SearchActivityQuery, SearchActivityQueryVariables>) {
+export function useSearchPeopleLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<SearchPeopleQuery, SearchPeopleQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
- return Apollo.useLazyQuery<SearchActivityQuery, SearchActivityQueryVariables>(SearchActivityDocument, options);
+ return Apollo.useLazyQuery<SearchPeopleQuery, SearchPeopleQueryVariables>(SearchPeopleDocument, options);
}
-export type SearchActivityQueryHookResult = ReturnType<typeof useSearchActivityQuery>;
-export type SearchActivityLazyQueryHookResult = ReturnType<typeof useSearchActivityLazyQuery>;
-export type SearchActivityQueryResult = Apollo.QueryResult<SearchActivityQuery, SearchActivityQueryVariables>;
-export const GetCurrentUserDocument = gql`
- query GetCurrentUser {
- currentUser {
+export type SearchPeopleQueryHookResult = ReturnType<typeof useSearchPeopleQuery>;
+export type SearchPeopleLazyQueryHookResult = ReturnType<typeof useSearchPeopleLazyQuery>;
+export type SearchPeopleQueryResult = Apollo.QueryResult<SearchPeopleQuery, SearchPeopleQueryVariables>;
+export const SearchUserDocument = gql`
+ query SearchUser($where: UserWhereInput, $limit: Int, $orderBy: [UserOrderByWithRelationInput!]) {
+ searchResults: findManyUser(where: $where, take: $limit, orderBy: $orderBy) {
id
email
displayName
firstName
lastName
avatarUrl
- canImpersonate
- workspaceMember {
- id
- allowImpersonation
- workspace {
- id
- domainName
- displayName
- logo
- inviteHash
- }
- }
- settings {
- id
- locale
- colorScheme
- }
- supportUserHash
}
}
`;
/**
- * __useGetCurrentUserQuery__
+ * __useSearchUserQuery__
*
- * To run a query within a React component, call `useGetCurrentUserQuery` and pass it any options that fit your needs.
- * When your component renders, `useGetCurrentUserQuery` returns an object from Apollo Client that contains loading, error, and data properties
+ * To run a query within a React component, call `useSearchUserQuery` and pass it any options that fit your needs.
+ * When your component renders, `useSearchUserQuery` returns an object from Apollo Client that contains loading, error, and data properties
* you can use to render your UI.
*
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
*
* @example
- * const { data, loading, error } = useGetCurrentUserQuery({
+ * const { data, loading, error } = useSearchUserQuery({
* variables: {
+ * where: // value for 'where'
+ * limit: // value for 'limit'
+ * orderBy: // value for 'orderBy'
* },
* });
*/
-export function useGetCurrentUserQuery(baseOptions?: Apollo.QueryHookOptions<GetCurrentUserQuery, GetCurrentUserQueryVariables>) {
+export function useSearchUserQuery(baseOptions?: Apollo.QueryHookOptions<SearchUserQuery, SearchUserQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
- return Apollo.useQuery<GetCurrentUserQuery, GetCurrentUserQueryVariables>(GetCurrentUserDocument, options);
+ return Apollo.useQuery<SearchUserQuery, SearchUserQueryVariables>(SearchUserDocument, options);
}
-export function useGetCurrentUserLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetCurrentUserQuery, GetCurrentUserQueryVariables>) {
+export function useSearchUserLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<SearchUserQuery, SearchUserQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
- return Apollo.useLazyQuery<GetCurrentUserQuery, GetCurrentUserQueryVariables>(GetCurrentUserDocument, options);
+ return Apollo.useLazyQuery<SearchUserQuery, SearchUserQueryVariables>(SearchUserDocument, options);
}
-export type GetCurrentUserQueryHookResult = ReturnType<typeof useGetCurrentUserQuery>;
-export type GetCurrentUserLazyQueryHookResult = ReturnType<typeof useGetCurrentUserLazyQuery>;
-export type GetCurrentUserQueryResult = Apollo.QueryResult<GetCurrentUserQuery, GetCurrentUserQueryVariables>;
-export const GetUsersDocument = gql`
- query GetUsers {
- findManyUser {
+export type SearchUserQueryHookResult = ReturnType<typeof useSearchUserQuery>;
+export type SearchUserLazyQueryHookResult = ReturnType<typeof useSearchUserLazyQuery>;
+export type SearchUserQueryResult = Apollo.QueryResult<SearchUserQuery, SearchUserQueryVariables>;
+export const DeleteUserAccountDocument = gql`
+ mutation DeleteUserAccount {
+ deleteUserAccount {
id
- email
- displayName
- firstName
- lastName
}
}
`;
+export type DeleteUserAccountMutationFn = Apollo.MutationFunction<DeleteUserAccountMutation, DeleteUserAccountMutationVariables>;
/**
- * __useGetUsersQuery__
+ * __useDeleteUserAccountMutation__
*
- * To run a query within a React component, call `useGetUsersQuery` and pass it any options that fit your needs.
- * When your component renders, `useGetUsersQuery` returns an object from Apollo Client that contains loading, error, and data properties
- * you can use to render your UI.
+ * To run a mutation, you first call `useDeleteUserAccountMutation` within a React component and pass it any options that fit your needs.
+ * When your component renders, `useDeleteUserAccountMutation` returns a tuple that includes:
+ * - A mutate function that you can call at any time to execute the mutation
+ * - An object with fields that represent the current status of the mutation's execution
*
- * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
+ * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
- * const { data, loading, error } = useGetUsersQuery({
+ * const [deleteUserAccountMutation, { data, loading, error }] = useDeleteUserAccountMutation({
* variables: {
* },
* });
*/
-export function useGetUsersQuery(baseOptions?: Apollo.QueryHookOptions<GetUsersQuery, GetUsersQueryVariables>) {
+export function useDeleteUserAccountMutation(baseOptions?: Apollo.MutationHookOptions<DeleteUserAccountMutation, DeleteUserAccountMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
- return Apollo.useQuery<GetUsersQuery, GetUsersQueryVariables>(GetUsersDocument, options);
+ return Apollo.useMutation<DeleteUserAccountMutation, DeleteUserAccountMutationVariables>(DeleteUserAccountDocument, options);
}
-export function useGetUsersLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetUsersQuery, GetUsersQueryVariables>) {
- const options = {...defaultOptions, ...baseOptions}
- return Apollo.useLazyQuery<GetUsersQuery, GetUsersQueryVariables>(GetUsersDocument, options);
- }
-export type GetUsersQueryHookResult = ReturnType<typeof useGetUsersQuery>;
-export type GetUsersLazyQueryHookResult = ReturnType<typeof useGetUsersLazyQuery>;
-export type GetUsersQueryResult = Apollo.QueryResult<GetUsersQuery, GetUsersQueryVariables>;
-export const UpdateUserDocument = gql`
- mutation UpdateUser($data: UserUpdateInput!, $where: UserWhereUniqueInput!) {
- updateUser(data: $data, where: $where) {
+export type DeleteUserAccountMutationHookResult = ReturnType<typeof useDeleteUserAccountMutation>;
+export type DeleteUserAccountMutationResult = Apollo.MutationResult<DeleteUserAccountMutation>;
+export type DeleteUserAccountMutationOptions = Apollo.BaseMutationOptions<DeleteUserAccountMutation, DeleteUserAccountMutationVariables>;
+export const RemoveProfilePictureDocument = gql`
+ mutation RemoveProfilePicture($where: UserWhereUniqueInput!) {
+ updateUser(data: {avatarUrl: null}, where: $where) {
id
- email
- displayName
- firstName
- lastName
avatarUrl
- workspaceMember {
- id
- workspace {
- id
- domainName
- displayName
- logo
- inviteHash
- }
- }
- settings {
- id
- locale
- colorScheme
- }
}
}
`;
-export type UpdateUserMutationFn = Apollo.MutationFunction<UpdateUserMutation, UpdateUserMutationVariables>;
+export type RemoveProfilePictureMutationFn = Apollo.MutationFunction<RemoveProfilePictureMutation, RemoveProfilePictureMutationVariables>;
/**
- * __useUpdateUserMutation__
+ * __useRemoveProfilePictureMutation__
*
- * To run a mutation, you first call `useUpdateUserMutation` within a React component and pass it any options that fit your needs.
- * When your component renders, `useUpdateUserMutation` returns a tuple that includes:
+ * To run a mutation, you first call `useRemoveProfilePictureMutation` within a React component and pass it any options that fit your needs.
+ * When your component renders, `useRemoveProfilePictureMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
- * const [updateUserMutation, { data, loading, error }] = useUpdateUserMutation({
+ * const [removeProfilePictureMutation, { data, loading, error }] = useRemoveProfilePictureMutation({
* variables: {
- * data: // value for 'data'
* where: // value for 'where'
* },
* });
*/
-export function useUpdateUserMutation(baseOptions?: Apollo.MutationHookOptions<UpdateUserMutation, UpdateUserMutationVariables>) {
+export function useRemoveProfilePictureMutation(baseOptions?: Apollo.MutationHookOptions<RemoveProfilePictureMutation, RemoveProfilePictureMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
- return Apollo.useMutation<UpdateUserMutation, UpdateUserMutationVariables>(UpdateUserDocument, options);
+ return Apollo.useMutation<RemoveProfilePictureMutation, RemoveProfilePictureMutationVariables>(RemoveProfilePictureDocument, options);
}
-export type UpdateUserMutationHookResult = ReturnType<typeof useUpdateUserMutation>;
-export type UpdateUserMutationResult = Apollo.MutationResult<UpdateUserMutation>;
-export type UpdateUserMutationOptions = Apollo.BaseMutationOptions<UpdateUserMutation, UpdateUserMutationVariables>;
+export type RemoveProfilePictureMutationHookResult = ReturnType<typeof useRemoveProfilePictureMutation>;
+export type RemoveProfilePictureMutationResult = Apollo.MutationResult<RemoveProfilePictureMutation>;
+export type RemoveProfilePictureMutationOptions = Apollo.BaseMutationOptions<RemoveProfilePictureMutation, RemoveProfilePictureMutationVariables>;
export const UpdateAllowImpersonationDocument = gql`
mutation UpdateAllowImpersonation($allowImpersonation: Boolean!) {
allowImpersonation(allowImpersonation: $allowImpersonation) {
@@ -5668,72 +5531,155 @@ export function useUploadProfilePictureMutation(baseOptions?: Apollo.MutationHoo
export type UploadProfilePictureMutationHookResult = ReturnType<typeof useUploadProfilePictureMutation>;
export type UploadProfilePictureMutationResult = Apollo.MutationResult<UploadProfilePictureMutation>;
export type UploadProfilePictureMutationOptions = Apollo.BaseMutationOptions<UploadProfilePictureMutation, UploadProfilePictureMutationVariables>;
-export const RemoveProfilePictureDocument = gql`
- mutation RemoveProfilePicture($where: UserWhereUniqueInput!) {
- updateUser(data: {avatarUrl: null}, where: $where) {
+export const UpdateUserDocument = gql`
+ mutation UpdateUser($data: UserUpdateInput!, $where: UserWhereUniqueInput!) {
+ updateUser(data: $data, where: $where) {
id
+ email
+ displayName
+ firstName
+ lastName
avatarUrl
+ workspaceMember {
+ id
+ workspace {
+ id
+ domainName
+ displayName
+ logo
+ inviteHash
+ }
+ }
+ settings {
+ id
+ locale
+ colorScheme
+ }
}
}
`;
-export type RemoveProfilePictureMutationFn = Apollo.MutationFunction<RemoveProfilePictureMutation, RemoveProfilePictureMutationVariables>;
+export type UpdateUserMutationFn = Apollo.MutationFunction<UpdateUserMutation, UpdateUserMutationVariables>;
/**
- * __useRemoveProfilePictureMutation__
+ * __useUpdateUserMutation__
*
- * To run a mutation, you first call `useRemoveProfilePictureMutation` within a React component and pass it any options that fit your needs.
- * When your component renders, `useRemoveProfilePictureMutation` returns a tuple that includes:
+ * To run a mutation, you first call `useUpdateUserMutation` within a React component and pass it any options that fit your needs.
+ * When your component renders, `useUpdateUserMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
- * const [removeProfilePictureMutation, { data, loading, error }] = useRemoveProfilePictureMutation({
+ * const [updateUserMutation, { data, loading, error }] = useUpdateUserMutation({
* variables: {
+ * data: // value for 'data'
* where: // value for 'where'
* },
* });
*/
-export function useRemoveProfilePictureMutation(baseOptions?: Apollo.MutationHookOptions<RemoveProfilePictureMutation, RemoveProfilePictureMutationVariables>) {
+export function useUpdateUserMutation(baseOptions?: Apollo.MutationHookOptions<UpdateUserMutation, UpdateUserMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
- return Apollo.useMutation<RemoveProfilePictureMutation, RemoveProfilePictureMutationVariables>(RemoveProfilePictureDocument, options);
+ return Apollo.useMutation<UpdateUserMutation, UpdateUserMutationVariables>(UpdateUserDocument, options);
}
-export type RemoveProfilePictureMutationHookResult = ReturnType<typeof useRemoveProfilePictureMutation>;
-export type RemoveProfilePictureMutationResult = Apollo.MutationResult<RemoveProfilePictureMutation>;
-export type RemoveProfilePictureMutationOptions = Apollo.BaseMutationOptions<RemoveProfilePictureMutation, RemoveProfilePictureMutationVariables>;
-export const DeleteUserAccountDocument = gql`
- mutation DeleteUserAccount {
- deleteUserAccount {
+export type UpdateUserMutationHookResult = ReturnType<typeof useUpdateUserMutation>;
+export type UpdateUserMutationResult = Apollo.MutationResult<UpdateUserMutation>;
+export type UpdateUserMutationOptions = Apollo.BaseMutationOptions<UpdateUserMutation, UpdateUserMutationVariables>;
+export const GetCurrentUserDocument = gql`
+ query GetCurrentUser {
+ currentUser {
id
+ email
+ displayName
+ firstName
+ lastName
+ avatarUrl
+ canImpersonate
+ workspaceMember {
+ id
+ allowImpersonation
+ workspace {
+ id
+ domainName
+ displayName
+ logo
+ inviteHash
+ }
+ }
+ settings {
+ id
+ locale
+ colorScheme
+ }
+ supportUserHash
}
}
`;
-export type DeleteUserAccountMutationFn = Apollo.MutationFunction<DeleteUserAccountMutation, DeleteUserAccountMutationVariables>;
/**
- * __useDeleteUserAccountMutation__
+ * __useGetCurrentUserQuery__
*
- * To run a mutation, you first call `useDeleteUserAccountMutation` within a React component and pass it any options that fit your needs.
- * When your component renders, `useDeleteUserAccountMutation` returns a tuple that includes:
- * - A mutate function that you can call at any time to execute the mutation
- * - An object with fields that represent the current status of the mutation's execution
+ * To run a query within a React component, call `useGetCurrentUserQuery` and pass it any options that fit your needs.
+ * When your component renders, `useGetCurrentUserQuery` returns an object from Apollo Client that contains loading, error, and data properties
+ * you can use to render your UI.
*
- * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
+ * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
*
* @example
- * const [deleteUserAccountMutation, { data, loading, error }] = useDeleteUserAccountMutation({
+ * const { data, loading, error } = useGetCurrentUserQuery({
* variables: {
* },
* });
*/
-export function useDeleteUserAccountMutation(baseOptions?: Apollo.MutationHookOptions<DeleteUserAccountMutation, DeleteUserAccountMutationVariables>) {
+export function useGetCurrentUserQuery(baseOptions?: Apollo.QueryHookOptions<GetCurrentUserQuery, GetCurrentUserQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
- return Apollo.useMutation<DeleteUserAccountMutation, DeleteUserAccountMutationVariables>(DeleteUserAccountDocument, options);
+ return Apollo.useQuery<GetCurrentUserQuery, GetCurrentUserQueryVariables>(GetCurrentUserDocument, options);
}
-export type DeleteUserAccountMutationHookResult = ReturnType<typeof useDeleteUserAccountMutation>;
-export type DeleteUserAccountMutationResult = Apollo.MutationResult<DeleteUserAccountMutation>;
-export type DeleteUserAccountMutationOptions = Apollo.BaseMutationOptions<DeleteUserAccountMutation, DeleteUserAccountMutationVariables>;
+export function useGetCurrentUserLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetCurrentUserQuery, GetCurrentUserQueryVariables>) {
+ const options = {...defaultOptions, ...baseOptions}
+ return Apollo.useLazyQuery<GetCurrentUserQuery, GetCurrentUserQueryVariables>(GetCurrentUserDocument, options);
+ }
+export type GetCurrentUserQueryHookResult = ReturnType<typeof useGetCurrentUserQuery>;
+export type GetCurrentUserLazyQueryHookResult = ReturnType<typeof useGetCurrentUserLazyQuery>;
+export type GetCurrentUserQueryResult = Apollo.QueryResult<GetCurrentUserQuery, GetCurrentUserQueryVariables>;
+export const GetUsersDocument = gql`
+ query GetUsers {
+ findManyUser {
+ id
+ email
+ displayName
+ firstName
+ lastName
+ }
+}
+ `;
+
+/**
+ * __useGetUsersQuery__
+ *
+ * To run a query within a React component, call `useGetUsersQuery` and pass it any options that fit your needs.
+ * When your component renders, `useGetUsersQuery` returns an object from Apollo Client that contains loading, error, and data properties
+ * you can use to render your UI.
+ *
+ * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
+ *
+ * @example
+ * const { data, loading, error } = useGetUsersQuery({
+ * variables: {
+ * },
+ * });
+ */
+export function useGetUsersQuery(baseOptions?: Apollo.QueryHookOptions<GetUsersQuery, GetUsersQueryVariables>) {
+ const options = {...defaultOptions, ...baseOptions}
+ return Apollo.useQuery<GetUsersQuery, GetUsersQueryVariables>(GetUsersDocument, options);
+ }
+export function useGetUsersLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetUsersQuery, GetUsersQueryVariables>) {
+ const options = {...defaultOptions, ...baseOptions}
+ return Apollo.useLazyQuery<GetUsersQuery, GetUsersQueryVariables>(GetUsersDocument, options);
+ }
+export type GetUsersQueryHookResult = ReturnType<typeof useGetUsersQuery>;
+export type GetUsersLazyQueryHookResult = ReturnType<typeof useGetUsersLazyQuery>;
+export type GetUsersQueryResult = Apollo.QueryResult<GetUsersQuery, GetUsersQueryVariables>;
export const CreateViewFieldsDocument = gql`
mutation CreateViewFields($data: [ViewFieldCreateManyInput!]!) {
createManyViewField(data: $data) {
@@ -5833,6 +5779,80 @@ export function useDeleteViewSortsMutation(baseOptions?: Apollo.MutationHookOpti
export type DeleteViewSortsMutationHookResult = ReturnType<typeof useDeleteViewSortsMutation>;
export type DeleteViewSortsMutationResult = Apollo.MutationResult<DeleteViewSortsMutation>;
export type DeleteViewSortsMutationOptions = Apollo.BaseMutationOptions<DeleteViewSortsMutation, DeleteViewSortsMutationVariables>;
+export const UpdateViewFieldDocument = gql`
+ mutation UpdateViewField($data: ViewFieldUpdateInput!, $where: ViewFieldWhereUniqueInput!) {
+ updateOneViewField(data: $data, where: $where) {
+ id
+ fieldName
+ isVisible
+ sizeInPx
+ index
+ }
+}
+ `;
+export type UpdateViewFieldMutationFn = Apollo.MutationFunction<UpdateViewFieldMutation, UpdateViewFieldMutationVariables>;
+
+/**
+ * __useUpdateViewFieldMutation__
+ *
+ * To run a mutation, you first call `useUpdateViewFieldMutation` within a React component and pass it any options that fit your needs.
+ * When your component renders, `useUpdateViewFieldMutation` returns a tuple that includes:
+ * - A mutate function that you can call at any time to execute the mutation
+ * - An object with fields that represent the current status of the mutation's execution
+ *
+ * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
+ *
+ * @example
+ * const [updateViewFieldMutation, { data, loading, error }] = useUpdateViewFieldMutation({
+ * variables: {
+ * data: // value for 'data'
+ * where: // value for 'where'
+ * },
+ * });
+ */
+export function useUpdateViewFieldMutation(baseOptions?: Apollo.MutationHookOptions<UpdateViewFieldMutation, UpdateViewFieldMutationVariables>) {
+ const options = {...defaultOptions, ...baseOptions}
+ return Apollo.useMutation<UpdateViewFieldMutation, UpdateViewFieldMutationVariables>(UpdateViewFieldDocument, options);
+ }
+export type UpdateViewFieldMutationHookResult = ReturnType<typeof useUpdateViewFieldMutation>;
+export type UpdateViewFieldMutationResult = Apollo.MutationResult<UpdateViewFieldMutation>;
+export type UpdateViewFieldMutationOptions = Apollo.BaseMutationOptions<UpdateViewFieldMutation, UpdateViewFieldMutationVariables>;
+export const UpdateViewSortDocument = gql`
+ mutation UpdateViewSort($data: ViewSortUpdateInput!, $where: ViewSortWhereUniqueInput!) {
+ viewSort: updateOneViewSort(data: $data, where: $where) {
+ direction
+ key
+ name
+ }
+}
+ `;
+export type UpdateViewSortMutationFn = Apollo.MutationFunction<UpdateViewSortMutation, UpdateViewSortMutationVariables>;
+
+/**
+ * __useUpdateViewSortMutation__
+ *
+ * To run a mutation, you first call `useUpdateViewSortMutation` within a React component and pass it any options that fit your needs.
+ * When your component renders, `useUpdateViewSortMutation` returns a tuple that includes:
+ * - A mutate function that you can call at any time to execute the mutation
+ * - An object with fields that represent the current status of the mutation's execution
+ *
+ * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
+ *
+ * @example
+ * const [updateViewSortMutation, { data, loading, error }] = useUpdateViewSortMutation({
+ * variables: {
+ * data: // value for 'data'
+ * where: // value for 'where'
+ * },
+ * });
+ */
+export function useUpdateViewSortMutation(baseOptions?: Apollo.MutationHookOptions<UpdateViewSortMutation, UpdateViewSortMutationVariables>) {
+ const options = {...defaultOptions, ...baseOptions}
+ return Apollo.useMutation<UpdateViewSortMutation, UpdateViewSortMutationVariables>(UpdateViewSortDocument, options);
+ }
+export type UpdateViewSortMutationHookResult = ReturnType<typeof useUpdateViewSortMutation>;
+export type UpdateViewSortMutationResult = Apollo.MutationResult<UpdateViewSortMutation>;
+export type UpdateViewSortMutationOptions = Apollo.BaseMutationOptions<UpdateViewSortMutation, UpdateViewSortMutationVariables>;
export const GetViewFieldsDocument = gql`
query GetViewFields($where: ViewFieldWhereInput, $orderBy: [ViewFieldOrderByWithRelationInput!]) {
viewFields: findManyViewField(where: $where, orderBy: $orderBy) {
@@ -5910,159 +5930,103 @@ export function useGetViewSortsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptio
export type GetViewSortsQueryHookResult = ReturnType<typeof useGetViewSortsQuery>;
export type GetViewSortsLazyQueryHookResult = ReturnType<typeof useGetViewSortsLazyQuery>;
export type GetViewSortsQueryResult = Apollo.QueryResult<GetViewSortsQuery, GetViewSortsQueryVariables>;
-export const UpdateViewFieldDocument = gql`
- mutation UpdateViewField($data: ViewFieldUpdateInput!, $where: ViewFieldWhereUniqueInput!) {
- updateOneViewField(data: $data, where: $where) {
+export const DeleteCurrentWorkspaceDocument = gql`
+ mutation DeleteCurrentWorkspace {
+ deleteCurrentWorkspace {
id
- fieldName
- isVisible
- sizeInPx
- index
}
}
`;
-export type UpdateViewFieldMutationFn = Apollo.MutationFunction<UpdateViewFieldMutation, UpdateViewFieldMutationVariables>;
+export type DeleteCurrentWorkspaceMutationFn = Apollo.MutationFunction<DeleteCurrentWorkspaceMutation, DeleteCurrentWorkspaceMutationVariables>;
/**
- * __useUpdateViewFieldMutation__
+ * __useDeleteCurrentWorkspaceMutation__
*
- * To run a mutation, you first call `useUpdateViewFieldMutation` within a React component and pass it any options that fit your needs.
- * When your component renders, `useUpdateViewFieldMutation` returns a tuple that includes:
+ * To run a mutation, you first call `useDeleteCurrentWorkspaceMutation` within a React component and pass it any options that fit your needs.
+ * When your component renders, `useDeleteCurrentWorkspaceMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
- * const [updateViewFieldMutation, { data, loading, error }] = useUpdateViewFieldMutation({
+ * const [deleteCurrentWorkspaceMutation, { data, loading, error }] = useDeleteCurrentWorkspaceMutation({
* variables: {
- * data: // value for 'data'
- * where: // value for 'where'
* },
* });
*/
-export function useUpdateViewFieldMutation(baseOptions?: Apollo.MutationHookOptions<UpdateViewFieldMutation, UpdateViewFieldMutationVariables>) {
+export function useDeleteCurrentWorkspaceMutation(baseOptions?: Apollo.MutationHookOptions<DeleteCurrentWorkspaceMutation, DeleteCurrentWorkspaceMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
- return Apollo.useMutation<UpdateViewFieldMutation, UpdateViewFieldMutationVariables>(UpdateViewFieldDocument, options);
+ return Apollo.useMutation<DeleteCurrentWorkspaceMutation, DeleteCurrentWorkspaceMutationVariables>(DeleteCurrentWorkspaceDocument, options);
}
-export type UpdateViewFieldMutationHookResult = ReturnType<typeof useUpdateViewFieldMutation>;
-export type UpdateViewFieldMutationResult = Apollo.MutationResult<UpdateViewFieldMutation>;
-export type UpdateViewFieldMutationOptions = Apollo.BaseMutationOptions<UpdateViewFieldMutation, UpdateViewFieldMutationVariables>;
-export const UpdateViewSortDocument = gql`
- mutation UpdateViewSort($data: ViewSortUpdateInput!, $where: ViewSortWhereUniqueInput!) {
- viewSort: updateOneViewSort(data: $data, where: $where) {
- direction
- key
- name
+export type DeleteCurrentWorkspaceMutationHookResult = ReturnType<typeof useDeleteCurrentWorkspaceMutation>;
+export type DeleteCurrentWorkspaceMutationResult = Apollo.MutationResult<DeleteCurrentWorkspaceMutation>;
+export type DeleteCurrentWorkspaceMutationOptions = Apollo.BaseMutationOptions<DeleteCurrentWorkspaceMutation, DeleteCurrentWorkspaceMutationVariables>;
+export const RemoveWorkspaceLogoDocument = gql`
+ mutation RemoveWorkspaceLogo {
+ updateWorkspace(data: {logo: null}) {
+ id
}
}
`;
-export type UpdateViewSortMutationFn = Apollo.MutationFunction<UpdateViewSortMutation, UpdateViewSortMutationVariables>;
+export type RemoveWorkspaceLogoMutationFn = Apollo.MutationFunction<RemoveWorkspaceLogoMutation, RemoveWorkspaceLogoMutationVariables>;
/**
- * __useUpdateViewSortMutation__
+ * __useRemoveWorkspaceLogoMutation__
*
- * To run a mutation, you first call `useUpdateViewSortMutation` within a React component and pass it any options that fit your needs.
- * When your component renders, `useUpdateViewSortMutation` returns a tuple that includes:
+ * To run a mutation, you first call `useRemoveWorkspaceLogoMutation` within a React component and pass it any options that fit your needs.
+ * When your component renders, `useRemoveWorkspaceLogoMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
- * const [updateViewSortMutation, { data, loading, error }] = useUpdateViewSortMutation({
- * variables: {
- * data: // value for 'data'
- * where: // value for 'where'
- * },
- * });
- */
-export function useUpdateViewSortMutation(baseOptions?: Apollo.MutationHookOptions<UpdateViewSortMutation, UpdateViewSortMutationVariables>) {
- const options = {...defaultOptions, ...baseOptions}
- return Apollo.useMutation<UpdateViewSortMutation, UpdateViewSortMutationVariables>(UpdateViewSortDocument, options);
- }
-export type UpdateViewSortMutationHookResult = ReturnType<typeof useUpdateViewSortMutation>;
-export type UpdateViewSortMutationResult = Apollo.MutationResult<UpdateViewSortMutation>;
-export type UpdateViewSortMutationOptions = Apollo.BaseMutationOptions<UpdateViewSortMutation, UpdateViewSortMutationVariables>;
-export const GetWorkspaceMembersDocument = gql`
- query GetWorkspaceMembers {
- workspaceMembers: findManyWorkspaceMember {
- id
- user {
- id
- email
- avatarUrl
- firstName
- lastName
- displayName
- }
- }
-}
- `;
-
-/**
- * __useGetWorkspaceMembersQuery__
- *
- * To run a query within a React component, call `useGetWorkspaceMembersQuery` and pass it any options that fit your needs.
- * When your component renders, `useGetWorkspaceMembersQuery` returns an object from Apollo Client that contains loading, error, and data properties
- * you can use to render your UI.
- *
- * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
- *
- * @example
- * const { data, loading, error } = useGetWorkspaceMembersQuery({
+ * const [removeWorkspaceLogoMutation, { data, loading, error }] = useRemoveWorkspaceLogoMutation({
* variables: {
* },
* });
*/
-export function useGetWorkspaceMembersQuery(baseOptions?: Apollo.QueryHookOptions<GetWorkspaceMembersQuery, GetWorkspaceMembersQueryVariables>) {
+export function useRemoveWorkspaceLogoMutation(baseOptions?: Apollo.MutationHookOptions<RemoveWorkspaceLogoMutation, RemoveWorkspaceLogoMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
- return Apollo.useQuery<GetWorkspaceMembersQuery, GetWorkspaceMembersQueryVariables>(GetWorkspaceMembersDocument, options);
+ return Apollo.useMutation<RemoveWorkspaceLogoMutation, RemoveWorkspaceLogoMutationVariables>(RemoveWorkspaceLogoDocument, options);
}
-export function useGetWorkspaceMembersLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetWorkspaceMembersQuery, GetWorkspaceMembersQueryVariables>) {
- const options = {...defaultOptions, ...baseOptions}
- return Apollo.useLazyQuery<GetWorkspaceMembersQuery, GetWorkspaceMembersQueryVariables>(GetWorkspaceMembersDocument, options);
- }
-export type GetWorkspaceMembersQueryHookResult = ReturnType<typeof useGetWorkspaceMembersQuery>;
-export type GetWorkspaceMembersLazyQueryHookResult = ReturnType<typeof useGetWorkspaceMembersLazyQuery>;
-export type GetWorkspaceMembersQueryResult = Apollo.QueryResult<GetWorkspaceMembersQuery, GetWorkspaceMembersQueryVariables>;
-export const GetWorkspaceFromInviteHashDocument = gql`
- query GetWorkspaceFromInviteHash($inviteHash: String!) {
- findWorkspaceFromInviteHash(inviteHash: $inviteHash) {
+export type RemoveWorkspaceLogoMutationHookResult = ReturnType<typeof useRemoveWorkspaceLogoMutation>;
+export type RemoveWorkspaceLogoMutationResult = Apollo.MutationResult<RemoveWorkspaceLogoMutation>;
+export type RemoveWorkspaceLogoMutationOptions = Apollo.BaseMutationOptions<RemoveWorkspaceLogoMutation, RemoveWorkspaceLogoMutationVariables>;
+export const RemoveWorkspaceMemberDocument = gql`
+ mutation RemoveWorkspaceMember($where: WorkspaceMemberWhereUniqueInput!) {
+ deleteWorkspaceMember(where: $where) {
id
- displayName
- logo
}
}
`;
+export type RemoveWorkspaceMemberMutationFn = Apollo.MutationFunction<RemoveWorkspaceMemberMutation, RemoveWorkspaceMemberMutationVariables>;
/**
- * __useGetWorkspaceFromInviteHashQuery__
+ * __useRemoveWorkspaceMemberMutation__
*
- * To run a query within a React component, call `useGetWorkspaceFromInviteHashQuery` and pass it any options that fit your needs.
- * When your component renders, `useGetWorkspaceFromInviteHashQuery` returns an object from Apollo Client that contains loading, error, and data properties
- * you can use to render your UI.
+ * To run a mutation, you first call `useRemoveWorkspaceMemberMutation` within a React component and pass it any options that fit your needs.
+ * When your component renders, `useRemoveWorkspaceMemberMutation` returns a tuple that includes:
+ * - A mutate function that you can call at any time to execute the mutation
+ * - An object with fields that represent the current status of the mutation's execution
*
- * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
+ * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
- * const { data, loading, error } = useGetWorkspaceFromInviteHashQuery({
+ * const [removeWorkspaceMemberMutation, { data, loading, error }] = useRemoveWorkspaceMemberMutation({
* variables: {
- * inviteHash: // value for 'inviteHash'
+ * where: // value for 'where'
* },
* });
*/
-export function useGetWorkspaceFromInviteHashQuery(baseOptions: Apollo.QueryHookOptions<GetWorkspaceFromInviteHashQuery, GetWorkspaceFromInviteHashQueryVariables>) {
+export function useRemoveWorkspaceMemberMutation(baseOptions?: Apollo.MutationHookOptions<RemoveWorkspaceMemberMutation, RemoveWorkspaceMemberMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
- return Apollo.useQuery<GetWorkspaceFromInviteHashQuery, GetWorkspaceFromInviteHashQueryVariables>(GetWorkspaceFromInviteHashDocument, options);
+ return Apollo.useMutation<RemoveWorkspaceMemberMutation, RemoveWorkspaceMemberMutationVariables>(RemoveWorkspaceMemberDocument, options);
}
-export function useGetWorkspaceFromInviteHashLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetWorkspaceFromInviteHashQuery, GetWorkspaceFromInviteHashQueryVariables>) {
- const options = {...defaultOptions, ...baseOptions}
- return Apollo.useLazyQuery<GetWorkspaceFromInviteHashQuery, GetWorkspaceFromInviteHashQueryVariables>(GetWorkspaceFromInviteHashDocument, options);
- }
-export type GetWorkspaceFromInviteHashQueryHookResult = ReturnType<typeof useGetWorkspaceFromInviteHashQuery>;
-export type GetWorkspaceFromInviteHashLazyQueryHookResult = ReturnType<typeof useGetWorkspaceFromInviteHashLazyQuery>;
-export type GetWorkspaceFromInviteHashQueryResult = Apollo.QueryResult<GetWorkspaceFromInviteHashQuery, GetWorkspaceFromInviteHashQueryVariables>;
+export type RemoveWorkspaceMemberMutationHookResult = ReturnType<typeof useRemoveWorkspaceMemberMutation>;
+export type RemoveWorkspaceMemberMutationResult = Apollo.MutationResult<RemoveWorkspaceMemberMutation>;
+export type RemoveWorkspaceMemberMutationOptions = Apollo.BaseMutationOptions<RemoveWorkspaceMemberMutation, RemoveWorkspaceMemberMutationVariables>;
export const UpdateWorkspaceDocument = gql`
mutation UpdateWorkspace($data: WorkspaceUpdateInput!) {
updateWorkspace(data: $data) {
@@ -6130,100 +6094,82 @@ export function useUploadWorkspaceLogoMutation(baseOptions?: Apollo.MutationHook
export type UploadWorkspaceLogoMutationHookResult = ReturnType<typeof useUploadWorkspaceLogoMutation>;
export type UploadWorkspaceLogoMutationResult = Apollo.MutationResult<UploadWorkspaceLogoMutation>;
export type UploadWorkspaceLogoMutationOptions = Apollo.BaseMutationOptions<UploadWorkspaceLogoMutation, UploadWorkspaceLogoMutationVariables>;
-export const RemoveWorkspaceLogoDocument = gql`
- mutation RemoveWorkspaceLogo {
- updateWorkspace(data: {logo: null}) {
- id
- }
-}
- `;
-export type RemoveWorkspaceLogoMutationFn = Apollo.MutationFunction<RemoveWorkspaceLogoMutation, RemoveWorkspaceLogoMutationVariables>;
-
-/**
- * __useRemoveWorkspaceLogoMutation__
- *
- * To run a mutation, you first call `useRemoveWorkspaceLogoMutation` within a React component and pass it any options that fit your needs.
- * When your component renders, `useRemoveWorkspaceLogoMutation` returns a tuple that includes:
- * - A mutate function that you can call at any time to execute the mutation
- * - An object with fields that represent the current status of the mutation's execution
- *
- * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
- *
- * @example
- * const [removeWorkspaceLogoMutation, { data, loading, error }] = useRemoveWorkspaceLogoMutation({
- * variables: {
- * },
- * });
- */
-export function useRemoveWorkspaceLogoMutation(baseOptions?: Apollo.MutationHookOptions<RemoveWorkspaceLogoMutation, RemoveWorkspaceLogoMutationVariables>) {
- const options = {...defaultOptions, ...baseOptions}
- return Apollo.useMutation<RemoveWorkspaceLogoMutation, RemoveWorkspaceLogoMutationVariables>(RemoveWorkspaceLogoDocument, options);
- }
-export type RemoveWorkspaceLogoMutationHookResult = ReturnType<typeof useRemoveWorkspaceLogoMutation>;
-export type RemoveWorkspaceLogoMutationResult = Apollo.MutationResult<RemoveWorkspaceLogoMutation>;
-export type RemoveWorkspaceLogoMutationOptions = Apollo.BaseMutationOptions<RemoveWorkspaceLogoMutation, RemoveWorkspaceLogoMutationVariables>;
-export const RemoveWorkspaceMemberDocument = gql`
- mutation RemoveWorkspaceMember($where: WorkspaceMemberWhereUniqueInput!) {
- deleteWorkspaceMember(where: $where) {
+export const GetWorkspaceFromInviteHashDocument = gql`
+ query GetWorkspaceFromInviteHash($inviteHash: String!) {
+ findWorkspaceFromInviteHash(inviteHash: $inviteHash) {
id
+ displayName
+ logo
}
}
`;
-export type RemoveWorkspaceMemberMutationFn = Apollo.MutationFunction<RemoveWorkspaceMemberMutation, RemoveWorkspaceMemberMutationVariables>;
/**
- * __useRemoveWorkspaceMemberMutation__
+ * __useGetWorkspaceFromInviteHashQuery__
*
- * To run a mutation, you first call `useRemoveWorkspaceMemberMutation` within a React component and pass it any options that fit your needs.
- * When your component renders, `useRemoveWorkspaceMemberMutation` returns a tuple that includes:
- * - A mutate function that you can call at any time to execute the mutation
- * - An object with fields that represent the current status of the mutation's execution
+ * To run a query within a React component, call `useGetWorkspaceFromInviteHashQuery` and pass it any options that fit your needs.
+ * When your component renders, `useGetWorkspaceFromInviteHashQuery` returns an object from Apollo Client that contains loading, error, and data properties
+ * you can use to render your UI.
*
- * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
+ * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
*
* @example
- * const [removeWorkspaceMemberMutation, { data, loading, error }] = useRemoveWorkspaceMemberMutation({
+ * const { data, loading, error } = useGetWorkspaceFromInviteHashQuery({
* variables: {
- * where: // value for 'where'
+ * inviteHash: // value for 'inviteHash'
* },
* });
*/
-export function useRemoveWorkspaceMemberMutation(baseOptions?: Apollo.MutationHookOptions<RemoveWorkspaceMemberMutation, RemoveWorkspaceMemberMutationVariables>) {
+export function useGetWorkspaceFromInviteHashQuery(baseOptions: Apollo.QueryHookOptions<GetWorkspaceFromInviteHashQuery, GetWorkspaceFromInviteHashQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
- return Apollo.useMutation<RemoveWorkspaceMemberMutation, RemoveWorkspaceMemberMutationVariables>(RemoveWorkspaceMemberDocument, options);
+ return Apollo.useQuery<GetWorkspaceFromInviteHashQuery, GetWorkspaceFromInviteHashQueryVariables>(GetWorkspaceFromInviteHashDocument, options);
}
-export type RemoveWorkspaceMemberMutationHookResult = ReturnType<typeof useRemoveWorkspaceMemberMutation>;
-export type RemoveWorkspaceMemberMutationResult = Apollo.MutationResult<RemoveWorkspaceMemberMutation>;
-export type RemoveWorkspaceMemberMutationOptions = Apollo.BaseMutationOptions<RemoveWorkspaceMemberMutation, RemoveWorkspaceMemberMutationVariables>;
-export const DeleteCurrentWorkspaceDocument = gql`
- mutation DeleteCurrentWorkspace {
- deleteCurrentWorkspace {
+export function useGetWorkspaceFromInviteHashLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetWorkspaceFromInviteHashQuery, GetWorkspaceFromInviteHashQueryVariables>) {
+ const options = {...defaultOptions, ...baseOptions}
+ return Apollo.useLazyQuery<GetWorkspaceFromInviteHashQuery, GetWorkspaceFromInviteHashQueryVariables>(GetWorkspaceFromInviteHashDocument, options);
+ }
+export type GetWorkspaceFromInviteHashQueryHookResult = ReturnType<typeof useGetWorkspaceFromInviteHashQuery>;
+export type GetWorkspaceFromInviteHashLazyQueryHookResult = ReturnType<typeof useGetWorkspaceFromInviteHashLazyQuery>;
+export type GetWorkspaceFromInviteHashQueryResult = Apollo.QueryResult<GetWorkspaceFromInviteHashQuery, GetWorkspaceFromInviteHashQueryVariables>;
+export const GetWorkspaceMembersDocument = gql`
+ query GetWorkspaceMembers {
+ workspaceMembers: findManyWorkspaceMember {
id
+ user {
+ id
+ email
+ avatarUrl
+ firstName
+ lastName
+ displayName
+ }
}
}
`;
-export type DeleteCurrentWorkspaceMutationFn = Apollo.MutationFunction<DeleteCurrentWorkspaceMutation, DeleteCurrentWorkspaceMutationVariables>;
/**
- * __useDeleteCurrentWorkspaceMutation__
+ * __useGetWorkspaceMembersQuery__
*
- * To run a mutation, you first call `useDeleteCurrentWorkspaceMutation` within a React component and pass it any options that fit your needs.
- * When your component renders, `useDeleteCurrentWorkspaceMutation` returns a tuple that includes:
- * - A mutate function that you can call at any time to execute the mutation
- * - An object with fields that represent the current status of the mutation's execution
+ * To run a query within a React component, call `useGetWorkspaceMembersQuery` and pass it any options that fit your needs.
+ * When your component renders, `useGetWorkspaceMembersQuery` returns an object from Apollo Client that contains loading, error, and data properties
+ * you can use to render your UI.
*
- * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
+ * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
*
* @example
- * const [deleteCurrentWorkspaceMutation, { data, loading, error }] = useDeleteCurrentWorkspaceMutation({
+ * const { data, loading, error } = useGetWorkspaceMembersQuery({
* variables: {
* },
* });
*/
-export function useDeleteCurrentWorkspaceMutation(baseOptions?: Apollo.MutationHookOptions<DeleteCurrentWorkspaceMutation, DeleteCurrentWorkspaceMutationVariables>) {
+export function useGetWorkspaceMembersQuery(baseOptions?: Apollo.QueryHookOptions<GetWorkspaceMembersQuery, GetWorkspaceMembersQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
- return Apollo.useMutation<DeleteCurrentWorkspaceMutation, DeleteCurrentWorkspaceMutationVariables>(DeleteCurrentWorkspaceDocument, options);
+ return Apollo.useQuery<GetWorkspaceMembersQuery, GetWorkspaceMembersQueryVariables>(GetWorkspaceMembersDocument, options);
}
-export type DeleteCurrentWorkspaceMutationHookResult = ReturnType<typeof useDeleteCurrentWorkspaceMutation>;
-export type DeleteCurrentWorkspaceMutationResult = Apollo.MutationResult<DeleteCurrentWorkspaceMutation>;
-export type DeleteCurrentWorkspaceMutationOptions = Apollo.BaseMutationOptions<DeleteCurrentWorkspaceMutation, DeleteCurrentWorkspaceMutationVariables>;
\ No newline at end of file
+export function useGetWorkspaceMembersLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetWorkspaceMembersQuery, GetWorkspaceMembersQueryVariables>) {
+ const options = {...defaultOptions, ...baseOptions}
+ return Apollo.useLazyQuery<GetWorkspaceMembersQuery, GetWorkspaceMembersQueryVariables>(GetWorkspaceMembersDocument, options);
+ }
+export type GetWorkspaceMembersQueryHookResult = ReturnType<typeof useGetWorkspaceMembersQuery>;
+export type GetWorkspaceMembersLazyQueryHookResult = ReturnType<typeof useGetWorkspaceMembersLazyQuery>;
+export type GetWorkspaceMembersQueryResult = Apollo.QueryResult<GetWorkspaceMembersQuery, GetWorkspaceMembersQueryVariables>;
\ No newline at end of file
diff --git a/front/src/modules/activities/components/ActivityAssigneePicker.tsx b/front/src/modules/activities/components/ActivityAssigneePicker.tsx
index 5580cb1ddf8..96428a77e22 100644
--- a/front/src/modules/activities/components/ActivityAssigneePicker.tsx
+++ b/front/src/modules/activities/components/ActivityAssigneePicker.tsx
@@ -13,7 +13,7 @@ import {
useUpdateActivityMutation,
} from '~/generated/graphql';
-import { ACTIVITY_UPDATE_FRAGMENT } from '../queries/update';
+import { ACTIVITY_UPDATE_FRAGMENT } from '../graphql/fragments/activityUpdateFragment';
export type OwnProps = {
activity: Pick<Activity, 'id'> & {
diff --git a/front/src/modules/activities/components/ActivityBodyEditor.tsx b/front/src/modules/activities/components/ActivityBodyEditor.tsx
index ea9c0c483f8..c574c7be848 100644
--- a/front/src/modules/activities/components/ActivityBodyEditor.tsx
+++ b/front/src/modules/activities/components/ActivityBodyEditor.tsx
@@ -8,7 +8,7 @@ import debounce from 'lodash.debounce';
import { BlockEditor } from '@/ui/editor/components/BlockEditor';
import { Activity, useUpdateActivityMutation } from '~/generated/graphql';
-import { ACTIVITY_UPDATE_FRAGMENT } from '../queries/update';
+import { ACTIVITY_UPDATE_FRAGMENT } from '../graphql/fragments/activityUpdateFragment';
const BlockNoteStyledContainer = styled.div`
width: 100%;
diff --git a/front/src/modules/activities/components/ActivityComments.tsx b/front/src/modules/activities/components/ActivityComments.tsx
index c88c5a1be84..9687f663960 100644
--- a/front/src/modules/activities/components/ActivityComments.tsx
+++ b/front/src/modules/activities/components/ActivityComments.tsx
@@ -13,7 +13,7 @@ import { Activity, useCreateCommentMutation } from '~/generated/graphql';
import { isNonEmptyString } from '~/utils/isNonEmptyString';
import { Comment } from '../comment/Comment';
-import { GET_ACTIVITY } from '../queries';
+import { GET_ACTIVITY } from '../graphql/queries/getActivity';
import { CommentForDrawer } from '../types/CommentForDrawer';
type OwnProps = {
diff --git a/front/src/modules/activities/components/ActivityEditor.tsx b/front/src/modules/activities/components/ActivityEditor.tsx
index 52ee861d2ad..5d01a62653b 100644
--- a/front/src/modules/activities/components/ActivityEditor.tsx
+++ b/front/src/modules/activities/components/ActivityEditor.tsx
@@ -6,7 +6,7 @@ import styled from '@emotion/styled';
import { ActivityBodyEditor } from '@/activities/components/ActivityBodyEditor';
import { ActivityComments } from '@/activities/components/ActivityComments';
import { ActivityTypeDropdown } from '@/activities/components/ActivityTypeDropdown';
-import { GET_ACTIVITIES } from '@/activities/queries';
+import { GET_ACTIVITIES } from '@/activities/graphql/queries/getActivities';
import { PropertyBox } from '@/ui/editable-field/property-box/components/PropertyBox';
import { DateEditableField } from '@/ui/editable-field/variants/components/DateEditableField';
import { IconCalendar } from '@/ui/icon/index';
@@ -22,7 +22,7 @@ import { debounce } from '~/utils/debounce';
import { ActivityAssigneeEditableField } from '../editable-fields/components/ActivityAssigneeEditableField';
import { ActivityRelationEditableField } from '../editable-fields/components/ActivityRelationEditableField';
-import { ACTIVITY_UPDATE_FRAGMENT } from '../queries/update';
+import { ACTIVITY_UPDATE_FRAGMENT } from '../graphql/fragments/activityUpdateFragment';
import { CommentForDrawer } from '../types/CommentForDrawer';
import { ActivityTitle } from './ActivityTitle';
diff --git a/front/src/modules/activities/components/__stories__/TaskGroupsWithoutTasks.stories.tsx b/front/src/modules/activities/components/__stories__/TaskGroupsWithoutTasks.stories.tsx
index 59d7caaf7f1..e4b314df45f 100644
--- a/front/src/modules/activities/components/__stories__/TaskGroupsWithoutTasks.stories.tsx
+++ b/front/src/modules/activities/components/__stories__/TaskGroupsWithoutTasks.stories.tsx
@@ -2,7 +2,7 @@ import { getOperationName } from '@apollo/client/utilities';
import type { Meta, StoryObj } from '@storybook/react';
import { graphql } from 'msw';
-import { GET_ACTIVITIES } from '@/activities/queries';
+import { GET_ACTIVITIES } from '@/activities/graphql/queries/getActivities';
import { TasksRecoilScopeContext } from '@/activities/states/recoil-scope-contexts/TasksRecoilScopeContext';
import { ComponentWithRecoilScopeDecorator } from '~/testing/decorators/ComponentWithRecoilScopeDecorator';
import { ComponentWithRouterDecorator } from '~/testing/decorators/ComponentWithRouterDecorator';
diff --git a/front/src/modules/activities/editable-fields/components/ActivityRelationEditableFieldEditMode.tsx b/front/src/modules/activities/editable-fields/components/ActivityRelationEditableFieldEditMode.tsx
index 26e80677cdd..27546a8d222 100644
--- a/front/src/modules/activities/editable-fields/components/ActivityRelationEditableFieldEditMode.tsx
+++ b/front/src/modules/activities/editable-fields/components/ActivityRelationEditableFieldEditMode.tsx
@@ -3,8 +3,8 @@ import styled from '@emotion/styled';
import { useHandleCheckableActivityTargetChange } from '@/activities/hooks/useHandleCheckableActivityTargetChange';
import { flatMapAndSortEntityForSelectArrayOfArrayByName } from '@/activities/utils/flatMapAndSortEntityForSelectArrayByName';
-import { useFilteredSearchCompanyQuery } from '@/companies/queries';
-import { useFilteredSearchPeopleQuery } from '@/people/queries';
+import { useFilteredSearchCompanyQuery } from '@/companies/hooks/useFilteredSearchCompanyQuery';
+import { useFilteredSearchPeopleQuery } from '@/people/hooks/useFilteredSearchPeopleQuery';
import { useEditableField } from '@/ui/editable-field/hooks/useEditableField';
import { MultipleEntitySelect } from '@/ui/input/relation-picker/components/MultipleEntitySelect';
import { Activity, ActivityTarget } from '~/generated/graphql';
diff --git a/front/src/modules/activities/graphql/fragments/activityQueryFragment.ts b/front/src/modules/activities/graphql/fragments/activityQueryFragment.ts
new file mode 100644
index 00000000000..8a07fa9abe6
--- /dev/null
+++ b/front/src/modules/activities/graphql/fragments/activityQueryFragment.ts
@@ -0,0 +1,54 @@
+import { gql } from '@apollo/client';
+
+export const ACTIVITY_QUERY_FRAGMENT = gql`
+ fragment ActivityQueryFragment on Activity {
+ id
+ createdAt
+ title
+ body
+ type
+ completedAt
+ dueAt
+ assignee {
+ id
+ firstName
+ lastName
+ displayName
+ avatarUrl
+ }
+ author {
+ id
+ firstName
+ lastName
+ displayName
+ }
+ comments {
+ id
+ body
+ createdAt
+ updatedAt
+ author {
+ id
+ displayName
+ firstName
+ lastName
+ avatarUrl
+ }
+ }
+ activityTargets {
+ id
+ companyId
+ personId
+ company {
+ id
+ name
+ domainName
+ }
+ person {
+ id
+ displayName
+ avatarUrl
+ }
+ }
+ }
+`;
diff --git a/front/src/modules/activities/graphql/fragments/activityUpdateFragment.ts b/front/src/modules/activities/graphql/fragments/activityUpdateFragment.ts
new file mode 100644
index 00000000000..7ab2490cafd
--- /dev/null
+++ b/front/src/modules/activities/graphql/fragments/activityUpdateFragment.ts
@@ -0,0 +1,18 @@
+import { gql } from '@apollo/client';
+
+export const ACTIVITY_UPDATE_FRAGMENT = gql`
+ fragment ActivityUpdateParts on Activity {
+ id
+ body
+ title
+ type
+ completedAt
+ dueAt
+ assignee {
+ id
+ firstName
+ lastName
+ displayName
+ }
+ }
+`;
diff --git a/front/src/modules/activities/graphql/mutations/addActivityTargets.ts b/front/src/modules/activities/graphql/mutations/addActivityTargets.ts
new file mode 100644
index 00000000000..7c6f034a96b
--- /dev/null
+++ b/front/src/modules/activities/graphql/mutations/addActivityTargets.ts
@@ -0,0 +1,24 @@
+import { gql } from '@apollo/client';
+
+export const ADD_ACTIVITY_TARGETS = gql`
+ mutation AddActivityTargetsOnActivity(
+ $activityId: String!
+ $activityTargetInputs: [ActivityTargetCreateManyActivityInput!]!
+ ) {
+ updateOneActivity(
+ where: { id: $activityId }
+ data: { activityTargets: { createMany: { data: $activityTargetInputs } } }
+ ) {
+ id
+ createdAt
+ updatedAt
+ activityTargets {
+ id
+ createdAt
+ updatedAt
+ companyId
+ personId
+ }
+ }
+ }
+`;
diff --git a/front/src/modules/activities/graphql/mutations/createActivityWithComment.ts b/front/src/modules/activities/graphql/mutations/createActivityWithComment.ts
new file mode 100644
index 00000000000..c6c9b4e2c1d
--- /dev/null
+++ b/front/src/modules/activities/graphql/mutations/createActivityWithComment.ts
@@ -0,0 +1,30 @@
+import { gql } from '@apollo/client';
+
+export const CREATE_ACTIVITY_WITH_COMMENT = gql`
+ mutation CreateActivity($data: ActivityCreateInput!) {
+ createOneActivity(data: $data) {
+ id
+ createdAt
+ updatedAt
+ authorId
+ type
+ activityTargets {
+ id
+ createdAt
+ updatedAt
+ activityId
+ companyId
+ personId
+ }
+ comments {
+ id
+ createdAt
+ updatedAt
+ body
+ author {
+ id
+ }
+ }
+ }
+ }
+`;
diff --git a/front/src/modules/activities/queries/create.ts b/front/src/modules/activities/graphql/mutations/createComment.ts
similarity index 56%
rename from front/src/modules/activities/queries/create.ts
rename to front/src/modules/activities/graphql/mutations/createComment.ts
index 1fb75bac5db..ad11d8dc023 100644
--- a/front/src/modules/activities/queries/create.ts
+++ b/front/src/modules/activities/graphql/mutations/createComment.ts
@@ -31,32 +31,3 @@ export const CREATE_COMMENT = gql`
}
}
`;
-
-export const CREATE_ACTIVITY_WITH_COMMENT = gql`
- mutation CreateActivity($data: ActivityCreateInput!) {
- createOneActivity(data: $data) {
- id
- createdAt
- updatedAt
- authorId
- type
- activityTargets {
- id
- createdAt
- updatedAt
- activityId
- companyId
- personId
- }
- comments {
- id
- createdAt
- updatedAt
- body
- author {
- id
- }
- }
- }
- }
-`;
diff --git a/front/src/modules/activities/graphql/mutations/deleteActivity.ts b/front/src/modules/activities/graphql/mutations/deleteActivity.ts
new file mode 100644
index 00000000000..5deeae7b1db
--- /dev/null
+++ b/front/src/modules/activities/graphql/mutations/deleteActivity.ts
@@ -0,0 +1,9 @@
+import { gql } from '@apollo/client';
+
+export const DELETE_ACTIVITY = gql`
+ mutation DeleteActivity($activityId: String!) {
+ deleteManyActivities(where: { id: { equals: $activityId } }) {
+ count
+ }
+ }
+`;
diff --git a/front/src/modules/activities/graphql/mutations/removeActivityTargets.ts b/front/src/modules/activities/graphql/mutations/removeActivityTargets.ts
new file mode 100644
index 00000000000..c3f57febe1e
--- /dev/null
+++ b/front/src/modules/activities/graphql/mutations/removeActivityTargets.ts
@@ -0,0 +1,27 @@
+import { gql } from '@apollo/client';
+
+export const REMOVE_ACTIVITY_TARGETS = gql`
+ mutation RemoveActivityTargetsOnActivity(
+ $activityId: String!
+ $activityTargetIds: [String!]!
+ ) {
+ updateOneActivity(
+ where: { id: $activityId }
+ data: {
+ activityTargets: { deleteMany: { id: { in: $activityTargetIds } } }
+ }
+ ) {
+ id
+ createdAt
+ updatedAt
+ activityTargets {
+ id
+ createdAt
+ updatedAt
+ companyId
+ personId
+ }
+ }
+ }
+`;
+//
diff --git a/front/src/modules/activities/graphql/mutations/updateActivity.ts b/front/src/modules/activities/graphql/mutations/updateActivity.ts
new file mode 100644
index 00000000000..7576e78e828
--- /dev/null
+++ b/front/src/modules/activities/graphql/mutations/updateActivity.ts
@@ -0,0 +1,12 @@
+import { gql } from '@apollo/client';
+
+export const UPDATE_ACTIVITY = gql`
+ mutation UpdateActivity(
+ $where: ActivityWhereUniqueInput!
+ $data: ActivityUpdateInput!
+ ) {
+ updateOneActivity(where: $where, data: $data) {
+ ...ActivityUpdateParts
+ }
+ }
+`;
diff --git a/front/src/modules/activities/graphql/mutations/uploadAttachment.ts b/front/src/modules/activities/graphql/mutations/uploadAttachment.ts
new file mode 100644
index 00000000000..42f7baaaadc
--- /dev/null
+++ b/front/src/modules/activities/graphql/mutations/uploadAttachment.ts
@@ -0,0 +1,7 @@
+import { gql } from '@apollo/client';
+
+export const UPLOAD_ATTACHMENT = gql`
+ mutation UploadAttachment($file: Upload!, $activityId: String!) {
+ uploadAttachment(file: $file, activityId: $activityId)
+ }
+`;
diff --git a/front/src/modules/activities/graphql/queries/getActivities.ts b/front/src/modules/activities/graphql/queries/getActivities.ts
new file mode 100644
index 00000000000..6f31a61bb9c
--- /dev/null
+++ b/front/src/modules/activities/graphql/queries/getActivities.ts
@@ -0,0 +1,12 @@
+import { gql } from '@apollo/client';
+
+export const GET_ACTIVITIES = gql`
+ query GetActivities(
+ $where: ActivityWhereInput!
+ $orderBy: [ActivityOrderByWithRelationInput!]
+ ) {
+ findManyActivities(orderBy: $orderBy, where: $where) {
+ ...ActivityQueryFragment
+ }
+ }
+`;
diff --git a/front/src/modules/activities/graphql/queries/getActivitiesByTarget.ts b/front/src/modules/activities/graphql/queries/getActivitiesByTarget.ts
new file mode 100644
index 00000000000..9e98e8af948
--- /dev/null
+++ b/front/src/modules/activities/graphql/queries/getActivitiesByTarget.ts
@@ -0,0 +1,24 @@
+import { gql } from '@apollo/client';
+
+export const GET_ACTIVITIES_BY_TARGETS = gql`
+ query GetActivitiesByTargets(
+ $activityTargetIds: [String!]!
+ $orderBy: [ActivityOrderByWithRelationInput!]
+ ) {
+ findManyActivities(
+ orderBy: $orderBy
+ where: {
+ activityTargets: {
+ some: {
+ OR: [
+ { personId: { in: $activityTargetIds } }
+ { companyId: { in: $activityTargetIds } }
+ ]
+ }
+ }
+ }
+ ) {
+ ...ActivityQueryFragment
+ }
+ }
+`;
diff --git a/front/src/modules/activities/graphql/queries/getActivity.ts b/front/src/modules/activities/graphql/queries/getActivity.ts
new file mode 100644
index 00000000000..2f0b029c57e
--- /dev/null
+++ b/front/src/modules/activities/graphql/queries/getActivity.ts
@@ -0,0 +1,9 @@
+import { gql } from '@apollo/client';
+
+export const GET_ACTIVITY = gql`
+ query GetActivity($activityId: String!) {
+ findManyActivities(where: { id: { equals: $activityId } }) {
+ ...ActivityQueryFragment
+ }
+ }
+`;
diff --git a/front/src/modules/activities/hooks/useCompleteTask.ts b/front/src/modules/activities/hooks/useCompleteTask.ts
index ecf6973e219..e50d00f6041 100644
--- a/front/src/modules/activities/hooks/useCompleteTask.ts
+++ b/front/src/modules/activities/hooks/useCompleteTask.ts
@@ -3,7 +3,7 @@ import { useApolloClient } from '@apollo/client';
import { Activity, useUpdateActivityMutation } from '~/generated/graphql';
-import { ACTIVITY_UPDATE_FRAGMENT } from '../queries/update';
+import { ACTIVITY_UPDATE_FRAGMENT } from '../graphql/fragments/activityUpdateFragment';
type Task = Pick<Activity, 'id'>;
diff --git a/front/src/modules/activities/hooks/useHandleCheckableActivityTargetChange.ts b/front/src/modules/activities/hooks/useHandleCheckableActivityTargetChange.ts
index 4352e4b3be5..845afdd3275 100644
--- a/front/src/modules/activities/hooks/useHandleCheckableActivityTargetChange.ts
+++ b/front/src/modules/activities/hooks/useHandleCheckableActivityTargetChange.ts
@@ -1,8 +1,8 @@
import { getOperationName } from '@apollo/client/utilities';
import { v4 } from 'uuid';
-import { GET_COMPANIES } from '@/companies/queries';
-import { GET_PEOPLE } from '@/people/queries';
+import { GET_COMPANIES } from '@/companies/graphql/queries/getCompanies';
+import { GET_PEOPLE } from '@/people/graphql/queries/getPeople';
import {
Activity,
ActivityTarget,
@@ -10,7 +10,7 @@ import {
useRemoveActivityTargetsOnActivityMutation,
} from '~/generated/graphql';
-import { GET_ACTIVITY } from '../queries';
+import { GET_ACTIVITY } from '../graphql/queries/getActivity';
import { ActivityTargetableEntityType } from '../types/ActivityTargetableEntity';
import { ActivityTargetableEntityForSelect } from '../types/ActivityTargetableEntityForSelect';
diff --git a/front/src/modules/activities/hooks/useOpenCreateActivityDrawer.ts b/front/src/modules/activities/hooks/useOpenCreateActivityDrawer.ts
index a0d695f3c4c..5ea0d412854 100644
--- a/front/src/modules/activities/hooks/useOpenCreateActivityDrawer.ts
+++ b/front/src/modules/activities/hooks/useOpenCreateActivityDrawer.ts
@@ -3,19 +3,17 @@ import { useRecoilState, useRecoilValue } from 'recoil';
import { v4 } from 'uuid';
import { currentUserState } from '@/auth/states/currentUserState';
-import { GET_COMPANIES } from '@/companies/queries';
-import { GET_PEOPLE } from '@/people/queries';
+import { GET_COMPANIES } from '@/companies/graphql/queries/getCompanies';
+import { GET_PEOPLE } from '@/people/graphql/queries/getPeople';
import { useRightDrawer } from '@/ui/right-drawer/hooks/useRightDrawer';
import { RightDrawerHotkeyScope } from '@/ui/right-drawer/types/RightDrawerHotkeyScope';
import { RightDrawerPages } from '@/ui/right-drawer/types/RightDrawerPages';
import { useSetHotkeyScope } from '@/ui/utilities/hotkey/hooks/useSetHotkeyScope';
import { ActivityType, useCreateActivityMutation } from '~/generated/graphql';
-import {
- GET_ACTIVITIES,
- GET_ACTIVITIES_BY_TARGETS,
- GET_ACTIVITY,
-} from '../queries';
+import { GET_ACTIVITIES } from '../graphql/queries/getActivities';
+import { GET_ACTIVITIES_BY_TARGETS } from '../graphql/queries/getActivitiesByTarget';
+import { GET_ACTIVITY } from '../graphql/queries/getActivity';
import { activityTargetableEntityArrayState } from '../states/activityTargetableEntityArrayState';
import { viewableActivityIdState } from '../states/viewableActivityIdState';
import {
diff --git a/front/src/modules/activities/queries/index.ts b/front/src/modules/activities/queries/index.ts
deleted file mode 100644
index c7396734d3f..00000000000
--- a/front/src/modules/activities/queries/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './select';
diff --git a/front/src/modules/activities/queries/select.ts b/front/src/modules/activities/queries/select.ts
deleted file mode 100644
index eee362d94b6..00000000000
--- a/front/src/modules/activities/queries/select.ts
+++ /dev/null
@@ -1,96 +0,0 @@
-import { gql } from '@apollo/client';
-
-export const ACTIVITY_QUERY_FRAGMENT = gql`
- fragment ActivityQueryFragment on Activity {
- id
- createdAt
- title
- body
- type
- completedAt
- dueAt
- assignee {
- id
- firstName
- lastName
- displayName
- avatarUrl
- }
- author {
- id
- firstName
- lastName
- displayName
- }
- comments {
- id
- body
- createdAt
- updatedAt
- author {
- id
- displayName
- firstName
- lastName
- avatarUrl
- }
- }
- activityTargets {
- id
- companyId
- personId
- company {
- id
- name
- domainName
- }
- person {
- id
- displayName
- avatarUrl
- }
- }
- }
-`;
-
-export const GET_ACTIVITIES_BY_TARGETS = gql`
- query GetActivitiesByTargets(
- $activityTargetIds: [String!]!
- $orderBy: [ActivityOrderByWithRelationInput!]
- ) {
- findManyActivities(
- orderBy: $orderBy
- where: {
- activityTargets: {
- some: {
- OR: [
- { personId: { in: $activityTargetIds } }
- { companyId: { in: $activityTargetIds } }
- ]
- }
- }
- }
- ) {
- ...ActivityQueryFragment
- }
- }
-`;
-
-export const GET_ACTIVITIES = gql`
- query GetActivities(
- $where: ActivityWhereInput!
- $orderBy: [ActivityOrderByWithRelationInput!]
- ) {
- findManyActivities(orderBy: $orderBy, where: $where) {
- ...ActivityQueryFragment
- }
- }
-`;
-
-export const GET_ACTIVITY = gql`
- query GetActivity($activityId: String!) {
- findManyActivities(where: { id: { equals: $activityId } }) {
- ...ActivityQueryFragment
- }
- }
-`;
diff --git a/front/src/modules/activities/queries/update.ts b/front/src/modules/activities/queries/update.ts
deleted file mode 100644
index 02aa5d782a7..00000000000
--- a/front/src/modules/activities/queries/update.ts
+++ /dev/null
@@ -1,91 +0,0 @@
-import { gql } from '@apollo/client';
-
-export const ADD_ACTIVITY_TARGETS = gql`
- mutation AddActivityTargetsOnActivity(
- $activityId: String!
- $activityTargetInputs: [ActivityTargetCreateManyActivityInput!]!
- ) {
- updateOneActivity(
- where: { id: $activityId }
- data: { activityTargets: { createMany: { data: $activityTargetInputs } } }
- ) {
- id
- createdAt
- updatedAt
- activityTargets {
- id
- createdAt
- updatedAt
- companyId
- personId
- }
- }
- }
-`;
-
-export const REMOVE_ACTIVITY_TARGETS = gql`
- mutation RemoveActivityTargetsOnActivity(
- $activityId: String!
- $activityTargetIds: [String!]!
- ) {
- updateOneActivity(
- where: { id: $activityId }
- data: {
- activityTargets: { deleteMany: { id: { in: $activityTargetIds } } }
- }
- ) {
- id
- createdAt
- updatedAt
- activityTargets {
- id
- createdAt
- updatedAt
- companyId
- personId
- }
- }
- }
-`;
-
-export const DELETE_ACTIVITY = gql`
- mutation DeleteActivity($activityId: String!) {
- deleteManyActivities(where: { id: { equals: $activityId } }) {
- count
- }
- }
-`;
-
-export const ACTIVITY_UPDATE_FRAGMENT = gql`
- fragment ActivityUpdateParts on Activity {
- id
- body
- title
- type
- completedAt
- dueAt
- assignee {
- id
- firstName
- lastName
- displayName
- }
- }
-`;
-
-export const UPDATE_ACTIVITY = gql`
- mutation UpdateActivity(
- $where: ActivityWhereUniqueInput!
- $data: ActivityUpdateInput!
- ) {
- updateOneActivity(where: $where, data: $data) {
- ...ActivityUpdateParts
- }
- }
-`;
-
-export const UPLOAD_ATTACHMENT = gql`
- mutation UploadAttachment($file: Upload!, $activityId: String!) {
- uploadAttachment(file: $file, activityId: $activityId)
- }
-`;
diff --git a/front/src/modules/activities/right-drawer/components/ActivityActionBar.tsx b/front/src/modules/activities/right-drawer/components/ActivityActionBar.tsx
index c96289ae6d7..5d0431b1003 100644
--- a/front/src/modules/activities/right-drawer/components/ActivityActionBar.tsx
+++ b/front/src/modules/activities/right-drawer/components/ActivityActionBar.tsx
@@ -3,12 +3,10 @@ import { useTheme } from '@emotion/react';
import styled from '@emotion/styled';
import { useRecoilState } from 'recoil';
-import {
- GET_ACTIVITIES,
- GET_ACTIVITIES_BY_TARGETS,
-} from '@/activities/queries';
-import { GET_COMPANIES } from '@/companies/queries';
-import { GET_PEOPLE } from '@/people/queries';
+import { GET_ACTIVITIES } from '@/activities/graphql/queries/getActivities';
+import { GET_ACTIVITIES_BY_TARGETS } from '@/activities/graphql/queries/getActivitiesByTarget';
+import { GET_COMPANIES } from '@/companies/graphql/queries/getCompanies';
+import { GET_PEOPLE } from '@/people/graphql/queries/getPeople';
import { IconButton } from '@/ui/button/components/IconButton';
import { IconTrash } from '@/ui/icon';
import { isRightDrawerOpenState } from '@/ui/right-drawer/states/isRightDrawerOpenState';
diff --git a/front/src/modules/analytics/queries/index.ts b/front/src/modules/analytics/graphql/queries/createEvent.ts
similarity index 100%
rename from front/src/modules/analytics/queries/index.ts
rename to front/src/modules/analytics/graphql/queries/createEvent.ts
diff --git a/front/src/modules/auth/graphql/fragments/userQueryFragment.ts b/front/src/modules/auth/graphql/fragments/userQueryFragment.ts
new file mode 100644
index 00000000000..9945bf1704b
--- /dev/null
+++ b/front/src/modules/auth/graphql/fragments/userQueryFragment.ts
@@ -0,0 +1,29 @@
+import { gql } from '@apollo/client';
+
+export const USER_QUERY_FRAGMENT = gql`
+ fragment UserQueryFragment on User {
+ id
+ email
+ displayName
+ firstName
+ lastName
+ canImpersonate
+ supportUserHash
+ workspaceMember {
+ id
+ allowImpersonation
+ workspace {
+ id
+ domainName
+ displayName
+ logo
+ inviteHash
+ }
+ }
+ settings {
+ id
+ colorScheme
+ locale
+ }
+ }
+`;
diff --git a/front/src/modules/auth/graphql/mutations/challenge.ts b/front/src/modules/auth/graphql/mutations/challenge.ts
new file mode 100644
index 00000000000..65362e382ef
--- /dev/null
+++ b/front/src/modules/auth/graphql/mutations/challenge.ts
@@ -0,0 +1,12 @@
+import { gql } from '@apollo/client';
+
+export const CHALLENGE = gql`
+ mutation Challenge($email: String!, $password: String!) {
+ challenge(email: $email, password: $password) {
+ loginToken {
+ expiresAt
+ token
+ }
+ }
+ }
+`;
diff --git a/front/src/modules/auth/graphql/mutations/impersonate.ts b/front/src/modules/auth/graphql/mutations/impersonate.ts
new file mode 100644
index 00000000000..f68edcf9563
--- /dev/null
+++ b/front/src/modules/auth/graphql/mutations/impersonate.ts
@@ -0,0 +1,22 @@
+import { gql } from '@apollo/client';
+
+// TODO: Fragments should be used instead of duplicating the user fields !
+export const IMPERSONATE = gql`
+ mutation Impersonate($userId: String!) {
+ impersonate(userId: $userId) {
+ user {
+ ...UserQueryFragment
+ }
+ tokens {
+ accessToken {
+ token
+ expiresAt
+ }
+ refreshToken {
+ token
+ expiresAt
+ }
+ }
+ }
+ }
+`;
diff --git a/front/src/modules/auth/graphql/mutations/renewToken.ts b/front/src/modules/auth/graphql/mutations/renewToken.ts
new file mode 100644
index 00000000000..ea43ba83d6b
--- /dev/null
+++ b/front/src/modules/auth/graphql/mutations/renewToken.ts
@@ -0,0 +1,18 @@
+import { gql } from '@apollo/client';
+
+export const RENEW_TOKEN = gql`
+ mutation RenewToken($refreshToken: String!) {
+ renewToken(refreshToken: $refreshToken) {
+ tokens {
+ accessToken {
+ expiresAt
+ token
+ }
+ refreshToken {
+ token
+ expiresAt
+ }
+ }
+ }
+ }
+`;
diff --git a/front/src/modules/auth/graphql/mutations/signUp.ts b/front/src/modules/auth/graphql/mutations/signUp.ts
new file mode 100644
index 00000000000..05732a59445
--- /dev/null
+++ b/front/src/modules/auth/graphql/mutations/signUp.ts
@@ -0,0 +1,20 @@
+import { gql } from '@apollo/client';
+
+export const SIGN_UP = gql`
+ mutation SignUp(
+ $email: String!
+ $password: String!
+ $workspaceInviteHash: String
+ ) {
+ signUp(
+ email: $email
+ password: $password
+ workspaceInviteHash: $workspaceInviteHash
+ ) {
+ loginToken {
+ expiresAt
+ token
+ }
+ }
+ }
+`;
diff --git a/front/src/modules/auth/graphql/mutations/verify.ts b/front/src/modules/auth/graphql/mutations/verify.ts
new file mode 100644
index 00000000000..fef9b10b8d1
--- /dev/null
+++ b/front/src/modules/auth/graphql/mutations/verify.ts
@@ -0,0 +1,21 @@
+import { gql } from '@apollo/client';
+
+export const VERIFY = gql`
+ mutation Verify($loginToken: String!) {
+ verify(loginToken: $loginToken) {
+ user {
+ ...UserQueryFragment
+ }
+ tokens {
+ accessToken {
+ token
+ expiresAt
+ }
+ refreshToken {
+ token
+ expiresAt
+ }
+ }
+ }
+ }
+`;
diff --git a/front/src/modules/auth/queries/select.ts b/front/src/modules/auth/graphql/queries/checkUserExists.ts
similarity index 100%
rename from front/src/modules/auth/queries/select.ts
rename to front/src/modules/auth/graphql/queries/checkUserExists.ts
diff --git a/front/src/modules/auth/queries/index.ts b/front/src/modules/auth/queries/index.ts
deleted file mode 100644
index 18c6c2f7dd7..00000000000
--- a/front/src/modules/auth/queries/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export * from './select';
-export * from './update';
diff --git a/front/src/modules/auth/queries/update.ts b/front/src/modules/auth/queries/update.ts
deleted file mode 100644
index 9ad644bf75b..00000000000
--- a/front/src/modules/auth/queries/update.ts
+++ /dev/null
@@ -1,133 +0,0 @@
-import { gql } from '@apollo/client';
-
-export const CHALLENGE = gql`
- mutation Challenge($email: String!, $password: String!) {
- challenge(email: $email, password: $password) {
- loginToken {
- expiresAt
- token
- }
- }
- }
-`;
-
-export const SIGN_UP = gql`
- mutation SignUp(
- $email: String!
- $password: String!
- $workspaceInviteHash: String
- ) {
- signUp(
- email: $email
- password: $password
- workspaceInviteHash: $workspaceInviteHash
- ) {
- loginToken {
- expiresAt
- token
- }
- }
- }
-`;
-
-export const VERIFY = gql`
- mutation Verify($loginToken: String!) {
- verify(loginToken: $loginToken) {
- user {
- id
- email
- displayName
- firstName
- lastName
- canImpersonate
- supportUserHash
- workspaceMember {
- id
- allowImpersonation
- workspace {
- id
- domainName
- displayName
- logo
- inviteHash
- }
- }
- settings {
- id
- colorScheme
- locale
- }
- }
- tokens {
- accessToken {
- token
- expiresAt
- }
- refreshToken {
- token
- expiresAt
- }
- }
- }
- }
-`;
-
-export const RENEW_TOKEN = gql`
- mutation RenewToken($refreshToken: String!) {
- renewToken(refreshToken: $refreshToken) {
- tokens {
- accessToken {
- expiresAt
- token
- }
- refreshToken {
- token
- expiresAt
- }
- }
- }
- }
-`;
-
-// TODO: Fragments should be used instead of duplicating the user fields !
-export const IMPERSONATE = gql`
- mutation Impersonate($userId: String!) {
- impersonate(userId: $userId) {
- user {
- id
- email
- displayName
- firstName
- lastName
- canImpersonate
- supportUserHash
- workspaceMember {
- id
- allowImpersonation
- workspace {
- id
- domainName
- displayName
- logo
- inviteHash
- }
- }
- settings {
- id
- colorScheme
- locale
- }
- }
- tokens {
- accessToken {
- token
- expiresAt
- }
- refreshToken {
- token
- expiresAt
- }
- }
- }
- }
-`;
diff --git a/front/src/modules/client-config/queries/index.tsx b/front/src/modules/client-config/graphql/queries/getClientConfig.ts
similarity index 100%
rename from front/src/modules/client-config/queries/index.tsx
rename to front/src/modules/client-config/graphql/queries/getClientConfig.ts
diff --git a/front/src/modules/companies/__stories__/Board.stories.tsx b/front/src/modules/companies/__stories__/Board.stories.tsx
index 83351a73ce1..c35d9b02fe9 100644
--- a/front/src/modules/companies/__stories__/Board.stories.tsx
+++ b/front/src/modules/companies/__stories__/Board.stories.tsx
@@ -3,11 +3,11 @@ import { Meta, StoryObj } from '@storybook/react';
import { EntityBoard } from '@/ui/board/components/EntityBoard';
import { RecoilScope } from '@/ui/utilities/recoil-scope/components/RecoilScope';
+import { SortOrder } from '~/generated/graphql';
import { opportunitiesBoardOptions } from '~/pages/opportunities/opportunitiesBoardOptions';
import { ComponentDecorator } from '~/testing/decorators/ComponentDecorator';
import { graphqlMocks } from '~/testing/graphqlMocks';
-import { defaultPipelineProgressOrderBy } from '../../pipeline/queries';
import { HooksCompanyBoard } from '../components/HooksCompanyBoard';
import { CompanyBoardRecoilScopeContext } from '../states/recoil-scope-contexts/CompanyBoardRecoilScopeContext';
@@ -17,7 +17,13 @@ const meta: Meta<typeof EntityBoard> = {
decorators: [
(Story) => (
<RecoilScope SpecificContext={CompanyBoardRecoilScopeContext}>
- <HooksCompanyBoard orderBy={defaultPipelineProgressOrderBy} />
+ <HooksCompanyBoard
+ orderBy={[
+ {
+ createdAt: SortOrder.Asc,
+ },
+ ]}
+ />
<MemoryRouter>
<Story />
</MemoryRouter>
diff --git a/front/src/modules/companies/__stories__/CompanyBoardCard.stories.tsx b/front/src/modules/companies/__stories__/CompanyBoardCard.stories.tsx
index 3aabf1e81a3..254758da636 100644
--- a/front/src/modules/companies/__stories__/CompanyBoardCard.stories.tsx
+++ b/front/src/modules/companies/__stories__/CompanyBoardCard.stories.tsx
@@ -5,11 +5,11 @@ import { CompanyBoardCard } from '@/companies/components/CompanyBoardCard';
import { BoardCardIdContext } from '@/ui/board/contexts/BoardCardIdContext';
import { BoardColumnRecoilScopeContext } from '@/ui/board/states/recoil-scope-contexts/BoardColumnRecoilScopeContext';
import { RecoilScope } from '@/ui/utilities/recoil-scope/components/RecoilScope';
+import { SortOrder } from '~/generated/graphql';
import { ComponentDecorator } from '~/testing/decorators/ComponentDecorator';
import { graphqlMocks } from '~/testing/graphqlMocks';
import { mockedPipelineProgressData } from '~/testing/mock-data/pipeline-progress';
-import { defaultPipelineProgressOrderBy } from '../../pipeline/queries';
import { HooksCompanyBoard } from '../components/HooksCompanyBoard';
import { CompanyBoardRecoilScopeContext } from '../states/recoil-scope-contexts/CompanyBoardRecoilScopeContext';
@@ -19,7 +19,13 @@ const meta: Meta<typeof CompanyBoardCard> = {
decorators: [
(Story) => (
<RecoilScope SpecificContext={CompanyBoardRecoilScopeContext}>
- <HooksCompanyBoard orderBy={defaultPipelineProgressOrderBy} />
+ <HooksCompanyBoard
+ orderBy={[
+ {
+ createdAt: SortOrder.Asc,
+ },
+ ]}
+ />
<RecoilScope SpecificContext={BoardColumnRecoilScopeContext}>
<BoardCardIdContext.Provider value={mockedPipelineProgressData[1].id}>
<MemoryRouter>
diff --git a/front/src/modules/companies/components/CompanyAccountOwnerPicker.tsx b/front/src/modules/companies/components/CompanyAccountOwnerPicker.tsx
deleted file mode 100644
index 73c6ae189af..00000000000
--- a/front/src/modules/companies/components/CompanyAccountOwnerPicker.tsx
+++ /dev/null
@@ -1,79 +0,0 @@
-import { useFilteredSearchEntityQuery } from '@/search/hooks/useFilteredSearchEntityQuery';
-import { SingleEntitySelect } from '@/ui/input/relation-picker/components/SingleEntitySelect';
-import { relationPickerSearchFilterScopedState } from '@/ui/input/relation-picker/states/relationPickerSearchFilterScopedState';
-import { EntityForSelect } from '@/ui/input/relation-picker/types/EntityForSelect';
-import { Entity } from '@/ui/input/relation-picker/types/EntityTypeForSelect';
-import { useRecoilScopedState } from '@/ui/utilities/recoil-scope/hooks/useRecoilScopedState';
-import {
- Company,
- User,
- useSearchUserQuery,
- useUpdateOneCompanyMutation,
-} from '~/generated/graphql';
-
-export type OwnProps = {
- company: Pick<Company, 'id'> & {
- accountOwner?: Pick<User, 'id' | 'displayName'> | null;
- };
- onSubmit?: () => void;
- onCancel?: () => void;
-};
-
-type UserForSelect = EntityForSelect & {
- entityType: Entity.User;
-};
-
-export function CompanyAccountOwnerPicker({
- company,
- onSubmit,
- onCancel,
-}: OwnProps) {
- const [searchFilter] = useRecoilScopedState(
- relationPickerSearchFilterScopedState,
- );
- const [updateCompany] = useUpdateOneCompanyMutation();
-
- const companies = useFilteredSearchEntityQuery({
- queryHook: useSearchUserQuery,
- selectedIds: [company?.accountOwner?.id ?? ''],
- searchFilter: searchFilter,
- mappingFunction: (user) => ({
- entityType: Entity.User,
- id: user.id,
- name: user.displayName,
- avatarType: 'rounded',
- avatarUrl: user.avatarUrl ?? '',
- }),
- orderByField: 'firstName',
- searchOnFields: ['firstName', 'lastName'],
- });
-
- async function handleEntitySelected(
- selectedUser: UserForSelect | null | undefined,
- ) {
- if (selectedUser) {
- await updateCompany({
- variables: {
- where: { id: company.id },
- data: {
- accountOwner: { connect: { id: selectedUser.id } },
- },
- },
- });
- }
-
- onSubmit?.();
- }
-
- return (
- <SingleEntitySelect
- onEntitySelected={handleEntitySelected}
- onCancel={onCancel}
- entities={{
- loading: companies.loading,
- entitiesToSelect: companies.entitiesToSelect,
- selectedEntity: companies.selectedEntities[0],
- }}
- />
- );
-}
diff --git a/front/src/modules/companies/components/CompanyPicker.tsx b/front/src/modules/companies/components/CompanyPicker.tsx
index 102e71f9b2f..a52f0e16f1b 100644
--- a/front/src/modules/companies/components/CompanyPicker.tsx
+++ b/front/src/modules/companies/components/CompanyPicker.tsx
@@ -3,7 +3,7 @@ import { relationPickerSearchFilterScopedState } from '@/ui/input/relation-picke
import { EntityForSelect } from '@/ui/input/relation-picker/types/EntityForSelect';
import { useRecoilScopedState } from '@/ui/utilities/recoil-scope/hooks/useRecoilScopedState';
-import { useFilteredSearchCompanyQuery } from '../queries';
+import { useFilteredSearchCompanyQuery } from '../hooks/useFilteredSearchCompanyQuery';
export type OwnProps = {
companyId: string | null;
diff --git a/front/src/modules/companies/components/CompanyPickerCell.tsx b/front/src/modules/companies/components/CompanyPickerCell.tsx
index d587c4eefb8..28b6550b124 100644
--- a/front/src/modules/companies/components/CompanyPickerCell.tsx
+++ b/front/src/modules/companies/components/CompanyPickerCell.tsx
@@ -1,4 +1,4 @@
-import { useFilteredSearchCompanyQuery } from '@/companies/queries';
+import { useFilteredSearchCompanyQuery } from '@/companies/hooks/useFilteredSearchCompanyQuery';
import { SingleEntitySelect } from '@/ui/input/relation-picker/components/SingleEntitySelect';
import { relationPickerSearchFilterScopedState } from '@/ui/input/relation-picker/states/relationPickerSearchFilterScopedState';
import { EntityForSelect } from '@/ui/input/relation-picker/types/EntityForSelect';
diff --git a/front/src/modules/companies/components/FilterDropdownCompanySearchSelect.tsx b/front/src/modules/companies/components/FilterDropdownCompanySearchSelect.tsx
index 4783f70a627..044d4fa74b7 100644
--- a/front/src/modules/companies/components/FilterDropdownCompanySearchSelect.tsx
+++ b/front/src/modules/companies/components/FilterDropdownCompanySearchSelect.tsx
@@ -6,7 +6,7 @@ import { filterDropdownSelectedEntityIdScopedState } from '@/ui/filter-n-sort/st
import { useRecoilScopedState } from '@/ui/utilities/recoil-scope/hooks/useRecoilScopedState';
import { useRecoilScopedValue } from '@/ui/utilities/recoil-scope/hooks/useRecoilScopedValue';
-import { useFilteredSearchCompanyQuery } from '../queries';
+import { useFilteredSearchCompanyQuery } from '../hooks/useFilteredSearchCompanyQuery';
export function FilterDropdownCompanySearchSelect({
context,
diff --git a/front/src/modules/companies/components/NewCompanyProgressButton.tsx b/front/src/modules/companies/components/NewCompanyProgressButton.tsx
index de4d6af3822..09b75293e47 100644
--- a/front/src/modules/companies/components/NewCompanyProgressButton.tsx
+++ b/front/src/modules/companies/components/NewCompanyProgressButton.tsx
@@ -3,7 +3,8 @@ import { getOperationName } from '@apollo/client/utilities';
import { useRecoilCallback, useRecoilState } from 'recoil';
import { v4 as uuidv4 } from 'uuid';
-import { GET_PIPELINE_PROGRESS, GET_PIPELINES } from '@/pipeline/queries';
+import { GET_PIPELINE_PROGRESS } from '@/pipeline/graphql/queries/getPipelineProgress';
+import { GET_PIPELINES } from '@/pipeline/graphql/queries/getPipelines';
import { currentPipelineState } from '@/pipeline/states/currentPipelineState';
import { NewButton } from '@/ui/board/components/NewButton';
import { BoardColumnIdContext } from '@/ui/board/contexts/BoardColumnIdContext';
@@ -15,7 +16,7 @@ import { usePreviousHotkeyScope } from '@/ui/utilities/hotkey/hooks/usePreviousH
import { useRecoilScopedState } from '@/ui/utilities/recoil-scope/hooks/useRecoilScopedState';
import { useCreateOneCompanyPipelineProgressMutation } from '~/generated/graphql';
-import { useFilteredSearchCompanyQuery } from '../queries';
+import { useFilteredSearchCompanyQuery } from '../hooks/useFilteredSearchCompanyQuery';
export function NewCompanyProgressButton() {
const [isCreatingCard, setIsCreatingCard] = useState(false);
diff --git a/front/src/modules/companies/graphql/fragments/companyFieldsFragment.ts b/front/src/modules/companies/graphql/fragments/companyFieldsFragment.ts
new file mode 100644
index 00000000000..064b9192782
--- /dev/null
+++ b/front/src/modules/companies/graphql/fragments/companyFieldsFragment.ts
@@ -0,0 +1,19 @@
+import { gql } from '@apollo/client';
+
+export const COMPANY_FIELDS_FRAGMENT = gql`
+ fragment CompanyFieldsFragment on Company {
+ accountOwner {
+ id
+ email
+ displayName
+ avatarUrl
+ }
+ address
+ createdAt
+ domainName
+ employees
+ linkedinUrl
+ id
+ name
+ }
+`;
diff --git a/front/src/modules/companies/graphql/mutations/deleteManyCompanies.ts b/front/src/modules/companies/graphql/mutations/deleteManyCompanies.ts
new file mode 100644
index 00000000000..975f2bd56e5
--- /dev/null
+++ b/front/src/modules/companies/graphql/mutations/deleteManyCompanies.ts
@@ -0,0 +1,9 @@
+import { gql } from '@apollo/client';
+
+export const DELETE_MANY_COMPANIES = gql`
+ mutation DeleteManyCompanies($ids: [String!]) {
+ deleteManyCompany(where: { id: { in: $ids } }) {
+ count
+ }
+ }
+`;
diff --git a/front/src/modules/companies/graphql/mutations/insertOneCompany.ts b/front/src/modules/companies/graphql/mutations/insertOneCompany.ts
new file mode 100644
index 00000000000..6b63c03b98d
--- /dev/null
+++ b/front/src/modules/companies/graphql/mutations/insertOneCompany.ts
@@ -0,0 +1,9 @@
+import { gql } from '@apollo/client';
+
+export const INSERT_ONE_COMPANY = gql`
+ mutation InsertOneCompany($data: CompanyCreateInput!) {
+ createOneCompany(data: $data) {
+ ...CompanyFieldsFragment
+ }
+ }
+`;
diff --git a/front/src/modules/companies/graphql/mutations/updateOneCompany.ts b/front/src/modules/companies/graphql/mutations/updateOneCompany.ts
new file mode 100644
index 00000000000..88e4e1e21b5
--- /dev/null
+++ b/front/src/modules/companies/graphql/mutations/updateOneCompany.ts
@@ -0,0 +1,12 @@
+import { gql } from '@apollo/client';
+
+export const UPDATE_ONE_COMPANY = gql`
+ mutation UpdateOneCompany(
+ $where: CompanyWhereUniqueInput!
+ $data: CompanyUpdateInput!
+ ) {
+ updateOneCompany(data: $data, where: $where) {
+ ...CompanyFieldsFragment
+ }
+ }
+`;
diff --git a/front/src/modules/companies/graphql/queries/getCompanies.ts b/front/src/modules/companies/graphql/queries/getCompanies.ts
new file mode 100644
index 00000000000..a8a7c5a17f1
--- /dev/null
+++ b/front/src/modules/companies/graphql/queries/getCompanies.ts
@@ -0,0 +1,27 @@
+import { gql } from '@apollo/client';
+
+export const GET_COMPANIES = gql`
+ query GetCompanies(
+ $orderBy: [CompanyOrderByWithRelationInput!]
+ $where: CompanyWhereInput
+ ) {
+ companies: findManyCompany(orderBy: $orderBy, where: $where) {
+ id
+ domainName
+ name
+ createdAt
+ address
+ linkedinUrl
+ employees
+ _activityCount
+ accountOwner {
+ id
+ email
+ displayName
+ firstName
+ lastName
+ avatarUrl
+ }
+ }
+ }
+`;
diff --git a/front/src/modules/companies/queries/show.ts b/front/src/modules/companies/graphql/queries/getCompany.ts
similarity index 50%
rename from front/src/modules/companies/queries/show.ts
rename to front/src/modules/companies/graphql/queries/getCompany.ts
index a372632a520..6d979eab3bd 100644
--- a/front/src/modules/companies/queries/show.ts
+++ b/front/src/modules/companies/graphql/queries/getCompany.ts
@@ -1,8 +1,4 @@
import { gql } from '@apollo/client';
-import { useSetRecoilState } from 'recoil';
-
-import { genericEntitiesFamilyState } from '@/ui/editable-field/states/genericEntitiesFamilyState';
-import { useGetCompanyQuery } from '~/generated/graphql';
export const GET_COMPANY = gql`
query GetCompany($where: CompanyWhereUniqueInput!) {
@@ -33,15 +29,3 @@ export const GET_COMPANY = gql`
}
}
`;
-
-export function useCompanyQuery(id: string) {
- const updateCompanyShowPage = useSetRecoilState(
- genericEntitiesFamilyState(id),
- );
- return useGetCompanyQuery({
- variables: { where: { id } },
- onCompleted: (data) => {
- updateCompanyShowPage(data?.findUniqueCompany);
- },
- });
-}
diff --git a/front/src/modules/companies/hooks/useCompanyQuery.ts b/front/src/modules/companies/hooks/useCompanyQuery.ts
new file mode 100644
index 00000000000..7deb5b08f8a
--- /dev/null
+++ b/front/src/modules/companies/hooks/useCompanyQuery.ts
@@ -0,0 +1,16 @@
+import { useSetRecoilState } from 'recoil';
+
+import { genericEntitiesFamilyState } from '@/ui/editable-field/states/genericEntitiesFamilyState';
+import { useGetCompanyQuery } from '~/generated/graphql';
+
+export function useCompanyQuery(id: string) {
+ const updateCompanyShowPage = useSetRecoilState(
+ genericEntitiesFamilyState(id),
+ );
+ return useGetCompanyQuery({
+ variables: { where: { id } },
+ onCompleted: (data) => {
+ updateCompanyShowPage(data?.findUniqueCompany);
+ },
+ });
+}
diff --git a/front/src/modules/companies/hooks/useDeleteCompanies.ts b/front/src/modules/companies/hooks/useDeleteCompanies.ts
index c5625168e4b..67b21b220a4 100644
--- a/front/src/modules/companies/hooks/useDeleteCompanies.ts
+++ b/front/src/modules/companies/hooks/useDeleteCompanies.ts
@@ -1,7 +1,7 @@
import { getOperationName } from '@apollo/client/utilities';
import { useRecoilState, useRecoilValue } from 'recoil';
-import { GET_PIPELINES } from '@/pipeline/queries';
+import { GET_PIPELINES } from '@/pipeline/graphql/queries/getPipelines';
import { useResetTableRowSelection } from '@/ui/table/hooks/useResetTableRowSelection';
import { selectedRowIdsSelector } from '@/ui/table/states/selectors/selectedRowIdsSelector';
import { tableRowIdsState } from '@/ui/table/states/tableRowIdsState';
diff --git a/front/src/modules/companies/hooks/useFilteredSearchCompanyQuery.ts b/front/src/modules/companies/hooks/useFilteredSearchCompanyQuery.ts
new file mode 100644
index 00000000000..5d5e63637f1
--- /dev/null
+++ b/front/src/modules/companies/hooks/useFilteredSearchCompanyQuery.ts
@@ -0,0 +1,32 @@
+import { ActivityTargetableEntityType } from '@/activities/types/ActivityTargetableEntity';
+import { ActivityTargetableEntityForSelect } from '@/activities/types/ActivityTargetableEntityForSelect';
+import { useFilteredSearchEntityQuery } from '@/search/hooks/useFilteredSearchEntityQuery';
+import { useSearchCompanyQuery } from '~/generated/graphql';
+import { getLogoUrlFromDomainName } from '~/utils';
+
+export function useFilteredSearchCompanyQuery({
+ searchFilter,
+ selectedIds = [],
+ limit,
+}: {
+ searchFilter: string;
+ selectedIds?: string[];
+ limit?: number;
+}) {
+ return useFilteredSearchEntityQuery({
+ queryHook: useSearchCompanyQuery,
+ searchOnFields: ['name'],
+ orderByField: 'name',
+ selectedIds: selectedIds,
+ mappingFunction: (company) =>
+ ({
+ id: company.id,
+ entityType: ActivityTargetableEntityType.Company,
+ name: company.name,
+ avatarUrl: getLogoUrlFromDomainName(company.domainName),
+ avatarType: 'squared',
+ } as ActivityTargetableEntityForSelect),
+ searchFilter,
+ limit,
+ });
+}
diff --git a/front/src/modules/companies/queries/__tests__/select.test.ts b/front/src/modules/companies/queries/__tests__/select.test.ts
deleted file mode 100644
index bb0ddb0ba6a..00000000000
--- a/front/src/modules/companies/queries/__tests__/select.test.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-import { reduceSortsToOrderBy } from '@/ui/filter-n-sort/helpers';
-
-import { CompaniesSelectedSortType } from '../select';
-
-describe('reduceSortsToOrderBy', () => {
- it('should return an array of objects with the id as key and the order as value', () => {
- const sorts = [
- { key: 'name', label: 'name', order: 'asc' },
- {
- key: 'domainName',
- label: 'domainName',
- order: 'desc',
- },
- ] satisfies CompaniesSelectedSortType[];
- const result = reduceSortsToOrderBy(sorts);
- expect(result).toEqual([{ name: 'asc' }, { domainName: 'desc' }]);
- });
-});
diff --git a/front/src/modules/companies/queries/index.ts b/front/src/modules/companies/queries/index.ts
deleted file mode 100644
index 41161a6b18a..00000000000
--- a/front/src/modules/companies/queries/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export * from './select';
-export * from './show';
-export * from './update';
diff --git a/front/src/modules/companies/queries/select.ts b/front/src/modules/companies/queries/select.ts
deleted file mode 100644
index 9929f7d4f4b..00000000000
--- a/front/src/modules/companies/queries/select.ts
+++ /dev/null
@@ -1,82 +0,0 @@
-import { gql } from '@apollo/client';
-
-import { ActivityTargetableEntityType } from '@/activities/types/ActivityTargetableEntity';
-import { ActivityTargetableEntityForSelect } from '@/activities/types/ActivityTargetableEntityForSelect';
-import { useFilteredSearchEntityQuery } from '@/search/hooks/useFilteredSearchEntityQuery';
-import { SelectedSortType } from '@/ui/filter-n-sort/types/interface';
-import {
- CompanyOrderByWithRelationInput as Companies_Order_By,
- CompanyWhereInput as Companies_Bool_Exp,
- SortOrder as Order_By,
- useGetCompaniesQuery,
- useSearchCompanyQuery,
-} from '~/generated/graphql';
-import { getLogoUrlFromDomainName } from '~/utils';
-
-export type CompaniesSelectedSortType = SelectedSortType<Companies_Order_By>;
-
-export const GET_COMPANIES = gql`
- query GetCompanies(
- $orderBy: [CompanyOrderByWithRelationInput!]
- $where: CompanyWhereInput
- ) {
- companies: findManyCompany(orderBy: $orderBy, where: $where) {
- id
- domainName
- name
- createdAt
- address
- linkedinUrl
- employees
- _activityCount
- accountOwner {
- id
- email
- displayName
- firstName
- lastName
- avatarUrl
- }
- }
- }
-`;
-
-export function useCompaniesQuery(
- orderBy: Companies_Order_By[],
- where: Companies_Bool_Exp,
-) {
- return useGetCompaniesQuery({ variables: { orderBy, where } });
-}
-
-export function useFilteredSearchCompanyQuery({
- searchFilter,
- selectedIds = [],
- limit,
-}: {
- searchFilter: string;
- selectedIds?: string[];
- limit?: number;
-}) {
- return useFilteredSearchEntityQuery({
- queryHook: useSearchCompanyQuery,
- searchOnFields: ['name'],
- orderByField: 'name',
- selectedIds: selectedIds,
- mappingFunction: (company) =>
- ({
- id: company.id,
- entityType: ActivityTargetableEntityType.Company,
- name: company.name,
- avatarUrl: getLogoUrlFromDomainName(company.domainName),
- avatarType: 'squared',
- } as ActivityTargetableEntityForSelect),
- searchFilter,
- limit,
- });
-}
-
-export const defaultOrderBy: Companies_Order_By[] = [
- {
- createdAt: Order_By.Desc,
- },
-];
diff --git a/front/src/modules/companies/queries/update.ts b/front/src/modules/companies/queries/update.ts
deleted file mode 100644
index b8f31cf7369..00000000000
--- a/front/src/modules/companies/queries/update.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-import { gql } from '@apollo/client';
-
-export const COMPANY_FIELDS_FRAGMENT = gql`
- fragment CompanyFieldsFragment on Company {
- accountOwner {
- id
- email
- displayName
- avatarUrl
- }
- address
- createdAt
- domainName
- employees
- linkedinUrl
- id
- name
- }
-`;
-
-export const UPDATE_ONE_COMPANY = gql`
- mutation UpdateOneCompany(
- $where: CompanyWhereUniqueInput!
- $data: CompanyUpdateInput!
- ) {
- updateOneCompany(data: $data, where: $where) {
- ...CompanyFieldsFragment
- }
- }
-`;
-
-export const INSERT_ONE_COMPANY = gql`
- mutation InsertOneCompany($data: CompanyCreateInput!) {
- createOneCompany(data: $data) {
- ...CompanyFieldsFragment
- }
- }
-`;
-
-export const DELETE_MANY_COMPANIES = gql`
- mutation DeleteManyCompanies($ids: [String!]) {
- deleteManyCompany(where: { id: { in: $ids } }) {
- count
- }
- }
-`;
diff --git a/front/src/modules/companies/table/components/CompanyTable.tsx b/front/src/modules/companies/table/components/CompanyTable.tsx
index c5a5835e894..00a02e433e6 100644
--- a/front/src/modules/companies/table/components/CompanyTable.tsx
+++ b/front/src/modules/companies/table/components/CompanyTable.tsx
@@ -17,6 +17,7 @@ import { useTableViewFields } from '@/views/hooks/useTableViewFields';
import { useViewSorts } from '@/views/hooks/useViewSorts';
import { currentViewIdState } from '@/views/states/currentViewIdState';
import {
+ SortOrder,
UpdateOneCompanyMutationVariables,
useGetCompaniesQuery,
useUpdateOneCompanyMutation,
@@ -24,8 +25,6 @@ import {
import { companiesFilters } from '~/pages/companies/companies-filters';
import { availableSorts } from '~/pages/companies/companies-sorts';
-import { defaultOrderBy } from '../../queries';
-
export function CompanyTable() {
const currentViewId = useRecoilValue(currentViewIdState);
const orderBy = useRecoilScopedValue(
@@ -61,7 +60,15 @@ export function CompanyTable() {
<GenericEntityTableData
getRequestResultKey="companies"
useGetRequest={useGetCompaniesQuery}
- orderBy={orderBy.length ? orderBy : defaultOrderBy}
+ orderBy={
+ orderBy.length
+ ? orderBy
+ : [
+ {
+ createdAt: SortOrder.Desc,
+ },
+ ]
+ }
whereFilters={whereFilters}
filterDefinitionArray={companiesFilters}
setContextMenuEntries={setContextMenuEntries}
diff --git a/front/src/modules/favorites/graphql/mutations/deleteFavorite.ts b/front/src/modules/favorites/graphql/mutations/deleteFavorite.ts
new file mode 100644
index 00000000000..4e8f2d0c72c
--- /dev/null
+++ b/front/src/modules/favorites/graphql/mutations/deleteFavorite.ts
@@ -0,0 +1,9 @@
+import { gql } from '@apollo/client';
+
+export const DELETE_FAVORITE = gql`
+ mutation DeleteFavorite($where: FavoriteWhereInput!) {
+ deleteFavorite(where: $where) {
+ id
+ }
+ }
+`;
diff --git a/front/src/modules/favorites/graphql/mutations/insertCompanyFavorite.ts b/front/src/modules/favorites/graphql/mutations/insertCompanyFavorite.ts
new file mode 100644
index 00000000000..e6cdc7a7c06
--- /dev/null
+++ b/front/src/modules/favorites/graphql/mutations/insertCompanyFavorite.ts
@@ -0,0 +1,14 @@
+import { gql } from '@apollo/client';
+
+export const INSERT_COMPANY_FAVORITE = gql`
+ mutation InsertCompanyFavorite($data: FavoriteMutationForCompanyArgs!) {
+ createFavoriteForCompany(data: $data) {
+ id
+ company {
+ id
+ name
+ domainName
+ }
+ }
+ }
+`;
diff --git a/front/src/modules/favorites/graphql/mutations/insertPersonFavorite.ts b/front/src/modules/favorites/graphql/mutations/insertPersonFavorite.ts
new file mode 100644
index 00000000000..b18cb0ecdd1
--- /dev/null
+++ b/front/src/modules/favorites/graphql/mutations/insertPersonFavorite.ts
@@ -0,0 +1,15 @@
+import { gql } from '@apollo/client';
+
+export const INSERT_PERSON_FAVORITE = gql`
+ mutation InsertPersonFavorite($data: FavoriteMutationForPersonArgs!) {
+ createFavoriteForPerson(data: $data) {
+ id
+ person {
+ id
+ firstName
+ lastName
+ displayName
+ }
+ }
+ }
+`;
diff --git a/front/src/modules/favorites/queries/show.ts b/front/src/modules/favorites/graphql/queries/getFavorites.ts
similarity index 100%
rename from front/src/modules/favorites/queries/show.ts
rename to front/src/modules/favorites/graphql/queries/getFavorites.ts
diff --git a/front/src/modules/favorites/hooks/useFavorites.ts b/front/src/modules/favorites/hooks/useFavorites.ts
index 345150caad9..0eb0db9bbf6 100644
--- a/front/src/modules/favorites/hooks/useFavorites.ts
+++ b/front/src/modules/favorites/hooks/useFavorites.ts
@@ -1,14 +1,14 @@
import { getOperationName } from '@apollo/client/utilities';
-import { GET_COMPANY } from '@/companies/queries';
-import { GET_PERSON } from '@/people/queries/show';
+import { GET_COMPANY } from '@/companies/graphql/queries/getCompany';
+import { GET_PERSON } from '@/people/graphql/queries/getPerson';
import {
useDeleteFavoriteMutation,
useInsertCompanyFavoriteMutation,
useInsertPersonFavoriteMutation,
} from '~/generated/graphql';
-import { GET_FAVORITES } from '../queries/show';
+import { GET_FAVORITES } from '../graphql/queries/getFavorites';
export function useFavorites() {
const [insertCompanyFavoriteMutation] = useInsertCompanyFavoriteMutation();
diff --git a/front/src/modules/favorites/queries/update.ts b/front/src/modules/favorites/queries/update.ts
deleted file mode 100644
index b9ab1a17ea2..00000000000
--- a/front/src/modules/favorites/queries/update.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-import { gql } from '@apollo/client';
-
-export const INSERT_PERSON_FAVORITE = gql`
- mutation InsertPersonFavorite($data: FavoriteMutationForPersonArgs!) {
- createFavoriteForPerson(data: $data) {
- id
- person {
- id
- firstName
- lastName
- displayName
- }
- }
- }
-`;
-
-export const INSERT_COMPANY_FAVORITE = gql`
- mutation InsertCompanyFavorite($data: FavoriteMutationForCompanyArgs!) {
- createFavoriteForCompany(data: $data) {
- id
- company {
- id
- name
- domainName
- }
- }
- }
-`;
-
-export const DELETE_FAVORITE = gql`
- mutation DeleteFavorite($where: FavoriteWhereInput!) {
- deleteFavorite(where: $where) {
- id
- }
- }
-`;
diff --git a/front/src/modules/people/components/FilterDropdownPeopleSearchSelect.tsx b/front/src/modules/people/components/FilterDropdownPeopleSearchSelect.tsx
index 1c8e04272e1..4a8efc9668e 100644
--- a/front/src/modules/people/components/FilterDropdownPeopleSearchSelect.tsx
+++ b/front/src/modules/people/components/FilterDropdownPeopleSearchSelect.tsx
@@ -1,6 +1,6 @@
import { Context } from 'react';
-import { useFilteredSearchPeopleQuery } from '@/people/queries';
+import { useFilteredSearchPeopleQuery } from '@/people/hooks/useFilteredSearchPeopleQuery';
import { FilterDropdownEntitySearchSelect } from '@/ui/filter-n-sort/components/FilterDropdownEntitySearchSelect';
import { filterDropdownSearchInputScopedState } from '@/ui/filter-n-sort/states/filterDropdownSearchInputScopedState';
import { filterDropdownSelectedEntityIdScopedState } from '@/ui/filter-n-sort/states/filterDropdownSelectedEntityIdScopedState';
diff --git a/front/src/modules/people/components/PeopleEntityTableData.tsx b/front/src/modules/people/components/PeopleEntityTableData.tsx
index 29542c906c3..d76bd1cfaab 100644
--- a/front/src/modules/people/components/PeopleEntityTableData.tsx
+++ b/front/src/modules/people/components/PeopleEntityTableData.tsx
@@ -1,13 +1,17 @@
import {
PersonOrderByWithRelationInput,
+ SortOrder,
useGetPeopleQuery,
} from '~/generated/graphql';
import { useSetPeopleEntityTable } from '../hooks/useSetPeopleEntityTable';
-import { defaultOrderBy } from '../queries';
export function PeopleEntityTableData({
- orderBy = defaultOrderBy,
+ orderBy = [
+ {
+ createdAt: SortOrder.Desc,
+ },
+ ],
whereFilters,
}: {
orderBy?: PersonOrderByWithRelationInput[];
diff --git a/front/src/modules/people/graphql/fragments/insertOnePersonFragment.ts b/front/src/modules/people/graphql/fragments/insertOnePersonFragment.ts
new file mode 100644
index 00000000000..7b738aa1d72
--- /dev/null
+++ b/front/src/modules/people/graphql/fragments/insertOnePersonFragment.ts
@@ -0,0 +1,11 @@
+import { gql } from '@apollo/client';
+
+export const INSERT_PERSON_FRAGMENT = gql`
+ fragment InsertPersonFragment on Person {
+ id
+ firstName
+ lastName
+ displayName
+ createdAt
+ }
+`;
diff --git a/front/src/modules/people/graphql/mutations/deleteManyPerson.ts b/front/src/modules/people/graphql/mutations/deleteManyPerson.ts
new file mode 100644
index 00000000000..6c2af650ddd
--- /dev/null
+++ b/front/src/modules/people/graphql/mutations/deleteManyPerson.ts
@@ -0,0 +1,9 @@
+import { gql } from '@apollo/client';
+
+export const DELETE_MANY_PERSON = gql`
+ mutation DeleteManyPerson($ids: [String!]) {
+ deleteManyPerson(where: { id: { in: $ids } }) {
+ count
+ }
+ }
+`;
diff --git a/front/src/modules/people/graphql/mutations/insertOnePerson.ts b/front/src/modules/people/graphql/mutations/insertOnePerson.ts
new file mode 100644
index 00000000000..c4d8c519c02
--- /dev/null
+++ b/front/src/modules/people/graphql/mutations/insertOnePerson.ts
@@ -0,0 +1,9 @@
+import { gql } from '@apollo/client';
+
+export const INSERT_ONE_PERSON = gql`
+ mutation InsertOnePerson($data: PersonCreateInput!) {
+ createOnePerson(data: $data) {
+ ...InsertPersonFragment
+ }
+ }
+`;
diff --git a/front/src/modules/people/graphql/mutations/removePersonPicture.ts b/front/src/modules/people/graphql/mutations/removePersonPicture.ts
new file mode 100644
index 00000000000..01271ef3231
--- /dev/null
+++ b/front/src/modules/people/graphql/mutations/removePersonPicture.ts
@@ -0,0 +1,10 @@
+import { gql } from '@apollo/client';
+
+export const REMOVE_PERSON_PICTURE = gql`
+ mutation RemovePersonPicture($where: PersonWhereUniqueInput!) {
+ updateOnePerson(data: { avatarUrl: null }, where: $where) {
+ id
+ avatarUrl
+ }
+ }
+`;
diff --git a/front/src/modules/people/graphql/mutations/updateOnePerson.ts b/front/src/modules/people/graphql/mutations/updateOnePerson.ts
new file mode 100644
index 00000000000..bf3ccce16c3
--- /dev/null
+++ b/front/src/modules/people/graphql/mutations/updateOnePerson.ts
@@ -0,0 +1,27 @@
+import { gql } from '@apollo/client';
+
+export const UPDATE_ONE_PERSON = gql`
+ mutation UpdateOnePerson(
+ $where: PersonWhereUniqueInput!
+ $data: PersonUpdateInput!
+ ) {
+ updateOnePerson(data: $data, where: $where) {
+ id
+ city
+ company {
+ domainName
+ name
+ id
+ }
+ email
+ jobTitle
+ linkedinUrl
+ xUrl
+ firstName
+ lastName
+ displayName
+ phone
+ createdAt
+ }
+ }
+`;
diff --git a/front/src/modules/people/graphql/mutations/updatePersonPicture.ts b/front/src/modules/people/graphql/mutations/updatePersonPicture.ts
new file mode 100644
index 00000000000..c609246bd52
--- /dev/null
+++ b/front/src/modules/people/graphql/mutations/updatePersonPicture.ts
@@ -0,0 +1,7 @@
+import { gql } from '@apollo/client';
+
+export const UPDATE_PERSON_PICTURE = gql`
+ mutation UploadPersonPicture($id: String!, $file: Upload!) {
+ uploadPersonPicture(id: $id, file: $file)
+ }
+`;
diff --git a/front/src/modules/people/graphql/queries/getPeople.ts b/front/src/modules/people/graphql/queries/getPeople.ts
new file mode 100644
index 00000000000..0e5bc4a2d38
--- /dev/null
+++ b/front/src/modules/people/graphql/queries/getPeople.ts
@@ -0,0 +1,30 @@
+import { gql } from '@apollo/client';
+
+export const GET_PEOPLE = gql`
+ query GetPeople(
+ $orderBy: [PersonOrderByWithRelationInput!]
+ $where: PersonWhereInput
+ $limit: Int
+ ) {
+ people: findManyPerson(orderBy: $orderBy, where: $where, take: $limit) {
+ id
+ phone
+ email
+ city
+ firstName
+ lastName
+ displayName
+ jobTitle
+ linkedinUrl
+ xUrl
+ avatarUrl
+ createdAt
+ _activityCount
+ company {
+ id
+ name
+ domainName
+ }
+ }
+ }
+`;
diff --git a/front/src/modules/people/queries/show.ts b/front/src/modules/people/graphql/queries/getPerson.ts
similarity index 51%
rename from front/src/modules/people/queries/show.ts
rename to front/src/modules/people/graphql/queries/getPerson.ts
index 07096f96d47..d4a4c379abb 100644
--- a/front/src/modules/people/queries/show.ts
+++ b/front/src/modules/people/graphql/queries/getPerson.ts
@@ -1,8 +1,4 @@
import { gql } from '@apollo/client';
-import { useSetRecoilState } from 'recoil';
-
-import { genericEntitiesFamilyState } from '@/ui/editable-field/states/genericEntitiesFamilyState';
-import { useGetPersonQuery } from '~/generated/graphql';
export const GET_PERSON = gql`
query GetPerson($id: String!) {
@@ -37,15 +33,3 @@ export const GET_PERSON = gql`
}
}
`;
-
-export function usePersonQuery(id: string) {
- const updatePersonShowPage = useSetRecoilState(
- genericEntitiesFamilyState(id),
- );
- return useGetPersonQuery({
- variables: { id },
- onCompleted: (data) => {
- updatePersonShowPage(data?.findUniquePerson);
- },
- });
-}
diff --git a/front/src/modules/people/graphql/queries/getPersonCity.ts b/front/src/modules/people/graphql/queries/getPersonCity.ts
new file mode 100644
index 00000000000..c24af2a245b
--- /dev/null
+++ b/front/src/modules/people/graphql/queries/getPersonCity.ts
@@ -0,0 +1,10 @@
+import { gql } from '@apollo/client';
+
+export const GET_PERSON_CITY = gql`
+ query GetPersonCityById($id: String!) {
+ person: findUniquePerson(id: $id) {
+ id
+ city
+ }
+ }
+`;
diff --git a/front/src/modules/people/graphql/queries/getPersonCommentCount.ts b/front/src/modules/people/graphql/queries/getPersonCommentCount.ts
new file mode 100644
index 00000000000..da001480503
--- /dev/null
+++ b/front/src/modules/people/graphql/queries/getPersonCommentCount.ts
@@ -0,0 +1,10 @@
+import { gql } from '@apollo/client';
+
+export const GET_PERSON_COMMENT_COUNT = gql`
+ query GetPersonCommentCountById($id: String!) {
+ person: findUniquePerson(id: $id) {
+ id
+ _activityCount
+ }
+ }
+`;
diff --git a/front/src/modules/people/graphql/queries/getPersonCompany.ts b/front/src/modules/people/graphql/queries/getPersonCompany.ts
new file mode 100644
index 00000000000..b613607cdaf
--- /dev/null
+++ b/front/src/modules/people/graphql/queries/getPersonCompany.ts
@@ -0,0 +1,14 @@
+import { gql } from '@apollo/client';
+
+export const GET_PERSON_COMPANY = gql`
+ query GetPersonCompanyById($id: String!) {
+ person: findUniquePerson(id: $id) {
+ id
+ company {
+ id
+ name
+ domainName
+ }
+ }
+ }
+`;
diff --git a/front/src/modules/people/graphql/queries/getPersonCreatedAt.ts b/front/src/modules/people/graphql/queries/getPersonCreatedAt.ts
new file mode 100644
index 00000000000..04cd4982271
--- /dev/null
+++ b/front/src/modules/people/graphql/queries/getPersonCreatedAt.ts
@@ -0,0 +1,10 @@
+import { gql } from '@apollo/client';
+
+export const GET_PERSON_CREATED_AT = gql`
+ query GetPersonCreatedAtById($id: String!) {
+ person: findUniquePerson(id: $id) {
+ id
+ createdAt
+ }
+ }
+`;
diff --git a/front/src/modules/people/graphql/queries/getPersonEmail.ts b/front/src/modules/people/graphql/queries/getPersonEmail.ts
new file mode 100644
index 00000000000..ece37e1b9b0
--- /dev/null
+++ b/front/src/modules/people/graphql/queries/getPersonEmail.ts
@@ -0,0 +1,10 @@
+import { gql } from '@apollo/client';
+
+export const GET_PERSON_EMAIL = gql`
+ query GetPersonEmailById($id: String!) {
+ person: findUniquePerson(id: $id) {
+ id
+ email
+ }
+ }
+`;
diff --git a/front/src/modules/people/graphql/queries/getPersonNamesAndCommentCount.ts b/front/src/modules/people/graphql/queries/getPersonNamesAndCommentCount.ts
new file mode 100644
index 00000000000..de9b9203c11
--- /dev/null
+++ b/front/src/modules/people/graphql/queries/getPersonNamesAndCommentCount.ts
@@ -0,0 +1,13 @@
+import { gql } from '@apollo/client';
+
+export const GET_PERSON_NAMES_AND_COMMENT_COUNT = gql`
+ query GetPersonNamesAndCommentCountById($id: String!) {
+ person: findUniquePerson(id: $id) {
+ id
+ firstName
+ lastName
+ displayName
+ _activityCount
+ }
+ }
+`;
diff --git a/front/src/modules/people/graphql/queries/getPersonPhone.ts b/front/src/modules/people/graphql/queries/getPersonPhone.ts
new file mode 100644
index 00000000000..bea2279477c
--- /dev/null
+++ b/front/src/modules/people/graphql/queries/getPersonPhone.ts
@@ -0,0 +1,10 @@
+import { gql } from '@apollo/client';
+
+export const GET_PERSON_PHONE = gql`
+ query GetPersonPhoneById($id: String!) {
+ person: findUniquePerson(id: $id) {
+ id
+ phone
+ }
+ }
+`;
diff --git a/front/src/modules/people/hooks/useFilteredSearchPeopleQuery.ts b/front/src/modules/people/hooks/useFilteredSearchPeopleQuery.ts
new file mode 100644
index 00000000000..5dcf041b09b
--- /dev/null
+++ b/front/src/modules/people/hooks/useFilteredSearchPeopleQuery.ts
@@ -0,0 +1,31 @@
+import { ActivityTargetableEntityType } from '@/activities/types/ActivityTargetableEntity';
+import { ActivityTargetableEntityForSelect } from '@/activities/types/ActivityTargetableEntityForSelect';
+import { useFilteredSearchEntityQuery } from '@/search/hooks/useFilteredSearchEntityQuery';
+import { useSearchPeopleQuery } from '~/generated/graphql';
+
+export function useFilteredSearchPeopleQuery({
+ searchFilter,
+ selectedIds = [],
+ limit,
+}: {
+ searchFilter: string;
+ selectedIds?: string[];
+ limit?: number;
+}) {
+ return useFilteredSearchEntityQuery({
+ queryHook: useSearchPeopleQuery,
+ searchOnFields: ['firstName', 'lastName'],
+ orderByField: 'lastName',
+ selectedIds: selectedIds,
+ mappingFunction: (entity) =>
+ ({
+ id: entity.id,
+ entityType: ActivityTargetableEntityType.Person,
+ name: `${entity.firstName} ${entity.lastName}`,
+ avatarUrl: entity.avatarUrl,
+ avatarType: 'rounded',
+ } as ActivityTargetableEntityForSelect),
+ searchFilter,
+ limit,
+ });
+}
diff --git a/front/src/modules/people/hooks/usePeopleTableContextMenuEntries.tsx b/front/src/modules/people/hooks/usePeopleTableContextMenuEntries.tsx
index cb026cda4a6..7c02682ee1c 100644
--- a/front/src/modules/people/hooks/usePeopleTableContextMenuEntries.tsx
+++ b/front/src/modules/people/hooks/usePeopleTableContextMenuEntries.tsx
@@ -11,7 +11,7 @@ import { selectedRowIdsSelector } from '@/ui/table/states/selectors/selectedRowI
import { tableRowIdsState } from '@/ui/table/states/tableRowIdsState';
import { ActivityType, useDeleteManyPersonMutation } from '~/generated/graphql';
-import { GET_PEOPLE } from '../queries';
+import { GET_PEOPLE } from '../graphql/queries/getPeople';
export function usePersonTableContextMenuEntries() {
const setContextMenuEntries = useSetRecoilState(contextMenuEntriesState);
diff --git a/front/src/modules/people/hooks/usePersonQuery.ts b/front/src/modules/people/hooks/usePersonQuery.ts
new file mode 100644
index 00000000000..928ec3a6f6a
--- /dev/null
+++ b/front/src/modules/people/hooks/usePersonQuery.ts
@@ -0,0 +1,16 @@
+import { useSetRecoilState } from 'recoil';
+
+import { genericEntitiesFamilyState } from '@/ui/editable-field/states/genericEntitiesFamilyState';
+import { useGetPersonQuery } from '~/generated/graphql';
+
+export function usePersonQuery(id: string) {
+ const updatePersonShowPage = useSetRecoilState(
+ genericEntitiesFamilyState(id),
+ );
+ return useGetPersonQuery({
+ variables: { id },
+ onCompleted: (data) => {
+ updatePersonShowPage(data?.findUniquePerson);
+ },
+ });
+}
diff --git a/front/src/modules/people/hooks/usePersonTableActionBarEntries.tsx b/front/src/modules/people/hooks/usePersonTableActionBarEntries.tsx
index 74bfe98d742..0e3068e1de5 100644
--- a/front/src/modules/people/hooks/usePersonTableActionBarEntries.tsx
+++ b/front/src/modules/people/hooks/usePersonTableActionBarEntries.tsx
@@ -11,7 +11,7 @@ import { selectedRowIdsSelector } from '@/ui/table/states/selectors/selectedRowI
import { tableRowIdsState } from '@/ui/table/states/tableRowIdsState';
import { ActivityType, useDeleteManyPersonMutation } from '~/generated/graphql';
-import { GET_PEOPLE } from '../queries';
+import { GET_PEOPLE } from '../graphql/queries/getPeople';
export function usePersonTableActionBarEntries() {
const setActionBarEntries = useSetRecoilState(actionBarEntriesState);
diff --git a/front/src/modules/people/queries/__tests__/select.test.ts b/front/src/modules/people/queries/__tests__/select.test.ts
deleted file mode 100644
index ab4885bac3c..00000000000
--- a/front/src/modules/people/queries/__tests__/select.test.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-import { reduceSortsToOrderBy } from '@/ui/filter-n-sort/helpers';
-
-import { PeopleSelectedSortType } from '../select';
-
-describe('reduceSortsToOrderBy', () => {
- it('should return an array of objects with the id as key and the order as value', () => {
- const sorts = [
- {
- key: 'firstName',
- label: 'firstName',
- order: 'asc',
- },
- {
- key: 'lastName',
- label: 'lastName',
- order: 'desc',
- },
- ] satisfies PeopleSelectedSortType[];
- const result = reduceSortsToOrderBy(sorts);
- expect(result).toEqual([{ firstName: 'asc' }, { lastName: 'desc' }]);
- });
-});
diff --git a/front/src/modules/people/queries/index.ts b/front/src/modules/people/queries/index.ts
deleted file mode 100644
index 41161a6b18a..00000000000
--- a/front/src/modules/people/queries/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export * from './select';
-export * from './show';
-export * from './update';
diff --git a/front/src/modules/people/queries/select.ts b/front/src/modules/people/queries/select.ts
deleted file mode 100644
index 0ef7b377434..00000000000
--- a/front/src/modules/people/queries/select.ts
+++ /dev/null
@@ -1,156 +0,0 @@
-import { gql } from '@apollo/client';
-
-import { ActivityTargetableEntityType } from '@/activities/types/ActivityTargetableEntity';
-import { ActivityTargetableEntityForSelect } from '@/activities/types/ActivityTargetableEntityForSelect';
-import { useFilteredSearchEntityQuery } from '@/search/hooks/useFilteredSearchEntityQuery';
-import { SelectedSortType } from '@/ui/filter-n-sort/types/interface';
-import {
- PersonOrderByWithRelationInput as People_Order_By,
- PersonWhereInput as People_Bool_Exp,
- SortOrder,
- useGetPeopleQuery,
- useSearchPeopleQuery,
-} from '~/generated/graphql';
-
-export type PeopleSelectedSortType = SelectedSortType<People_Order_By>;
-
-export const GET_PEOPLE = gql`
- query GetPeople(
- $orderBy: [PersonOrderByWithRelationInput!]
- $where: PersonWhereInput
- $limit: Int
- ) {
- people: findManyPerson(orderBy: $orderBy, where: $where, take: $limit) {
- id
- phone
- email
- city
- firstName
- lastName
- displayName
- jobTitle
- linkedinUrl
- xUrl
- avatarUrl
- createdAt
- _activityCount
- company {
- id
- name
- domainName
- }
- }
- }
-`;
-
-export function usePeopleQuery(
- orderBy: People_Order_By[],
- where: People_Bool_Exp,
-) {
- return useGetPeopleQuery({
- variables: { orderBy, where },
- });
-}
-
-export function useFilteredSearchPeopleQuery({
- searchFilter,
- selectedIds = [],
- limit,
-}: {
- searchFilter: string;
- selectedIds?: string[];
- limit?: number;
-}) {
- return useFilteredSearchEntityQuery({
- queryHook: useSearchPeopleQuery,
- searchOnFields: ['firstName', 'lastName'],
- orderByField: 'lastName',
- selectedIds: selectedIds,
- mappingFunction: (entity) =>
- ({
- id: entity.id,
- entityType: ActivityTargetableEntityType.Person,
- name: `${entity.firstName} ${entity.lastName}`,
- avatarUrl: entity.avatarUrl,
- avatarType: 'rounded',
- } as ActivityTargetableEntityForSelect),
- searchFilter,
- limit,
- });
-}
-
-export const defaultOrderBy: People_Order_By[] = [
- {
- createdAt: SortOrder.Desc,
- },
-];
-
-export const GET_PERSON_PHONE = gql`
- query GetPersonPhoneById($id: String!) {
- person: findUniquePerson(id: $id) {
- id
- phone
- }
- }
-`;
-
-export const GET_PERSON_EMAIL = gql`
- query GetPersonEmailById($id: String!) {
- person: findUniquePerson(id: $id) {
- id
- email
- }
- }
-`;
-
-export const GET_PERSON_NAMES_AND_COMMENT_COUNT = gql`
- query GetPersonNamesAndCommentCountById($id: String!) {
- person: findUniquePerson(id: $id) {
- id
- firstName
- lastName
- displayName
- _activityCount
- }
- }
-`;
-
-export const GET_PERSON_COMPANY = gql`
- query GetPersonCompanyById($id: String!) {
- person: findUniquePerson(id: $id) {
- id
- company {
- id
- name
- domainName
- }
- }
- }
-`;
-
-export const GET_PERSON_COMMENT_COUNT = gql`
- query GetPersonCommentCountById($id: String!) {
- person: findUniquePerson(id: $id) {
- id
- _activityCount
- }
- }
-`;
-
-export const GET_PERSON_CREATED_AT = gql`
- query GetPersonCreatedAtById($id: String!) {
- person: findUniquePerson(id: $id) {
- id
- createdAt
- }
- }
-`;
-
-export const GET_PERSON_CITY = gql`
- query GetPersonCityById($id: String!) {
- person: findUniquePerson(id: $id) {
- id
- city
- }
- }
-`;
diff --git a/front/src/modules/people/queries/update.ts b/front/src/modules/people/queries/update.ts
deleted file mode 100644
index 7c3b00ebd50..00000000000
--- a/front/src/modules/people/queries/update.ts
+++ /dev/null
@@ -1,68 +0,0 @@
-import { gql } from '@apollo/client';
-
-export const UPDATE_ONE_PERSON = gql`
- mutation UpdateOnePerson(
- $where: PersonWhereUniqueInput!
- $data: PersonUpdateInput!
- ) {
- updateOnePerson(data: $data, where: $where) {
- id
- city
- company {
- domainName
- name
- id
- }
- email
- jobTitle
- linkedinUrl
- xUrl
- firstName
- lastName
- displayName
- phone
- createdAt
- }
- }
-`;
-
-export const INSERT_PERSON_FRAGMENT = gql`
- fragment InsertPersonFragment on Person {
- id
- firstName
- lastName
- displayName
- createdAt
- }
-`;
-
-export const INSERT_ONE_PERSON = gql`
- mutation InsertOnePerson($data: PersonCreateInput!) {
- createOnePerson(data: $data) {
- ...InsertPersonFragment
- }
- }
-`;
-
-export const DELETE_MANY_PERSON = gql`
- mutation DeleteManyPerson($ids: [String!]) {
- deleteManyPerson(where: { id: { in: $ids } }) {
- count
- }
- }
-`;
-
-export const UPDATE_PERSON_PICTURE = gql`
- mutation UploadPersonPicture($id: String!, $file: Upload!) {
- uploadPersonPicture(id: $id, file: $file)
- }
-`;
-
-export const REMOVE_PERSON_PICTURE = gql`
- mutation RemovePersonPicture($where: PersonWhereUniqueInput!) {
- updateOnePerson(data: { avatarUrl: null }, where: $where) {
- id
- avatarUrl
- }
- }
-`;
diff --git a/front/src/modules/people/table/components/PeopleTable.tsx b/front/src/modules/people/table/components/PeopleTable.tsx
index c468e3f85ed..d0e8bfbd728 100644
--- a/front/src/modules/people/table/components/PeopleTable.tsx
+++ b/front/src/modules/people/table/components/PeopleTable.tsx
@@ -17,6 +17,7 @@ import { useTableViewFields } from '@/views/hooks/useTableViewFields';
import { useViewSorts } from '@/views/hooks/useViewSorts';
import { currentViewIdState } from '@/views/states/currentViewIdState';
import {
+ SortOrder,
UpdateOnePersonMutationVariables,
useGetPeopleQuery,
useUpdateOnePersonMutation,
@@ -24,8 +25,6 @@ import {
import { peopleFilters } from '~/pages/people/people-filters';
import { availableSorts } from '~/pages/people/people-sorts';
-import { defaultOrderBy } from '../../queries';
-
export function PeopleTable() {
const currentViewId = useRecoilValue(currentViewIdState);
const orderBy = useRecoilScopedValue(
@@ -61,7 +60,15 @@ export function PeopleTable() {
<GenericEntityTableData
getRequestResultKey="people"
useGetRequest={useGetPeopleQuery}
- orderBy={orderBy.length ? orderBy : defaultOrderBy}
+ orderBy={
+ orderBy.length
+ ? orderBy
+ : [
+ {
+ createdAt: SortOrder.Desc,
+ },
+ ]
+ }
whereFilters={whereFilters}
filterDefinitionArray={peopleFilters}
setContextMenuEntries={setContextMenuEntries}
diff --git a/front/src/modules/pipeline/graphql/mutations/createCompanyPipelineProgress.ts b/front/src/modules/pipeline/graphql/mutations/createCompanyPipelineProgress.ts
new file mode 100644
index 00000000000..bcf4801c0e4
--- /dev/null
+++ b/front/src/modules/pipeline/graphql/mutations/createCompanyPipelineProgress.ts
@@ -0,0 +1,21 @@
+import { gql } from '@apollo/client';
+
+export const CREATE_COMPANY_PIPELINE_PROGRESS = gql`
+ mutation CreateOneCompanyPipelineProgress(
+ $uuid: String!
+ $companyId: String!
+ $pipelineId: String!
+ $pipelineStageId: String!
+ ) {
+ createOnePipelineProgress(
+ data: {
+ id: $uuid
+ company: { connect: { id: $companyId } }
+ pipeline: { connect: { id: $pipelineId } }
+ pipelineStage: { connect: { id: $pipelineStageId } }
+ }
+ ) {
+ id
+ }
+ }
+`;
diff --git a/front/src/modules/pipeline/graphql/mutations/deletePipelineProgress.ts b/front/src/modules/pipeline/graphql/mutations/deletePipelineProgress.ts
new file mode 100644
index 00000000000..6214e00cb04
--- /dev/null
+++ b/front/src/modules/pipeline/graphql/mutations/deletePipelineProgress.ts
@@ -0,0 +1,9 @@
+import { gql } from '@apollo/client';
+
+export const DELETE_PIPELINE_PROGRESS = gql`
+ mutation DeleteManyPipelineProgress($ids: [String!]) {
+ deleteManyPipelineProgress(where: { id: { in: $ids } }) {
+ count
+ }
+ }
+`;
diff --git a/front/src/modules/pipeline/graphql/mutations/updatePipelineProgress.ts b/front/src/modules/pipeline/graphql/mutations/updatePipelineProgress.ts
new file mode 100644
index 00000000000..2d9b0b766f1
--- /dev/null
+++ b/front/src/modules/pipeline/graphql/mutations/updatePipelineProgress.ts
@@ -0,0 +1,18 @@
+import { gql } from '@apollo/client';
+
+export const UPDATE_PIPELINE_PROGRESS = gql`
+ mutation UpdateOnePipelineProgress(
+ $data: PipelineProgressUpdateInput!
+ $where: PipelineProgressWhereUniqueInput!
+ ) {
+ updateOnePipelineProgress(where: $where, data: $data) {
+ id
+ amount
+ closeDate
+ probability
+ pointOfContact {
+ id
+ }
+ }
+ }
+`;
diff --git a/front/src/modules/pipeline/graphql/mutations/updatePipelineProgressStage.ts b/front/src/modules/pipeline/graphql/mutations/updatePipelineProgressStage.ts
new file mode 100644
index 00000000000..648aaaadd08
--- /dev/null
+++ b/front/src/modules/pipeline/graphql/mutations/updatePipelineProgressStage.ts
@@ -0,0 +1,15 @@
+import { gql } from '@apollo/client';
+
+export const UPDATE_PIPELINE_PROGRESS_STAGE = gql`
+ mutation UpdateOnePipelineProgressStage(
+ $id: String
+ $pipelineStageId: String
+ ) {
+ updateOnePipelineProgress(
+ where: { id: $id }
+ data: { pipelineStage: { connect: { id: $pipelineStageId } } }
+ ) {
+ id
+ }
+ }
+`;
diff --git a/front/src/modules/pipeline/graphql/mutations/updatePipelineStage.ts b/front/src/modules/pipeline/graphql/mutations/updatePipelineStage.ts
new file mode 100644
index 00000000000..34c42c8f87f
--- /dev/null
+++ b/front/src/modules/pipeline/graphql/mutations/updatePipelineStage.ts
@@ -0,0 +1,11 @@
+import { gql } from '@apollo/client';
+
+export const UPDATE_PIPELINE_STAGE = gql`
+ mutation UpdatePipelineStage($id: String, $data: PipelineStageUpdateInput!) {
+ updateOnePipelineStage(where: { id: $id }, data: $data) {
+ id
+ name
+ color
+ }
+ }
+`;
diff --git a/front/src/modules/pipeline/graphql/queries/getPipelineProgress.ts b/front/src/modules/pipeline/graphql/queries/getPipelineProgress.ts
new file mode 100644
index 00000000000..38684c5b991
--- /dev/null
+++ b/front/src/modules/pipeline/graphql/queries/getPipelineProgress.ts
@@ -0,0 +1,26 @@
+import { gql } from '@apollo/client';
+
+export const GET_PIPELINE_PROGRESS = gql`
+ query GetPipelineProgress(
+ $where: PipelineProgressWhereInput
+ $orderBy: [PipelineProgressOrderByWithRelationInput!]
+ ) {
+ findManyPipelineProgress(where: $where, orderBy: $orderBy) {
+ id
+ pipelineStageId
+ companyId
+ personId
+ amount
+ closeDate
+ pointOfContactId
+ pointOfContact {
+ id
+ firstName
+ lastName
+ displayName
+ avatarUrl
+ }
+ probability
+ }
+ }
+`;
diff --git a/front/src/modules/pipeline/graphql/queries/getPipelines.ts b/front/src/modules/pipeline/graphql/queries/getPipelines.ts
new file mode 100644
index 00000000000..aab605c98b2
--- /dev/null
+++ b/front/src/modules/pipeline/graphql/queries/getPipelines.ts
@@ -0,0 +1,17 @@
+import { gql } from '@apollo/client';
+
+export const GET_PIPELINES = gql`
+ query GetPipelines($where: PipelineWhereInput) {
+ findManyPipeline(where: $where) {
+ id
+ name
+ pipelineProgressableType
+ pipelineStages {
+ id
+ name
+ color
+ index
+ }
+ }
+ }
+`;
diff --git a/front/src/modules/pipeline/queries/index.ts b/front/src/modules/pipeline/queries/index.ts
deleted file mode 100644
index 18c6c2f7dd7..00000000000
--- a/front/src/modules/pipeline/queries/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export * from './select';
-export * from './update';
diff --git a/front/src/modules/pipeline/queries/select.ts b/front/src/modules/pipeline/queries/select.ts
deleted file mode 100644
index ce830135ece..00000000000
--- a/front/src/modules/pipeline/queries/select.ts
+++ /dev/null
@@ -1,57 +0,0 @@
-import { gql } from '@apollo/client';
-
-import { SelectedSortType } from '@/ui/filter-n-sort/types/interface';
-import {
- PipelineProgressOrderByWithRelationInput as PipelineProgresses_Order_By,
- SortOrder as Order_By,
-} from '~/generated/graphql';
-
-export type PipelineProgressesSelectedSortType =
- SelectedSortType<PipelineProgresses_Order_By>;
-
-export const GET_PIPELINES = gql`
- query GetPipelines($where: PipelineWhereInput) {
- findManyPipeline(where: $where) {
- id
- name
- pipelineProgressableType
- pipelineStages {
- id
- name
- color
- index
- }
- }
- }
-`;
-
-export const GET_PIPELINE_PROGRESS = gql`
- query GetPipelineProgress(
- $where: PipelineProgressWhereInput
- $orderBy: [PipelineProgressOrderByWithRelationInput!]
- ) {
- findManyPipelineProgress(where: $where, orderBy: $orderBy) {
- id
- pipelineStageId
- companyId
- personId
- amount
- closeDate
- pointOfContactId
- pointOfContact {
- id
- firstName
- lastName
- displayName
- avatarUrl
- }
- probability
- }
- }
-`;
-
-export const defaultPipelineProgressOrderBy: PipelineProgresses_Order_By[] = [
- {
- createdAt: Order_By.Asc,
- },
-];
diff --git a/front/src/modules/pipeline/queries/update.ts b/front/src/modules/pipeline/queries/update.ts
deleted file mode 100644
index d392274262b..00000000000
--- a/front/src/modules/pipeline/queries/update.ts
+++ /dev/null
@@ -1,70 +0,0 @@
-import { gql } from '@apollo/client';
-
-export const DELETE_PIPELINE_PROGRESS = gql`
- mutation DeleteManyPipelineProgress($ids: [String!]) {
- deleteManyPipelineProgress(where: { id: { in: $ids } }) {
- count
- }
- }
-`;
-
-export const UPDATE_PIPELINE_STAGE = gql`
- mutation UpdatePipelineStage($id: String, $data: PipelineStageUpdateInput!) {
- updateOnePipelineStage(where: { id: $id }, data: $data) {
- id
- name
- color
- }
- }
-`;
-
-export const UPDATE_PIPELINE_PROGRESS = gql`
- mutation UpdateOnePipelineProgress(
- $data: PipelineProgressUpdateInput!
- $where: PipelineProgressWhereUniqueInput!
- ) {
- updateOnePipelineProgress(where: $where, data: $data) {
- id
- amount
- closeDate
- probability
- pointOfContact {
- id
- }
- }
- }
-`;
-
-export const UPDATE_PIPELINE_PROGRESS_STAGE = gql`
- mutation UpdateOnePipelineProgressStage(
- $id: String
- $pipelineStageId: String
- ) {
- updateOnePipelineProgress(
- where: { id: $id }
- data: { pipelineStage: { connect: { id: $pipelineStageId } } }
- ) {
- id
- }
- }
-`;
-
-export const CREATE_COMPANY_PIPELINE_PROGRESS = gql`
- mutation CreateOneCompanyPipelineProgress(
- $uuid: String!
- $companyId: String!
- $pipelineId: String!
- $pipelineStageId: String!
- ) {
- createOnePipelineProgress(
- data: {
- id: $uuid
- company: { connect: { id: $companyId } }
- pipeline: { connect: { id: $pipelineId } }
- pipelineStage: { connect: { id: $pipelineStageId } }
- }
- ) {
- id
- }
- }
-`;
diff --git a/front/src/modules/search/graphql/queries/searchActivityQuery.ts b/front/src/modules/search/graphql/queries/searchActivityQuery.ts
new file mode 100644
index 00000000000..48551e6246b
--- /dev/null
+++ b/front/src/modules/search/graphql/queries/searchActivityQuery.ts
@@ -0,0 +1,19 @@
+import { gql } from '@apollo/client';
+
+export const SEARCH_ACTIVITY_QUERY = gql`
+ query SearchActivity(
+ $where: ActivityWhereInput
+ $limit: Int
+ $orderBy: [ActivityOrderByWithRelationInput!]
+ ) {
+ searchResults: findManyActivities(
+ where: $where
+ take: $limit
+ orderBy: $orderBy
+ ) {
+ id
+ title
+ body
+ }
+ }
+`;
diff --git a/front/src/modules/search/graphql/queries/searchCompanyQuery.ts b/front/src/modules/search/graphql/queries/searchCompanyQuery.ts
new file mode 100644
index 00000000000..41b2bbb53d3
--- /dev/null
+++ b/front/src/modules/search/graphql/queries/searchCompanyQuery.ts
@@ -0,0 +1,17 @@
+import { gql } from '@apollo/client';
+
+export const SEARCH_COMPANY_QUERY = gql`
+ query SearchCompany(
+ $where: CompanyWhereInput
+ $limit: Int
+ $orderBy: [CompanyOrderByWithRelationInput!]
+ ) {
+ searchResults: findManyCompany(
+ where: $where
+ take: $limit
+ orderBy: $orderBy
+ ) {
+ ...CompanyFieldsFragment
+ }
+ }
+`;
diff --git a/front/src/modules/search/graphql/queries/searchPeopleQuery.ts b/front/src/modules/search/graphql/queries/searchPeopleQuery.ts
new file mode 100644
index 00000000000..c11fcd1492c
--- /dev/null
+++ b/front/src/modules/search/graphql/queries/searchPeopleQuery.ts
@@ -0,0 +1,25 @@
+import { gql } from '@apollo/client';
+
+export const SEARCH_PEOPLE_QUERY = gql`
+ query SearchPeople(
+ $where: PersonWhereInput
+ $limit: Int
+ $orderBy: [PersonOrderByWithRelationInput!]
+ ) {
+ searchResults: findManyPerson(
+ where: $where
+ take: $limit
+ orderBy: $orderBy
+ ) {
+ id
+ phone
+ email
+ city
+ firstName
+ lastName
+ displayName
+ avatarUrl
+ createdAt
+ }
+ }
+`;
diff --git a/front/src/modules/search/graphql/queries/searchUserQuery.ts b/front/src/modules/search/graphql/queries/searchUserQuery.ts
new file mode 100644
index 00000000000..a3175765aa8
--- /dev/null
+++ b/front/src/modules/search/graphql/queries/searchUserQuery.ts
@@ -0,0 +1,22 @@
+import { gql } from '@apollo/client';
+
+export const SEARCH_USER_QUERY = gql`
+ query SearchUser(
+ $where: UserWhereInput
+ $limit: Int
+ $orderBy: [UserOrderByWithRelationInput!]
+ ) {
+ searchResults: findManyUser(
+ where: $where
+ take: $limit
+ orderBy: $orderBy
+ ) {
+ id
+ email
+ displayName
+ firstName
+ lastName
+ avatarUrl
+ }
+ }
+`;
diff --git a/front/src/modules/search/queries/search.ts b/front/src/modules/search/queries/search.ts
deleted file mode 100644
index 9eb90ea8e17..00000000000
--- a/front/src/modules/search/queries/search.ts
+++ /dev/null
@@ -1,88 +0,0 @@
-import { gql } from '@apollo/client';
-
-export const SEARCH_PEOPLE_QUERY = gql`
- query SearchPeople(
- $where: PersonWhereInput
- $limit: Int
- $orderBy: [PersonOrderByWithRelationInput!]
- ) {
- searchResults: findManyPerson(
- where: $where
- take: $limit
- orderBy: $orderBy
- ) {
- id
- phone
- email
- city
- firstName
- lastName
- displayName
- avatarUrl
- createdAt
- }
- }
-`;
-
-export const SEARCH_USER_QUERY = gql`
- query SearchUser(
- $where: UserWhereInput
- $limit: Int
- $orderBy: [UserOrderByWithRelationInput!]
- ) {
- searchResults: findManyUser(
- where: $where
- take: $limit
- orderBy: $orderBy
- ) {
- id
- email
- displayName
- firstName
- lastName
- avatarUrl
- }
- }
-`;
-// TODO: remove this query
-export const EMPTY_QUERY = gql`
- query EmptyQuery {
- searchResults: findManyUser {
- id
- }
- }
-`;
-
-export const SEARCH_COMPANY_QUERY = gql`
- query SearchCompany(
- $where: CompanyWhereInput
- $limit: Int
- $orderBy: [CompanyOrderByWithRelationInput!]
- ) {
- searchResults: findManyCompany(
- where: $where
- take: $limit
- orderBy: $orderBy
- ) {
- ...CompanyFieldsFragment
- }
- }
-`;
-
-export const SEARCH_ACTIVITY_QUERY = gql`
- query SearchActivity(
- $where: ActivityWhereInput
- $limit: Int
- $orderBy: [ActivityOrderByWithRelationInput!]
- ) {
- searchResults: findManyActivities(
- where: $where
- take: $limit
- orderBy: $orderBy
- ) {
- id
- title
- body
- }
- }
-`;
diff --git a/front/src/modules/settings/profile/components/NameFields.tsx b/front/src/modules/settings/profile/components/NameFields.tsx
index 8b3ba31a117..4315e3bcf32 100644
--- a/front/src/modules/settings/profile/components/NameFields.tsx
+++ b/front/src/modules/settings/profile/components/NameFields.tsx
@@ -6,7 +6,7 @@ import { useRecoilValue } from 'recoil';
import { currentUserState } from '@/auth/states/currentUserState';
import { TextInput } from '@/ui/input/text/components/TextInput';
-import { GET_CURRENT_USER } from '@/users/queries';
+import { GET_CURRENT_USER } from '@/users/graphql/queries/getCurrentUser';
import { useUpdateUserMutation } from '~/generated/graphql';
const StyledComboInputContainer = styled.div`
diff --git a/front/src/modules/settings/profile/components/ProfilePictureUploader.tsx b/front/src/modules/settings/profile/components/ProfilePictureUploader.tsx
index 8e107e5a5d7..5cbe3dfd89a 100644
--- a/front/src/modules/settings/profile/components/ProfilePictureUploader.tsx
+++ b/front/src/modules/settings/profile/components/ProfilePictureUploader.tsx
@@ -3,7 +3,7 @@ import { useRecoilState } from 'recoil';
import { currentUserState } from '@/auth/states/currentUserState';
import { ImageInput } from '@/ui/input/image/components/ImageInput';
-import { GET_CURRENT_USER } from '@/users/queries';
+import { GET_CURRENT_USER } from '@/users/graphql/queries/getCurrentUser';
import { getImageAbsoluteURIOrBase64 } from '@/users/utils/getProfilePictureAbsoluteURI';
import {
useRemoveProfilePictureMutation,
diff --git a/front/src/modules/settings/workspace/components/NameField.tsx b/front/src/modules/settings/workspace/components/NameField.tsx
index 9073ef87263..303541910f4 100644
--- a/front/src/modules/settings/workspace/components/NameField.tsx
+++ b/front/src/modules/settings/workspace/components/NameField.tsx
@@ -6,7 +6,7 @@ import { useRecoilState } from 'recoil';
import { currentUserState } from '@/auth/states/currentUserState';
import { TextInput } from '@/ui/input/text/components/TextInput';
-import { GET_CURRENT_USER } from '@/users/queries';
+import { GET_CURRENT_USER } from '@/users/graphql/queries/getCurrentUser';
import { useUpdateWorkspaceMutation } from '~/generated/graphql';
const StyledComboInputContainer = styled.div`
diff --git a/front/src/modules/settings/workspace/components/WorkspaceLogoUploader.tsx b/front/src/modules/settings/workspace/components/WorkspaceLogoUploader.tsx
index 3b0dad0b7c8..d26eb839fbb 100644
--- a/front/src/modules/settings/workspace/components/WorkspaceLogoUploader.tsx
+++ b/front/src/modules/settings/workspace/components/WorkspaceLogoUploader.tsx
@@ -3,7 +3,7 @@ import { useRecoilState } from 'recoil';
import { currentUserState } from '@/auth/states/currentUserState';
import { ImageInput } from '@/ui/input/image/components/ImageInput';
-import { GET_CURRENT_USER } from '@/users/queries';
+import { GET_CURRENT_USER } from '@/users/graphql/queries/getCurrentUser';
import { getImageAbsoluteURIOrBase64 } from '@/users/utils/getProfilePictureAbsoluteURI';
import {
useRemoveWorkspaceLogoMutation,
diff --git a/front/src/modules/ui/board/components/BoardActionBarButtonDeleteBoardCard.tsx b/front/src/modules/ui/board/components/BoardActionBarButtonDeleteBoardCard.tsx
index 1f1f6713c7f..45e19ac4576 100644
--- a/front/src/modules/ui/board/components/BoardActionBarButtonDeleteBoardCard.tsx
+++ b/front/src/modules/ui/board/components/BoardActionBarButtonDeleteBoardCard.tsx
@@ -1,7 +1,7 @@
import { getOperationName } from '@apollo/client/utilities';
import { useRecoilValue } from 'recoil';
-import { GET_PIPELINES } from '@/pipeline/queries';
+import { GET_PIPELINES } from '@/pipeline/graphql/queries/getPipelines';
import { ActionBarEntry } from '@/ui/action-bar/components/ActionBarEntry';
import { IconTrash } from '@/ui/icon/index';
import { useDeleteManyPipelineProgressMutation } from '~/generated/graphql';
diff --git a/front/src/modules/ui/board/components/EntityBoard.tsx b/front/src/modules/ui/board/components/EntityBoard.tsx
index a12ccaea284..876cab423d4 100644
--- a/front/src/modules/ui/board/components/EntityBoard.tsx
+++ b/front/src/modules/ui/board/components/EntityBoard.tsx
@@ -7,7 +7,7 @@ import { IconList } from '@tabler/icons-react';
import { useRecoilState } from 'recoil';
import { CompanyBoardRecoilScopeContext } from '@/companies/states/recoil-scope-contexts/CompanyBoardRecoilScopeContext';
-import { GET_PIPELINE_PROGRESS } from '@/pipeline/queries';
+import { GET_PIPELINE_PROGRESS } from '@/pipeline/graphql/queries/getPipelineProgress';
import { BoardHeader } from '@/ui/board/components/BoardHeader';
import { StyledBoard } from '@/ui/board/components/StyledBoard';
import { BoardColumnIdContext } from '@/ui/board/contexts/BoardColumnIdContext';
diff --git a/front/src/modules/ui/table/components/GenericEntityTableData.tsx b/front/src/modules/ui/table/components/GenericEntityTableData.tsx
index a9f4d45f617..917c78dd070 100644
--- a/front/src/modules/ui/table/components/GenericEntityTableData.tsx
+++ b/front/src/modules/ui/table/components/GenericEntityTableData.tsx
@@ -1,13 +1,17 @@
import { useEffect } from 'react';
-import { defaultOrderBy } from '@/people/queries';
import { FilterDefinition } from '@/ui/filter-n-sort/types/FilterDefinition';
import { useSetEntityTableData } from '@/ui/table/hooks/useSetEntityTableData';
+import { SortOrder } from '~/generated/graphql';
export function GenericEntityTableData({
useGetRequest,
getRequestResultKey,
- orderBy = defaultOrderBy,
+ orderBy = [
+ {
+ createdAt: SortOrder.Desc,
+ },
+ ],
whereFilters,
filterDefinitionArray,
setActionBarEntries,
diff --git a/front/src/modules/users/graphql/mutations/deleteUserAccount.ts b/front/src/modules/users/graphql/mutations/deleteUserAccount.ts
new file mode 100644
index 00000000000..feb1eedb7a4
--- /dev/null
+++ b/front/src/modules/users/graphql/mutations/deleteUserAccount.ts
@@ -0,0 +1,9 @@
+import { gql } from '@apollo/client';
+
+export const DELETE_USER_ACCOUNT = gql`
+ mutation DeleteUserAccount {
+ deleteUserAccount {
+ id
+ }
+ }
+`;
diff --git a/front/src/modules/users/graphql/mutations/removeProfilePicture.ts b/front/src/modules/users/graphql/mutations/removeProfilePicture.ts
new file mode 100644
index 00000000000..906fd1d4708
--- /dev/null
+++ b/front/src/modules/users/graphql/mutations/removeProfilePicture.ts
@@ -0,0 +1,10 @@
+import { gql } from '@apollo/client';
+
+export const REMOVE_PROFILE_PICTURE = gql`
+ mutation RemoveProfilePicture($where: UserWhereUniqueInput!) {
+ updateUser(data: { avatarUrl: null }, where: $where) {
+ id
+ avatarUrl
+ }
+ }
+`;
diff --git a/front/src/modules/users/graphql/mutations/updateAllowImpersonation.ts b/front/src/modules/users/graphql/mutations/updateAllowImpersonation.ts
new file mode 100644
index 00000000000..62e06e7c8f7
--- /dev/null
+++ b/front/src/modules/users/graphql/mutations/updateAllowImpersonation.ts
@@ -0,0 +1,10 @@
+import { gql } from '@apollo/client';
+
+export const UPDATE_ALLOW_IMPERSONATION = gql`
+ mutation UpdateAllowImpersonation($allowImpersonation: Boolean!) {
+ allowImpersonation(allowImpersonation: $allowImpersonation) {
+ id
+ allowImpersonation
+ }
+ }
+`;
diff --git a/front/src/modules/users/graphql/mutations/updateProfilePicture.ts b/front/src/modules/users/graphql/mutations/updateProfilePicture.ts
new file mode 100644
index 00000000000..573fb878c39
--- /dev/null
+++ b/front/src/modules/users/graphql/mutations/updateProfilePicture.ts
@@ -0,0 +1,7 @@
+import { gql } from '@apollo/client';
+
+export const UPDATE_PROFILE_PICTURE = gql`
+ mutation UploadProfilePicture($file: Upload!) {
+ uploadProfilePicture(file: $file)
+ }
+`;
diff --git a/front/src/modules/users/graphql/mutations/updateUser.ts b/front/src/modules/users/graphql/mutations/updateUser.ts
new file mode 100644
index 00000000000..993b1cef77a
--- /dev/null
+++ b/front/src/modules/users/graphql/mutations/updateUser.ts
@@ -0,0 +1,29 @@
+import { gql } from '@apollo/client';
+
+export const UPDATE_USER = gql`
+ mutation UpdateUser($data: UserUpdateInput!, $where: UserWhereUniqueInput!) {
+ updateUser(data: $data, where: $where) {
+ id
+ email
+ displayName
+ firstName
+ lastName
+ avatarUrl
+ workspaceMember {
+ id
+ workspace {
+ id
+ domainName
+ displayName
+ logo
+ inviteHash
+ }
+ }
+ settings {
+ id
+ locale
+ colorScheme
+ }
+ }
+ }
+`;
diff --git a/front/src/modules/users/queries/index.ts b/front/src/modules/users/graphql/queries/getCurrentUser.ts
similarity index 74%
rename from front/src/modules/users/queries/index.ts
rename to front/src/modules/users/graphql/queries/getCurrentUser.ts
index 69ee88640e0..6d326fb1737 100644
--- a/front/src/modules/users/queries/index.ts
+++ b/front/src/modules/users/graphql/queries/getCurrentUser.ts
@@ -1,5 +1,4 @@
import { gql } from '@apollo/client';
-export * from './update';
export const GET_CURRENT_USER = gql`
query GetCurrentUser {
@@ -31,15 +30,3 @@ export const GET_CURRENT_USER = gql`
}
}
`;
-
-export const GET_USERS = gql`
- query GetUsers {
- findManyUser {
- id
- email
- displayName
- firstName
- lastName
- }
- }
-`;
diff --git a/front/src/modules/users/graphql/queries/getUsers.ts b/front/src/modules/users/graphql/queries/getUsers.ts
new file mode 100644
index 00000000000..1df75f751cb
--- /dev/null
+++ b/front/src/modules/users/graphql/queries/getUsers.ts
@@ -0,0 +1,13 @@
+import { gql } from '@apollo/client';
+
+export const GET_USERS = gql`
+ query GetUsers {
+ findManyUser {
+ id
+ email
+ displayName
+ firstName
+ lastName
+ }
+ }
+`;
diff --git a/front/src/modules/users/queries/update.ts b/front/src/modules/users/queries/update.ts
deleted file mode 100644
index 1069ea10340..00000000000
--- a/front/src/modules/users/queries/update.ts
+++ /dev/null
@@ -1,61 +0,0 @@
-import { gql } from '@apollo/client';
-
-export const UPDATE_USER = gql`
- mutation UpdateUser($data: UserUpdateInput!, $where: UserWhereUniqueInput!) {
- updateUser(data: $data, where: $where) {
- id
- email
- displayName
- firstName
- lastName
- avatarUrl
- workspaceMember {
- id
- workspace {
- id
- domainName
- displayName
- logo
- inviteHash
- }
- }
- settings {
- id
- locale
- colorScheme
- }
- }
- }
-`;
-
-export const UPDATE_ALLOW_IMPERONATION = gql`
- mutation UpdateAllowImpersonation($allowImpersonation: Boolean!) {
- allowImpersonation(allowImpersonation: $allowImpersonation) {
- id
- allowImpersonation
- }
- }
-`;
-
-export const UPDATE_PROFILE_PICTURE = gql`
- mutation UploadProfilePicture($file: Upload!) {
- uploadProfilePicture(file: $file)
- }
-`;
-
-export const REMOVE_PROFILE_PICTURE = gql`
- mutation RemoveProfilePicture($where: UserWhereUniqueInput!) {
- updateUser(data: { avatarUrl: null }, where: $where) {
- id
- avatarUrl
- }
- }
-`;
-
-export const DELETE_USER_ACCOUNT = gql`
- mutation DeleteUserAccount {
- deleteUserAccount {
- id
- }
- }
-`;
diff --git a/front/src/modules/views/queries/create.ts b/front/src/modules/views/graphql/mutations/createViewFields.ts
similarity index 55%
rename from front/src/modules/views/queries/create.ts
rename to front/src/modules/views/graphql/mutations/createViewFields.ts
index d6c81ed8fed..a91b4264d84 100644
--- a/front/src/modules/views/queries/create.ts
+++ b/front/src/modules/views/graphql/mutations/createViewFields.ts
@@ -7,11 +7,3 @@ export const CREATE_VIEW_FIELDS = gql`
}
}
`;
-
-export const CREATE_VIEW_SORTS = gql`
- mutation CreateViewSorts($data: [ViewSortCreateManyInput!]!) {
- createManyViewSort(data: $data) {
- count
- }
- }
-`;
diff --git a/front/src/modules/views/graphql/mutations/createViewSorts.ts b/front/src/modules/views/graphql/mutations/createViewSorts.ts
new file mode 100644
index 00000000000..2473c6d150c
--- /dev/null
+++ b/front/src/modules/views/graphql/mutations/createViewSorts.ts
@@ -0,0 +1,9 @@
+import { gql } from '@apollo/client';
+
+export const CREATE_VIEW_SORTS = gql`
+ mutation CreateViewSorts($data: [ViewSortCreateManyInput!]!) {
+ createManyViewSort(data: $data) {
+ count
+ }
+ }
+`;
diff --git a/front/src/modules/views/queries/delete.ts b/front/src/modules/views/graphql/mutations/deleteViewSorts.ts
similarity index 100%
rename from front/src/modules/views/queries/delete.ts
rename to front/src/modules/views/graphql/mutations/deleteViewSorts.ts
diff --git a/front/src/modules/views/queries/update.ts b/front/src/modules/views/graphql/mutations/updateViewField.ts
similarity index 55%
rename from front/src/modules/views/queries/update.ts
rename to front/src/modules/views/graphql/mutations/updateViewField.ts
index 3430eac347e..c270d7a6b7d 100644
--- a/front/src/modules/views/queries/update.ts
+++ b/front/src/modules/views/graphql/mutations/updateViewField.ts
@@ -14,16 +14,3 @@ export const UPDATE_VIEW_FIELD = gql`
}
}
`;
-
-export const UPDATE_VIEW_SORT = gql`
- mutation UpdateViewSort(
- $data: ViewSortUpdateInput!
- $where: ViewSortWhereUniqueInput!
- ) {
- viewSort: updateOneViewSort(data: $data, where: $where) {
- direction
- key
- name
- }
- }
-`;
diff --git a/front/src/modules/views/graphql/mutations/updateViewSort.ts b/front/src/modules/views/graphql/mutations/updateViewSort.ts
new file mode 100644
index 00000000000..c46f618e9c0
--- /dev/null
+++ b/front/src/modules/views/graphql/mutations/updateViewSort.ts
@@ -0,0 +1,14 @@
+import { gql } from '@apollo/client';
+
+export const UPDATE_VIEW_SORT = gql`
+ mutation UpdateViewSort(
+ $data: ViewSortUpdateInput!
+ $where: ViewSortWhereUniqueInput!
+ ) {
+ viewSort: updateOneViewSort(data: $data, where: $where) {
+ direction
+ key
+ name
+ }
+ }
+`;
diff --git a/front/src/modules/views/queries/select.ts b/front/src/modules/views/graphql/queries/getViewFields.ts
similarity index 64%
rename from front/src/modules/views/queries/select.ts
rename to front/src/modules/views/graphql/queries/getViewFields.ts
index 6cadcde8c1f..735405c4823 100644
--- a/front/src/modules/views/queries/select.ts
+++ b/front/src/modules/views/graphql/queries/getViewFields.ts
@@ -14,13 +14,3 @@ export const GET_VIEW_FIELDS = gql`
}
}
`;
-
-export const GET_VIEW_SORTS = gql`
- query GetViewSorts($where: ViewSortWhereInput) {
- viewSorts: findManyViewSort(where: $where) {
- direction
- key
- name
- }
- }
-`;
diff --git a/front/src/modules/views/graphql/queries/getViewSorts.ts b/front/src/modules/views/graphql/queries/getViewSorts.ts
new file mode 100644
index 00000000000..39d4494b37f
--- /dev/null
+++ b/front/src/modules/views/graphql/queries/getViewSorts.ts
@@ -0,0 +1,11 @@
+import { gql } from '@apollo/client';
+
+export const GET_VIEW_SORTS = gql`
+ query GetViewSorts($where: ViewSortWhereInput) {
+ viewSorts: findManyViewSort(where: $where) {
+ direction
+ key
+ name
+ }
+ }
+`;
diff --git a/front/src/modules/views/hooks/useTableViewFields.ts b/front/src/modules/views/hooks/useTableViewFields.ts
index c911584afb3..95384f8519b 100644
--- a/front/src/modules/views/hooks/useTableViewFields.ts
+++ b/front/src/modules/views/hooks/useTableViewFields.ts
@@ -19,7 +19,7 @@ import {
useUpdateViewFieldMutation,
} from '~/generated/graphql';
-import { GET_VIEW_FIELDS } from '../queries/select';
+import { GET_VIEW_FIELDS } from '../graphql/queries/getViewFields';
const DEFAULT_VIEW_FIELD_METADATA: ViewFieldTextMetadata = {
type: 'text',
diff --git a/front/src/modules/views/hooks/useViewSorts.ts b/front/src/modules/views/hooks/useViewSorts.ts
index 81ec89b0034..866a0d5068f 100644
--- a/front/src/modules/views/hooks/useViewSorts.ts
+++ b/front/src/modules/views/hooks/useViewSorts.ts
@@ -21,7 +21,7 @@ import {
ViewSortDirection,
} from '~/generated/graphql';
-import { GET_VIEW_SORTS } from '../queries/select';
+import { GET_VIEW_SORTS } from '../graphql/queries/getViewSorts';
export const useViewSorts = <SortField>({
availableSorts,
diff --git a/front/src/modules/workspace/graphql/mutations/deleteCurrentWorkspace.ts b/front/src/modules/workspace/graphql/mutations/deleteCurrentWorkspace.ts
new file mode 100644
index 00000000000..f38d7434707
--- /dev/null
+++ b/front/src/modules/workspace/graphql/mutations/deleteCurrentWorkspace.ts
@@ -0,0 +1,9 @@
+import { gql } from '@apollo/client';
+
+export const DELETE_CURRENT_WORKSPACE = gql`
+ mutation DeleteCurrentWorkspace {
+ deleteCurrentWorkspace {
+ id
+ }
+ }
+`;
diff --git a/front/src/modules/workspace/graphql/mutations/removeWorkspaceLogo.ts b/front/src/modules/workspace/graphql/mutations/removeWorkspaceLogo.ts
new file mode 100644
index 00000000000..7f1b09623f1
--- /dev/null
+++ b/front/src/modules/workspace/graphql/mutations/removeWorkspaceLogo.ts
@@ -0,0 +1,9 @@
+import { gql } from '@apollo/client';
+
+export const REMOVE_WORKSPACE_LOGO = gql`
+ mutation RemoveWorkspaceLogo {
+ updateWorkspace(data: { logo: null }) {
+ id
+ }
+ }
+`;
diff --git a/front/src/modules/workspace/graphql/mutations/removeWorkspaceMember.ts b/front/src/modules/workspace/graphql/mutations/removeWorkspaceMember.ts
new file mode 100644
index 00000000000..4dcad80d31f
--- /dev/null
+++ b/front/src/modules/workspace/graphql/mutations/removeWorkspaceMember.ts
@@ -0,0 +1,9 @@
+import { gql } from '@apollo/client';
+
+export const REMOVE_WORKSPACE_MEMBER = gql`
+ mutation RemoveWorkspaceMember($where: WorkspaceMemberWhereUniqueInput!) {
+ deleteWorkspaceMember(where: $where) {
+ id
+ }
+ }
+`;
diff --git a/front/src/modules/workspace/graphql/mutations/updateWorkspace.ts b/front/src/modules/workspace/graphql/mutations/updateWorkspace.ts
new file mode 100644
index 00000000000..8ed42c7a25e
--- /dev/null
+++ b/front/src/modules/workspace/graphql/mutations/updateWorkspace.ts
@@ -0,0 +1,12 @@
+import { gql } from '@apollo/client';
+
+export const UPDATE_WORKSPACE = gql`
+ mutation UpdateWorkspace($data: WorkspaceUpdateInput!) {
+ updateWorkspace(data: $data) {
+ id
+ domainName
+ displayName
+ logo
+ }
+ }
+`;
diff --git a/front/src/modules/workspace/graphql/mutations/updateWorkspaceLogo.ts b/front/src/modules/workspace/graphql/mutations/updateWorkspaceLogo.ts
new file mode 100644
index 00000000000..f89d18cb2d2
--- /dev/null
+++ b/front/src/modules/workspace/graphql/mutations/updateWorkspaceLogo.ts
@@ -0,0 +1,7 @@
+import { gql } from '@apollo/client';
+
+export const UPDATE_WORKSPACE_LOGO = gql`
+ mutation UploadWorkspaceLogo($file: Upload!) {
+ uploadWorkspaceLogo(file: $file)
+ }
+`;
diff --git a/front/src/modules/workspace/graphql/queries/getWorkspaceFromInviteHash.ts b/front/src/modules/workspace/graphql/queries/getWorkspaceFromInviteHash.ts
new file mode 100644
index 00000000000..eaca9009560
--- /dev/null
+++ b/front/src/modules/workspace/graphql/queries/getWorkspaceFromInviteHash.ts
@@ -0,0 +1,11 @@
+import { gql } from '@apollo/client';
+
+export const GET_WORKSPACE_FROM_INVITE_HASH = gql`
+ query GetWorkspaceFromInviteHash($inviteHash: String!) {
+ findWorkspaceFromInviteHash(inviteHash: $inviteHash) {
+ id
+ displayName
+ logo
+ }
+ }
+`;
diff --git a/front/src/modules/workspace/queries/select.ts b/front/src/modules/workspace/graphql/queries/getWorkspaceMembers.ts
similarity index 57%
rename from front/src/modules/workspace/queries/select.ts
rename to front/src/modules/workspace/graphql/queries/getWorkspaceMembers.ts
index dd248175c8d..5a670d7c532 100644
--- a/front/src/modules/workspace/queries/select.ts
+++ b/front/src/modules/workspace/graphql/queries/getWorkspaceMembers.ts
@@ -15,13 +15,3 @@ export const GET_WORKSPACE_MEMBERS = gql`
}
}
`;
-
-export const GET_WORKSPACE_FROM_INVITE_HASH = gql`
- query GetWorkspaceFromInviteHash($inviteHash: String!) {
- findWorkspaceFromInviteHash(inviteHash: $inviteHash) {
- id
- displayName
- logo
- }
- }
-`;
diff --git a/front/src/modules/workspace/queries/index.ts b/front/src/modules/workspace/queries/index.ts
deleted file mode 100644
index 18c6c2f7dd7..00000000000
--- a/front/src/modules/workspace/queries/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export * from './select';
-export * from './update';
diff --git a/front/src/modules/workspace/queries/update.ts b/front/src/modules/workspace/queries/update.ts
deleted file mode 100644
index f2c1e4f4bf3..00000000000
--- a/front/src/modules/workspace/queries/update.ts
+++ /dev/null
@@ -1,42 +0,0 @@
-import { gql } from '@apollo/client';
-
-export const UPDATE_WORKSPACE = gql`
- mutation UpdateWorkspace($data: WorkspaceUpdateInput!) {
- updateWorkspace(data: $data) {
- id
- domainName
- displayName
- logo
- }
- }
-`;
-
-export const UPDATE_WORKSPACE_LOGO = gql`
- mutation UploadWorkspaceLogo($file: Upload!) {
- uploadWorkspaceLogo(file: $file)
- }
-`;
-
-export const REMOVE_WORKSPACE_LOGO = gql`
- mutation RemoveWorkspaceLogo {
- updateWorkspace(data: { logo: null }) {
- id
- }
- }
-`;
-
-export const REMOVE_WORKSPACE_MEMBER = gql`
- mutation RemoveWorkspaceMember($where: WorkspaceMemberWhereUniqueInput!) {
- deleteWorkspaceMember(where: $where) {
- id
- }
- }
-`;
-
-export const DELETE_CURRENT_WORKSPACE = gql`
- mutation DeleteCurrentWorkspace {
- deleteCurrentWorkspace {
- id
- }
- }
-`;
diff --git a/front/src/pages/auth/CreateProfile.tsx b/front/src/pages/auth/CreateProfile.tsx
index e1949ba8911..2cf384709f6 100644
--- a/front/src/pages/auth/CreateProfile.tsx
+++ b/front/src/pages/auth/CreateProfile.tsx
@@ -18,7 +18,7 @@ import { TextInput } from '@/ui/input/text/components/TextInput';
import { useSnackBar } from '@/ui/snack-bar/hooks/useSnackBar';
import { H2Title } from '@/ui/typography/components/H2Title';
import { useScopedHotkeys } from '@/ui/utilities/hotkey/hooks/useScopedHotkeys';
-import { GET_CURRENT_USER } from '@/users/queries';
+import { GET_CURRENT_USER } from '@/users/graphql/queries/getCurrentUser';
import { useUpdateUserMutation } from '~/generated/graphql';
const StyledContentContainer = styled.div`
diff --git a/front/src/pages/auth/CreateWorkspace.tsx b/front/src/pages/auth/CreateWorkspace.tsx
index c39087e9856..c7f1efe8b06 100644
--- a/front/src/pages/auth/CreateWorkspace.tsx
+++ b/front/src/pages/auth/CreateWorkspace.tsx
@@ -15,7 +15,7 @@ import { TextInput } from '@/ui/input/text/components/TextInput';
import { useSnackBar } from '@/ui/snack-bar/hooks/useSnackBar';
import { H2Title } from '@/ui/typography/components/H2Title';
import { useScopedHotkeys } from '@/ui/utilities/hotkey/hooks/useScopedHotkeys';
-import { GET_CURRENT_USER } from '@/users/queries';
+import { GET_CURRENT_USER } from '@/users/graphql/queries/getCurrentUser';
import { useUpdateWorkspaceMutation } from '~/generated/graphql';
const StyledContentContainer = styled.div`
diff --git a/front/src/pages/auth/__stories__/CreateProfile.stories.tsx b/front/src/pages/auth/__stories__/CreateProfile.stories.tsx
index ad89c28b2a4..2f86af09f1a 100644
--- a/front/src/pages/auth/__stories__/CreateProfile.stories.tsx
+++ b/front/src/pages/auth/__stories__/CreateProfile.stories.tsx
@@ -10,7 +10,7 @@ import {
} from '~/testing/decorators/PageDecorator';
import { mockedOnboardingUsersData } from '~/testing/mock-data/users';
-import { GET_CURRENT_USER } from '../../../modules/users/queries';
+import { GET_CURRENT_USER } from '../../../modules/users/graphql/queries/getCurrentUser';
import { CreateProfile } from '../CreateProfile';
const meta: Meta<PageDecoratorArgs> = {
diff --git a/front/src/pages/auth/__stories__/CreateWorkspace.stories.tsx b/front/src/pages/auth/__stories__/CreateWorkspace.stories.tsx
index ac8fd4a9bf8..1b8b7ebeadf 100644
--- a/front/src/pages/auth/__stories__/CreateWorkspace.stories.tsx
+++ b/front/src/pages/auth/__stories__/CreateWorkspace.stories.tsx
@@ -10,7 +10,7 @@ import {
} from '~/testing/decorators/PageDecorator';
import { mockedOnboardingUsersData } from '~/testing/mock-data/users';
-import { GET_CURRENT_USER } from '../../../modules/users/queries';
+import { GET_CURRENT_USER } from '../../../modules/users/graphql/queries/getCurrentUser';
import { CreateWorkspace } from '../CreateWorkspace';
const meta: Meta<PageDecoratorArgs> = {
diff --git a/front/src/pages/companies/Companies.tsx b/front/src/pages/companies/Companies.tsx
index 3a0d65c7355..3a192cb3cac 100644
--- a/front/src/pages/companies/Companies.tsx
+++ b/front/src/pages/companies/Companies.tsx
@@ -4,7 +4,7 @@ import styled from '@emotion/styled';
import { v4 } from 'uuid';
import { CompanyTable } from '@/companies/table/components/CompanyTable';
-import { SEARCH_COMPANY_QUERY } from '@/search/queries/search';
+import { SEARCH_COMPANY_QUERY } from '@/search/graphql/queries/searchCompanyQuery';
import { IconBuildingSkyscraper } from '@/ui/icon';
import { WithTopBarContainer } from '@/ui/layout/components/WithTopBarContainer';
import { EntityTableActionBar } from '@/ui/table/action-bar/components/EntityTableActionBar';
diff --git a/front/src/pages/companies/CompanyShow.tsx b/front/src/pages/companies/CompanyShow.tsx
index f9fb9db0bd5..d5346f43179 100644
--- a/front/src/pages/companies/CompanyShow.tsx
+++ b/front/src/pages/companies/CompanyShow.tsx
@@ -4,7 +4,7 @@ import { useTheme } from '@emotion/react';
import { Timeline } from '@/activities/timeline/components/Timeline';
import { ActivityTargetableEntityType } from '@/activities/types/ActivityTargetableEntity';
import { CompanyTeam } from '@/companies/components/CompanyTeam';
-import { useCompanyQuery } from '@/companies/queries';
+import { useCompanyQuery } from '@/companies/hooks/useCompanyQuery';
import { useFavorites } from '@/favorites/hooks/useFavorites';
import { GenericEditableField } from '@/ui/editable-field/components/GenericEditableField';
import { EditableFieldDefinitionContext } from '@/ui/editable-field/contexts/EditableFieldDefinitionContext';
diff --git a/front/src/pages/companies/__stories__/Company.stories.tsx b/front/src/pages/companies/__stories__/Company.stories.tsx
index 0c6f0267ed5..497242bb99b 100644
--- a/front/src/pages/companies/__stories__/Company.stories.tsx
+++ b/front/src/pages/companies/__stories__/Company.stories.tsx
@@ -4,9 +4,11 @@ import type { Meta, StoryObj } from '@storybook/react';
import { fireEvent, within } from '@storybook/testing-library';
import { graphql } from 'msw';
-import { GET_ACTIVITIES_BY_TARGETS, GET_ACTIVITY } from '@/activities/queries';
-import { CREATE_ACTIVITY_WITH_COMMENT } from '@/activities/queries/create';
-import { GET_COMPANY, UPDATE_ONE_COMPANY } from '@/companies/queries';
+import { CREATE_ACTIVITY_WITH_COMMENT } from '@/activities/graphql/mutations/createActivityWithComment';
+import { GET_ACTIVITIES_BY_TARGETS } from '@/activities/graphql/queries/getActivitiesByTarget';
+import { GET_ACTIVITY } from '@/activities/graphql/queries/getActivity';
+import { UPDATE_ONE_COMPANY } from '@/companies/graphql/mutations/updateOneCompany';
+import { GET_COMPANY } from '@/companies/graphql/queries/getCompany';
import { AppPath } from '@/types/AppPath';
import {
PageDecorator,
diff --git a/front/src/pages/opportunities/Opportunities.tsx b/front/src/pages/opportunities/Opportunities.tsx
index 92b2d3bd93b..f40704b8d1f 100644
--- a/front/src/pages/opportunities/Opportunities.tsx
+++ b/front/src/pages/opportunities/Opportunities.tsx
@@ -3,19 +3,17 @@ import { useTheme } from '@emotion/react';
import { HooksCompanyBoard } from '@/companies/components/HooksCompanyBoard';
import { CompanyBoardRecoilScopeContext } from '@/companies/states/recoil-scope-contexts/CompanyBoardRecoilScopeContext';
-import {
- defaultPipelineProgressOrderBy,
- PipelineProgressesSelectedSortType,
-} from '@/pipeline/queries';
import { EntityBoard } from '@/ui/board/components/EntityBoard';
import { EntityBoardActionBar } from '@/ui/board/components/EntityBoardActionBar';
import { BoardOptionsContext } from '@/ui/board/contexts/BoardOptionsContext';
import { reduceSortsToOrderBy } from '@/ui/filter-n-sort/helpers';
+import { SelectedSortType } from '@/ui/filter-n-sort/types/interface';
import { IconTargetArrow } from '@/ui/icon/index';
import { WithTopBarContainer } from '@/ui/layout/components/WithTopBarContainer';
import { RecoilScope } from '@/ui/utilities/recoil-scope/components/RecoilScope';
import {
PipelineProgressOrderByWithRelationInput,
+ SortOrder,
useUpdatePipelineStageMutation,
} from '~/generated/graphql';
import { opportunitiesBoardOptions } from '~/pages/opportunities/opportunitiesBoardOptions';
@@ -25,14 +23,16 @@ export function Opportunities() {
const [orderBy, setOrderBy] = useState<
PipelineProgressOrderByWithRelationInput[]
- >(defaultPipelineProgressOrderBy);
+ >([{ createdAt: SortOrder.Asc }]);
const updateSorts = useCallback(
- (sorts: Array<PipelineProgressesSelectedSortType>) => {
+ (
+ sorts: Array<SelectedSortType<PipelineProgressOrderByWithRelationInput>>,
+ ) => {
setOrderBy(
sorts.length
? reduceSortsToOrderBy(sorts)
- : defaultPipelineProgressOrderBy,
+ : [{ createdAt: SortOrder.Asc }],
);
},
[],
diff --git a/front/src/pages/people/PersonShow.tsx b/front/src/pages/people/PersonShow.tsx
index 6f0aeea2e87..5babac9395a 100644
--- a/front/src/pages/people/PersonShow.tsx
+++ b/front/src/pages/people/PersonShow.tsx
@@ -5,7 +5,8 @@ import { useTheme } from '@emotion/react';
import { Timeline } from '@/activities/timeline/components/Timeline';
import { ActivityTargetableEntityType } from '@/activities/types/ActivityTargetableEntity';
import { useFavorites } from '@/favorites/hooks/useFavorites';
-import { GET_PERSON, usePersonQuery } from '@/people/queries';
+import { GET_PERSON } from '@/people/graphql/queries/getPerson';
+import { usePersonQuery } from '@/people/hooks/usePersonQuery';
import { GenericEditableField } from '@/ui/editable-field/components/GenericEditableField';
import { EditableFieldDefinitionContext } from '@/ui/editable-field/contexts/EditableFieldDefinitionContext';
import { EditableFieldEntityIdContext } from '@/ui/editable-field/contexts/EditableFieldEntityIdContext';
diff --git a/front/src/pages/people/__stories__/People.inputs.stories.tsx b/front/src/pages/people/__stories__/People.inputs.stories.tsx
index d879a54a326..e0917fac40a 100644
--- a/front/src/pages/people/__stories__/People.inputs.stories.tsx
+++ b/front/src/pages/people/__stories__/People.inputs.stories.tsx
@@ -4,8 +4,8 @@ import type { Meta } from '@storybook/react';
import { userEvent, within } from '@storybook/testing-library';
import { graphql } from 'msw';
-import { UPDATE_ONE_PERSON } from '@/people/queries';
-import { SEARCH_COMPANY_QUERY } from '@/search/queries/search';
+import { UPDATE_ONE_PERSON } from '@/people/graphql/mutations/updateOnePerson';
+import { SEARCH_COMPANY_QUERY } from '@/search/graphql/queries/searchCompanyQuery';
import { AppPath } from '@/types/AppPath';
import { Company } from '~/generated/graphql';
import {
diff --git a/front/src/testing/graphqlMocks.ts b/front/src/testing/graphqlMocks.ts
index a531f698ca0..5adccef1f68 100644
--- a/front/src/testing/graphqlMocks.ts
+++ b/front/src/testing/graphqlMocks.ts
@@ -1,21 +1,22 @@
import { getOperationName } from '@apollo/client/utilities';
import { graphql } from 'msw';
-import { GET_ACTIVITIES } from '@/activities/queries';
-import { CREATE_ACTIVITY_WITH_COMMENT } from '@/activities/queries/create';
-import { CREATE_EVENT } from '@/analytics/queries';
-import { GET_CLIENT_CONFIG } from '@/client-config/queries';
-import { GET_COMPANIES } from '@/companies/queries';
-import { GET_PEOPLE, GET_PERSON, UPDATE_ONE_PERSON } from '@/people/queries';
-import { GET_PIPELINE_PROGRESS, GET_PIPELINES } from '@/pipeline/queries';
-import {
- SEARCH_ACTIVITY_QUERY,
- SEARCH_COMPANY_QUERY,
- SEARCH_PEOPLE_QUERY,
- SEARCH_USER_QUERY,
-} from '@/search/queries/search';
-import { GET_CURRENT_USER } from '@/users/queries';
-import { GET_VIEW_FIELDS } from '@/views/queries/select';
+import { CREATE_ACTIVITY_WITH_COMMENT } from '@/activities/graphql/mutations/createActivityWithComment';
+import { GET_ACTIVITIES } from '@/activities/graphql/queries/getActivities';
+import { CREATE_EVENT } from '@/analytics/graphql/queries/createEvent';
+import { GET_CLIENT_CONFIG } from '@/client-config/graphql/queries/getClientConfig';
+import { GET_COMPANIES } from '@/companies/graphql/queries/getCompanies';
+import { UPDATE_ONE_PERSON } from '@/people/graphql/mutations/updateOnePerson';
+import { GET_PEOPLE } from '@/people/graphql/queries/getPeople';
+import { GET_PERSON } from '@/people/graphql/queries/getPerson';
+import { GET_PIPELINE_PROGRESS } from '@/pipeline/graphql/queries/getPipelineProgress';
+import { GET_PIPELINES } from '@/pipeline/graphql/queries/getPipelines';
+import { SEARCH_ACTIVITY_QUERY } from '@/search/graphql/queries/searchActivityQuery';
+import { SEARCH_COMPANY_QUERY } from '@/search/graphql/queries/searchCompanyQuery';
+import { SEARCH_PEOPLE_QUERY } from '@/search/graphql/queries/searchPeopleQuery';
+import { SEARCH_USER_QUERY } from '@/search/graphql/queries/searchUserQuery';
+import { GET_CURRENT_USER } from '@/users/graphql/queries/getCurrentUser';
+import { GET_VIEW_FIELDS } from '@/views/graphql/queries/getViewFields';
import {
GetCompaniesQuery,
GetPeopleQuery,