Chore: Use Fragments as types (#1670)

* Use Fragments as types

Co-authored-by: v1b3m <vibenjamin6@gmail.com>

* Use Fragments as types in GraphQL queries and mutations

Co-authored-by: v1b3m <vibenjamin6@gmail.com>

---------

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
This commit is contained in:
gitstart-twenty
2023-09-20 09:58:59 +01:00
committed by GitHub
parent 3f600146b1
commit 103fb701e7
25 changed files with 354 additions and 561 deletions

View File

@ -1016,15 +1016,15 @@ export enum FileFolder {
WorkspaceLogo = 'WorkspaceLogo' WorkspaceLogo = 'WorkspaceLogo'
} }
export type FloatFilter = { export type IntFilter = {
equals?: InputMaybe<Scalars['Float']>; equals?: InputMaybe<Scalars['Int']>;
gt?: InputMaybe<Scalars['Float']>; gt?: InputMaybe<Scalars['Int']>;
gte?: InputMaybe<Scalars['Float']>; gte?: InputMaybe<Scalars['Int']>;
in?: InputMaybe<Array<Scalars['Float']>>; in?: InputMaybe<Array<Scalars['Int']>>;
lt?: InputMaybe<Scalars['Float']>; lt?: InputMaybe<Scalars['Int']>;
lte?: InputMaybe<Scalars['Float']>; lte?: InputMaybe<Scalars['Int']>;
not?: InputMaybe<NestedFloatFilter>; not?: InputMaybe<NestedIntFilter>;
notIn?: InputMaybe<Array<Scalars['Float']>>; notIn?: InputMaybe<Array<Scalars['Int']>>;
}; };
export type IntNullableFilter = { export type IntNullableFilter = {
@ -1478,15 +1478,15 @@ export type NestedEnumViewTypeFilter = {
notIn?: InputMaybe<Array<ViewType>>; notIn?: InputMaybe<Array<ViewType>>;
}; };
export type NestedFloatFilter = { export type NestedIntFilter = {
equals?: InputMaybe<Scalars['Float']>; equals?: InputMaybe<Scalars['Int']>;
gt?: InputMaybe<Scalars['Float']>; gt?: InputMaybe<Scalars['Int']>;
gte?: InputMaybe<Scalars['Float']>; gte?: InputMaybe<Scalars['Int']>;
in?: InputMaybe<Array<Scalars['Float']>>; in?: InputMaybe<Array<Scalars['Int']>>;
lt?: InputMaybe<Scalars['Float']>; lt?: InputMaybe<Scalars['Int']>;
lte?: InputMaybe<Scalars['Float']>; lte?: InputMaybe<Scalars['Int']>;
not?: InputMaybe<NestedFloatFilter>; not?: InputMaybe<NestedIntFilter>;
notIn?: InputMaybe<Array<Scalars['Float']>>; notIn?: InputMaybe<Array<Scalars['Int']>>;
}; };
export type NestedIntNullableFilter = { export type NestedIntNullableFilter = {
@ -2587,7 +2587,7 @@ export type ViewCreateNestedOneWithoutFieldsInput = {
export type ViewField = { export type ViewField = {
__typename?: 'ViewField'; __typename?: 'ViewField';
index: Scalars['Float']; index: Scalars['Int'];
isVisible: Scalars['Boolean']; isVisible: Scalars['Boolean'];
key: Scalars['String']; key: Scalars['String'];
name: Scalars['String']; name: Scalars['String'];
@ -2598,7 +2598,7 @@ export type ViewField = {
}; };
export type ViewFieldCreateInput = { export type ViewFieldCreateInput = {
index: Scalars['Float']; index: Scalars['Int'];
isVisible: Scalars['Boolean']; isVisible: Scalars['Boolean'];
key: Scalars['String']; key: Scalars['String'];
name: Scalars['String']; name: Scalars['String'];
@ -2608,7 +2608,7 @@ export type ViewFieldCreateInput = {
}; };
export type ViewFieldCreateManyInput = { export type ViewFieldCreateManyInput = {
index: Scalars['Float']; index: Scalars['Int'];
isVisible: Scalars['Boolean']; isVisible: Scalars['Boolean'];
key: Scalars['String']; key: Scalars['String'];
name: Scalars['String']; name: Scalars['String'];
@ -2654,7 +2654,7 @@ export enum ViewFieldScalarFieldEnum {
} }
export type ViewFieldUpdateInput = { export type ViewFieldUpdateInput = {
index?: InputMaybe<Scalars['Float']>; index?: InputMaybe<Scalars['Int']>;
isVisible?: InputMaybe<Scalars['Boolean']>; isVisible?: InputMaybe<Scalars['Boolean']>;
key?: InputMaybe<Scalars['String']>; key?: InputMaybe<Scalars['String']>;
name?: InputMaybe<Scalars['String']>; name?: InputMaybe<Scalars['String']>;
@ -2684,7 +2684,7 @@ export type ViewFieldWhereInput = {
AND?: InputMaybe<Array<ViewFieldWhereInput>>; AND?: InputMaybe<Array<ViewFieldWhereInput>>;
NOT?: InputMaybe<Array<ViewFieldWhereInput>>; NOT?: InputMaybe<Array<ViewFieldWhereInput>>;
OR?: InputMaybe<Array<ViewFieldWhereInput>>; OR?: InputMaybe<Array<ViewFieldWhereInput>>;
index?: InputMaybe<FloatFilter>; index?: InputMaybe<IntFilter>;
isVisible?: InputMaybe<BoolFilter>; isVisible?: InputMaybe<BoolFilter>;
key?: InputMaybe<StringFilter>; key?: InputMaybe<StringFilter>;
name?: InputMaybe<StringFilter>; name?: InputMaybe<StringFilter>;
@ -3166,6 +3166,8 @@ export type WorkspaceUpdateInput = {
workspaceMember?: InputMaybe<WorkspaceMemberUpdateManyWithoutWorkspaceNestedInput>; workspaceMember?: InputMaybe<WorkspaceMemberUpdateManyWithoutWorkspaceNestedInput>;
}; };
export type ActivityWithTargetsFragment = { __typename?: 'Activity', id: string, createdAt: string, updatedAt: string, activityTargets?: Array<{ __typename?: 'ActivityTarget', id: string, createdAt: string, updatedAt: string, companyId?: string | null, personId?: string | null }> | null };
export type ActivityQueryFragmentFragment = { __typename?: 'Activity', id: string, createdAt: string, title?: string | null, body?: string | null, type: ActivityType, completedAt?: string | null, dueAt?: string | null, assignee?: { __typename?: 'User', id: string, firstName?: string | null, lastName?: string | null, displayName: string, avatarUrl?: string | null } | null, author: { __typename?: 'User', id: string, firstName?: string | null, lastName?: string | null, displayName: string }, comments?: Array<{ __typename?: 'Comment', id: string, body: string, createdAt: string, updatedAt: string, author: { __typename?: 'User', id: string, displayName: string, firstName?: string | null, lastName?: string | null, avatarUrl?: string | null } }> | null, activityTargets?: Array<{ __typename?: 'ActivityTarget', id: string, companyId?: string | null, personId?: string | null, company?: { __typename?: 'Company', id: string, name: string, domainName: string } | null, person?: { __typename?: 'Person', id: string, displayName: string, avatarUrl?: string | null } | null }> | null }; export type 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 ActivityUpdatePartsFragment = { __typename?: 'Activity', id: string, body?: string | null, title?: string | null, type: ActivityType, completedAt?: string | null, dueAt?: string | null, assignee?: { __typename?: 'User', id: string, firstName?: string | null, lastName?: string | null, displayName: string } | null };
@ -3258,6 +3260,10 @@ export type CreateEventMutationVariables = Exact<{
export type CreateEventMutation = { __typename?: 'Mutation', createEvent: { __typename?: 'Analytics', success: boolean } }; export type CreateEventMutation = { __typename?: 'Mutation', createEvent: { __typename?: 'Analytics', success: boolean } };
export type AuthTokenFragmentFragment = { __typename?: 'AuthToken', token: string, expiresAt: string };
export type AuthTokensFragmentFragment = { __typename?: 'AuthTokenPair', accessToken: { __typename?: 'AuthToken', token: string, expiresAt: string }, refreshToken: { __typename?: 'AuthToken', token: string, expiresAt: string } };
export type UserQueryFragmentFragment = { __typename?: 'User', id: string, email: string, displayName: string, firstName?: string | null, lastName?: string | null, canImpersonate: boolean, supportUserHash?: string | null, avatarUrl?: string | null, workspaceMember?: { __typename?: 'WorkspaceMember', id: string, allowImpersonation: boolean, workspace: { __typename?: 'Workspace', id: string, domainName?: string | null, displayName?: string | null, logo?: string | null, inviteHash?: string | null }, assignedActivities?: Array<{ __typename?: 'Activity', id: string, title?: string | null }> | null, authoredActivities?: Array<{ __typename?: 'Activity', id: string, title?: string | null }> | null, authoredAttachments?: Array<{ __typename?: 'Attachment', id: string, name: string, type: AttachmentType }> | null, settings?: { __typename?: 'UserSettings', id: string, colorScheme: ColorScheme, locale: string } | null, companies?: Array<{ __typename?: 'Company', id: string, name: string, domainName: string }> | null, comments?: Array<{ __typename?: 'Comment', id: string, body: string }> | null } | null, settings: { __typename?: 'UserSettings', id: string, colorScheme: ColorScheme, locale: string } }; export type UserQueryFragmentFragment = { __typename?: 'User', id: string, email: string, displayName: string, firstName?: string | null, lastName?: string | null, canImpersonate: boolean, supportUserHash?: string | null, avatarUrl?: string | null, workspaceMember?: { __typename?: 'WorkspaceMember', id: string, allowImpersonation: boolean, workspace: { __typename?: 'Workspace', id: string, domainName?: string | null, displayName?: string | null, logo?: string | null, inviteHash?: string | null }, assignedActivities?: Array<{ __typename?: 'Activity', id: string, title?: string | null }> | null, authoredActivities?: Array<{ __typename?: 'Activity', id: string, title?: string | null }> | null, authoredAttachments?: Array<{ __typename?: 'Attachment', id: string, name: string, type: AttachmentType }> | null, settings?: { __typename?: 'UserSettings', id: string, colorScheme: ColorScheme, locale: string } | null, companies?: Array<{ __typename?: 'Company', id: string, name: string, domainName: string }> | null, comments?: Array<{ __typename?: 'Comment', id: string, body: string }> | null } | null, settings: { __typename?: 'UserSettings', id: string, colorScheme: ColorScheme, locale: string } };
export type ChallengeMutationVariables = Exact<{ export type ChallengeMutationVariables = Exact<{
@ -3266,7 +3272,7 @@ export type ChallengeMutationVariables = Exact<{
}>; }>;
export type ChallengeMutation = { __typename?: 'Mutation', challenge: { __typename?: 'LoginToken', loginToken: { __typename?: 'AuthToken', expiresAt: string, token: string } } }; export type ChallengeMutation = { __typename?: 'Mutation', challenge: { __typename?: 'LoginToken', loginToken: { __typename?: 'AuthToken', token: string, expiresAt: string } } };
export type ImpersonateMutationVariables = Exact<{ export type ImpersonateMutationVariables = Exact<{
userId: Scalars['String']; userId: Scalars['String'];
@ -3280,7 +3286,7 @@ export type RenewTokenMutationVariables = Exact<{
}>; }>;
export type RenewTokenMutation = { __typename?: 'Mutation', renewToken: { __typename?: 'AuthTokens', tokens: { __typename?: 'AuthTokenPair', accessToken: { __typename?: 'AuthToken', expiresAt: string, token: string }, refreshToken: { __typename?: 'AuthToken', token: string, expiresAt: string } } } }; export type RenewTokenMutation = { __typename?: 'Mutation', renewToken: { __typename?: 'AuthTokens', tokens: { __typename?: 'AuthTokenPair', accessToken: { __typename?: 'AuthToken', token: string, expiresAt: string }, refreshToken: { __typename?: 'AuthToken', token: string, expiresAt: string } } } };
export type SignUpMutationVariables = Exact<{ export type SignUpMutationVariables = Exact<{
email: Scalars['String']; email: Scalars['String'];
@ -3289,7 +3295,7 @@ export type SignUpMutationVariables = Exact<{
}>; }>;
export type SignUpMutation = { __typename?: 'Mutation', signUp: { __typename?: 'LoginToken', loginToken: { __typename?: 'AuthToken', expiresAt: string, token: string } } }; export type SignUpMutation = { __typename?: 'Mutation', signUp: { __typename?: 'LoginToken', loginToken: { __typename?: 'AuthToken', token: string, expiresAt: string } } };
export type VerifyMutationVariables = Exact<{ export type VerifyMutationVariables = Exact<{
loginToken: Scalars['String']; loginToken: Scalars['String'];
@ -3310,7 +3316,11 @@ export type GetClientConfigQueryVariables = Exact<{ [key: string]: never; }>;
export type GetClientConfigQuery = { __typename?: 'Query', clientConfig: { __typename?: 'ClientConfig', signInPrefilled: boolean, debugMode: boolean, authProviders: { __typename?: 'AuthProviders', google: boolean, password: boolean }, telemetry: { __typename?: 'Telemetry', enabled: boolean, anonymizationEnabled: boolean }, support: { __typename?: 'Support', supportDriver: string, supportFrontChatId?: string | null } } }; export type GetClientConfigQuery = { __typename?: 'Query', clientConfig: { __typename?: 'ClientConfig', signInPrefilled: boolean, debugMode: boolean, authProviders: { __typename?: 'AuthProviders', google: boolean, password: boolean }, telemetry: { __typename?: 'Telemetry', enabled: boolean, anonymizationEnabled: boolean }, support: { __typename?: 'Support', supportDriver: string, supportFrontChatId?: string | null } } };
export type CompanyFieldsFragmentFragment = { __typename?: 'Company', address: string, createdAt: string, domainName: string, employees?: number | null, linkedinUrl?: string | null, xUrl?: string | null, annualRecurringRevenue?: number | null, idealCustomerProfile: boolean, id: string, name: string, _activityCount: number, accountOwner?: { __typename?: 'User', id: string, email: string, displayName: string, avatarUrl?: string | null } | null }; export type BaseCompanyFieldsFragmentFragment = { __typename?: 'Company', address: string, annualRecurringRevenue?: number | null, createdAt: string, domainName: string, employees?: number | null, id: string, idealCustomerProfile: boolean, linkedinUrl?: string | null, name: string, xUrl?: string | null, _activityCount: number };
export type BaseAccountOwnerFragmentFragment = { __typename?: 'User', id: string, email: string, displayName: string, avatarUrl?: string | null };
export type CompanyFieldsFragmentFragment = { __typename?: 'Company', address: string, annualRecurringRevenue?: number | null, createdAt: string, domainName: string, employees?: number | null, id: string, idealCustomerProfile: boolean, linkedinUrl?: string | null, name: string, xUrl?: string | null, _activityCount: number, accountOwner?: { __typename?: 'User', id: string, email: string, displayName: string, avatarUrl?: string | null } | null };
export type DeleteManyCompaniesMutationVariables = Exact<{ export type DeleteManyCompaniesMutationVariables = Exact<{
ids?: InputMaybe<Array<Scalars['String']> | Scalars['String']>; ids?: InputMaybe<Array<Scalars['String']> | Scalars['String']>;
@ -3331,7 +3341,7 @@ export type InsertOneCompanyMutationVariables = Exact<{
}>; }>;
export type InsertOneCompanyMutation = { __typename?: 'Mutation', createOneCompany: { __typename?: 'Company', address: string, createdAt: string, domainName: string, employees?: number | null, linkedinUrl?: string | null, xUrl?: string | null, annualRecurringRevenue?: number | null, idealCustomerProfile: boolean, id: string, name: string, _activityCount: number, accountOwner?: { __typename?: 'User', id: string, email: string, displayName: string, avatarUrl?: string | null } | null } }; export type InsertOneCompanyMutation = { __typename?: 'Mutation', createOneCompany: { __typename?: 'Company', address: string, annualRecurringRevenue?: number | null, createdAt: string, domainName: string, employees?: number | null, id: string, idealCustomerProfile: boolean, linkedinUrl?: string | null, name: string, xUrl?: string | null, _activityCount: number, accountOwner?: { __typename?: 'User', id: string, email: string, displayName: string, avatarUrl?: string | null } | null } };
export type UpdateOneCompanyMutationVariables = Exact<{ export type UpdateOneCompanyMutationVariables = Exact<{
where: CompanyWhereUniqueInput; where: CompanyWhereUniqueInput;
@ -3339,7 +3349,7 @@ export type UpdateOneCompanyMutationVariables = Exact<{
}>; }>;
export type UpdateOneCompanyMutation = { __typename?: 'Mutation', updateOneCompany?: { __typename?: 'Company', address: string, createdAt: string, domainName: string, employees?: number | null, linkedinUrl?: string | null, xUrl?: string | null, annualRecurringRevenue?: number | null, idealCustomerProfile: boolean, id: string, name: string, _activityCount: number, accountOwner?: { __typename?: 'User', id: string, email: string, displayName: string, avatarUrl?: string | null } | null } | null }; export type UpdateOneCompanyMutation = { __typename?: 'Mutation', updateOneCompany?: { __typename?: 'Company', address: string, annualRecurringRevenue?: number | null, createdAt: string, domainName: string, employees?: number | null, id: string, idealCustomerProfile: boolean, linkedinUrl?: string | null, name: string, xUrl?: string | null, _activityCount: number, accountOwner?: { __typename?: 'User', id: string, email: string, displayName: string, avatarUrl?: string | null } | null } | null };
export type GetCompaniesQueryVariables = Exact<{ export type GetCompaniesQueryVariables = Exact<{
orderBy?: InputMaybe<Array<CompanyOrderByWithRelationInput> | CompanyOrderByWithRelationInput>; orderBy?: InputMaybe<Array<CompanyOrderByWithRelationInput> | CompanyOrderByWithRelationInput>;
@ -3347,14 +3357,14 @@ export type GetCompaniesQueryVariables = Exact<{
}>; }>;
export type GetCompaniesQuery = { __typename?: 'Query', companies: Array<{ __typename?: 'Company', id: string, domainName: string, name: string, createdAt: string, address: string, linkedinUrl?: string | null, xUrl?: string | null, annualRecurringRevenue?: number | null, idealCustomerProfile: boolean, employees?: number | null, _activityCount: number, accountOwner?: { __typename?: 'User', id: string, email: string, displayName: string, firstName?: string | null, lastName?: string | null, avatarUrl?: string | null } | null }> }; export type GetCompaniesQuery = { __typename?: 'Query', companies: Array<{ __typename?: 'Company', address: string, annualRecurringRevenue?: number | null, createdAt: string, domainName: string, employees?: number | null, id: string, idealCustomerProfile: boolean, linkedinUrl?: string | null, name: string, xUrl?: string | null, _activityCount: number, accountOwner?: { __typename?: 'User', firstName?: string | null, lastName?: string | null, id: string, email: string, displayName: string, avatarUrl?: string | null } | null }> };
export type GetCompanyQueryVariables = Exact<{ export type GetCompanyQueryVariables = Exact<{
where: CompanyWhereUniqueInput; where: CompanyWhereUniqueInput;
}>; }>;
export type GetCompanyQuery = { __typename?: 'Query', findUniqueCompany: { __typename?: 'Company', id: string, domainName: string, name: string, createdAt: string, address: string, linkedinUrl?: string | null, xUrl?: string | null, annualRecurringRevenue?: number | null, idealCustomerProfile: boolean, employees?: number | null, _activityCount: number, accountOwner?: { __typename?: 'User', id: string, email: string, displayName: string, avatarUrl?: string | null } | null, Favorite?: Array<{ __typename?: 'Favorite', id: string, person?: { __typename?: 'Person', id: string } | null, company?: { __typename?: 'Company', id: string } | null }> | null } }; export type GetCompanyQuery = { __typename?: 'Query', findUniqueCompany: { __typename?: 'Company', address: string, annualRecurringRevenue?: number | null, createdAt: string, domainName: string, employees?: number | null, id: string, idealCustomerProfile: boolean, linkedinUrl?: string | null, name: string, xUrl?: string | null, _activityCount: number, Favorite?: Array<{ __typename?: 'Favorite', id: string, person?: { __typename?: 'Person', id: string } | null, company?: { __typename?: 'Company', id: string } | null }> | null, accountOwner?: { __typename?: 'User', id: string, email: string, displayName: string, avatarUrl?: string | null } | null } };
export type DeleteFavoriteMutationVariables = Exact<{ export type DeleteFavoriteMutationVariables = Exact<{
where: FavoriteWhereInput; where: FavoriteWhereInput;
@ -3382,7 +3392,9 @@ export type GetFavoritesQueryVariables = Exact<{ [key: string]: never; }>;
export type GetFavoritesQuery = { __typename?: 'Query', findFavorites: Array<{ __typename?: 'Favorite', id: string, person?: { __typename?: 'Person', id: string, firstName?: string | null, lastName?: string | null, avatarUrl?: string | null } | null, company?: { __typename?: 'Company', id: string, name: string, domainName: string, accountOwner?: { __typename?: 'User', id: string, displayName: string, avatarUrl?: string | null } | null } | null }> }; export type GetFavoritesQuery = { __typename?: 'Query', findFavorites: Array<{ __typename?: 'Favorite', id: string, person?: { __typename?: 'Person', id: string, firstName?: string | null, lastName?: string | null, avatarUrl?: string | null } | null, company?: { __typename?: 'Company', id: string, name: string, domainName: string, accountOwner?: { __typename?: 'User', id: string, displayName: string, avatarUrl?: string | null } | null } | null }> };
export type PersonFieldsFragmentFragment = { __typename?: 'Person', id: string, phone?: string | null, email?: string | null, city?: string | null, firstName?: string | null, lastName?: string | null, displayName: string, jobTitle?: string | null, linkedinUrl?: string | null, xUrl?: string | null, avatarUrl?: string | null, createdAt: string, _activityCount: number, company?: { __typename?: 'Company', id: string, name: string, domainName: string } | null }; export type BasePersonFieldsFragmentFragment = { __typename?: 'Person', id: string, phone?: string | null, email?: string | null, city?: string | null, firstName?: string | null, lastName?: string | null, displayName: string, avatarUrl?: string | null, createdAt: string };
export type PersonFieldsFragmentFragment = { __typename?: 'Person', jobTitle?: string | null, linkedinUrl?: string | null, xUrl?: string | null, _activityCount: number, id: string, phone?: string | null, email?: string | null, city?: string | null, firstName?: string | null, lastName?: string | null, displayName: string, avatarUrl?: string | null, createdAt: string, company?: { __typename?: 'Company', id: string, name: string, domainName: string } | null };
export type DeleteManyPersonMutationVariables = Exact<{ export type DeleteManyPersonMutationVariables = Exact<{
ids?: InputMaybe<Array<Scalars['String']> | Scalars['String']>; ids?: InputMaybe<Array<Scalars['String']> | Scalars['String']>;
@ -3403,7 +3415,7 @@ export type InsertOnePersonMutationVariables = Exact<{
}>; }>;
export type InsertOnePersonMutation = { __typename?: 'Mutation', createOnePerson: { __typename?: 'Person', id: string, phone?: string | null, email?: string | null, city?: string | null, firstName?: string | null, lastName?: string | null, displayName: string, jobTitle?: string | null, linkedinUrl?: string | null, xUrl?: string | null, avatarUrl?: string | null, createdAt: string, _activityCount: number, company?: { __typename?: 'Company', id: string, name: string, domainName: string } | null } }; export type InsertOnePersonMutation = { __typename?: 'Mutation', createOnePerson: { __typename?: 'Person', jobTitle?: string | null, linkedinUrl?: string | null, xUrl?: string | null, _activityCount: number, id: string, phone?: string | null, email?: string | null, city?: string | null, firstName?: string | null, lastName?: string | null, displayName: string, avatarUrl?: string | null, createdAt: string, company?: { __typename?: 'Company', id: string, name: string, domainName: string } | null } };
export type RemovePersonPictureMutationVariables = Exact<{ export type RemovePersonPictureMutationVariables = Exact<{
where: PersonWhereUniqueInput; where: PersonWhereUniqueInput;
@ -3418,7 +3430,7 @@ export type UpdateOnePersonMutationVariables = Exact<{
}>; }>;
export type UpdateOnePersonMutation = { __typename?: 'Mutation', updateOnePerson?: { __typename?: 'Person', id: string, city?: string | null, avatarUrl?: string | null, email?: string | null, jobTitle?: string | null, linkedinUrl?: string | null, xUrl?: string | null, firstName?: string | null, lastName?: string | null, displayName: string, phone?: string | null, createdAt: string, company?: { __typename?: 'Company', domainName: string, name: string, id: string } | null } | null }; export type UpdateOnePersonMutation = { __typename?: 'Mutation', updateOnePerson?: { __typename?: 'Person', jobTitle?: string | null, linkedinUrl?: string | null, xUrl?: string | null, _activityCount: number, id: string, phone?: string | null, email?: string | null, city?: string | null, firstName?: string | null, lastName?: string | null, displayName: string, avatarUrl?: string | null, createdAt: string, company?: { __typename?: 'Company', id: string, name: string, domainName: string } | null } | null };
export type UploadPersonPictureMutationVariables = Exact<{ export type UploadPersonPictureMutationVariables = Exact<{
id: Scalars['String']; id: Scalars['String'];
@ -3435,14 +3447,14 @@ export type GetPeopleQueryVariables = Exact<{
}>; }>;
export type GetPeopleQuery = { __typename?: 'Query', people: Array<{ __typename?: 'Person', id: string, phone?: string | null, email?: string | null, city?: string | null, firstName?: string | null, lastName?: string | null, displayName: string, jobTitle?: string | null, linkedinUrl?: string | null, xUrl?: string | null, avatarUrl?: string | null, createdAt: string, _activityCount: number, company?: { __typename?: 'Company', id: string, name: string, domainName: string } | null }> }; export type GetPeopleQuery = { __typename?: 'Query', people: Array<{ __typename?: 'Person', jobTitle?: string | null, linkedinUrl?: string | null, xUrl?: string | null, _activityCount: number, id: string, phone?: string | null, email?: string | null, city?: string | null, firstName?: string | null, lastName?: string | null, displayName: string, avatarUrl?: string | null, createdAt: string, company?: { __typename?: 'Company', id: string, name: string, domainName: string } | null }> };
export type GetPersonQueryVariables = Exact<{ export type GetPersonQueryVariables = Exact<{
id: Scalars['String']; id: Scalars['String'];
}>; }>;
export type GetPersonQuery = { __typename?: 'Query', findUniquePerson: { __typename?: 'Person', id: string, firstName?: string | null, lastName?: string | null, displayName: string, email?: string | null, createdAt: string, city?: string | null, jobTitle?: string | null, linkedinUrl?: string | null, xUrl?: string | null, avatarUrl?: string | null, phone?: string | null, _activityCount: number, company?: { __typename?: 'Company', id: string, name: string, domainName: string } | null, Favorite?: Array<{ __typename?: 'Favorite', id: string, person?: { __typename?: 'Person', id: string } | null, company?: { __typename?: 'Company', id: string } | null }> | null } }; export type GetPersonQuery = { __typename?: 'Query', findUniquePerson: { __typename?: 'Person', jobTitle?: string | null, linkedinUrl?: string | null, xUrl?: string | null, _activityCount: number, id: string, phone?: string | null, email?: string | null, city?: string | null, firstName?: string | null, lastName?: string | null, displayName: string, avatarUrl?: string | null, createdAt: string, Favorite?: Array<{ __typename?: 'Favorite', id: string, person?: { __typename?: 'Person', id: string } | null, company?: { __typename?: 'Company', id: string } | null }> | null, company?: { __typename?: 'Company', id: string, name: string, domainName: string } | null } };
export type GetPersonCityByIdQueryVariables = Exact<{ export type GetPersonCityByIdQueryVariables = Exact<{
id: Scalars['String']; id: Scalars['String'];
@ -3579,7 +3591,7 @@ export type SearchCompanyQueryVariables = Exact<{
}>; }>;
export type SearchCompanyQuery = { __typename?: 'Query', searchResults: Array<{ __typename?: 'Company', address: string, createdAt: string, domainName: string, employees?: number | null, linkedinUrl?: string | null, xUrl?: string | null, annualRecurringRevenue?: number | null, idealCustomerProfile: boolean, id: string, name: string, _activityCount: number, accountOwner?: { __typename?: 'User', id: string, email: string, displayName: string, avatarUrl?: string | null } | null }> }; export type SearchCompanyQuery = { __typename?: 'Query', searchResults: Array<{ __typename?: 'Company', address: string, annualRecurringRevenue?: number | null, createdAt: string, domainName: string, employees?: number | null, id: string, idealCustomerProfile: boolean, linkedinUrl?: string | null, name: string, xUrl?: string | null, _activityCount: number, accountOwner?: { __typename?: 'User', id: string, email: string, displayName: string, avatarUrl?: string | null } | null }> };
export type SearchPeopleQueryVariables = Exact<{ export type SearchPeopleQueryVariables = Exact<{
where?: InputMaybe<PersonWhereInput>; where?: InputMaybe<PersonWhereInput>;
@ -3597,7 +3609,9 @@ export type SearchUserQueryVariables = Exact<{
}>; }>;
export type SearchUserQuery = { __typename?: 'Query', searchResults: Array<{ __typename?: 'User', id: string, email: string, displayName: string, firstName?: string | null, lastName?: string | null, avatarUrl?: string | null }> }; export type SearchUserQuery = { __typename?: 'Query', searchResults: Array<{ __typename?: 'User', avatarUrl?: string | null, id: string, email: string, displayName: string, firstName?: string | null, lastName?: string | null }> };
export type UserFieldsFragmentFragment = { __typename?: 'User', id: string, email: string, displayName: string, firstName?: string | null, lastName?: string | null };
export type DeleteUserAccountMutationVariables = Exact<{ [key: string]: never; }>; export type DeleteUserAccountMutationVariables = Exact<{ [key: string]: never; }>;
@ -3636,7 +3650,7 @@ export type UpdateUserMutation = { __typename?: 'Mutation', updateUser: { __type
export type GetCurrentUserQueryVariables = Exact<{ [key: string]: never; }>; 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 }, assignedActivities?: Array<{ __typename?: 'Activity', id: string, title?: string | null }> | null, authoredActivities?: Array<{ __typename?: 'Activity', id: string, title?: string | null }> | null, authoredAttachments?: Array<{ __typename?: 'Attachment', id: string, name: string, type: AttachmentType }> | null, settings?: { __typename?: 'UserSettings', id: string, colorScheme: ColorScheme, locale: string } | null, companies?: Array<{ __typename?: 'Company', id: string, name: string, domainName: string }> | null, comments?: Array<{ __typename?: 'Comment', id: string, body: string }> | null } | null, settings: { __typename?: 'UserSettings', id: string, locale: string, colorScheme: ColorScheme } } }; export type GetCurrentUserQuery = { __typename?: 'Query', currentUser: { __typename?: 'User', avatarUrl?: string | null, canImpersonate: boolean, supportUserHash?: string | null, id: string, email: string, displayName: string, firstName?: string | null, lastName?: string | null, workspaceMember?: { __typename?: 'WorkspaceMember', id: string, allowImpersonation: boolean, workspace: { __typename?: 'Workspace', id: string, domainName?: string | null, displayName?: string | null, logo?: string | null, inviteHash?: string | null }, assignedActivities?: Array<{ __typename?: 'Activity', id: string, title?: string | null }> | null, authoredActivities?: Array<{ __typename?: 'Activity', id: string, title?: string | null }> | null, authoredAttachments?: Array<{ __typename?: 'Attachment', id: string, name: string, type: AttachmentType }> | null, settings?: { __typename?: 'UserSettings', id: string, colorScheme: ColorScheme, locale: string } | null, companies?: Array<{ __typename?: 'Company', id: string, name: string, domainName: string }> | null, comments?: Array<{ __typename?: 'Comment', id: string, body: string }> | null } | null, settings: { __typename?: 'UserSettings', id: string, locale: string, colorScheme: ColorScheme } } };
export type GetUsersQueryVariables = Exact<{ [key: string]: never; }>; export type GetUsersQueryVariables = Exact<{ [key: string]: never; }>;
@ -3753,6 +3767,8 @@ export type GetViewsQueryVariables = Exact<{
export type GetViewsQuery = { __typename?: 'Query', views: Array<{ __typename?: 'View', id: string, name: string }> }; export type GetViewsQuery = { __typename?: 'Query', views: Array<{ __typename?: 'View', id: string, name: string }> };
export type WorkspaceMemberFieldsFragmentFragment = { __typename?: 'WorkspaceMember', id: string, allowImpersonation: boolean, workspace: { __typename?: 'Workspace', id: string, domainName?: string | null, displayName?: string | null, logo?: string | null, inviteHash?: string | null }, assignedActivities?: Array<{ __typename?: 'Activity', id: string, title?: string | null }> | null, authoredActivities?: Array<{ __typename?: 'Activity', id: string, title?: string | null }> | null, authoredAttachments?: Array<{ __typename?: 'Attachment', id: string, name: string, type: AttachmentType }> | null, settings?: { __typename?: 'UserSettings', id: string, colorScheme: ColorScheme, locale: string } | null, companies?: Array<{ __typename?: 'Company', id: string, name: string, domainName: string }> | null, comments?: Array<{ __typename?: 'Comment', id: string, body: string }> | null };
export type DeleteCurrentWorkspaceMutationVariables = Exact<{ [key: string]: never; }>; export type DeleteCurrentWorkspaceMutationVariables = Exact<{ [key: string]: never; }>;
@ -3804,8 +3820,22 @@ export type GetWorkspaceMembersQueryVariables = Exact<{
}>; }>;
export type GetWorkspaceMembersQuery = { __typename?: 'Query', workspaceMembers: Array<{ __typename?: 'WorkspaceMember', id: string, user: { __typename?: 'User', id: string, email: string, avatarUrl?: string | null, firstName?: string | null, lastName?: string | null, displayName: string } }> }; export type GetWorkspaceMembersQuery = { __typename?: 'Query', workspaceMembers: Array<{ __typename?: 'WorkspaceMember', id: string, user: { __typename?: 'User', avatarUrl?: string | null, id: string, email: string, displayName: string, firstName?: string | null, lastName?: string | null } }> };
export const ActivityWithTargetsFragmentDoc = gql`
fragment ActivityWithTargets on Activity {
id
createdAt
updatedAt
activityTargets {
id
createdAt
updatedAt
companyId
personId
}
}
`;
export const ActivityQueryFragmentFragmentDoc = gql` export const ActivityQueryFragmentFragmentDoc = gql`
fragment ActivityQueryFragment on Activity { fragment ActivityQueryFragment on Activity {
id id
@ -3874,6 +3904,22 @@ export const ActivityUpdatePartsFragmentDoc = gql`
} }
} }
`; `;
export const AuthTokenFragmentFragmentDoc = gql`
fragment AuthTokenFragment on AuthToken {
token
expiresAt
}
`;
export const AuthTokensFragmentFragmentDoc = gql`
fragment AuthTokensFragment on AuthTokenPair {
accessToken {
...AuthTokenFragment
}
refreshToken {
...AuthTokenFragment
}
}
${AuthTokenFragmentFragmentDoc}`;
export const UserQueryFragmentFragmentDoc = gql` export const UserQueryFragmentFragmentDoc = gql`
fragment UserQueryFragment on User { fragment UserQueryFragment on User {
id id
@ -3929,29 +3975,40 @@ export const UserQueryFragmentFragmentDoc = gql`
} }
} }
`; `;
export const CompanyFieldsFragmentFragmentDoc = gql` export const BaseAccountOwnerFragmentFragmentDoc = gql`
fragment companyFieldsFragment on Company { fragment baseAccountOwnerFragment on User {
accountOwner { id
id email
email displayName
displayName avatarUrl
avatarUrl }
} `;
export const BaseCompanyFieldsFragmentFragmentDoc = gql`
fragment baseCompanyFieldsFragment on Company {
address address
annualRecurringRevenue
createdAt createdAt
domainName domainName
employees employees
linkedinUrl
xUrl
annualRecurringRevenue
idealCustomerProfile
id id
idealCustomerProfile
linkedinUrl
name name
xUrl
_activityCount _activityCount
} }
`; `;
export const PersonFieldsFragmentFragmentDoc = gql` export const CompanyFieldsFragmentFragmentDoc = gql`
fragment personFieldsFragment on Person { fragment companyFieldsFragment on Company {
accountOwner {
...baseAccountOwnerFragment
}
...baseCompanyFieldsFragment
}
${BaseAccountOwnerFragmentFragmentDoc}
${BaseCompanyFieldsFragmentFragmentDoc}`;
export const BasePersonFieldsFragmentFragmentDoc = gql`
fragment basePersonFieldsFragment on Person {
id id
phone phone
email email
@ -3959,17 +4016,71 @@ export const PersonFieldsFragmentFragmentDoc = gql`
firstName firstName
lastName lastName
displayName displayName
avatarUrl
createdAt
}
`;
export const PersonFieldsFragmentFragmentDoc = gql`
fragment personFieldsFragment on Person {
...basePersonFieldsFragment
jobTitle jobTitle
linkedinUrl linkedinUrl
xUrl xUrl
avatarUrl
createdAt
_activityCount _activityCount
company { company {
id id
name name
domainName domainName
} }
}
${BasePersonFieldsFragmentFragmentDoc}`;
export const UserFieldsFragmentFragmentDoc = gql`
fragment userFieldsFragment on User {
id
email
displayName
firstName
lastName
}
`;
export const WorkspaceMemberFieldsFragmentFragmentDoc = gql`
fragment workspaceMemberFieldsFragment on WorkspaceMember {
id
allowImpersonation
workspace {
id
domainName
displayName
logo
inviteHash
}
assignedActivities {
id
title
}
authoredActivities {
id
title
}
authoredAttachments {
id
name
type
}
settings {
id
colorScheme
locale
}
companies {
id
name
domainName
}
comments {
id
body
}
} }
`; `;
export const AddActivityTargetsOnActivityDocument = gql` export const AddActivityTargetsOnActivityDocument = gql`
@ -3978,19 +4089,10 @@ export const AddActivityTargetsOnActivityDocument = gql`
where: {id: $activityId} where: {id: $activityId}
data: {activityTargets: {createMany: {data: $activityTargetInputs}}} data: {activityTargets: {createMany: {data: $activityTargetInputs}}}
) { ) {
id ...ActivityWithTargets
createdAt
updatedAt
activityTargets {
id
createdAt
updatedAt
companyId
personId
}
} }
} }
`; ${ActivityWithTargetsFragmentDoc}`;
export type AddActivityTargetsOnActivityMutationFn = Apollo.MutationFunction<AddActivityTargetsOnActivityMutation, AddActivityTargetsOnActivityMutationVariables>; export type AddActivityTargetsOnActivityMutationFn = Apollo.MutationFunction<AddActivityTargetsOnActivityMutation, AddActivityTargetsOnActivityMutationVariables>;
/** /**
@ -4160,19 +4262,10 @@ export const RemoveActivityTargetsOnActivityDocument = gql`
where: {id: $activityId} where: {id: $activityId}
data: {activityTargets: {deleteMany: {id: {in: $activityTargetIds}}}} data: {activityTargets: {deleteMany: {id: {in: $activityTargetIds}}}}
) { ) {
id ...ActivityWithTargets
createdAt
updatedAt
activityTargets {
id
createdAt
updatedAt
companyId
personId
}
} }
} }
`; ${ActivityWithTargetsFragmentDoc}`;
export type RemoveActivityTargetsOnActivityMutationFn = Apollo.MutationFunction<RemoveActivityTargetsOnActivityMutation, RemoveActivityTargetsOnActivityMutationVariables>; export type RemoveActivityTargetsOnActivityMutationFn = Apollo.MutationFunction<RemoveActivityTargetsOnActivityMutation, RemoveActivityTargetsOnActivityMutationVariables>;
/** /**
@ -4414,12 +4507,11 @@ export const ChallengeDocument = gql`
mutation Challenge($email: String!, $password: String!) { mutation Challenge($email: String!, $password: String!) {
challenge(email: $email, password: $password) { challenge(email: $email, password: $password) {
loginToken { loginToken {
expiresAt ...AuthTokenFragment
token
} }
} }
} }
`; ${AuthTokenFragmentFragmentDoc}`;
export type ChallengeMutationFn = Apollo.MutationFunction<ChallengeMutation, ChallengeMutationVariables>; export type ChallengeMutationFn = Apollo.MutationFunction<ChallengeMutation, ChallengeMutationVariables>;
/** /**
@ -4454,18 +4546,12 @@ export const ImpersonateDocument = gql`
...UserQueryFragment ...UserQueryFragment
} }
tokens { tokens {
accessToken { ...AuthTokensFragment
token
expiresAt
}
refreshToken {
token
expiresAt
}
} }
} }
} }
${UserQueryFragmentFragmentDoc}`; ${UserQueryFragmentFragmentDoc}
${AuthTokensFragmentFragmentDoc}`;
export type ImpersonateMutationFn = Apollo.MutationFunction<ImpersonateMutation, ImpersonateMutationVariables>; export type ImpersonateMutationFn = Apollo.MutationFunction<ImpersonateMutation, ImpersonateMutationVariables>;
/** /**
@ -4496,18 +4582,11 @@ export const RenewTokenDocument = gql`
mutation RenewToken($refreshToken: String!) { mutation RenewToken($refreshToken: String!) {
renewToken(refreshToken: $refreshToken) { renewToken(refreshToken: $refreshToken) {
tokens { tokens {
accessToken { ...AuthTokensFragment
expiresAt
token
}
refreshToken {
token
expiresAt
}
} }
} }
} }
`; ${AuthTokensFragmentFragmentDoc}`;
export type RenewTokenMutationFn = Apollo.MutationFunction<RenewTokenMutation, RenewTokenMutationVariables>; export type RenewTokenMutationFn = Apollo.MutationFunction<RenewTokenMutation, RenewTokenMutationVariables>;
/** /**
@ -4542,12 +4621,11 @@ export const SignUpDocument = gql`
workspaceInviteHash: $workspaceInviteHash workspaceInviteHash: $workspaceInviteHash
) { ) {
loginToken { loginToken {
expiresAt ...AuthTokenFragment
token
} }
} }
} }
`; ${AuthTokenFragmentFragmentDoc}`;
export type SignUpMutationFn = Apollo.MutationFunction<SignUpMutation, SignUpMutationVariables>; export type SignUpMutationFn = Apollo.MutationFunction<SignUpMutation, SignUpMutationVariables>;
/** /**
@ -4583,18 +4661,12 @@ export const VerifyDocument = gql`
...UserQueryFragment ...UserQueryFragment
} }
tokens { tokens {
accessToken { ...AuthTokensFragment
token
expiresAt
}
refreshToken {
token
expiresAt
}
} }
} }
} }
${UserQueryFragmentFragmentDoc}`; ${UserQueryFragmentFragmentDoc}
${AuthTokensFragmentFragmentDoc}`;
export type VerifyMutationFn = Apollo.MutationFunction<VerifyMutation, VerifyMutationVariables>; export type VerifyMutationFn = Apollo.MutationFunction<VerifyMutation, VerifyMutationVariables>;
/** /**
@ -4839,28 +4911,16 @@ export type UpdateOneCompanyMutationOptions = Apollo.BaseMutationOptions<UpdateO
export const GetCompaniesDocument = gql` export const GetCompaniesDocument = gql`
query GetCompanies($orderBy: [CompanyOrderByWithRelationInput!], $where: CompanyWhereInput) { query GetCompanies($orderBy: [CompanyOrderByWithRelationInput!], $where: CompanyWhereInput) {
companies: findManyCompany(orderBy: $orderBy, where: $where) { companies: findManyCompany(orderBy: $orderBy, where: $where) {
id
domainName
name
createdAt
address
linkedinUrl
xUrl
annualRecurringRevenue
idealCustomerProfile
employees
_activityCount
accountOwner { accountOwner {
id ...baseAccountOwnerFragment
email
displayName
firstName firstName
lastName lastName
avatarUrl
} }
...baseCompanyFieldsFragment
} }
} }
`; ${BaseAccountOwnerFragmentFragmentDoc}
${BaseCompanyFieldsFragmentFragmentDoc}`;
/** /**
* __useGetCompaniesQuery__ * __useGetCompaniesQuery__
@ -4893,23 +4953,7 @@ export type GetCompaniesQueryResult = Apollo.QueryResult<GetCompaniesQuery, GetC
export const GetCompanyDocument = gql` export const GetCompanyDocument = gql`
query GetCompany($where: CompanyWhereUniqueInput!) { query GetCompany($where: CompanyWhereUniqueInput!) {
findUniqueCompany(where: $where) { findUniqueCompany(where: $where) {
id ...companyFieldsFragment
domainName
name
createdAt
address
linkedinUrl
xUrl
annualRecurringRevenue
idealCustomerProfile
employees
_activityCount
accountOwner {
id
email
displayName
avatarUrl
}
Favorite { Favorite {
id id
person { person {
@ -4921,7 +4965,7 @@ export const GetCompanyDocument = gql`
} }
} }
} }
`; ${CompanyFieldsFragmentFragmentDoc}`;
/** /**
* __useGetCompanyQuery__ * __useGetCompanyQuery__
@ -5246,26 +5290,10 @@ export type RemovePersonPictureMutationOptions = Apollo.BaseMutationOptions<Remo
export const UpdateOnePersonDocument = gql` export const UpdateOnePersonDocument = gql`
mutation UpdateOnePerson($where: PersonWhereUniqueInput!, $data: PersonUpdateInput!) { mutation UpdateOnePerson($where: PersonWhereUniqueInput!, $data: PersonUpdateInput!) {
updateOnePerson(data: $data, where: $where) { updateOnePerson(data: $data, where: $where) {
id ...personFieldsFragment
city
company {
domainName
name
id
}
avatarUrl
email
jobTitle
linkedinUrl
xUrl
firstName
lastName
displayName
phone
createdAt
} }
} }
`; ${PersonFieldsFragmentFragmentDoc}`;
export type UpdateOnePersonMutationFn = Apollo.MutationFunction<UpdateOnePersonMutation, UpdateOnePersonMutationVariables>; export type UpdateOnePersonMutationFn = Apollo.MutationFunction<UpdateOnePersonMutation, UpdateOnePersonMutationVariables>;
/** /**
@ -5328,27 +5356,10 @@ export type UploadPersonPictureMutationOptions = Apollo.BaseMutationOptions<Uplo
export const GetPeopleDocument = gql` export const GetPeopleDocument = gql`
query GetPeople($orderBy: [PersonOrderByWithRelationInput!], $where: PersonWhereInput, $limit: Int) { query GetPeople($orderBy: [PersonOrderByWithRelationInput!], $where: PersonWhereInput, $limit: Int) {
people: findManyPerson(orderBy: $orderBy, where: $where, take: $limit) { people: findManyPerson(orderBy: $orderBy, where: $where, take: $limit) {
id ...personFieldsFragment
phone
email
city
firstName
lastName
displayName
jobTitle
linkedinUrl
xUrl
avatarUrl
createdAt
_activityCount
company {
id
name
domainName
}
} }
} }
`; ${PersonFieldsFragmentFragmentDoc}`;
/** /**
* __useGetPeopleQuery__ * __useGetPeopleQuery__
@ -5382,24 +5393,7 @@ export type GetPeopleQueryResult = Apollo.QueryResult<GetPeopleQuery, GetPeopleQ
export const GetPersonDocument = gql` export const GetPersonDocument = gql`
query GetPerson($id: String!) { query GetPerson($id: String!) {
findUniquePerson(id: $id) { findUniquePerson(id: $id) {
id ...personFieldsFragment
firstName
lastName
displayName
email
createdAt
city
jobTitle
linkedinUrl
xUrl
avatarUrl
phone
_activityCount
company {
id
name
domainName
}
Favorite { Favorite {
id id
person { person {
@ -5411,7 +5405,7 @@ export const GetPersonDocument = gql`
} }
} }
} }
`; ${PersonFieldsFragmentFragmentDoc}`;
/** /**
* __useGetPersonQuery__ * __useGetPersonQuery__
@ -6129,18 +6123,10 @@ export type SearchCompanyQueryResult = Apollo.QueryResult<SearchCompanyQuery, Se
export const SearchPeopleDocument = gql` export const SearchPeopleDocument = gql`
query SearchPeople($where: PersonWhereInput, $limit: Int, $orderBy: [PersonOrderByWithRelationInput!]) { query SearchPeople($where: PersonWhereInput, $limit: Int, $orderBy: [PersonOrderByWithRelationInput!]) {
searchResults: findManyPerson(where: $where, take: $limit, orderBy: $orderBy) { searchResults: findManyPerson(where: $where, take: $limit, orderBy: $orderBy) {
id ...basePersonFieldsFragment
phone
email
city
firstName
lastName
displayName
avatarUrl
createdAt
} }
} }
`; ${BasePersonFieldsFragmentFragmentDoc}`;
/** /**
* __useSearchPeopleQuery__ * __useSearchPeopleQuery__
@ -6174,15 +6160,11 @@ export type SearchPeopleQueryResult = Apollo.QueryResult<SearchPeopleQuery, Sear
export const SearchUserDocument = gql` export const SearchUserDocument = gql`
query SearchUser($where: UserWhereInput, $limit: Int, $orderBy: [UserOrderByWithRelationInput!]) { query SearchUser($where: UserWhereInput, $limit: Int, $orderBy: [UserOrderByWithRelationInput!]) {
searchResults: findManyUser(where: $where, take: $limit, orderBy: $orderBy) { searchResults: findManyUser(where: $where, take: $limit, orderBy: $orderBy) {
id ...userFieldsFragment
email
displayName
firstName
lastName
avatarUrl avatarUrl
} }
} }
`; ${UserFieldsFragmentFragmentDoc}`;
/** /**
* __useSearchUserQuery__ * __useSearchUserQuery__
@ -6428,50 +6410,11 @@ export type UpdateUserMutationOptions = Apollo.BaseMutationOptions<UpdateUserMut
export const GetCurrentUserDocument = gql` export const GetCurrentUserDocument = gql`
query GetCurrentUser { query GetCurrentUser {
currentUser { currentUser {
id ...userFieldsFragment
email
displayName
firstName
lastName
avatarUrl avatarUrl
canImpersonate canImpersonate
workspaceMember { workspaceMember {
id ...workspaceMemberFieldsFragment
allowImpersonation
workspace {
id
domainName
displayName
logo
inviteHash
}
assignedActivities {
id
title
}
authoredActivities {
id
title
}
authoredAttachments {
id
name
type
}
settings {
id
colorScheme
locale
}
companies {
id
name
domainName
}
comments {
id
body
}
} }
settings { settings {
id id
@ -6481,7 +6424,8 @@ export const GetCurrentUserDocument = gql`
supportUserHash supportUserHash
} }
} }
`; ${UserFieldsFragmentFragmentDoc}
${WorkspaceMemberFieldsFragmentFragmentDoc}`;
/** /**
* __useGetCurrentUserQuery__ * __useGetCurrentUserQuery__
@ -6512,14 +6456,10 @@ export type GetCurrentUserQueryResult = Apollo.QueryResult<GetCurrentUserQuery,
export const GetUsersDocument = gql` export const GetUsersDocument = gql`
query GetUsers { query GetUsers {
findManyUser { findManyUser {
id ...userFieldsFragment
email
displayName
firstName
lastName
} }
} }
`; ${UserFieldsFragmentFragmentDoc}`;
/** /**
* __useGetUsersQuery__ * __useGetUsersQuery__
@ -7246,45 +7186,10 @@ export type UploadWorkspaceLogoMutationOptions = Apollo.BaseMutationOptions<Uplo
export const UpdateOneWorkspaceMemberDocument = gql` export const UpdateOneWorkspaceMemberDocument = gql`
mutation UpdateOneWorkspaceMember($data: WorkspaceMemberUpdateInput!, $where: WorkspaceMemberWhereUniqueInput!) { mutation UpdateOneWorkspaceMember($data: WorkspaceMemberUpdateInput!, $where: WorkspaceMemberWhereUniqueInput!) {
UpdateOneWorkspaceMember(data: $data, where: $where) { UpdateOneWorkspaceMember(data: $data, where: $where) {
id ...workspaceMemberFieldsFragment
allowImpersonation
workspace {
id
domainName
displayName
logo
inviteHash
}
assignedActivities {
id
title
}
authoredActivities {
id
title
}
authoredAttachments {
id
name
type
}
settings {
id
colorScheme
locale
}
companies {
id
name
domainName
}
comments {
id
body
}
} }
} }
`; ${WorkspaceMemberFieldsFragmentFragmentDoc}`;
export type UpdateOneWorkspaceMemberMutationFn = Apollo.MutationFunction<UpdateOneWorkspaceMemberMutation, UpdateOneWorkspaceMemberMutationVariables>; export type UpdateOneWorkspaceMemberMutationFn = Apollo.MutationFunction<UpdateOneWorkspaceMemberMutation, UpdateOneWorkspaceMemberMutationVariables>;
/** /**
@ -7354,16 +7259,12 @@ export const GetWorkspaceMembersDocument = gql`
workspaceMembers: findManyWorkspaceMember(where: $where) { workspaceMembers: findManyWorkspaceMember(where: $where) {
id id
user { user {
id ...userFieldsFragment
email
avatarUrl avatarUrl
firstName
lastName
displayName
} }
} }
} }
`; ${UserFieldsFragmentFragmentDoc}`;
/** /**
* __useGetWorkspaceMembersQuery__ * __useGetWorkspaceMembersQuery__

View File

@ -0,0 +1,16 @@
import { gql } from '@apollo/client';
export const ACTIVITY_WITH_TARGETS = gql`
fragment ActivityWithTargets on Activity {
id
createdAt
updatedAt
activityTargets {
id
createdAt
updatedAt
companyId
personId
}
}
`;

View File

@ -9,16 +9,7 @@ export const ADD_ACTIVITY_TARGETS = gql`
where: { id: $activityId } where: { id: $activityId }
data: { activityTargets: { createMany: { data: $activityTargetInputs } } } data: { activityTargets: { createMany: { data: $activityTargetInputs } } }
) { ) {
id ...ActivityWithTargets
createdAt
updatedAt
activityTargets {
id
createdAt
updatedAt
companyId
personId
}
} }
} }
`; `;

View File

@ -11,16 +11,7 @@ export const REMOVE_ACTIVITY_TARGETS = gql`
activityTargets: { deleteMany: { id: { in: $activityTargetIds } } } activityTargets: { deleteMany: { id: { in: $activityTargetIds } } }
} }
) { ) {
id ...ActivityWithTargets
createdAt
updatedAt
activityTargets {
id
createdAt
updatedAt
companyId
personId
}
} }
} }
`; `;

View File

@ -0,0 +1,19 @@
import { gql } from '@apollo/client';
export const AUTH_TOKEN = gql`
fragment AuthTokenFragment on AuthToken {
token
expiresAt
}
`;
export const AUTH_TOKENS = gql`
fragment AuthTokensFragment on AuthTokenPair {
accessToken {
...AuthTokenFragment
}
refreshToken {
...AuthTokenFragment
}
}
`;

View File

@ -4,8 +4,7 @@ export const CHALLENGE = gql`
mutation Challenge($email: String!, $password: String!) { mutation Challenge($email: String!, $password: String!) {
challenge(email: $email, password: $password) { challenge(email: $email, password: $password) {
loginToken { loginToken {
expiresAt ...AuthTokenFragment
token
} }
} }
} }

View File

@ -8,14 +8,7 @@ export const IMPERSONATE = gql`
...UserQueryFragment ...UserQueryFragment
} }
tokens { tokens {
accessToken { ...AuthTokensFragment
token
expiresAt
}
refreshToken {
token
expiresAt
}
} }
} }
} }

View File

@ -4,14 +4,7 @@ export const RENEW_TOKEN = gql`
mutation RenewToken($refreshToken: String!) { mutation RenewToken($refreshToken: String!) {
renewToken(refreshToken: $refreshToken) { renewToken(refreshToken: $refreshToken) {
tokens { tokens {
accessToken { ...AuthTokensFragment
expiresAt
token
}
refreshToken {
token
expiresAt
}
} }
} }
} }

View File

@ -12,8 +12,7 @@ export const SIGN_UP = gql`
workspaceInviteHash: $workspaceInviteHash workspaceInviteHash: $workspaceInviteHash
) { ) {
loginToken { loginToken {
expiresAt ...AuthTokenFragment
token
} }
} }
} }

View File

@ -7,14 +7,7 @@ export const VERIFY = gql`
...UserQueryFragment ...UserQueryFragment
} }
tokens { tokens {
accessToken { ...AuthTokensFragment
token
expiresAt
}
refreshToken {
token
expiresAt
}
} }
} }
} }

View File

@ -1,23 +1,35 @@
import { gql } from '@apollo/client'; import { gql } from '@apollo/client';
export const BASE_COMPANY_FIELDS_FRAGMENT = gql`
fragment baseCompanyFieldsFragment on Company {
address
annualRecurringRevenue
createdAt
domainName
employees
id
idealCustomerProfile
linkedinUrl
name
xUrl
_activityCount
}
`;
export const BASE_ACCOUNT_OWNER_FRAGMENT = gql`
fragment baseAccountOwnerFragment on User {
id
email
displayName
avatarUrl
}
`;
export const COMPANY_FIELDS_FRAGMENT = gql` export const COMPANY_FIELDS_FRAGMENT = gql`
fragment companyFieldsFragment on Company { fragment companyFieldsFragment on Company {
accountOwner { accountOwner {
id ...baseAccountOwnerFragment
email
displayName
avatarUrl
} }
address ...baseCompanyFieldsFragment
createdAt
domainName
employees
linkedinUrl
xUrl
annualRecurringRevenue
idealCustomerProfile
id
name
_activityCount
} }
`; `;

View File

@ -6,25 +6,12 @@ export const GET_COMPANIES = gql`
$where: CompanyWhereInput $where: CompanyWhereInput
) { ) {
companies: findManyCompany(orderBy: $orderBy, where: $where) { companies: findManyCompany(orderBy: $orderBy, where: $where) {
id
domainName
name
createdAt
address
linkedinUrl
xUrl
annualRecurringRevenue
idealCustomerProfile
employees
_activityCount
accountOwner { accountOwner {
id ...baseAccountOwnerFragment
email
displayName
firstName firstName
lastName lastName
avatarUrl
} }
...baseCompanyFieldsFragment
} }
} }
`; `;

View File

@ -3,23 +3,7 @@ import { gql } from '@apollo/client';
export const GET_COMPANY = gql` export const GET_COMPANY = gql`
query GetCompany($where: CompanyWhereUniqueInput!) { query GetCompany($where: CompanyWhereUniqueInput!) {
findUniqueCompany(where: $where) { findUniqueCompany(where: $where) {
id ...companyFieldsFragment
domainName
name
createdAt
address
linkedinUrl
xUrl
annualRecurringRevenue
idealCustomerProfile
employees
_activityCount
accountOwner {
id
email
displayName
avatarUrl
}
Favorite { Favorite {
id id
person { person {

View File

@ -1,7 +1,7 @@
import { gql } from '@apollo/client'; import { gql } from '@apollo/client';
export const PERSON_FIELDS_FRAGMENT = gql` export const BASE_PERSON_FIELDS_FRAGMENT = gql`
fragment personFieldsFragment on Person { fragment basePersonFieldsFragment on Person {
id id
phone phone
email email
@ -9,11 +9,17 @@ export const PERSON_FIELDS_FRAGMENT = gql`
firstName firstName
lastName lastName
displayName displayName
avatarUrl
createdAt
}
`;
export const PERSON_FIELDS_FRAGMENT = gql`
fragment personFieldsFragment on Person {
...basePersonFieldsFragment
jobTitle jobTitle
linkedinUrl linkedinUrl
xUrl xUrl
avatarUrl
createdAt
_activityCount _activityCount
company { company {
id id

View File

@ -6,23 +6,7 @@ export const UPDATE_ONE_PERSON = gql`
$data: PersonUpdateInput! $data: PersonUpdateInput!
) { ) {
updateOnePerson(data: $data, where: $where) { updateOnePerson(data: $data, where: $where) {
id ...personFieldsFragment
city
company {
domainName
name
id
}
avatarUrl
email
jobTitle
linkedinUrl
xUrl
firstName
lastName
displayName
phone
createdAt
} }
} }
`; `;

View File

@ -7,24 +7,7 @@ export const GET_PEOPLE = gql`
$limit: Int $limit: Int
) { ) {
people: findManyPerson(orderBy: $orderBy, where: $where, take: $limit) { people: findManyPerson(orderBy: $orderBy, where: $where, take: $limit) {
id ...personFieldsFragment
phone
email
city
firstName
lastName
displayName
jobTitle
linkedinUrl
xUrl
avatarUrl
createdAt
_activityCount
company {
id
name
domainName
}
} }
} }
`; `;

View File

@ -3,24 +3,7 @@ import { gql } from '@apollo/client';
export const GET_PERSON = gql` export const GET_PERSON = gql`
query GetPerson($id: String!) { query GetPerson($id: String!) {
findUniquePerson(id: $id) { findUniquePerson(id: $id) {
id ...personFieldsFragment
firstName
lastName
displayName
email
createdAt
city
jobTitle
linkedinUrl
xUrl
avatarUrl
phone
_activityCount
company {
id
name
domainName
}
Favorite { Favorite {
id id
person { person {

View File

@ -11,15 +11,7 @@ export const SEARCH_PEOPLE_QUERY = gql`
take: $limit take: $limit
orderBy: $orderBy orderBy: $orderBy
) { ) {
id ...basePersonFieldsFragment
phone
email
city
firstName
lastName
displayName
avatarUrl
createdAt
} }
} }
`; `;

View File

@ -11,11 +11,7 @@ export const SEARCH_USER_QUERY = gql`
take: $limit take: $limit
orderBy: $orderBy orderBy: $orderBy
) { ) {
id ...userFieldsFragment
email
displayName
firstName
lastName
avatarUrl avatarUrl
} }
} }

View File

@ -0,0 +1,11 @@
import { gql } from '@apollo/client';
export const USER_FIELDS_FRAGMENT = gql`
fragment userFieldsFragment on User {
id
email
displayName
firstName
lastName
}
`;

View File

@ -3,50 +3,11 @@ import { gql } from '@apollo/client';
export const GET_CURRENT_USER = gql` export const GET_CURRENT_USER = gql`
query GetCurrentUser { query GetCurrentUser {
currentUser { currentUser {
id ...userFieldsFragment
email
displayName
firstName
lastName
avatarUrl avatarUrl
canImpersonate canImpersonate
workspaceMember { workspaceMember {
id ...workspaceMemberFieldsFragment
allowImpersonation
workspace {
id
domainName
displayName
logo
inviteHash
}
assignedActivities {
id
title
}
authoredActivities {
id
title
}
authoredAttachments {
id
name
type
}
settings {
id
colorScheme
locale
}
companies {
id
name
domainName
}
comments {
id
body
}
} }
settings { settings {
id id

View File

@ -3,11 +3,7 @@ import { gql } from '@apollo/client';
export const GET_USERS = gql` export const GET_USERS = gql`
query GetUsers { query GetUsers {
findManyUser { findManyUser {
id ...userFieldsFragment
email
displayName
firstName
lastName
} }
} }
`; `;

View File

@ -0,0 +1,42 @@
import { gql } from '@apollo/client';
export const WORKSPACE_MEMBER_FIELDS_FRAGMENT = gql`
fragment workspaceMemberFieldsFragment on WorkspaceMember {
id
allowImpersonation
workspace {
id
domainName
displayName
logo
inviteHash
}
assignedActivities {
id
title
}
authoredActivities {
id
title
}
authoredAttachments {
id
name
type
}
settings {
id
colorScheme
locale
}
companies {
id
name
domainName
}
comments {
id
body
}
}
`;

View File

@ -6,42 +6,7 @@ export const UPDATE_WORKSPACE_MEMBER = gql`
$where: WorkspaceMemberWhereUniqueInput! $where: WorkspaceMemberWhereUniqueInput!
) { ) {
UpdateOneWorkspaceMember(data: $data, where: $where) { UpdateOneWorkspaceMember(data: $data, where: $where) {
id ...workspaceMemberFieldsFragment
allowImpersonation
workspace {
id
domainName
displayName
logo
inviteHash
}
assignedActivities {
id
title
}
authoredActivities {
id
title
}
authoredAttachments {
id
name
type
}
settings {
id
colorScheme
locale
}
companies {
id
name
domainName
}
comments {
id
body
}
} }
} }
`; `;

View File

@ -5,12 +5,8 @@ export const GET_WORKSPACE_MEMBERS = gql`
workspaceMembers: findManyWorkspaceMember(where: $where) { workspaceMembers: findManyWorkspaceMember(where: $where) {
id id
user { user {
id ...userFieldsFragment
email
avatarUrl avatarUrl
firstName
lastName
displayName
} }
} }
} }