import { gql } from '@apollo/client'; import * as Apollo from '@apollo/client'; export type Maybe = T | null; export type InputMaybe = Maybe; export type Exact = { [K in keyof T]: T[K] }; export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; const defaultOptions = {} as const; /** All built-in and custom scalars, mapped to their actual values */ export type Scalars = { ID: string; String: string; Boolean: boolean; Int: number; Float: number; ConnectionCursor: any; DateTime: string; JSON: any; Upload: any; }; export type Analytics = { __typename?: 'Analytics'; /** Boolean that confirms query was dispatched */ success: Scalars['Boolean']; }; export type ApiKeyToken = { __typename?: 'ApiKeyToken'; token: Scalars['String']; }; export type AuthProviders = { __typename?: 'AuthProviders'; google: Scalars['Boolean']; magicLink: Scalars['Boolean']; password: Scalars['Boolean']; }; export type AuthToken = { __typename?: 'AuthToken'; expiresAt: Scalars['DateTime']; token: Scalars['String']; }; export type AuthTokenPair = { __typename?: 'AuthTokenPair'; accessToken: AuthToken; refreshToken: AuthToken; }; export type AuthTokens = { __typename?: 'AuthTokens'; tokens: AuthTokenPair; }; export type BooleanFieldComparison = { is?: InputMaybe; isNot?: InputMaybe; }; export type ClientConfig = { __typename?: 'ClientConfig'; authProviders: AuthProviders; debugMode: Scalars['Boolean']; signInPrefilled: Scalars['Boolean']; support: Support; telemetry: Telemetry; }; export type CreateOneRefreshTokenInput = { /** The record to create */ refreshToken: CreateRefreshTokenInput; }; export type CreateRefreshTokenInput = { expiresAt: Scalars['DateTime']; }; export type CursorPaging = { /** Paginate after opaque cursor */ after?: InputMaybe; /** Paginate before opaque cursor */ before?: InputMaybe; /** Paginate first */ first?: InputMaybe; /** Paginate last */ last?: InputMaybe; }; export type FieldConnection = { __typename?: 'FieldConnection'; /** Array of edges. */ edges: Array; /** Paging information */ pageInfo: PageInfo; /** Fetch total count of records */ totalCount: Scalars['Int']; }; export type FieldDeleteResponse = { __typename?: 'FieldDeleteResponse'; createdAt?: Maybe; description?: Maybe; icon?: Maybe; id?: Maybe; isActive?: Maybe; isCustom?: Maybe; isNullable?: Maybe; isSystem?: Maybe; label?: Maybe; name?: Maybe; /** @deprecated Use label name instead */ placeholder?: Maybe; type?: Maybe; updatedAt?: Maybe; }; /** Type of the field */ export enum FieldMetadataType { Boolean = 'BOOLEAN', Currency = 'CURRENCY', DateTime = 'DATE_TIME', Email = 'EMAIL', Enum = 'ENUM', FullName = 'FULL_NAME', Link = 'LINK', Number = 'NUMBER', Phone = 'PHONE', Probability = 'PROBABILITY', Relation = 'RELATION', Text = 'TEXT', Uuid = 'UUID' } export enum FileFolder { Attachment = 'Attachment', PersonPicture = 'PersonPicture', ProfilePicture = 'ProfilePicture', WorkspaceLogo = 'WorkspaceLogo' } export type IdFilterComparison = { eq?: InputMaybe; gt?: InputMaybe; gte?: InputMaybe; iLike?: InputMaybe; in?: InputMaybe>; is?: InputMaybe; isNot?: InputMaybe; like?: InputMaybe; lt?: InputMaybe; lte?: InputMaybe; neq?: InputMaybe; notILike?: InputMaybe; notIn?: InputMaybe>; notLike?: InputMaybe; }; export type LoginToken = { __typename?: 'LoginToken'; loginToken: AuthToken; }; export type Mutation = { __typename?: 'Mutation'; challenge: LoginToken; createEvent: Analytics; createOneField: Field; createOneObject: Object; createOneRefreshToken: RefreshToken; createOneRelation: Relation; deleteCurrentWorkspace: Workspace; deleteOneField: FieldDeleteResponse; deleteOneObject: ObjectDeleteResponse; deleteOneRelation: RelationDeleteResponse; deleteUser: User; generateApiKeyToken: ApiKeyToken; impersonate: Verify; renewToken: AuthTokens; signUp: LoginToken; updateOneField: Field; updateOneObject: Object; updateWorkspace: Workspace; uploadFile: Scalars['String']; uploadImage: Scalars['String']; uploadProfilePicture: Scalars['String']; uploadWorkspaceLogo: Scalars['String']; verify: Verify; }; export type MutationChallengeArgs = { email: Scalars['String']; password: Scalars['String']; }; export type MutationCreateEventArgs = { data: Scalars['JSON']; type: Scalars['String']; }; export type MutationCreateOneRefreshTokenArgs = { input: CreateOneRefreshTokenInput; }; export type MutationGenerateApiKeyTokenArgs = { apiKeyId: Scalars['String']; expiresAt: Scalars['String']; }; export type MutationImpersonateArgs = { userId: Scalars['String']; }; export type MutationRenewTokenArgs = { refreshToken: Scalars['String']; }; export type MutationSignUpArgs = { email: Scalars['String']; password: Scalars['String']; workspaceInviteHash?: InputMaybe; }; export type MutationUpdateWorkspaceArgs = { data: UpdateWorkspaceInput; }; export type MutationUploadFileArgs = { file: Scalars['Upload']; fileFolder?: InputMaybe; }; export type MutationUploadImageArgs = { file: Scalars['Upload']; fileFolder?: InputMaybe; }; export type MutationUploadProfilePictureArgs = { file: Scalars['Upload']; }; export type MutationUploadWorkspaceLogoArgs = { file: Scalars['Upload']; }; export type MutationVerifyArgs = { loginToken: Scalars['String']; }; export type ObjectConnection = { __typename?: 'ObjectConnection'; /** Array of edges. */ edges: Array; /** Paging information */ pageInfo: PageInfo; /** Fetch total count of records */ totalCount: Scalars['Int']; }; export type ObjectDeleteResponse = { __typename?: 'ObjectDeleteResponse'; createdAt?: Maybe; dataSourceId?: Maybe; description?: Maybe; icon?: Maybe; id?: Maybe; isActive?: Maybe; isCustom?: Maybe; isSystem?: Maybe; labelPlural?: Maybe; labelSingular?: Maybe; namePlural?: Maybe; nameSingular?: Maybe; updatedAt?: Maybe; }; export type ObjectFieldsConnection = { __typename?: 'ObjectFieldsConnection'; /** Array of edges. */ edges: Array; /** Paging information */ pageInfo: PageInfo; /** Fetch total count of records */ totalCount: Scalars['Int']; }; export type PageInfo = { __typename?: 'PageInfo'; /** The cursor of the last returned record. */ endCursor?: Maybe; /** true if paging forward and there are more records. */ hasNextPage?: Maybe; /** true if paging backwards and there are more records. */ hasPreviousPage?: Maybe; /** The cursor of the first returned record. */ startCursor?: Maybe; }; export type Query = { __typename?: 'Query'; checkUserExists: UserExists; checkWorkspaceInviteHashIsValid: WorkspaceInviteHashValid; clientConfig: ClientConfig; currentUser: User; currentWorkspace: Workspace; field: Field; fields: FieldConnection; findWorkspaceFromInviteHash: Workspace; object: Object; objects: ObjectConnection; relation: Relation; relations: RelationConnection; }; export type QueryCheckUserExistsArgs = { email: Scalars['String']; }; export type QueryCheckWorkspaceInviteHashIsValidArgs = { inviteHash: Scalars['String']; }; export type QueryFindWorkspaceFromInviteHashArgs = { inviteHash: Scalars['String']; }; export type RefreshToken = { __typename?: 'RefreshToken'; createdAt: Scalars['DateTime']; expiresAt: Scalars['DateTime']; id: Scalars['ID']; updatedAt: Scalars['DateTime']; }; export type RefreshTokenEdge = { __typename?: 'RefreshTokenEdge'; /** Cursor for this node. */ cursor: Scalars['ConnectionCursor']; /** The node containing the RefreshToken */ node: RefreshToken; }; export type RelationConnection = { __typename?: 'RelationConnection'; /** Array of edges. */ edges: Array; /** Paging information */ pageInfo: PageInfo; /** Fetch total count of records */ totalCount: Scalars['Int']; }; export type RelationDeleteResponse = { __typename?: 'RelationDeleteResponse'; createdAt?: Maybe; fromFieldMetadataId?: Maybe; fromObjectMetadataId?: Maybe; id?: Maybe; relationType?: Maybe; toFieldMetadataId?: Maybe; toObjectMetadataId?: Maybe; updatedAt?: Maybe; }; /** Type of the relation */ export enum RelationMetadataType { ManyToMany = 'MANY_TO_MANY', OneToMany = 'ONE_TO_MANY', OneToOne = 'ONE_TO_ONE' } export type Support = { __typename?: 'Support'; supportDriver: Scalars['String']; supportFrontChatId?: Maybe; }; export type Telemetry = { __typename?: 'Telemetry'; anonymizationEnabled: Scalars['Boolean']; enabled: Scalars['Boolean']; }; export type UpdateWorkspaceInput = { displayName?: InputMaybe; domainName?: InputMaybe; inviteHash?: InputMaybe; logo?: InputMaybe; }; export type User = { __typename?: 'User'; canImpersonate: Scalars['Boolean']; createdAt: Scalars['DateTime']; defaultWorkspace: Workspace; deletedAt?: Maybe; disabled?: Maybe; email: Scalars['String']; emailVerified: Scalars['Boolean']; firstName: Scalars['String']; id: Scalars['ID']; lastName: Scalars['String']; passwordHash?: Maybe; supportUserHash?: Maybe; updatedAt: Scalars['DateTime']; workspaceMember: UserWorkspaceMember; }; export type UserEdge = { __typename?: 'UserEdge'; /** Cursor for this node. */ cursor: Scalars['ConnectionCursor']; /** The node containing the User */ node: User; }; export type UserExists = { __typename?: 'UserExists'; exists: Scalars['Boolean']; }; export type UserWorkspaceMember = { __typename?: 'UserWorkspaceMember'; allowImpersonation: Scalars['Boolean']; avatarUrl?: Maybe; colorScheme: Scalars['String']; id: Scalars['ID']; locale: Scalars['String']; name: UserWorkspaceMemberName; }; export type UserWorkspaceMemberName = { __typename?: 'UserWorkspaceMemberName'; firstName: Scalars['String']; lastName: Scalars['String']; }; export type Verify = { __typename?: 'Verify'; tokens: AuthTokenPair; user: User; }; export type Workspace = { __typename?: 'Workspace'; createdAt: Scalars['DateTime']; deletedAt?: Maybe; displayName?: Maybe; domainName?: Maybe; id: Scalars['ID']; inviteHash?: Maybe; logo?: Maybe; updatedAt: Scalars['DateTime']; }; export type WorkspaceEdge = { __typename?: 'WorkspaceEdge'; /** Cursor for this node. */ cursor: Scalars['ConnectionCursor']; /** The node containing the Workspace */ node: Workspace; }; export type WorkspaceInviteHashValid = { __typename?: 'WorkspaceInviteHashValid'; isValid: Scalars['Boolean']; }; export type Field = { __typename?: 'field'; createdAt: Scalars['DateTime']; description?: Maybe; fromRelationMetadata?: Maybe; icon?: Maybe; id: Scalars['ID']; isActive: Scalars['Boolean']; isCustom: Scalars['Boolean']; isNullable: Scalars['Boolean']; isSystem: Scalars['Boolean']; label: Scalars['String']; name: Scalars['String']; /** @deprecated Use label name instead */ placeholder?: Maybe; toRelationMetadata?: Maybe; type: FieldMetadataType; updatedAt: Scalars['DateTime']; }; export type FieldEdge = { __typename?: 'fieldEdge'; /** Cursor for this node. */ cursor: Scalars['ConnectionCursor']; /** The node containing the field */ node: Field; }; export type FieldFilter = { and?: InputMaybe>; id?: InputMaybe; isActive?: InputMaybe; isCustom?: InputMaybe; isSystem?: InputMaybe; or?: InputMaybe>; }; export type Object = { __typename?: 'object'; createdAt: Scalars['DateTime']; dataSourceId: Scalars['String']; description?: Maybe; fields: ObjectFieldsConnection; icon?: Maybe; id: Scalars['ID']; isActive: Scalars['Boolean']; isCustom: Scalars['Boolean']; isSystem: Scalars['Boolean']; labelPlural: Scalars['String']; labelSingular: Scalars['String']; namePlural: Scalars['String']; nameSingular: Scalars['String']; updatedAt: Scalars['DateTime']; }; export type ObjectFieldsArgs = { filter?: FieldFilter; paging?: CursorPaging; }; export type ObjectEdge = { __typename?: 'objectEdge'; /** Cursor for this node. */ cursor: Scalars['ConnectionCursor']; /** The node containing the object */ node: Object; }; export type Relation = { __typename?: 'relation'; createdAt: Scalars['DateTime']; fromFieldMetadataId: Scalars['String']; fromObjectMetadata: Object; fromObjectMetadataId: Scalars['String']; id: Scalars['ID']; relationType: RelationMetadataType; toFieldMetadataId: Scalars['String']; toObjectMetadata: Object; toObjectMetadataId: Scalars['String']; updatedAt: Scalars['DateTime']; }; export type RelationEdge = { __typename?: 'relationEdge'; /** Cursor for this node. */ cursor: Scalars['ConnectionCursor']; /** The node containing the relation */ node: Relation; }; export type CreateEventMutationVariables = Exact<{ type: Scalars['String']; data: Scalars['JSON']; }>; 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 ChallengeMutationVariables = Exact<{ email: Scalars['String']; password: Scalars['String']; }>; export type ChallengeMutation = { __typename?: 'Mutation', challenge: { __typename?: 'LoginToken', loginToken: { __typename?: 'AuthToken', token: string, expiresAt: string } } }; export type GenerateApiKeyTokenMutationVariables = Exact<{ apiKeyId: Scalars['String']; expiresAt: Scalars['String']; }>; export type GenerateApiKeyTokenMutation = { __typename?: 'Mutation', generateApiKeyToken: { __typename?: 'ApiKeyToken', token: string } }; export type ImpersonateMutationVariables = Exact<{ userId: Scalars['String']; }>; export type ImpersonateMutation = { __typename?: 'Mutation', impersonate: { __typename?: 'Verify', user: { __typename?: 'User', id: string, firstName: string, lastName: string, email: string, canImpersonate: boolean, supportUserHash?: string | null, workspaceMember: { __typename?: 'UserWorkspaceMember', id: string, colorScheme: string, avatarUrl?: string | null, locale: string, allowImpersonation: boolean, name: { __typename?: 'UserWorkspaceMemberName', firstName: string, lastName: string } }, defaultWorkspace: { __typename?: 'Workspace', id: string, displayName?: string | null, logo?: string | null, domainName?: string | null, inviteHash?: string | null } }, 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', token: string, expiresAt: string }, refreshToken: { __typename?: 'AuthToken', token: string, expiresAt: string } } } }; export type SignUpMutationVariables = Exact<{ email: Scalars['String']; password: Scalars['String']; workspaceInviteHash?: InputMaybe; }>; export type SignUpMutation = { __typename?: 'Mutation', signUp: { __typename?: 'LoginToken', loginToken: { __typename?: 'AuthToken', token: string, expiresAt: string } } }; export type VerifyMutationVariables = Exact<{ loginToken: Scalars['String']; }>; export type VerifyMutation = { __typename?: 'Mutation', verify: { __typename?: 'Verify', user: { __typename?: 'User', id: string, firstName: string, lastName: string, email: string, canImpersonate: boolean, supportUserHash?: string | null, workspaceMember: { __typename?: 'UserWorkspaceMember', id: string, colorScheme: string, avatarUrl?: string | null, locale: string, allowImpersonation: boolean, name: { __typename?: 'UserWorkspaceMemberName', firstName: string, lastName: string } }, defaultWorkspace: { __typename?: 'Workspace', id: string, displayName?: string | null, logo?: string | null, domainName?: string | null, inviteHash?: string | null } }, tokens: { __typename?: 'AuthTokenPair', accessToken: { __typename?: 'AuthToken', token: string, expiresAt: string }, refreshToken: { __typename?: 'AuthToken', token: string, expiresAt: string } } } }; export type CheckUserExistsQueryVariables = Exact<{ email: Scalars['String']; }>; export type CheckUserExistsQuery = { __typename?: 'Query', checkUserExists: { __typename?: 'UserExists', exists: boolean } }; 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 UserQueryFragmentFragment = { __typename?: 'User', id: string, firstName: string, lastName: string, email: string, canImpersonate: boolean, supportUserHash?: string | null, workspaceMember: { __typename?: 'UserWorkspaceMember', id: string, colorScheme: string, avatarUrl?: string | null, locale: string, allowImpersonation: boolean, name: { __typename?: 'UserWorkspaceMemberName', firstName: string, lastName: string } }, defaultWorkspace: { __typename?: 'Workspace', id: string, displayName?: string | null, logo?: string | null, domainName?: string | null, inviteHash?: string | null } }; export type DeleteUserAccountMutationVariables = Exact<{ [key: string]: never; }>; export type DeleteUserAccountMutation = { __typename?: 'Mutation', deleteUser: { __typename?: 'User', id: string } }; export type UploadProfilePictureMutationVariables = Exact<{ file: Scalars['Upload']; }>; export type UploadProfilePictureMutation = { __typename?: 'Mutation', uploadProfilePicture: string }; export type GetCurrentUserQueryVariables = Exact<{ [key: string]: never; }>; export type GetCurrentUserQuery = { __typename?: 'Query', currentUser: { __typename?: 'User', id: string, firstName: string, lastName: string, email: string, canImpersonate: boolean, supportUserHash?: string | null, workspaceMember: { __typename?: 'UserWorkspaceMember', id: string, colorScheme: string, avatarUrl?: string | null, locale: string, allowImpersonation: boolean, name: { __typename?: 'UserWorkspaceMemberName', firstName: string, lastName: string } }, defaultWorkspace: { __typename?: 'Workspace', id: string, displayName?: string | null, logo?: string | null, domainName?: string | null, inviteHash?: string | null } } }; export type DeleteCurrentWorkspaceMutationVariables = Exact<{ [key: string]: never; }>; export type DeleteCurrentWorkspaceMutation = { __typename?: 'Mutation', deleteCurrentWorkspace: { __typename?: 'Workspace', id: string } }; export type UpdateWorkspaceMutationVariables = Exact<{ input: UpdateWorkspaceInput; }>; export type UpdateWorkspaceMutation = { __typename?: 'Mutation', updateWorkspace: { __typename?: 'Workspace', id: string, domainName?: string | null, displayName?: string | null, logo?: string | null } }; export type UploadWorkspaceLogoMutationVariables = Exact<{ file: Scalars['Upload']; }>; export type UploadWorkspaceLogoMutation = { __typename?: 'Mutation', uploadWorkspaceLogo: string }; export type GetWorkspaceFromInviteHashQueryVariables = Exact<{ inviteHash: Scalars['String']; }>; export type GetWorkspaceFromInviteHashQuery = { __typename?: 'Query', findWorkspaceFromInviteHash: { __typename?: 'Workspace', id: string, displayName?: string | null, logo?: string | null } }; export const AuthTokenFragmentFragmentDoc = gql` fragment AuthTokenFragment on AuthToken { token expiresAt } `; export const AuthTokensFragmentFragmentDoc = gql` fragment AuthTokensFragment on AuthTokenPair { accessToken { ...AuthTokenFragment } refreshToken { ...AuthTokenFragment } } ${AuthTokenFragmentFragmentDoc}`; export const UserQueryFragmentFragmentDoc = gql` fragment UserQueryFragment on User { id firstName lastName email canImpersonate supportUserHash workspaceMember { id name { firstName lastName } colorScheme avatarUrl locale allowImpersonation } defaultWorkspace { id displayName logo domainName inviteHash } } `; export const CreateEventDocument = gql` mutation CreateEvent($type: String!, $data: JSON!) { createEvent(type: $type, data: $data) { success } } `; export type CreateEventMutationFn = Apollo.MutationFunction; /** * __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 [createEventMutation, { data, loading, error }] = useCreateEventMutation({ * variables: { * type: // value for 'type' * data: // value for 'data' * }, * }); */ export function useCreateEventMutation(baseOptions?: Apollo.MutationHookOptions) { const options = {...defaultOptions, ...baseOptions} return Apollo.useMutation(CreateEventDocument, options); } export type CreateEventMutationHookResult = ReturnType; export type CreateEventMutationResult = Apollo.MutationResult; export type CreateEventMutationOptions = Apollo.BaseMutationOptions; export const ChallengeDocument = gql` mutation Challenge($email: String!, $password: String!) { challenge(email: $email, password: $password) { loginToken { ...AuthTokenFragment } } } ${AuthTokenFragmentFragmentDoc}`; export type ChallengeMutationFn = Apollo.MutationFunction; /** * __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 * * @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({ * variables: { * email: // value for 'email' * password: // value for 'password' * }, * }); */ export function useChallengeMutation(baseOptions?: Apollo.MutationHookOptions) { const options = {...defaultOptions, ...baseOptions} return Apollo.useMutation(ChallengeDocument, options); } export type ChallengeMutationHookResult = ReturnType; export type ChallengeMutationResult = Apollo.MutationResult; export type ChallengeMutationOptions = Apollo.BaseMutationOptions; export const GenerateApiKeyTokenDocument = gql` mutation GenerateApiKeyToken($apiKeyId: String!, $expiresAt: String!) { generateApiKeyToken(apiKeyId: $apiKeyId, expiresAt: $expiresAt) { token } } `; export type GenerateApiKeyTokenMutationFn = Apollo.MutationFunction; /** * __useGenerateApiKeyTokenMutation__ * * To run a mutation, you first call `useGenerateApiKeyTokenMutation` within a React component and pass it any options that fit your needs. * When your component renders, `useGenerateApiKeyTokenMutation` 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 [generateApiKeyTokenMutation, { data, loading, error }] = useGenerateApiKeyTokenMutation({ * variables: { * apiKeyId: // value for 'apiKeyId' * expiresAt: // value for 'expiresAt' * }, * }); */ export function useGenerateApiKeyTokenMutation(baseOptions?: Apollo.MutationHookOptions) { const options = {...defaultOptions, ...baseOptions} return Apollo.useMutation(GenerateApiKeyTokenDocument, options); } export type GenerateApiKeyTokenMutationHookResult = ReturnType; export type GenerateApiKeyTokenMutationResult = Apollo.MutationResult; export type GenerateApiKeyTokenMutationOptions = Apollo.BaseMutationOptions; export const ImpersonateDocument = gql` mutation Impersonate($userId: String!) { impersonate(userId: $userId) { user { ...UserQueryFragment } tokens { ...AuthTokensFragment } } } ${UserQueryFragmentFragmentDoc} ${AuthTokensFragmentFragmentDoc}`; export type ImpersonateMutationFn = Apollo.MutationFunction; /** * __useImpersonateMutation__ * * 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 [impersonateMutation, { data, loading, error }] = useImpersonateMutation({ * variables: { * userId: // value for 'userId' * }, * }); */ export function useImpersonateMutation(baseOptions?: Apollo.MutationHookOptions) { const options = {...defaultOptions, ...baseOptions} return Apollo.useMutation(ImpersonateDocument, options); } export type ImpersonateMutationHookResult = ReturnType; export type ImpersonateMutationResult = Apollo.MutationResult; export type ImpersonateMutationOptions = Apollo.BaseMutationOptions; export const RenewTokenDocument = gql` mutation RenewToken($refreshToken: String!) { renewToken(refreshToken: $refreshToken) { tokens { ...AuthTokensFragment } } } ${AuthTokensFragmentFragmentDoc}`; export type RenewTokenMutationFn = Apollo.MutationFunction; /** * __useRenewTokenMutation__ * * To run a mutation, you first call `useRenewTokenMutation` within a React component and pass it any options that fit your needs. * When your component renders, `useRenewTokenMutation` 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 [renewTokenMutation, { data, loading, error }] = useRenewTokenMutation({ * variables: { * refreshToken: // value for 'refreshToken' * }, * }); */ export function useRenewTokenMutation(baseOptions?: Apollo.MutationHookOptions) { const options = {...defaultOptions, ...baseOptions} return Apollo.useMutation(RenewTokenDocument, options); } export type RenewTokenMutationHookResult = ReturnType; export type RenewTokenMutationResult = Apollo.MutationResult; export type RenewTokenMutationOptions = Apollo.BaseMutationOptions; export const SignUpDocument = gql` mutation SignUp($email: String!, $password: String!, $workspaceInviteHash: String) { signUp( email: $email password: $password workspaceInviteHash: $workspaceInviteHash ) { loginToken { ...AuthTokenFragment } } } ${AuthTokenFragmentFragmentDoc}`; export type SignUpMutationFn = Apollo.MutationFunction; /** * __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) { const options = {...defaultOptions, ...baseOptions} return Apollo.useMutation(SignUpDocument, options); } export type SignUpMutationHookResult = ReturnType; export type SignUpMutationResult = Apollo.MutationResult; export type SignUpMutationOptions = Apollo.BaseMutationOptions; export const VerifyDocument = gql` mutation Verify($loginToken: String!) { verify(loginToken: $loginToken) { user { ...UserQueryFragment } tokens { ...AuthTokensFragment } } } ${UserQueryFragmentFragmentDoc} ${AuthTokensFragmentFragmentDoc}`; export type VerifyMutationFn = Apollo.MutationFunction; /** * __useVerifyMutation__ * * 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 [verifyMutation, { data, loading, error }] = useVerifyMutation({ * variables: { * loginToken: // value for 'loginToken' * }, * }); */ export function useVerifyMutation(baseOptions?: Apollo.MutationHookOptions) { const options = {...defaultOptions, ...baseOptions} return Apollo.useMutation(VerifyDocument, options); } export type VerifyMutationHookResult = ReturnType; export type VerifyMutationResult = Apollo.MutationResult; export type VerifyMutationOptions = Apollo.BaseMutationOptions; 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) { const options = {...defaultOptions, ...baseOptions} return Apollo.useQuery(CheckUserExistsDocument, options); } export function useCheckUserExistsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { const options = {...defaultOptions, ...baseOptions} return Apollo.useLazyQuery(CheckUserExistsDocument, options); } export type CheckUserExistsQueryHookResult = ReturnType; export type CheckUserExistsLazyQueryHookResult = ReturnType; export type CheckUserExistsQueryResult = Apollo.QueryResult; export const GetClientConfigDocument = gql` query GetClientConfig { clientConfig { authProviders { google password } signInPrefilled debugMode telemetry { enabled anonymizationEnabled } support { supportDriver supportFrontChatId } } } `; /** * __useGetClientConfigQuery__ * * To run a query within a React component, call `useGetClientConfigQuery` and pass it any options that fit your needs. * When your component renders, `useGetClientConfigQuery` 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 } = useGetClientConfigQuery({ * variables: { * }, * }); */ export function useGetClientConfigQuery(baseOptions?: Apollo.QueryHookOptions) { const options = {...defaultOptions, ...baseOptions} return Apollo.useQuery(GetClientConfigDocument, options); } export function useGetClientConfigLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { const options = {...defaultOptions, ...baseOptions} return Apollo.useLazyQuery(GetClientConfigDocument, options); } export type GetClientConfigQueryHookResult = ReturnType; export type GetClientConfigLazyQueryHookResult = ReturnType; export type GetClientConfigQueryResult = Apollo.QueryResult; export const DeleteUserAccountDocument = gql` mutation DeleteUserAccount { deleteUser { id } } `; export type DeleteUserAccountMutationFn = Apollo.MutationFunction; /** * __useDeleteUserAccountMutation__ * * 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 mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; * * @example * const [deleteUserAccountMutation, { data, loading, error }] = useDeleteUserAccountMutation({ * variables: { * }, * }); */ export function useDeleteUserAccountMutation(baseOptions?: Apollo.MutationHookOptions) { const options = {...defaultOptions, ...baseOptions} return Apollo.useMutation(DeleteUserAccountDocument, options); } export type DeleteUserAccountMutationHookResult = ReturnType; export type DeleteUserAccountMutationResult = Apollo.MutationResult; export type DeleteUserAccountMutationOptions = Apollo.BaseMutationOptions; export const UploadProfilePictureDocument = gql` mutation UploadProfilePicture($file: Upload!) { uploadProfilePicture(file: $file) } `; export type UploadProfilePictureMutationFn = Apollo.MutationFunction; /** * __useUploadProfilePictureMutation__ * * To run a mutation, you first call `useUploadProfilePictureMutation` within a React component and pass it any options that fit your needs. * When your component renders, `useUploadProfilePictureMutation` 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 [uploadProfilePictureMutation, { data, loading, error }] = useUploadProfilePictureMutation({ * variables: { * file: // value for 'file' * }, * }); */ export function useUploadProfilePictureMutation(baseOptions?: Apollo.MutationHookOptions) { const options = {...defaultOptions, ...baseOptions} return Apollo.useMutation(UploadProfilePictureDocument, options); } export type UploadProfilePictureMutationHookResult = ReturnType; export type UploadProfilePictureMutationResult = Apollo.MutationResult; export type UploadProfilePictureMutationOptions = Apollo.BaseMutationOptions; export const GetCurrentUserDocument = gql` query GetCurrentUser { currentUser { id firstName lastName email canImpersonate supportUserHash workspaceMember { id name { firstName lastName } colorScheme avatarUrl locale allowImpersonation } defaultWorkspace { id displayName logo domainName inviteHash } } } `; /** * __useGetCurrentUserQuery__ * * 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 query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; * * @example * const { data, loading, error } = useGetCurrentUserQuery({ * variables: { * }, * }); */ export function useGetCurrentUserQuery(baseOptions?: Apollo.QueryHookOptions) { const options = {...defaultOptions, ...baseOptions} return Apollo.useQuery(GetCurrentUserDocument, options); } export function useGetCurrentUserLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { const options = {...defaultOptions, ...baseOptions} return Apollo.useLazyQuery(GetCurrentUserDocument, options); } export type GetCurrentUserQueryHookResult = ReturnType; export type GetCurrentUserLazyQueryHookResult = ReturnType; export type GetCurrentUserQueryResult = Apollo.QueryResult; export const DeleteCurrentWorkspaceDocument = gql` mutation DeleteCurrentWorkspace { deleteCurrentWorkspace { id } } `; export type DeleteCurrentWorkspaceMutationFn = Apollo.MutationFunction; /** * __useDeleteCurrentWorkspaceMutation__ * * 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 [deleteCurrentWorkspaceMutation, { data, loading, error }] = useDeleteCurrentWorkspaceMutation({ * variables: { * }, * }); */ export function useDeleteCurrentWorkspaceMutation(baseOptions?: Apollo.MutationHookOptions) { const options = {...defaultOptions, ...baseOptions} return Apollo.useMutation(DeleteCurrentWorkspaceDocument, options); } export type DeleteCurrentWorkspaceMutationHookResult = ReturnType; export type DeleteCurrentWorkspaceMutationResult = Apollo.MutationResult; export type DeleteCurrentWorkspaceMutationOptions = Apollo.BaseMutationOptions; export const UpdateWorkspaceDocument = gql` mutation UpdateWorkspace($input: UpdateWorkspaceInput!) { updateWorkspace(data: $input) { id domainName displayName logo } } `; export type UpdateWorkspaceMutationFn = Apollo.MutationFunction; /** * __useUpdateWorkspaceMutation__ * * To run a mutation, you first call `useUpdateWorkspaceMutation` within a React component and pass it any options that fit your needs. * When your component renders, `useUpdateWorkspaceMutation` 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 [updateWorkspaceMutation, { data, loading, error }] = useUpdateWorkspaceMutation({ * variables: { * input: // value for 'input' * }, * }); */ export function useUpdateWorkspaceMutation(baseOptions?: Apollo.MutationHookOptions) { const options = {...defaultOptions, ...baseOptions} return Apollo.useMutation(UpdateWorkspaceDocument, options); } export type UpdateWorkspaceMutationHookResult = ReturnType; export type UpdateWorkspaceMutationResult = Apollo.MutationResult; export type UpdateWorkspaceMutationOptions = Apollo.BaseMutationOptions; export const UploadWorkspaceLogoDocument = gql` mutation UploadWorkspaceLogo($file: Upload!) { uploadWorkspaceLogo(file: $file) } `; export type UploadWorkspaceLogoMutationFn = Apollo.MutationFunction; /** * __useUploadWorkspaceLogoMutation__ * * To run a mutation, you first call `useUploadWorkspaceLogoMutation` within a React component and pass it any options that fit your needs. * When your component renders, `useUploadWorkspaceLogoMutation` 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 [uploadWorkspaceLogoMutation, { data, loading, error }] = useUploadWorkspaceLogoMutation({ * variables: { * file: // value for 'file' * }, * }); */ export function useUploadWorkspaceLogoMutation(baseOptions?: Apollo.MutationHookOptions) { const options = {...defaultOptions, ...baseOptions} return Apollo.useMutation(UploadWorkspaceLogoDocument, options); } export type UploadWorkspaceLogoMutationHookResult = ReturnType; export type UploadWorkspaceLogoMutationResult = Apollo.MutationResult; export type UploadWorkspaceLogoMutationOptions = Apollo.BaseMutationOptions; export const GetWorkspaceFromInviteHashDocument = gql` query GetWorkspaceFromInviteHash($inviteHash: String!) { findWorkspaceFromInviteHash(inviteHash: $inviteHash) { id displayName logo } } `; /** * __useGetWorkspaceFromInviteHashQuery__ * * 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 query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; * * @example * const { data, loading, error } = useGetWorkspaceFromInviteHashQuery({ * variables: { * inviteHash: // value for 'inviteHash' * }, * }); */ export function useGetWorkspaceFromInviteHashQuery(baseOptions: Apollo.QueryHookOptions) { const options = {...defaultOptions, ...baseOptions} return Apollo.useQuery(GetWorkspaceFromInviteHashDocument, options); } export function useGetWorkspaceFromInviteHashLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { const options = {...defaultOptions, ...baseOptions} return Apollo.useLazyQuery(GetWorkspaceFromInviteHashDocument, options); } export type GetWorkspaceFromInviteHashQueryHookResult = ReturnType; export type GetWorkspaceFromInviteHashLazyQueryHookResult = ReturnType; export type GetWorkspaceFromInviteHashQueryResult = Apollo.QueryResult;