From 5c5dcf5cb5a8f28eb7df7ac417fc622a3c891f23 Mon Sep 17 00:00:00 2001 From: Aditya Pimpalkar Date: Tue, 26 Mar 2024 13:37:36 +0000 Subject: [PATCH] feat: check if company/person saved (chrome-extension) (#4280) * add twenty icon * rest api calls for company * check if company exists * refacto * person/company saved call * gql codegen init * type defs * build fix * DB calls with gql codegen and apollo integration --- .../twenty-chrome-extension/.eslintrc.cjs | 2 +- packages/twenty-chrome-extension/codegen.ts | 24 + packages/twenty-chrome-extension/package.json | 1 + .../src/contentScript/createButton.ts | 64 +- .../contentScript/extractCompanyProfile.ts | 189 +- .../src/contentScript/extractPersonProfile.ts | 204 +- .../src/contentScript/index.ts | 10 +- .../src/db/company.db.ts | 38 + .../src/db/person.db.ts | 36 + .../src/db/types/company.types.ts | 10 + .../src/db/types/person.types.ts | 8 + .../src/generated/graphql.tsx | 5631 +++++++++++++++++ .../src/graphql/company/mutations.ts | 9 + .../src/graphql/company/queries.ts | 17 + .../src/graphql/person/mutations.ts | 9 + .../src/graphql/person/queries.ts | 20 + .../src/utils/apolloClient.ts | 18 + .../src/utils/requestDb.ts | 53 +- .../twenty-chrome-extension/tsconfig.json | 4 +- .../twenty-chrome-extension/vite.config.ts | 1 + 20 files changed, 6107 insertions(+), 241 deletions(-) create mode 100644 packages/twenty-chrome-extension/codegen.ts create mode 100644 packages/twenty-chrome-extension/src/db/company.db.ts create mode 100644 packages/twenty-chrome-extension/src/db/person.db.ts create mode 100644 packages/twenty-chrome-extension/src/db/types/company.types.ts create mode 100644 packages/twenty-chrome-extension/src/db/types/person.types.ts create mode 100644 packages/twenty-chrome-extension/src/generated/graphql.tsx create mode 100644 packages/twenty-chrome-extension/src/graphql/company/mutations.ts create mode 100644 packages/twenty-chrome-extension/src/graphql/company/queries.ts create mode 100644 packages/twenty-chrome-extension/src/graphql/person/mutations.ts create mode 100644 packages/twenty-chrome-extension/src/graphql/person/queries.ts create mode 100644 packages/twenty-chrome-extension/src/utils/apolloClient.ts diff --git a/packages/twenty-chrome-extension/.eslintrc.cjs b/packages/twenty-chrome-extension/.eslintrc.cjs index fc82c221ab..afc60a95a6 100644 --- a/packages/twenty-chrome-extension/.eslintrc.cjs +++ b/packages/twenty-chrome-extension/.eslintrc.cjs @@ -10,7 +10,7 @@ module.exports = { '../../.eslintrc.js', ], plugins: ['react-hooks', 'react-refresh'], - ignorePatterns: ['!**/*', 'node_modules', 'dist'], + ignorePatterns: ['!**/*', 'node_modules', 'dist', 'src/generated/*.tsx'], rules: { '@nx/workspace-effect-components': 'error', '@nx/workspace-no-hardcoded-colors': 'error', diff --git a/packages/twenty-chrome-extension/codegen.ts b/packages/twenty-chrome-extension/codegen.ts new file mode 100644 index 0000000000..30ed008a0d --- /dev/null +++ b/packages/twenty-chrome-extension/codegen.ts @@ -0,0 +1,24 @@ +import { CodegenConfig } from '@graphql-codegen/cli'; + +const config: CodegenConfig = { + schema: ['http://localhost:3000/graphql'], + overwrite: true, + documents: ['./src/**/*.ts', '!src/generated/**/*.*'], + generates: { + './src/generated/graphql.tsx': { + plugins: [ + 'typescript', + 'typescript-operations', + 'typescript-react-apollo', + ], + config: { + skipTypename: true, + withHooks: true, + withHOC: false, + withComponent: false, + }, + }, + }, +}; + +export default config; diff --git a/packages/twenty-chrome-extension/package.json b/packages/twenty-chrome-extension/package.json index c5f359cab0..237c74a514 100644 --- a/packages/twenty-chrome-extension/package.json +++ b/packages/twenty-chrome-extension/package.json @@ -10,6 +10,7 @@ "start": "yarn clean && vite", "build": "yarn clean && tsc && vite build", "lint": "eslint . --report-unused-disable-directives --max-warnings 0 --config .eslintrc.cjs", + "graphql:generate": "graphql-codegen", "fmt": "prettier --check \"src/**/*.ts\" \"src/**/*.tsx\"", "fmt:fix": "prettier --cache --write \"src/**/*.ts\" \"src/**/*.tsx\"" }, diff --git a/packages/twenty-chrome-extension/src/contentScript/createButton.ts b/packages/twenty-chrome-extension/src/contentScript/createButton.ts index 990d4e4e80..1fa9e9a3f1 100644 --- a/packages/twenty-chrome-extension/src/contentScript/createButton.ts +++ b/packages/twenty-chrome-extension/src/contentScript/createButton.ts @@ -1,42 +1,55 @@ -/* eslint-disable @nx/workspace-no-hardcoded-colors */ const createNewButton = ( text: string, onClickHandler: () => void, -): HTMLButtonElement => { - const newButton: HTMLButtonElement = document.createElement('button'); - newButton.textContent = text; +): HTMLDivElement => { + const div = document.createElement('div'); + const img = document.createElement('img'); + const span = document.createElement('span'); + + span.textContent = text; + img.src = + 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAA7EAAAOxAGVKw4bAAACb0lEQVR4nO2VO4taQRTHr3AblbjxEVlwCwVhg7BoqqCIjy/gAyyFWNlYBOxsfH0KuxgQGwXRUkGuL2S7i1barGAgiwbdW93SnGOc4BonPiKahf3DwXFmuP/fPM4ZlvmlTxAhCBdzHnEQWYiv7Mr4C3NeuVYhQYDPzOUUQgDLBQGcLHNhvQK8DACPx8PTxiqVyvISG43GbyaT6Qfpn06n0m63e/tPAPF4vJ1MJu8kEsnWTCkWi1yr1RKGw+GDRqPBOTfr44vFQvD7/Q/lcpmaaVQAr9fLp1IpO22c47hGOBz+MB6PH+Vy+VYDAL8qlUoGtVotzOfzq4MAgsHgE/6KojiQyWR/bKVSqbSszHFM8Pl8z1YK48JsNltCOBwOnrYLO+8AAIjb+nHbycoTiUQfDJ7tFq4YAHiVSmXBxcD41u8flQU8z7fhzO0r83atVns3Go3u9Xr9x0O/RQXo9/tsIBBg6vX606a52Wz+bZ7P5/WwG29gxSJzhKgA6XTaDoFNF+krFAocmC//4yWEcSf2wTm7mCO19xFgSsKOLI16vV7b7XY7mRNoLwA0JymJ5uQIzgIAuX5PzDElT2m+E8BqtQ4ymcx7Yq7T6a6ZE4sKgOadTucaCwkxp1UzlEKh0GDxIXOwDWHAdi6Xe3swQDQa/Q7mywoolUpvsaptymazDWKxmBHTlWXZm405BFZoNpuGgwEmk4mE2SGtVivii4f1AO7J3ZopkQCQj7Ar1FeRChCJRJzVapX6DKNIfSc1Ax+wtQWQ55h6bH8FWDfYV4fO3wlwDr0C/BcADYiTPCxHqIEA2QsCZAkAKnRGkMbKN/sTX5YHPQ1e7SkAAAAASUVORK5CYII='; + img.height = 16; + img.width = 16; + img.alt = 'Twenty logo'; // Write universal styles for the button - const buttonStyles = { + const divStyles = { border: '1px solid black', borderRadius: '20px', backgroundColor: 'black', color: 'white', - fontSize: '1.5rem', fontWeight: '600', - padding: '0.45em 1em', - width: '15rem', + fontSize: '1.5rem', + display: 'flex', + alignItems: 'center', + gap: '5px', + justifyContent: 'center', + padding: '0 1rem', + cursor: 'pointer', height: '32px', }; - // Apply common styles to the button. - Object.assign(newButton.style, buttonStyles); + Object.assign(div.style, divStyles); - // Apply common styles to specifc states of a button. - newButton.addEventListener('mouseenter', () => { - const hoverStyles = { - backgroundColor: '#5e5e5e', - borderColor: '#5e5e5e', - }; - Object.assign(newButton.style, hoverStyles); - }); + // // Apply common styles to the button. + // Object.assign(buttonDiv.style, buttonDivStyles); - newButton.addEventListener('mouseleave', () => { - Object.assign(newButton.style, buttonStyles); - }); + // // Apply common styles to specifc states of a button. + // newButton.addEventListener('mouseenter', () => { + // const hoverStyles = { + // backgroundColor: '#5e5e5e', + // borderColor: '#5e5e5e', + // }; + // Object.assign(newButton.style, hoverStyles); + // }); + + // newButton.addEventListener('mouseleave', () => { + // Object.assign(newButton.style, buttonStyles); + // }); // Handle the click event. - newButton.addEventListener('click', async () => { + div.addEventListener('click', async () => { const { apiKey } = await chrome.storage.local.get('apiKey'); // If an api key is not set, the options page opens up to allow the user to configure an api key. @@ -46,13 +59,16 @@ const createNewButton = ( } // Update content during the resolution of the request. - newButton.textContent = 'Saving...'; + span.textContent = 'Saving...'; // Call the provided onClickHandler function to handle button click logic onClickHandler(); }); - return newButton; + div.appendChild(img); + div.appendChild(span); + + return div; }; export default createNewButton; diff --git a/packages/twenty-chrome-extension/src/contentScript/extractCompanyProfile.ts b/packages/twenty-chrome-extension/src/contentScript/extractCompanyProfile.ts index e2c972efa1..5096438a05 100644 --- a/packages/twenty-chrome-extension/src/contentScript/extractCompanyProfile.ts +++ b/packages/twenty-chrome-extension/src/contentScript/extractCompanyProfile.ts @@ -1,10 +1,10 @@ import createNewButton from '~/contentScript/createButton'; import extractCompanyLinkedinLink from '~/contentScript/utils/extractCompanyLinkedinLink'; import extractDomain from '~/contentScript/utils/extractDomain'; -import handleQueryParams from '~/utils/handleQueryParams'; -import requestDb from '~/utils/requestDb'; +import { createCompany, fetchCompany } from '~/db/company.db'; +import { CompanyInput } from '~/db/types/company.types'; -const insertButtonForCompany = (): void => { +const insertButtonForCompany = async (): Promise => { // Select the element in which to create the button. const parentDiv: HTMLDivElement | null = document.querySelector( '.org-top-card-primary-actions__inner', @@ -12,94 +12,111 @@ const insertButtonForCompany = (): void => { // Create the button with desired callback funciton to execute upon click. if (parentDiv) { - const newButtonCompany: HTMLButtonElement = createNewButton( - 'Add to Twenty', - async () => { - // Extract company-specific data from the DOM - const companyNameElement = document.querySelector( - '.org-top-card-summary__title', - ); - const domainNameElement = document.querySelector( - '.org-top-card-primary-actions__inner a', - ); - const addressElement = document.querySelectorAll( - '.org-top-card-summary-info-list__info-item', - )[1]; - const employeesNumberElement = document.querySelectorAll( - '.org-top-card-summary-info-list__info-item', - )[3]; - - // Get the text content or other necessary data from the DOM elements - const companyName = companyNameElement - ? companyNameElement.getAttribute('title') - : ''; - const domainName = extractDomain( - domainNameElement && domainNameElement.getAttribute('href'), - ); - const address = addressElement - ? addressElement.textContent?.trim().replace(/\s+/g, ' ') - : ''; - const employees = employeesNumberElement - ? Number( - employeesNumberElement.textContent - ?.trim() - .replace(/\s+/g, ' ') - .split('-')[0], - ) - : 0; - - // Prepare company data to send to the backend - const companyData = { - name: companyName, - domainName: domainName, - address: address, - employees: employees, - linkedinLink: { url: '', label: '' }, - }; - - // Extract active tab url using chrome API - an event is triggered here and is caught by background script. - const { url: activeTabUrl } = await chrome.runtime.sendMessage({ - action: 'getActiveTabUrl', - }); - - // Convert URLs like https://www.linkedin.com/company/twenty/about/ to https://www.linkedin.com/company/twenty - const companyURL = extractCompanyLinkedinLink(activeTabUrl); - companyData.linkedinLink = { url: companyURL, label: companyURL }; - - const query = `mutation CreateOneCompany { createCompany(data:{${handleQueryParams( - companyData, - )}}) {id} }`; - - const response = await requestDb(query); - - if (response.data) { - newButtonCompany.textContent = 'Saved'; - newButtonCompany.setAttribute('disabled', 'true'); - - // Button specific styles once the button is unclickable after successfully sending data to server. - newButtonCompany.addEventListener('mouseenter', () => { - const hoverStyles = { - backgroundColor: 'black', - borderColor: 'black', - cursor: 'default', - }; - Object.assign(newButtonCompany.style, hoverStyles); - }); - } else { - newButtonCompany.textContent = 'Try Again'; - } - }, + // Extract company-specific data from the DOM + const companyNameElement = document.querySelector( + '.org-top-card-summary__title', ); + const domainNameElement = document.querySelector( + '.org-top-card-primary-actions__inner a', + ); + const addressElement = document.querySelectorAll( + '.org-top-card-summary-info-list__info-item', + )[1]; + const employeesNumberElement = document.querySelectorAll( + '.org-top-card-summary-info-list__info-item', + )[3]; - // Include the button in the DOM. - parentDiv.prepend(newButtonCompany); + // Get the text content or other necessary data from the DOM elements + const companyName = companyNameElement + ? companyNameElement.getAttribute('title') + : ''; + const domainName = extractDomain( + domainNameElement && domainNameElement.getAttribute('href'), + ); + const address = addressElement + ? addressElement.textContent?.trim().replace(/\s+/g, ' ') + : ''; + const employees = employeesNumberElement + ? Number( + employeesNumberElement.textContent + ?.trim() + .replace(/\s+/g, ' ') + .split('-')[0], + ) + : 0; - // Write button specific styles here - common ones can be found in createButton.ts. - const buttonSpecificStyles = { - alignSelf: 'end', + // Prepare company data to send to the backend + const companyInputData: CompanyInput = { + name: companyName ?? '', + domainName: domainName, + address: address ?? '', + employees: employees, }; - Object.assign(newButtonCompany.style, buttonSpecificStyles); + // Extract active tab url using chrome API - an event is triggered here and is caught by background script. + const { url: activeTabUrl } = await chrome.runtime.sendMessage({ + action: 'getActiveTabUrl', + }); + + // Convert URLs like https://www.linkedin.com/company/twenty/about/ to https://www.linkedin.com/company/twenty + const companyURL = extractCompanyLinkedinLink(activeTabUrl); + companyInputData.linkedinLink = { url: companyURL, label: companyURL }; + + const company = await fetchCompany({ + linkedinLink: { + url: { eq: companyURL }, + label: { eq: companyURL }, + }, + }); + if (company) { + const savedCompany: HTMLDivElement = createNewButton( + 'Saved', + async () => {}, + ); + // Include the button in the DOM. + parentDiv.prepend(savedCompany); + + // Write button specific styles here - common ones can be found in createButton.ts. + const buttonSpecificStyles = { + alignSelf: 'end', + }; + + Object.assign(savedCompany.style, buttonSpecificStyles); + } else { + const newButtonCompany: HTMLDivElement = createNewButton( + 'Add to Twenty', + async () => { + const response = await createCompany(companyInputData); + + if (response) { + newButtonCompany.textContent = 'Saved'; + newButtonCompany.setAttribute('disabled', 'true'); + + // Button specific styles once the button is unclickable after successfully sending data to server. + newButtonCompany.addEventListener('mouseenter', () => { + const hoverStyles = { + backgroundColor: 'black', + borderColor: 'black', + cursor: 'default', + }; + Object.assign(newButtonCompany.style, hoverStyles); + }); + } else { + newButtonCompany.textContent = 'Try Again'; + } + }, + ); + + // Include the button in the DOM. + parentDiv.prepend(newButtonCompany); + + // Write button specific styles here - common ones can be found in createButton.ts. + const buttonSpecificStyles = { + alignSelf: 'end', + }; + + Object.assign(newButtonCompany.style, buttonSpecificStyles); + } } }; diff --git a/packages/twenty-chrome-extension/src/contentScript/extractPersonProfile.ts b/packages/twenty-chrome-extension/src/contentScript/extractPersonProfile.ts index 4ddc1d06f3..2d5076dfa3 100644 --- a/packages/twenty-chrome-extension/src/contentScript/extractPersonProfile.ts +++ b/packages/twenty-chrome-extension/src/contentScript/extractPersonProfile.ts @@ -1,9 +1,9 @@ import createNewButton from '~/contentScript/createButton'; import extractFirstAndLastName from '~/contentScript/utils/extractFirstAndLastName'; -import handleQueryParams from '~/utils/handleQueryParams'; -import requestDb from '~/utils/requestDb'; +import { createPerson, fetchPerson } from '~/db/person.db'; +import { PersonInput } from '~/db/types/person.types'; -const insertButtonForPerson = (): void => { +const insertButtonForPerson = async (): Promise => { // Select the element in which to create the button. const parentDiv: HTMLDivElement | null = document.querySelector( '.pv-top-card-v2-ctas', @@ -11,108 +11,116 @@ const insertButtonForPerson = (): void => { // Create the button with desired callback funciton to execute upon click. if (parentDiv) { - const newButtonPerson: HTMLButtonElement = createNewButton( - 'Add to Twenty', - async () => { - // Extract person-specific data from the DOM. - const personNameElement = document.querySelector( - '.text-heading-xlarge', - ); + // Extract person-specific data from the DOM. + const personNameElement = document.querySelector('.text-heading-xlarge'); - const separatorElement = document.querySelector( - '.pv-text-details__separator', - ); - const personCityElement = separatorElement?.previousElementSibling; + const separatorElement = document.querySelector( + '.pv-text-details__separator', + ); + const personCityElement = separatorElement?.previousElementSibling; - const profilePictureElement = document.querySelector( - '.pv-top-card-profile-picture__image', - ); - - const firstListItem = document.querySelector( - 'div[data-view-name="profile-component-entity"]', - ); - const secondDivElement = - firstListItem?.querySelector('div:nth-child(2)'); - const ariaHiddenSpan = secondDivElement?.querySelector( - 'span[aria-hidden="true"]', - ); - - // Get the text content or other necessary data from the DOM elements. - const personName = personNameElement - ? personNameElement.textContent - : ''; - const personCity = personCityElement - ? personCityElement.textContent - ?.trim() - .replace(/\s+/g, ' ') - .split(',')[0] - : ''; - const profilePicture = profilePictureElement - ? profilePictureElement?.getAttribute('src') - : ''; - const jobTitle = ariaHiddenSpan - ? ariaHiddenSpan.textContent?.trim() - : ''; - - const { firstName, lastName } = extractFirstAndLastName( - String(personName), - ); - - // Prepare person data to send to the backend. - const personData = { - name: { firstName, lastName }, - city: personCity, - avatarUrl: profilePicture, - jobTitle, - linkedinLink: { url: '', label: '' }, - }; - - // Extract active tab url using chrome API - an event is triggered here and is caught by background script. - let { url: activeTabUrl } = await chrome.runtime.sendMessage({ - action: 'getActiveTabUrl', - }); - - // Remove last slash from the URL for consistency when saving usernames. - if (activeTabUrl.endsWith('/')) { - activeTabUrl = activeTabUrl.slice(0, -1); - } - - personData.linkedinLink = { url: activeTabUrl, label: activeTabUrl }; - - const query = `mutation CreateOnePerson { createPerson(data:{${handleQueryParams( - personData, - )}}) {id} }`; - - const response = await requestDb(query); - - if (response.data) { - newButtonPerson.textContent = 'Saved'; - newButtonPerson.setAttribute('disabled', 'true'); - - // Button specific styles once the button is unclickable after successfully sending data to server. - newButtonPerson.addEventListener('mouseenter', () => { - const hoverStyles = { - backgroundColor: 'black', - borderColor: 'black', - cursor: 'default', - }; - Object.assign(newButtonPerson.style, hoverStyles); - }); - } else { - newButtonPerson.textContent = 'Try Again'; - } - }, + const profilePictureElement = document.querySelector( + '.pv-top-card-profile-picture__image', ); - // Include the button in the DOM. - parentDiv.prepend(newButtonPerson); + const firstListItem = document.querySelector( + 'div[data-view-name="profile-component-entity"]', + ); + const secondDivElement = firstListItem?.querySelector('div:nth-child(2)'); + const ariaHiddenSpan = secondDivElement?.querySelector( + 'span[aria-hidden="true"]', + ); - // Write button specific styles here - common ones can be found in createButton.ts. - const buttonSpecificStyles = { - marginRight: '0.5em', + // Get the text content or other necessary data from the DOM elements. + const personName = personNameElement ? personNameElement.textContent : ''; + const personCity = personCityElement + ? personCityElement.textContent?.trim().replace(/\s+/g, ' ').split(',')[0] + : ''; + const profilePicture = profilePictureElement + ? profilePictureElement?.getAttribute('src') + : ''; + const jobTitle = ariaHiddenSpan ? ariaHiddenSpan.textContent?.trim() : ''; + + const { firstName, lastName } = extractFirstAndLastName(String(personName)); + + // Prepare person data to send to the backend. + const personData: PersonInput = { + name: { firstName, lastName }, + city: personCity ?? '', + avatarUrl: profilePicture ?? '', + jobTitle: jobTitle ?? '', + linkedinLink: { url: '', label: '' }, }; - Object.assign(newButtonPerson.style, buttonSpecificStyles); + // Extract active tab url using chrome API - an event is triggered here and is caught by background script. + let { url: activeTabUrl } = await chrome.runtime.sendMessage({ + action: 'getActiveTabUrl', + }); + + // Remove last slash from the URL for consistency when saving usernames. + if (activeTabUrl.endsWith('/')) { + activeTabUrl = activeTabUrl.slice(0, -1); + } + + personData.linkedinLink = { url: activeTabUrl, label: activeTabUrl }; + + const person = await fetchPerson({ + name: { + firstName: { eq: firstName }, + lastName: { eq: lastName }, + }, + linkedinLink: { url: { eq: activeTabUrl }, label: { eq: activeTabUrl } }, + }); + + if (person) { + const savedPerson: HTMLDivElement = createNewButton( + 'Saved', + async () => {}, + ); + + // Include the button in the DOM. + parentDiv.prepend(savedPerson); + + // Write button specific styles here - common ones can be found in createButton.ts. + const buttonSpecificStyles = { + marginRight: '0.5em', + }; + + Object.assign(savedPerson.style, buttonSpecificStyles); + } else { + const newButtonPerson: HTMLDivElement = createNewButton( + 'Add to Twenty', + async () => { + const response = await createPerson(personData); + if (response) { + newButtonPerson.textContent = 'Saved'; + newButtonPerson.setAttribute('disabled', 'true'); + + // Button specific styles once the button is unclickable after successfully sending data to server. + newButtonPerson.addEventListener('mouseenter', () => { + const hoverStyles = { + backgroundColor: 'black', + borderColor: 'black', + cursor: 'default', + }; + Object.assign(newButtonPerson.style, hoverStyles); + }); + } else { + newButtonPerson.textContent = 'Try Again'; + } + }, + ); + + // Include the button in the DOM. + parentDiv.prepend(newButtonPerson); + + // Write button specific styles here - common ones can be found in createButton.ts. + const buttonSpecificStyles = { + marginRight: '0.5em', + }; + + Object.assign(newButtonPerson.style, buttonSpecificStyles); + } } }; diff --git a/packages/twenty-chrome-extension/src/contentScript/index.ts b/packages/twenty-chrome-extension/src/contentScript/index.ts index 0e81cc94cb..2cf8d378e8 100644 --- a/packages/twenty-chrome-extension/src/contentScript/index.ts +++ b/packages/twenty-chrome-extension/src/contentScript/index.ts @@ -3,17 +3,17 @@ import insertButtonForPerson from '~/contentScript/extractPersonProfile'; // Inject buttons into the DOM when SPA is reloaded on the resource url. // e.g. reload the page when on https://www.linkedin.com/in/mabdullahabaid/ -insertButtonForCompany(); -insertButtonForPerson(); +await insertButtonForCompany(); +await insertButtonForPerson(); // The content script gets executed upon load, so the the content script is executed when a user visits https://www.linkedin.com/feed/. // However, there would never be another reload in a single page application unless triggered manually. // Therefore, if the user navigates to a person or a company page, we must manually re-execute the content script to create the "Add to Twenty" button. // e.g. create "Add to Twenty" button when a user navigates to https://www.linkedin.com/in/mabdullahabaid/ from https://www.linkedin.com/feed/ -chrome.runtime.onMessage.addListener((message, _, sendResponse) => { +chrome.runtime.onMessage.addListener(async (message, _, sendResponse) => { if (message.action === 'executeContentScript') { - insertButtonForCompany(); - insertButtonForPerson(); + await insertButtonForCompany(); + await insertButtonForPerson(); } if (message.action === 'TOGGLE') { diff --git a/packages/twenty-chrome-extension/src/db/company.db.ts b/packages/twenty-chrome-extension/src/db/company.db.ts new file mode 100644 index 0000000000..f0936e1b4e --- /dev/null +++ b/packages/twenty-chrome-extension/src/db/company.db.ts @@ -0,0 +1,38 @@ +import { + CompanyInput, + CreateCompanyResponse, + FindCompanyResponse, +} from '~/db/types/company.types'; +import { Company, CompanyFilterInput } from '~/generated/graphql'; +import { CREATE_COMPANY } from '~/graphql/company/mutations'; +import { FIND_COMPANY } from '~/graphql/company/queries'; + +import { callMutation, callQuery } from '../utils/requestDb'; + +export const fetchCompany = async ( + companyfilerInput: CompanyFilterInput, +): Promise => { + const data = await callQuery(FIND_COMPANY, { + filter: { + ...companyfilerInput, + }, + }); + if (data?.companies.edges) { + return data?.companies.edges.length > 0 + ? data?.companies.edges[0].node + : null; + } + return null; +}; + +export const createCompany = async ( + company: CompanyInput, +): Promise => { + const data = await callMutation(CREATE_COMPANY, { + input: company, + }); + if (data) { + return data.createCompany.id; + } + return null; +}; diff --git a/packages/twenty-chrome-extension/src/db/person.db.ts b/packages/twenty-chrome-extension/src/db/person.db.ts new file mode 100644 index 0000000000..29c782b387 --- /dev/null +++ b/packages/twenty-chrome-extension/src/db/person.db.ts @@ -0,0 +1,36 @@ +import { + CreatePersonResponse, + FindPersonResponse, + PersonInput, +} from '~/db/types/person.types'; +import { Person, PersonFilterInput } from '~/generated/graphql'; +import { CREATE_PERSON } from '~/graphql/person/mutations'; +import { FIND_PERSON } from '~/graphql/person/queries'; + +import { callMutation, callQuery } from '../utils/requestDb'; + +export const fetchPerson = async ( + personFilterData: PersonFilterInput, +): Promise => { + const data = await callQuery(FIND_PERSON, { + filter: { + ...personFilterData, + }, + }); + if (data?.people.edges) { + return data?.people.edges.length > 0 ? data?.people.edges[0].node : null; + } + return null; +}; + +export const createPerson = async ( + person: PersonInput, +): Promise => { + const data = await callMutation(CREATE_PERSON, { + input: person, + }); + if (data?.createPerson) { + return data.createPerson.id; + } + return null; +}; diff --git a/packages/twenty-chrome-extension/src/db/types/company.types.ts b/packages/twenty-chrome-extension/src/db/types/company.types.ts new file mode 100644 index 0000000000..f6c1241652 --- /dev/null +++ b/packages/twenty-chrome-extension/src/db/types/company.types.ts @@ -0,0 +1,10 @@ +import { Company, CompanyConnection } from '~/generated/graphql'; + +export type CompanyInput = Pick< + Company, + 'name' | 'domainName' | 'address' | 'employees' | 'linkedinLink' +>; +export type FindCompanyResponse = { + companies: Pick; +}; +export type CreateCompanyResponse = { createCompany: { id: string } }; diff --git a/packages/twenty-chrome-extension/src/db/types/person.types.ts b/packages/twenty-chrome-extension/src/db/types/person.types.ts new file mode 100644 index 0000000000..914240eb14 --- /dev/null +++ b/packages/twenty-chrome-extension/src/db/types/person.types.ts @@ -0,0 +1,8 @@ +import { Person, PersonConnection } from '~/generated/graphql'; + +export type PersonInput = Pick< + Person, + 'name' | 'city' | 'avatarUrl' | 'jobTitle' | 'linkedinLink' +>; +export type FindPersonResponse = { people: Pick }; +export type CreatePersonResponse = { createPerson: { id: string } }; diff --git a/packages/twenty-chrome-extension/src/generated/graphql.tsx b/packages/twenty-chrome-extension/src/generated/graphql.tsx new file mode 100644 index 0000000000..95d45a4c2d --- /dev/null +++ b/packages/twenty-chrome-extension/src/generated/graphql.tsx @@ -0,0 +1,5631 @@ +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; + BigFloat: any; + ConnectionCursor: any; + Cursor: any; + Date: any; + DateTime: any; + JSON: any; + UUID: any; + Upload: any; +}; + +export type ActivateWorkspaceInput = { + displayName?: InputMaybe; +}; + +/** An activity */ +export type Activity = { + /** Activity targets */ + activityTargets?: Maybe; + /** Acitivity assignee */ + assignee?: Maybe; + /** Acitivity assignee id foreign key */ + assigneeId?: Maybe; + /** Activity attachments */ + attachments?: Maybe; + /** Activity author */ + author?: Maybe; + /** Activity author id foreign key */ + authorId: Scalars['ID']; + /** Activity body */ + body: Scalars['String']; + /** Activity comments */ + comments?: Maybe; + /** Activity completion date */ + completedAt?: Maybe; + createdAt: Scalars['DateTime']; + deletedAt?: Maybe; + /** Activity due date */ + dueAt?: Maybe; + id: Scalars['ID']; + /** Activity reminder date */ + reminderAt?: Maybe; + /** Activity title */ + title: Scalars['String']; + /** Activity type */ + type: Scalars['String']; + updatedAt: Scalars['DateTime']; +}; + + +/** An activity */ +export type ActivityActivityTargetsArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + + +/** An activity */ +export type ActivityAttachmentsArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + + +/** An activity */ +export type ActivityCommentsArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + +/** An activity */ +export type ActivityConnection = { + edges: Array; + pageInfo: PageInfo; + /** Total number of records in the connection */ + totalCount?: Maybe; +}; + +/** An activity */ +export type ActivityCreateInput = { + /** Acitivity assignee id foreign key */ + assigneeId?: InputMaybe; + /** Activity author id foreign key */ + authorId: Scalars['ID']; + /** Activity body */ + body?: InputMaybe; + /** Activity completion date */ + completedAt?: InputMaybe; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + /** Activity due date */ + dueAt?: InputMaybe; + id?: InputMaybe; + /** Activity reminder date */ + reminderAt?: InputMaybe; + /** Activity title */ + title?: InputMaybe; + /** Activity type */ + type?: InputMaybe; + updatedAt?: InputMaybe; +}; + +/** An activity */ +export type ActivityEdge = { + cursor: Scalars['Cursor']; + node: Activity; +}; + +/** An activity */ +export type ActivityFilterInput = { + and?: InputMaybe>>; + /** Acitivity assignee id foreign key */ + assigneeId?: InputMaybe; + /** Activity author id foreign key */ + authorId?: InputMaybe; + /** Activity body */ + body?: InputMaybe; + /** Activity completion date */ + completedAt?: InputMaybe; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + /** Activity due date */ + dueAt?: InputMaybe; + id?: InputMaybe; + not?: InputMaybe; + or?: InputMaybe>>; + /** Activity reminder date */ + reminderAt?: InputMaybe; + /** Activity title */ + title?: InputMaybe; + /** Activity type */ + type?: InputMaybe; + updatedAt?: InputMaybe; +}; + +/** An activity */ +export type ActivityOrderByInput = { + /** Acitivity assignee id foreign key */ + assigneeId?: InputMaybe; + /** Activity author id foreign key */ + authorId?: InputMaybe; + /** Activity body */ + body?: InputMaybe; + /** Activity completion date */ + completedAt?: InputMaybe; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + /** Activity due date */ + dueAt?: InputMaybe; + id?: InputMaybe; + /** Activity reminder date */ + reminderAt?: InputMaybe; + /** Activity title */ + title?: InputMaybe; + /** Activity type */ + type?: InputMaybe; + updatedAt?: InputMaybe; +}; + +/** An activity target */ +export type ActivityTarget = { + /** ActivityTarget activity */ + activity?: Maybe; + /** ActivityTarget activity id foreign key */ + activityId?: Maybe; + /** ActivityTarget company */ + company?: Maybe; + /** ActivityTarget company id foreign key */ + companyId?: Maybe; + createdAt: Scalars['DateTime']; + deletedAt?: Maybe; + id: Scalars['ID']; + /** ActivityTarget opportunity */ + opportunity?: Maybe; + /** ActivityTarget opportunity id foreign key */ + opportunityId?: Maybe; + /** ActivityTarget person */ + person?: Maybe; + /** ActivityTarget person id foreign key */ + personId?: Maybe; + updatedAt: Scalars['DateTime']; +}; + +/** An activity target */ +export type ActivityTargetConnection = { + edges: Array; + pageInfo: PageInfo; + /** Total number of records in the connection */ + totalCount?: Maybe; +}; + +/** An activity target */ +export type ActivityTargetCreateInput = { + /** ActivityTarget activity id foreign key */ + activityId?: InputMaybe; + /** ActivityTarget company id foreign key */ + companyId?: InputMaybe; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + id?: InputMaybe; + /** ActivityTarget opportunity id foreign key */ + opportunityId?: InputMaybe; + /** ActivityTarget person id foreign key */ + personId?: InputMaybe; + updatedAt?: InputMaybe; +}; + +/** An activity target */ +export type ActivityTargetEdge = { + cursor: Scalars['Cursor']; + node: ActivityTarget; +}; + +/** An activity target */ +export type ActivityTargetFilterInput = { + /** ActivityTarget activity id foreign key */ + activityId?: InputMaybe; + and?: InputMaybe>>; + /** ActivityTarget company id foreign key */ + companyId?: InputMaybe; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + id?: InputMaybe; + not?: InputMaybe; + /** ActivityTarget opportunity id foreign key */ + opportunityId?: InputMaybe; + or?: InputMaybe>>; + /** ActivityTarget person id foreign key */ + personId?: InputMaybe; + updatedAt?: InputMaybe; +}; + +/** An activity target */ +export type ActivityTargetOrderByInput = { + /** ActivityTarget activity id foreign key */ + activityId?: InputMaybe; + /** ActivityTarget company id foreign key */ + companyId?: InputMaybe; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + id?: InputMaybe; + /** ActivityTarget opportunity id foreign key */ + opportunityId?: InputMaybe; + /** ActivityTarget person id foreign key */ + personId?: InputMaybe; + updatedAt?: InputMaybe; +}; + +/** An activity target */ +export type ActivityTargetUpdateInput = { + /** ActivityTarget activity id foreign key */ + activityId?: InputMaybe; + /** ActivityTarget company id foreign key */ + companyId?: InputMaybe; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + id?: InputMaybe; + /** ActivityTarget opportunity id foreign key */ + opportunityId?: InputMaybe; + /** ActivityTarget person id foreign key */ + personId?: InputMaybe; + updatedAt?: InputMaybe; +}; + +/** An activity */ +export type ActivityUpdateInput = { + /** Acitivity assignee id foreign key */ + assigneeId?: InputMaybe; + /** Activity author id foreign key */ + authorId?: InputMaybe; + /** Activity body */ + body?: InputMaybe; + /** Activity completion date */ + completedAt?: InputMaybe; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + /** Activity due date */ + dueAt?: InputMaybe; + id?: InputMaybe; + /** Activity reminder date */ + reminderAt?: InputMaybe; + /** Activity title */ + title?: InputMaybe; + /** Activity type */ + type?: InputMaybe; + updatedAt?: InputMaybe; +}; + +export type Analytics = { + /** Boolean that confirms query was dispatched */ + success: Scalars['Boolean']; +}; + +/** An api key */ +export type ApiKey = { + createdAt: Scalars['DateTime']; + deletedAt?: Maybe; + /** ApiKey expiration date */ + expiresAt: Scalars['DateTime']; + id: Scalars['ID']; + /** ApiKey name */ + name: Scalars['String']; + /** ApiKey revocation date */ + revokedAt?: Maybe; + updatedAt: Scalars['DateTime']; +}; + +/** An api key */ +export type ApiKeyConnection = { + edges: Array; + pageInfo: PageInfo; + /** Total number of records in the connection */ + totalCount?: Maybe; +}; + +/** An api key */ +export type ApiKeyCreateInput = { + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + /** ApiKey expiration date */ + expiresAt: Scalars['DateTime']; + id?: InputMaybe; + /** ApiKey name */ + name?: InputMaybe; + /** ApiKey revocation date */ + revokedAt?: InputMaybe; + updatedAt?: InputMaybe; +}; + +/** An api key */ +export type ApiKeyEdge = { + cursor: Scalars['Cursor']; + node: ApiKey; +}; + +/** An api key */ +export type ApiKeyFilterInput = { + and?: InputMaybe>>; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + /** ApiKey expiration date */ + expiresAt?: InputMaybe; + id?: InputMaybe; + /** ApiKey name */ + name?: InputMaybe; + not?: InputMaybe; + or?: InputMaybe>>; + /** ApiKey revocation date */ + revokedAt?: InputMaybe; + updatedAt?: InputMaybe; +}; + +/** An api key */ +export type ApiKeyOrderByInput = { + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + /** ApiKey expiration date */ + expiresAt?: InputMaybe; + id?: InputMaybe; + /** ApiKey name */ + name?: InputMaybe; + /** ApiKey revocation date */ + revokedAt?: InputMaybe; + updatedAt?: InputMaybe; +}; + +export type ApiKeyToken = { + token: Scalars['String']; +}; + +/** An api key */ +export type ApiKeyUpdateInput = { + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + /** ApiKey expiration date */ + expiresAt?: InputMaybe; + id?: InputMaybe; + /** ApiKey name */ + name?: InputMaybe; + /** ApiKey revocation date */ + revokedAt?: InputMaybe; + updatedAt?: InputMaybe; +}; + +/** An attachment */ +export type Attachment = { + /** Attachment activity */ + activity?: Maybe; + /** Attachment activity id foreign key */ + activityId?: Maybe; + /** Attachment author */ + author?: Maybe; + /** Attachment author id foreign key */ + authorId: Scalars['ID']; + /** Attachment company */ + company?: Maybe; + /** Attachment company id foreign key */ + companyId?: Maybe; + createdAt: Scalars['DateTime']; + deletedAt?: Maybe; + /** Attachment full path */ + fullPath: Scalars['String']; + id: Scalars['ID']; + /** Attachment name */ + name: Scalars['String']; + /** Attachment opportunity */ + opportunity?: Maybe; + /** Attachment opportunity id foreign key */ + opportunityId?: Maybe; + /** Attachment person */ + person?: Maybe; + /** Attachment person id foreign key */ + personId?: Maybe; + /** Attachment type */ + type: Scalars['String']; + updatedAt: Scalars['DateTime']; +}; + +/** An attachment */ +export type AttachmentConnection = { + edges: Array; + pageInfo: PageInfo; + /** Total number of records in the connection */ + totalCount?: Maybe; +}; + +/** An attachment */ +export type AttachmentCreateInput = { + /** Attachment activity id foreign key */ + activityId?: InputMaybe; + /** Attachment author id foreign key */ + authorId: Scalars['ID']; + /** Attachment company id foreign key */ + companyId?: InputMaybe; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + /** Attachment full path */ + fullPath?: InputMaybe; + id?: InputMaybe; + /** Attachment name */ + name?: InputMaybe; + /** Attachment opportunity id foreign key */ + opportunityId?: InputMaybe; + /** Attachment person id foreign key */ + personId?: InputMaybe; + /** Attachment type */ + type?: InputMaybe; + updatedAt?: InputMaybe; +}; + +/** An attachment */ +export type AttachmentEdge = { + cursor: Scalars['Cursor']; + node: Attachment; +}; + +/** An attachment */ +export type AttachmentFilterInput = { + /** Attachment activity id foreign key */ + activityId?: InputMaybe; + and?: InputMaybe>>; + /** Attachment author id foreign key */ + authorId?: InputMaybe; + /** Attachment company id foreign key */ + companyId?: InputMaybe; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + /** Attachment full path */ + fullPath?: InputMaybe; + id?: InputMaybe; + /** Attachment name */ + name?: InputMaybe; + not?: InputMaybe; + /** Attachment opportunity id foreign key */ + opportunityId?: InputMaybe; + or?: InputMaybe>>; + /** Attachment person id foreign key */ + personId?: InputMaybe; + /** Attachment type */ + type?: InputMaybe; + updatedAt?: InputMaybe; +}; + +/** An attachment */ +export type AttachmentOrderByInput = { + /** Attachment activity id foreign key */ + activityId?: InputMaybe; + /** Attachment author id foreign key */ + authorId?: InputMaybe; + /** Attachment company id foreign key */ + companyId?: InputMaybe; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + /** Attachment full path */ + fullPath?: InputMaybe; + id?: InputMaybe; + /** Attachment name */ + name?: InputMaybe; + /** Attachment opportunity id foreign key */ + opportunityId?: InputMaybe; + /** Attachment person id foreign key */ + personId?: InputMaybe; + /** Attachment type */ + type?: InputMaybe; + updatedAt?: InputMaybe; +}; + +/** An attachment */ +export type AttachmentUpdateInput = { + /** Attachment activity id foreign key */ + activityId?: InputMaybe; + /** Attachment author id foreign key */ + authorId?: InputMaybe; + /** Attachment company id foreign key */ + companyId?: InputMaybe; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + /** Attachment full path */ + fullPath?: InputMaybe; + id?: InputMaybe; + /** Attachment name */ + name?: InputMaybe; + /** Attachment opportunity id foreign key */ + opportunityId?: InputMaybe; + /** Attachment person id foreign key */ + personId?: InputMaybe; + /** Attachment type */ + type?: InputMaybe; + updatedAt?: InputMaybe; +}; + +export type AuthProviders = { + google: Scalars['Boolean']; + magicLink: Scalars['Boolean']; + password: Scalars['Boolean']; +}; + +export type AuthToken = { + expiresAt: Scalars['DateTime']; + token: Scalars['String']; +}; + +export type AuthTokenPair = { + accessToken: AuthToken; + refreshToken: AuthToken; +}; + +export type AuthTokens = { + tokens: AuthTokenPair; +}; + +export type BigFloatFilter = { + eq?: InputMaybe; + gt?: InputMaybe; + gte?: InputMaybe; + in?: InputMaybe>; + is?: InputMaybe; + lt?: InputMaybe; + lte?: InputMaybe; + neq?: InputMaybe; +}; + +export type Billing = { + billingFreeTrialDurationInDays?: Maybe; + billingUrl: Scalars['String']; + isBillingEnabled: Scalars['Boolean']; +}; + +/** Blocklist */ +export type Blocklist = { + createdAt: Scalars['DateTime']; + deletedAt?: Maybe; + /** Handle */ + handle: Scalars['String']; + id: Scalars['ID']; + updatedAt: Scalars['DateTime']; + /** WorkspaceMember */ + workspaceMember?: Maybe; + /** WorkspaceMember id foreign key */ + workspaceMemberId: Scalars['ID']; +}; + +/** Blocklist */ +export type BlocklistConnection = { + edges: Array; + pageInfo: PageInfo; + /** Total number of records in the connection */ + totalCount?: Maybe; +}; + +/** Blocklist */ +export type BlocklistCreateInput = { + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + /** Handle */ + handle?: InputMaybe; + id?: InputMaybe; + updatedAt?: InputMaybe; + /** WorkspaceMember id foreign key */ + workspaceMemberId: Scalars['ID']; +}; + +/** Blocklist */ +export type BlocklistEdge = { + cursor: Scalars['Cursor']; + node: Blocklist; +}; + +/** Blocklist */ +export type BlocklistFilterInput = { + and?: InputMaybe>>; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + /** Handle */ + handle?: InputMaybe; + id?: InputMaybe; + not?: InputMaybe; + or?: InputMaybe>>; + updatedAt?: InputMaybe; + /** WorkspaceMember id foreign key */ + workspaceMemberId?: InputMaybe; +}; + +/** Blocklist */ +export type BlocklistOrderByInput = { + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + /** Handle */ + handle?: InputMaybe; + id?: InputMaybe; + updatedAt?: InputMaybe; + /** WorkspaceMember id foreign key */ + workspaceMemberId?: InputMaybe; +}; + +/** Blocklist */ +export type BlocklistUpdateInput = { + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + /** Handle */ + handle?: InputMaybe; + id?: InputMaybe; + updatedAt?: InputMaybe; + /** WorkspaceMember id foreign key */ + workspaceMemberId?: InputMaybe; +}; + +export type BooleanFieldComparison = { + is?: InputMaybe; + isNot?: InputMaybe; +}; + +export type BooleanFilter = { + eq?: InputMaybe; + is?: InputMaybe; +}; + +export type CheckoutEntity = { + url: Scalars['String']; +}; + +export type ClientConfig = { + authProviders: AuthProviders; + billing: Billing; + debugMode: Scalars['Boolean']; + sentry: Sentry; + signInPrefilled: Scalars['Boolean']; + signUpDisabled: Scalars['Boolean']; + support: Support; + telemetry: Telemetry; +}; + +/** A comment */ +export type Comment = { + /** Comment activity */ + activity?: Maybe; + /** Comment activity id foreign key */ + activityId: Scalars['ID']; + /** Comment author */ + author?: Maybe; + /** Comment author id foreign key */ + authorId: Scalars['ID']; + /** Comment body */ + body: Scalars['String']; + createdAt: Scalars['DateTime']; + deletedAt?: Maybe; + id: Scalars['ID']; + updatedAt: Scalars['DateTime']; +}; + +/** A comment */ +export type CommentConnection = { + edges: Array; + pageInfo: PageInfo; + /** Total number of records in the connection */ + totalCount?: Maybe; +}; + +/** A comment */ +export type CommentCreateInput = { + /** Comment activity id foreign key */ + activityId: Scalars['ID']; + /** Comment author id foreign key */ + authorId: Scalars['ID']; + /** Comment body */ + body?: InputMaybe; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + id?: InputMaybe; + updatedAt?: InputMaybe; +}; + +/** A comment */ +export type CommentEdge = { + cursor: Scalars['Cursor']; + node: Comment; +}; + +/** A comment */ +export type CommentFilterInput = { + /** Comment activity id foreign key */ + activityId?: InputMaybe; + and?: InputMaybe>>; + /** Comment author id foreign key */ + authorId?: InputMaybe; + /** Comment body */ + body?: InputMaybe; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + id?: InputMaybe; + not?: InputMaybe; + or?: InputMaybe>>; + updatedAt?: InputMaybe; +}; + +/** A comment */ +export type CommentOrderByInput = { + /** Comment activity id foreign key */ + activityId?: InputMaybe; + /** Comment author id foreign key */ + authorId?: InputMaybe; + /** Comment body */ + body?: InputMaybe; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + id?: InputMaybe; + updatedAt?: InputMaybe; +}; + +/** A comment */ +export type CommentUpdateInput = { + /** Comment activity id foreign key */ + activityId?: InputMaybe; + /** Comment author id foreign key */ + authorId?: InputMaybe; + /** Comment body */ + body?: InputMaybe; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + id?: InputMaybe; + updatedAt?: InputMaybe; +}; + +/** A company */ +export type Company = { + /** Your team member responsible for managing the company account */ + accountOwner?: Maybe; + /** Your team member responsible for managing the company account id foreign key */ + accountOwnerId?: Maybe; + /** Activities tied to the company */ + activityTargets?: Maybe; + /** The company address */ + address: Scalars['String']; + /** Annual Recurring Revenue: The actual or estimated annual revenue of the company */ + annualRecurringRevenue?: Maybe; + /** Attachments linked to the company. */ + attachments?: Maybe; + createdAt: Scalars['DateTime']; + deletedAt?: Maybe; + /** The company website URL. We use this url to fetch the company icon */ + domainName: Scalars['String']; + /** Number of employees in the company */ + employees?: Maybe; + /** Favorites linked to the company */ + favorites?: Maybe; + id: Scalars['ID']; + /** Ideal Customer Profile: Indicates whether the company is the most suitable and valuable customer for you */ + idealCustomerProfile: Scalars['Boolean']; + /** The company Linkedin account */ + linkedinLink?: Maybe; + /** The company name */ + name: Scalars['String']; + /** Opportunities linked to the company. */ + opportunities?: Maybe; + /** People linked to the company. */ + people?: Maybe; + /** Position */ + position?: Maybe; + updatedAt: Scalars['DateTime']; + /** The company Twitter/X account */ + xLink?: Maybe; +}; + + +/** A company */ +export type CompanyActivityTargetsArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + + +/** A company */ +export type CompanyAttachmentsArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + + +/** A company */ +export type CompanyFavoritesArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + + +/** A company */ +export type CompanyOpportunitiesArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + + +/** A company */ +export type CompanyPeopleArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + +/** A company */ +export type CompanyConnection = { + edges: Array; + pageInfo: PageInfo; + /** Total number of records in the connection */ + totalCount?: Maybe; +}; + +/** A company */ +export type CompanyCreateInput = { + /** Your team member responsible for managing the company account id foreign key */ + accountOwnerId?: InputMaybe; + /** The company address */ + address?: InputMaybe; + /** Annual Recurring Revenue: The actual or estimated annual revenue of the company */ + annualRecurringRevenue?: InputMaybe; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + /** The company website URL. We use this url to fetch the company icon */ + domainName?: InputMaybe; + /** Number of employees in the company */ + employees?: InputMaybe; + id?: InputMaybe; + /** Ideal Customer Profile: Indicates whether the company is the most suitable and valuable customer for you */ + idealCustomerProfile?: InputMaybe; + /** The company Linkedin account */ + linkedinLink?: InputMaybe; + /** The company name */ + name?: InputMaybe; + /** Position */ + position?: InputMaybe; + updatedAt?: InputMaybe; + /** The company Twitter/X account */ + xLink?: InputMaybe; +}; + +/** A company */ +export type CompanyEdge = { + cursor: Scalars['Cursor']; + node: Company; +}; + +/** A company */ +export type CompanyFilterInput = { + /** Your team member responsible for managing the company account id foreign key */ + accountOwnerId?: InputMaybe; + /** The company address */ + address?: InputMaybe; + and?: InputMaybe>>; + /** Annual Recurring Revenue: The actual or estimated annual revenue of the company */ + annualRecurringRevenue?: InputMaybe; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + /** The company website URL. We use this url to fetch the company icon */ + domainName?: InputMaybe; + /** Number of employees in the company */ + employees?: InputMaybe; + id?: InputMaybe; + /** Ideal Customer Profile: Indicates whether the company is the most suitable and valuable customer for you */ + idealCustomerProfile?: InputMaybe; + /** The company Linkedin account */ + linkedinLink?: InputMaybe; + /** The company name */ + name?: InputMaybe; + not?: InputMaybe; + or?: InputMaybe>>; + /** Position */ + position?: InputMaybe; + updatedAt?: InputMaybe; + /** The company Twitter/X account */ + xLink?: InputMaybe; +}; + +/** A company */ +export type CompanyOrderByInput = { + /** Your team member responsible for managing the company account id foreign key */ + accountOwnerId?: InputMaybe; + /** The company address */ + address?: InputMaybe; + /** Annual Recurring Revenue: The actual or estimated annual revenue of the company */ + annualRecurringRevenue?: InputMaybe; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + /** The company website URL. We use this url to fetch the company icon */ + domainName?: InputMaybe; + /** Number of employees in the company */ + employees?: InputMaybe; + id?: InputMaybe; + /** Ideal Customer Profile: Indicates whether the company is the most suitable and valuable customer for you */ + idealCustomerProfile?: InputMaybe; + /** The company Linkedin account */ + linkedinLink?: InputMaybe; + /** The company name */ + name?: InputMaybe; + /** Position */ + position?: InputMaybe; + updatedAt?: InputMaybe; + /** The company Twitter/X account */ + xLink?: InputMaybe; +}; + +/** A company */ +export type CompanyUpdateInput = { + /** Your team member responsible for managing the company account id foreign key */ + accountOwnerId?: InputMaybe; + /** The company address */ + address?: InputMaybe; + /** Annual Recurring Revenue: The actual or estimated annual revenue of the company */ + annualRecurringRevenue?: InputMaybe; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + /** The company website URL. We use this url to fetch the company icon */ + domainName?: InputMaybe; + /** Number of employees in the company */ + employees?: InputMaybe; + id?: InputMaybe; + /** Ideal Customer Profile: Indicates whether the company is the most suitable and valuable customer for you */ + idealCustomerProfile?: InputMaybe; + /** The company Linkedin account */ + linkedinLink?: InputMaybe; + /** The company name */ + name?: InputMaybe; + /** Position */ + position?: InputMaybe; + updatedAt?: InputMaybe; + /** The company Twitter/X account */ + xLink?: InputMaybe; +}; + +/** A connected account */ +export type ConnectedAccount = { + /** Messaging provider access token */ + accessToken: Scalars['String']; + /** Account Owner */ + accountOwner?: Maybe; + /** Account Owner id foreign key */ + accountOwnerId: Scalars['ID']; + createdAt: Scalars['DateTime']; + deletedAt?: Maybe; + /** The account handle (email, username, phone number, etc.) */ + handle: Scalars['String']; + id: Scalars['ID']; + /** Last sync history ID */ + lastSyncHistoryId: Scalars['String']; + /** Message Channel */ + messageChannels?: Maybe; + /** The account provider */ + provider: Scalars['String']; + /** Messaging provider refresh token */ + refreshToken: Scalars['String']; + updatedAt: Scalars['DateTime']; +}; + + +/** A connected account */ +export type ConnectedAccountMessageChannelsArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + +/** A connected account */ +export type ConnectedAccountConnection = { + edges: Array; + pageInfo: PageInfo; + /** Total number of records in the connection */ + totalCount?: Maybe; +}; + +/** A connected account */ +export type ConnectedAccountCreateInput = { + /** Messaging provider access token */ + accessToken?: InputMaybe; + /** Account Owner id foreign key */ + accountOwnerId: Scalars['ID']; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + /** The account handle (email, username, phone number, etc.) */ + handle?: InputMaybe; + id?: InputMaybe; + /** Last sync history ID */ + lastSyncHistoryId?: InputMaybe; + /** The account provider */ + provider?: InputMaybe; + /** Messaging provider refresh token */ + refreshToken?: InputMaybe; + updatedAt?: InputMaybe; +}; + +/** A connected account */ +export type ConnectedAccountEdge = { + cursor: Scalars['Cursor']; + node: ConnectedAccount; +}; + +/** A connected account */ +export type ConnectedAccountFilterInput = { + /** Messaging provider access token */ + accessToken?: InputMaybe; + /** Account Owner id foreign key */ + accountOwnerId?: InputMaybe; + and?: InputMaybe>>; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + /** The account handle (email, username, phone number, etc.) */ + handle?: InputMaybe; + id?: InputMaybe; + /** Last sync history ID */ + lastSyncHistoryId?: InputMaybe; + not?: InputMaybe; + or?: InputMaybe>>; + /** The account provider */ + provider?: InputMaybe; + /** Messaging provider refresh token */ + refreshToken?: InputMaybe; + updatedAt?: InputMaybe; +}; + +/** A connected account */ +export type ConnectedAccountOrderByInput = { + /** Messaging provider access token */ + accessToken?: InputMaybe; + /** Account Owner id foreign key */ + accountOwnerId?: InputMaybe; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + /** The account handle (email, username, phone number, etc.) */ + handle?: InputMaybe; + id?: InputMaybe; + /** Last sync history ID */ + lastSyncHistoryId?: InputMaybe; + /** The account provider */ + provider?: InputMaybe; + /** Messaging provider refresh token */ + refreshToken?: InputMaybe; + updatedAt?: InputMaybe; +}; + +/** A connected account */ +export type ConnectedAccountUpdateInput = { + /** Messaging provider access token */ + accessToken?: InputMaybe; + /** Account Owner id foreign key */ + accountOwnerId?: InputMaybe; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + /** The account handle (email, username, phone number, etc.) */ + handle?: InputMaybe; + id?: InputMaybe; + /** Last sync history ID */ + lastSyncHistoryId?: InputMaybe; + /** The account provider */ + provider?: InputMaybe; + /** Messaging provider refresh token */ + refreshToken?: InputMaybe; + updatedAt?: InputMaybe; +}; + +export type Currency = { + amountMicros?: Maybe; + createdAt?: Maybe; + currencyCode?: Maybe; + deletedAt?: Maybe; + id?: Maybe; + updatedAt?: Maybe; +}; + +export type CurrencyCreateInput = { + amountMicros?: InputMaybe; + createdAt?: InputMaybe; + currencyCode?: InputMaybe; + deletedAt?: InputMaybe; + id?: InputMaybe; + updatedAt?: InputMaybe; +}; + +export type CurrencyFilterInput = { + amountMicros?: InputMaybe; + and?: InputMaybe>>; + createdAt?: InputMaybe; + currencyCode?: InputMaybe; + deletedAt?: InputMaybe; + id?: InputMaybe; + not?: InputMaybe; + or?: InputMaybe>>; + updatedAt?: InputMaybe; +}; + +export type CurrencyOrderByInput = { + amountMicros?: InputMaybe; + createdAt?: InputMaybe; + currencyCode?: InputMaybe; + deletedAt?: InputMaybe; + id?: InputMaybe; + updatedAt?: InputMaybe; +}; + +export type CurrencyUpdateInput = { + amountMicros?: InputMaybe; + createdAt?: InputMaybe; + currencyCode?: InputMaybe; + deletedAt?: InputMaybe; + id?: InputMaybe; + updatedAt?: InputMaybe; +}; + +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 DateFilter = { + eq?: InputMaybe; + gt?: InputMaybe; + gte?: InputMaybe; + in?: InputMaybe>; + is?: InputMaybe; + lt?: InputMaybe; + lte?: InputMaybe; + neq?: InputMaybe; +}; + +export type DeleteOneObjectInput = { + /** The id of the record to delete. */ + id: Scalars['ID']; +}; + +export type EmailPasswordResetLink = { + /** Boolean that confirms query was dispatched */ + success: Scalars['Boolean']; +}; + +/** A favorite */ +export type Favorite = { + /** Favorite company */ + company?: Maybe; + /** Favorite company id foreign key */ + companyId?: Maybe; + createdAt: Scalars['DateTime']; + deletedAt?: Maybe; + id: Scalars['ID']; + /** Favorite opportunity */ + opportunity?: Maybe; + /** Favorite opportunity id foreign key */ + opportunityId?: Maybe; + /** Favorite person */ + person?: Maybe; + /** Favorite person id foreign key */ + personId?: Maybe; + /** Favorite position */ + position: Scalars['Float']; + updatedAt: Scalars['DateTime']; + /** Favorite workspace member */ + workspaceMember?: Maybe; + /** Favorite workspace member id foreign key */ + workspaceMemberId: Scalars['ID']; +}; + +/** A favorite */ +export type FavoriteConnection = { + edges: Array; + pageInfo: PageInfo; + /** Total number of records in the connection */ + totalCount?: Maybe; +}; + +/** A favorite */ +export type FavoriteCreateInput = { + /** Favorite company id foreign key */ + companyId?: InputMaybe; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + id?: InputMaybe; + /** Favorite opportunity id foreign key */ + opportunityId?: InputMaybe; + /** Favorite person id foreign key */ + personId?: InputMaybe; + /** Favorite position */ + position?: InputMaybe; + updatedAt?: InputMaybe; + /** Favorite workspace member id foreign key */ + workspaceMemberId: Scalars['ID']; +}; + +/** A favorite */ +export type FavoriteEdge = { + cursor: Scalars['Cursor']; + node: Favorite; +}; + +/** A favorite */ +export type FavoriteFilterInput = { + and?: InputMaybe>>; + /** Favorite company id foreign key */ + companyId?: InputMaybe; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + id?: InputMaybe; + not?: InputMaybe; + /** Favorite opportunity id foreign key */ + opportunityId?: InputMaybe; + or?: InputMaybe>>; + /** Favorite person id foreign key */ + personId?: InputMaybe; + /** Favorite position */ + position?: InputMaybe; + updatedAt?: InputMaybe; + /** Favorite workspace member id foreign key */ + workspaceMemberId?: InputMaybe; +}; + +/** A favorite */ +export type FavoriteOrderByInput = { + /** Favorite company id foreign key */ + companyId?: InputMaybe; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + id?: InputMaybe; + /** Favorite opportunity id foreign key */ + opportunityId?: InputMaybe; + /** Favorite person id foreign key */ + personId?: InputMaybe; + /** Favorite position */ + position?: InputMaybe; + updatedAt?: InputMaybe; + /** Favorite workspace member id foreign key */ + workspaceMemberId?: InputMaybe; +}; + +/** A favorite */ +export type FavoriteUpdateInput = { + /** Favorite company id foreign key */ + companyId?: InputMaybe; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + id?: InputMaybe; + /** Favorite opportunity id foreign key */ + opportunityId?: InputMaybe; + /** Favorite person id foreign key */ + personId?: InputMaybe; + /** Favorite position */ + position?: InputMaybe; + updatedAt?: InputMaybe; + /** Favorite workspace member id foreign key */ + workspaceMemberId?: InputMaybe; +}; + +export type FeatureFlag = { + id: Scalars['ID']; + key: Scalars['String']; + value: Scalars['Boolean']; + workspaceId: Scalars['String']; +}; + +export type FeatureFlagFilter = { + and?: InputMaybe>; + id?: InputMaybe; + or?: InputMaybe>; +}; + +export type FeatureFlagSort = { + direction: SortDirection; + field: FeatureFlagSortFields; + nulls?: InputMaybe; +}; + +export enum FeatureFlagSortFields { + Id = 'id' +} + +export type FieldConnection = { + /** Array of edges. */ + edges: Array; + /** Paging information */ + pageInfo: PageInfo; + /** Fetch total count of records */ + totalCount: Scalars['Int']; +}; + +export type FieldDeleteResponse = { + createdAt?: Maybe; + defaultValue?: Maybe; + description?: Maybe; + icon?: Maybe; + id?: Maybe; + isActive?: Maybe; + isCustom?: Maybe; + isNullable?: Maybe; + isSystem?: Maybe; + label?: Maybe; + name?: Maybe; + options?: Maybe; + type?: Maybe; + updatedAt?: Maybe; +}; + +/** Type of the field */ +export enum FieldMetadataType { + Boolean = 'BOOLEAN', + Currency = 'CURRENCY', + DateTime = 'DATE_TIME', + Email = 'EMAIL', + FullName = 'FULL_NAME', + Link = 'LINK', + MultiSelect = 'MULTI_SELECT', + Number = 'NUMBER', + Numeric = 'NUMERIC', + Phone = 'PHONE', + Probability = 'PROBABILITY', + Rating = 'RATING', + Relation = 'RELATION', + Select = 'SELECT', + Text = 'TEXT', + Uuid = 'UUID' +} + +export enum FileFolder { + Attachment = 'Attachment', + PersonPicture = 'PersonPicture', + ProfilePicture = 'ProfilePicture', + WorkspaceLogo = 'WorkspaceLogo' +} + +/** This enum to filter by nullability */ +export enum FilterIs { + /** Non-nulish values */ + NotNull = 'NOT_NULL', + /** Nulish values */ + Null = 'NULL' +} + +export type FloatFilter = { + eq?: InputMaybe; + gt?: InputMaybe; + gte?: InputMaybe; + in?: InputMaybe>; + is?: InputMaybe; + lt?: InputMaybe; + lte?: InputMaybe; + neq?: InputMaybe; +}; + +export type FullName = { + createdAt?: Maybe; + deletedAt?: Maybe; + firstName: Scalars['String']; + id?: Maybe; + lastName: Scalars['String']; + updatedAt?: Maybe; +}; + +export type FullNameCreateInput = { + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + firstName?: InputMaybe; + id?: InputMaybe; + lastName?: InputMaybe; + updatedAt?: InputMaybe; +}; + +export type FullNameFilterInput = { + and?: InputMaybe>>; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + firstName?: InputMaybe; + id?: InputMaybe; + lastName?: InputMaybe; + not?: InputMaybe; + or?: InputMaybe>>; + updatedAt?: InputMaybe; +}; + +export type FullNameOrderByInput = { + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + firstName?: InputMaybe; + id?: InputMaybe; + lastName?: InputMaybe; + updatedAt?: InputMaybe; +}; + +export type FullNameUpdateInput = { + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + firstName?: InputMaybe; + id?: InputMaybe; + lastName?: InputMaybe; + updatedAt?: InputMaybe; +}; + +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 InvalidatePassword = { + /** Boolean that confirms query was dispatched */ + success: Scalars['Boolean']; +}; + +export type Link = { + createdAt?: Maybe; + deletedAt?: Maybe; + id?: Maybe; + label?: Maybe; + updatedAt?: Maybe; + url?: Maybe; +}; + +export type LinkCreateInput = { + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + id?: InputMaybe; + label?: InputMaybe; + updatedAt?: InputMaybe; + url?: InputMaybe; +}; + +export type LinkFilterInput = { + and?: InputMaybe>>; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + id?: InputMaybe; + label?: InputMaybe; + not?: InputMaybe; + or?: InputMaybe>>; + updatedAt?: InputMaybe; + url?: InputMaybe; +}; + +export type LinkOrderByInput = { + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + id?: InputMaybe; + label?: InputMaybe; + updatedAt?: InputMaybe; + url?: InputMaybe; +}; + +export type LinkUpdateInput = { + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + id?: InputMaybe; + label?: InputMaybe; + updatedAt?: InputMaybe; + url?: InputMaybe; +}; + +export type LoginToken = { + loginToken: AuthToken; +}; + +/** Message */ +export type Message = { + createdAt: Scalars['DateTime']; + deletedAt?: Maybe; + /** Message Direction */ + direction: MessageDirectionEnum; + /** Message id from the message header */ + headerMessageId: Scalars['String']; + id: Scalars['ID']; + /** Messages from the channel. */ + messageChannelMessageAssociations?: Maybe; + /** Message Participants */ + messageParticipants?: Maybe; + /** Message Thread Id */ + messageThread?: Maybe; + /** Message Thread Id id foreign key */ + messageThreadId?: Maybe; + /** The date the message was received */ + receivedAt?: Maybe; + /** Subject */ + subject: Scalars['String']; + /** Text */ + text: Scalars['String']; + updatedAt: Scalars['DateTime']; +}; + + +/** Message */ +export type MessageMessageChannelMessageAssociationsArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + + +/** Message */ +export type MessageMessageParticipantsArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + +/** Message Channels */ +export type MessageChannel = { + /** Connected Account */ + connectedAccount?: Maybe; + /** Connected Account id foreign key */ + connectedAccountId: Scalars['ID']; + createdAt: Scalars['DateTime']; + deletedAt?: Maybe; + /** Handle */ + handle: Scalars['String']; + id: Scalars['ID']; + /** Is Contact Auto Creation Enabled */ + isContactAutoCreationEnabled: Scalars['Boolean']; + /** Messages from the channel. */ + messageChannelMessageAssociations?: Maybe; + /** Channel Type */ + type: MessageChannelTypeEnum; + updatedAt: Scalars['DateTime']; + /** Visibility */ + visibility: MessageChannelVisibilityEnum; +}; + + +/** Message Channels */ +export type MessageChannelMessageChannelMessageAssociationsArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + +/** Message Channels */ +export type MessageChannelConnection = { + edges: Array; + pageInfo: PageInfo; + /** Total number of records in the connection */ + totalCount?: Maybe; +}; + +/** Message Channels */ +export type MessageChannelCreateInput = { + /** Connected Account id foreign key */ + connectedAccountId: Scalars['ID']; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + /** Handle */ + handle?: InputMaybe; + id?: InputMaybe; + /** Is Contact Auto Creation Enabled */ + isContactAutoCreationEnabled?: InputMaybe; + /** Channel Type */ + type?: InputMaybe; + updatedAt?: InputMaybe; + /** Visibility */ + visibility?: InputMaybe; +}; + +/** Message Channels */ +export type MessageChannelEdge = { + cursor: Scalars['Cursor']; + node: MessageChannel; +}; + +/** Message Channels */ +export type MessageChannelFilterInput = { + and?: InputMaybe>>; + /** Connected Account id foreign key */ + connectedAccountId?: InputMaybe; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + /** Handle */ + handle?: InputMaybe; + id?: InputMaybe; + /** Is Contact Auto Creation Enabled */ + isContactAutoCreationEnabled?: InputMaybe; + not?: InputMaybe; + or?: InputMaybe>>; + /** Channel Type */ + type?: InputMaybe; + updatedAt?: InputMaybe; + /** Visibility */ + visibility?: InputMaybe; +}; + +/** Message Synced with a Message Channel */ +export type MessageChannelMessageAssociation = { + createdAt: Scalars['DateTime']; + deletedAt?: Maybe; + id: Scalars['ID']; + /** Message Id */ + message?: Maybe; + /** Message Channel Id */ + messageChannel?: Maybe; + /** Message Channel Id id foreign key */ + messageChannelId?: Maybe; + /** Message id from the messaging provider */ + messageExternalId?: Maybe; + /** Message Id id foreign key */ + messageId?: Maybe; + /** Message Thread Id */ + messageThread?: Maybe; + /** Thread id from the messaging provider */ + messageThreadExternalId?: Maybe; + /** Message Thread Id id foreign key */ + messageThreadId?: Maybe; + updatedAt: Scalars['DateTime']; +}; + +/** Message Synced with a Message Channel */ +export type MessageChannelMessageAssociationConnection = { + edges: Array; + pageInfo: PageInfo; + /** Total number of records in the connection */ + totalCount?: Maybe; +}; + +/** Message Synced with a Message Channel */ +export type MessageChannelMessageAssociationCreateInput = { + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + id?: InputMaybe; + /** Message Channel Id id foreign key */ + messageChannelId?: InputMaybe; + /** Message id from the messaging provider */ + messageExternalId?: InputMaybe; + /** Message Id id foreign key */ + messageId?: InputMaybe; + /** Thread id from the messaging provider */ + messageThreadExternalId?: InputMaybe; + /** Message Thread Id id foreign key */ + messageThreadId?: InputMaybe; + updatedAt?: InputMaybe; +}; + +/** Message Synced with a Message Channel */ +export type MessageChannelMessageAssociationEdge = { + cursor: Scalars['Cursor']; + node: MessageChannelMessageAssociation; +}; + +/** Message Synced with a Message Channel */ +export type MessageChannelMessageAssociationFilterInput = { + and?: InputMaybe>>; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + id?: InputMaybe; + /** Message Channel Id id foreign key */ + messageChannelId?: InputMaybe; + /** Message id from the messaging provider */ + messageExternalId?: InputMaybe; + /** Message Id id foreign key */ + messageId?: InputMaybe; + /** Thread id from the messaging provider */ + messageThreadExternalId?: InputMaybe; + /** Message Thread Id id foreign key */ + messageThreadId?: InputMaybe; + not?: InputMaybe; + or?: InputMaybe>>; + updatedAt?: InputMaybe; +}; + +/** Message Synced with a Message Channel */ +export type MessageChannelMessageAssociationOrderByInput = { + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + id?: InputMaybe; + /** Message Channel Id id foreign key */ + messageChannelId?: InputMaybe; + /** Message id from the messaging provider */ + messageExternalId?: InputMaybe; + /** Message Id id foreign key */ + messageId?: InputMaybe; + /** Thread id from the messaging provider */ + messageThreadExternalId?: InputMaybe; + /** Message Thread Id id foreign key */ + messageThreadId?: InputMaybe; + updatedAt?: InputMaybe; +}; + +/** Message Synced with a Message Channel */ +export type MessageChannelMessageAssociationUpdateInput = { + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + id?: InputMaybe; + /** Message Channel Id id foreign key */ + messageChannelId?: InputMaybe; + /** Message id from the messaging provider */ + messageExternalId?: InputMaybe; + /** Message Id id foreign key */ + messageId?: InputMaybe; + /** Thread id from the messaging provider */ + messageThreadExternalId?: InputMaybe; + /** Message Thread Id id foreign key */ + messageThreadId?: InputMaybe; + updatedAt?: InputMaybe; +}; + +/** Message Channels */ +export type MessageChannelOrderByInput = { + /** Connected Account id foreign key */ + connectedAccountId?: InputMaybe; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + /** Handle */ + handle?: InputMaybe; + id?: InputMaybe; + /** Is Contact Auto Creation Enabled */ + isContactAutoCreationEnabled?: InputMaybe; + /** Channel Type */ + type?: InputMaybe; + updatedAt?: InputMaybe; + /** Visibility */ + visibility?: InputMaybe; +}; + +/** Channel Type */ +export enum MessageChannelTypeEnum { + /** Email */ + Email = 'email', + /** SMS */ + Sms = 'sms' +} + +export type MessageChannelTypeEnumFilter = { + eq?: InputMaybe; + in?: InputMaybe>>; + is?: InputMaybe; + neq?: InputMaybe; +}; + +/** Message Channels */ +export type MessageChannelUpdateInput = { + /** Connected Account id foreign key */ + connectedAccountId?: InputMaybe; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + /** Handle */ + handle?: InputMaybe; + id?: InputMaybe; + /** Is Contact Auto Creation Enabled */ + isContactAutoCreationEnabled?: InputMaybe; + /** Channel Type */ + type?: InputMaybe; + updatedAt?: InputMaybe; + /** Visibility */ + visibility?: InputMaybe; +}; + +/** Visibility */ +export enum MessageChannelVisibilityEnum { + /** Metadata */ + Metadata = 'metadata', + /** Share Everything */ + ShareEverything = 'share_everything', + /** Subject */ + Subject = 'subject' +} + +export type MessageChannelVisibilityEnumFilter = { + eq?: InputMaybe; + in?: InputMaybe>>; + is?: InputMaybe; + neq?: InputMaybe; +}; + +/** Message */ +export type MessageConnection = { + edges: Array; + pageInfo: PageInfo; + /** Total number of records in the connection */ + totalCount?: Maybe; +}; + +/** Message */ +export type MessageCreateInput = { + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + /** Message Direction */ + direction?: InputMaybe; + /** Message id from the message header */ + headerMessageId?: InputMaybe; + id?: InputMaybe; + /** Message Thread Id id foreign key */ + messageThreadId?: InputMaybe; + /** The date the message was received */ + receivedAt?: InputMaybe; + /** Subject */ + subject?: InputMaybe; + /** Text */ + text?: InputMaybe; + updatedAt?: InputMaybe; +}; + +/** Message Direction */ +export enum MessageDirectionEnum { + /** Incoming */ + Incoming = 'incoming', + /** Outgoing */ + Outgoing = 'outgoing' +} + +export type MessageDirectionEnumFilter = { + eq?: InputMaybe; + in?: InputMaybe>>; + is?: InputMaybe; + neq?: InputMaybe; +}; + +/** Message */ +export type MessageEdge = { + cursor: Scalars['Cursor']; + node: Message; +}; + +/** Message */ +export type MessageFilterInput = { + and?: InputMaybe>>; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + /** Message Direction */ + direction?: InputMaybe; + /** Message id from the message header */ + headerMessageId?: InputMaybe; + id?: InputMaybe; + /** Message Thread Id id foreign key */ + messageThreadId?: InputMaybe; + not?: InputMaybe; + or?: InputMaybe>>; + /** The date the message was received */ + receivedAt?: InputMaybe; + /** Subject */ + subject?: InputMaybe; + /** Text */ + text?: InputMaybe; + updatedAt?: InputMaybe; +}; + +/** Message */ +export type MessageOrderByInput = { + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + /** Message Direction */ + direction?: InputMaybe; + /** Message id from the message header */ + headerMessageId?: InputMaybe; + id?: InputMaybe; + /** Message Thread Id id foreign key */ + messageThreadId?: InputMaybe; + /** The date the message was received */ + receivedAt?: InputMaybe; + /** Subject */ + subject?: InputMaybe; + /** Text */ + text?: InputMaybe; + updatedAt?: InputMaybe; +}; + +/** Message Participants */ +export type MessageParticipant = { + createdAt: Scalars['DateTime']; + deletedAt?: Maybe; + /** Display Name */ + displayName: Scalars['String']; + /** Handle */ + handle: Scalars['String']; + id: Scalars['ID']; + /** Message */ + message?: Maybe; + /** Message id foreign key */ + messageId: Scalars['ID']; + /** Person */ + person?: Maybe; + /** Person id foreign key */ + personId?: Maybe; + /** Role */ + role: MessageParticipantRoleEnum; + updatedAt: Scalars['DateTime']; + /** Workspace member */ + workspaceMember?: Maybe; + /** Workspace member id foreign key */ + workspaceMemberId?: Maybe; +}; + +/** Message Participants */ +export type MessageParticipantConnection = { + edges: Array; + pageInfo: PageInfo; + /** Total number of records in the connection */ + totalCount?: Maybe; +}; + +/** Message Participants */ +export type MessageParticipantCreateInput = { + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + /** Display Name */ + displayName?: InputMaybe; + /** Handle */ + handle?: InputMaybe; + id?: InputMaybe; + /** Message id foreign key */ + messageId: Scalars['ID']; + /** Person id foreign key */ + personId?: InputMaybe; + /** Role */ + role?: InputMaybe; + updatedAt?: InputMaybe; + /** Workspace member id foreign key */ + workspaceMemberId?: InputMaybe; +}; + +/** Message Participants */ +export type MessageParticipantEdge = { + cursor: Scalars['Cursor']; + node: MessageParticipant; +}; + +/** Message Participants */ +export type MessageParticipantFilterInput = { + and?: InputMaybe>>; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + /** Display Name */ + displayName?: InputMaybe; + /** Handle */ + handle?: InputMaybe; + id?: InputMaybe; + /** Message id foreign key */ + messageId?: InputMaybe; + not?: InputMaybe; + or?: InputMaybe>>; + /** Person id foreign key */ + personId?: InputMaybe; + /** Role */ + role?: InputMaybe; + updatedAt?: InputMaybe; + /** Workspace member id foreign key */ + workspaceMemberId?: InputMaybe; +}; + +/** Message Participants */ +export type MessageParticipantOrderByInput = { + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + /** Display Name */ + displayName?: InputMaybe; + /** Handle */ + handle?: InputMaybe; + id?: InputMaybe; + /** Message id foreign key */ + messageId?: InputMaybe; + /** Person id foreign key */ + personId?: InputMaybe; + /** Role */ + role?: InputMaybe; + updatedAt?: InputMaybe; + /** Workspace member id foreign key */ + workspaceMemberId?: InputMaybe; +}; + +/** Role */ +export enum MessageParticipantRoleEnum { + /** Bcc */ + Bcc = 'bcc', + /** Cc */ + Cc = 'cc', + /** From */ + From = 'from', + /** To */ + To = 'to' +} + +export type MessageParticipantRoleEnumFilter = { + eq?: InputMaybe; + in?: InputMaybe>>; + is?: InputMaybe; + neq?: InputMaybe; +}; + +/** Message Participants */ +export type MessageParticipantUpdateInput = { + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + /** Display Name */ + displayName?: InputMaybe; + /** Handle */ + handle?: InputMaybe; + id?: InputMaybe; + /** Message id foreign key */ + messageId?: InputMaybe; + /** Person id foreign key */ + personId?: InputMaybe; + /** Role */ + role?: InputMaybe; + updatedAt?: InputMaybe; + /** Workspace member id foreign key */ + workspaceMemberId?: InputMaybe; +}; + +/** Message Thread */ +export type MessageThread = { + createdAt: Scalars['DateTime']; + deletedAt?: Maybe; + id: Scalars['ID']; + /** Messages from the channel. */ + messageChannelMessageAssociations?: Maybe; + /** Messages from the thread. */ + messages?: Maybe; + updatedAt: Scalars['DateTime']; +}; + + +/** Message Thread */ +export type MessageThreadMessageChannelMessageAssociationsArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + + +/** Message Thread */ +export type MessageThreadMessagesArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + +/** Message Thread */ +export type MessageThreadConnection = { + edges: Array; + pageInfo: PageInfo; + /** Total number of records in the connection */ + totalCount?: Maybe; +}; + +/** Message Thread */ +export type MessageThreadCreateInput = { + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + id?: InputMaybe; + updatedAt?: InputMaybe; +}; + +/** Message Thread */ +export type MessageThreadEdge = { + cursor: Scalars['Cursor']; + node: MessageThread; +}; + +/** Message Thread */ +export type MessageThreadFilterInput = { + and?: InputMaybe>>; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + id?: InputMaybe; + not?: InputMaybe; + or?: InputMaybe>>; + updatedAt?: InputMaybe; +}; + +/** Message Thread */ +export type MessageThreadOrderByInput = { + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + id?: InputMaybe; + updatedAt?: InputMaybe; +}; + +/** Message Thread */ +export type MessageThreadUpdateInput = { + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + id?: InputMaybe; + updatedAt?: InputMaybe; +}; + +/** Message */ +export type MessageUpdateInput = { + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + /** Message Direction */ + direction?: InputMaybe; + /** Message id from the message header */ + headerMessageId?: InputMaybe; + id?: InputMaybe; + /** Message Thread Id id foreign key */ + messageThreadId?: InputMaybe; + /** The date the message was received */ + receivedAt?: InputMaybe; + /** Subject */ + subject?: InputMaybe; + /** Text */ + text?: InputMaybe; + updatedAt?: InputMaybe; +}; + +export type Mutation = { + activateWorkspace: Workspace; + challenge: LoginToken; + checkout: CheckoutEntity; + createActivities: Array; + createActivity: Activity; + createActivityTarget: ActivityTarget; + createActivityTargets: Array; + createApiKey: ApiKey; + createApiKeys: Array; + createAttachment: Attachment; + createAttachments: Array; + createBlocklist: Blocklist; + createBlocklists: Array; + createComment: Comment; + createComments: Array; + createCompanies: Array; + createCompany: Company; + createConnectedAccount: ConnectedAccount; + createConnectedAccounts: Array; + createEvent: Analytics; + createFavorite: Favorite; + createFavorites: Array; + createMessage: Message; + createMessageChannel: MessageChannel; + createMessageChannelMessageAssociation: MessageChannelMessageAssociation; + createMessageChannelMessageAssociations: Array; + createMessageChannels: Array; + createMessageParticipant: MessageParticipant; + createMessageParticipants: Array; + createMessageThread: MessageThread; + createMessageThreads: Array; + createMessages: Array; + createOneObject: Object; + createOneRefreshToken: RefreshToken; + createOpportunities: Array; + createOpportunity: Opportunity; + createPeople: Array; + createPerson: Person; + createPipelineStep: PipelineStep; + createPipelineSteps: Array; + createView: View; + createViewField: ViewField; + createViewFields: Array; + createViewFilter: ViewFilter; + createViewFilters: Array; + createViewSort: ViewSort; + createViewSorts: Array; + createViews: Array; + createWebhook: Webhook; + createWebhooks: Array; + createWorkspaceMember: WorkspaceMember; + createWorkspaceMembers: Array; + deleteActivities: Array; + deleteActivity: Activity; + deleteActivityTarget: ActivityTarget; + deleteActivityTargets: Array; + deleteApiKey: ApiKey; + deleteApiKeys: Array; + deleteAttachment: Attachment; + deleteAttachments: Array; + deleteBlocklist: Blocklist; + deleteBlocklists: Array; + deleteComment: Comment; + deleteComments: Array; + deleteCompanies: Array; + deleteCompany: Company; + deleteConnectedAccount: ConnectedAccount; + deleteConnectedAccounts: Array; + deleteCurrentWorkspace: Workspace; + deleteFavorite: Favorite; + deleteFavorites: Array; + deleteMessage: Message; + deleteMessageChannel: MessageChannel; + deleteMessageChannelMessageAssociation: MessageChannelMessageAssociation; + deleteMessageChannelMessageAssociations: Array; + deleteMessageChannels: Array; + deleteMessageParticipant: MessageParticipant; + deleteMessageParticipants: Array; + deleteMessageThread: MessageThread; + deleteMessageThreads: Array; + deleteMessages: Array; + deleteOneObject: Object; + deleteOpportunities: Array; + deleteOpportunity: Opportunity; + deletePeople: Array; + deletePerson: Person; + deletePipelineStep: PipelineStep; + deletePipelineSteps: Array; + deleteUser: User; + deleteView: View; + deleteViewField: ViewField; + deleteViewFields: Array; + deleteViewFilter: ViewFilter; + deleteViewFilters: Array; + deleteViewSort: ViewSort; + deleteViewSorts: Array; + deleteViews: Array; + deleteWebhook: Webhook; + deleteWebhooks: Array; + deleteWorkspaceMember: WorkspaceMember; + deleteWorkspaceMembers: Array; + emailPasswordResetLink: EmailPasswordResetLink; + executeQuickActionOnActivity: Activity; + executeQuickActionOnActivityTarget: ActivityTarget; + executeQuickActionOnApiKey: ApiKey; + executeQuickActionOnAttachment: Attachment; + executeQuickActionOnBlocklist: Blocklist; + executeQuickActionOnComment: Comment; + executeQuickActionOnCompany: Company; + executeQuickActionOnConnectedAccount: ConnectedAccount; + executeQuickActionOnFavorite: Favorite; + executeQuickActionOnMessage: Message; + executeQuickActionOnMessageChannel: MessageChannel; + executeQuickActionOnMessageChannelMessageAssociation: MessageChannelMessageAssociation; + executeQuickActionOnMessageParticipant: MessageParticipant; + executeQuickActionOnMessageThread: MessageThread; + executeQuickActionOnOpportunity: Opportunity; + executeQuickActionOnPerson: Person; + executeQuickActionOnPipelineStep: PipelineStep; + executeQuickActionOnView: View; + executeQuickActionOnViewField: ViewField; + executeQuickActionOnViewFilter: ViewFilter; + executeQuickActionOnViewSort: ViewSort; + executeQuickActionOnWebhook: Webhook; + executeQuickActionOnWorkspaceMember: WorkspaceMember; + generateApiKeyToken: ApiKeyToken; + generateTransientToken: TransientToken; + impersonate: Verify; + renewToken: AuthTokens; + signUp: LoginToken; + updateActivities: Array; + updateActivity: Activity; + updateActivityTarget: ActivityTarget; + updateActivityTargets: Array; + updateApiKey: ApiKey; + updateApiKeys: Array; + updateAttachment: Attachment; + updateAttachments: Array; + updateBlocklist: Blocklist; + updateBlocklists: Array; + updateComment: Comment; + updateComments: Array; + updateCompanies: Array; + updateCompany: Company; + updateConnectedAccount: ConnectedAccount; + updateConnectedAccounts: Array; + updateFavorite: Favorite; + updateFavorites: Array; + updateMessage: Message; + updateMessageChannel: MessageChannel; + updateMessageChannelMessageAssociation: MessageChannelMessageAssociation; + updateMessageChannelMessageAssociations: Array; + updateMessageChannels: Array; + updateMessageParticipant: MessageParticipant; + updateMessageParticipants: Array; + updateMessageThread: MessageThread; + updateMessageThreads: Array; + updateMessages: Array; + updateOneObject: Object; + updateOpportunities: Array; + updateOpportunity: Opportunity; + updatePasswordViaResetToken: InvalidatePassword; + updatePeople: Array; + updatePerson: Person; + updatePipelineStep: PipelineStep; + updatePipelineSteps: Array; + updateView: View; + updateViewField: ViewField; + updateViewFields: Array; + updateViewFilter: ViewFilter; + updateViewFilters: Array; + updateViewSort: ViewSort; + updateViewSorts: Array; + updateViews: Array; + updateWebhook: Webhook; + updateWebhooks: Array; + updateWorkspace: Workspace; + updateWorkspaceMember: WorkspaceMember; + updateWorkspaceMembers: Array; + uploadFile: Scalars['String']; + uploadImage: Scalars['String']; + uploadProfilePicture: Scalars['String']; + uploadWorkspaceLogo: Scalars['String']; + verify: Verify; +}; + + +export type MutationActivateWorkspaceArgs = { + data: ActivateWorkspaceInput; +}; + + +export type MutationChallengeArgs = { + email: Scalars['String']; + password: Scalars['String']; +}; + + +export type MutationCheckoutArgs = { + recurringInterval: Scalars['String']; + successUrlPath?: InputMaybe; +}; + + +export type MutationCreateActivitiesArgs = { + data: Array; +}; + + +export type MutationCreateActivityArgs = { + data: ActivityCreateInput; +}; + + +export type MutationCreateActivityTargetArgs = { + data: ActivityTargetCreateInput; +}; + + +export type MutationCreateActivityTargetsArgs = { + data: Array; +}; + + +export type MutationCreateApiKeyArgs = { + data: ApiKeyCreateInput; +}; + + +export type MutationCreateApiKeysArgs = { + data: Array; +}; + + +export type MutationCreateAttachmentArgs = { + data: AttachmentCreateInput; +}; + + +export type MutationCreateAttachmentsArgs = { + data: Array; +}; + + +export type MutationCreateBlocklistArgs = { + data: BlocklistCreateInput; +}; + + +export type MutationCreateBlocklistsArgs = { + data: Array; +}; + + +export type MutationCreateCommentArgs = { + data: CommentCreateInput; +}; + + +export type MutationCreateCommentsArgs = { + data: Array; +}; + + +export type MutationCreateCompaniesArgs = { + data: Array; +}; + + +export type MutationCreateCompanyArgs = { + data: CompanyCreateInput; +}; + + +export type MutationCreateConnectedAccountArgs = { + data: ConnectedAccountCreateInput; +}; + + +export type MutationCreateConnectedAccountsArgs = { + data: Array; +}; + + +export type MutationCreateEventArgs = { + data: Scalars['JSON']; + type: Scalars['String']; +}; + + +export type MutationCreateFavoriteArgs = { + data: FavoriteCreateInput; +}; + + +export type MutationCreateFavoritesArgs = { + data: Array; +}; + + +export type MutationCreateMessageArgs = { + data: MessageCreateInput; +}; + + +export type MutationCreateMessageChannelArgs = { + data: MessageChannelCreateInput; +}; + + +export type MutationCreateMessageChannelMessageAssociationArgs = { + data: MessageChannelMessageAssociationCreateInput; +}; + + +export type MutationCreateMessageChannelMessageAssociationsArgs = { + data: Array; +}; + + +export type MutationCreateMessageChannelsArgs = { + data: Array; +}; + + +export type MutationCreateMessageParticipantArgs = { + data: MessageParticipantCreateInput; +}; + + +export type MutationCreateMessageParticipantsArgs = { + data: Array; +}; + + +export type MutationCreateMessageThreadArgs = { + data: MessageThreadCreateInput; +}; + + +export type MutationCreateMessageThreadsArgs = { + data: Array; +}; + + +export type MutationCreateMessagesArgs = { + data: Array; +}; + + +export type MutationCreateOpportunitiesArgs = { + data: Array; +}; + + +export type MutationCreateOpportunityArgs = { + data: OpportunityCreateInput; +}; + + +export type MutationCreatePeopleArgs = { + data: Array; +}; + + +export type MutationCreatePersonArgs = { + data: PersonCreateInput; +}; + + +export type MutationCreatePipelineStepArgs = { + data: PipelineStepCreateInput; +}; + + +export type MutationCreatePipelineStepsArgs = { + data: Array; +}; + + +export type MutationCreateViewArgs = { + data: ViewCreateInput; +}; + + +export type MutationCreateViewFieldArgs = { + data: ViewFieldCreateInput; +}; + + +export type MutationCreateViewFieldsArgs = { + data: Array; +}; + + +export type MutationCreateViewFilterArgs = { + data: ViewFilterCreateInput; +}; + + +export type MutationCreateViewFiltersArgs = { + data: Array; +}; + + +export type MutationCreateViewSortArgs = { + data: ViewSortCreateInput; +}; + + +export type MutationCreateViewSortsArgs = { + data: Array; +}; + + +export type MutationCreateViewsArgs = { + data: Array; +}; + + +export type MutationCreateWebhookArgs = { + data: WebhookCreateInput; +}; + + +export type MutationCreateWebhooksArgs = { + data: Array; +}; + + +export type MutationCreateWorkspaceMemberArgs = { + data: WorkspaceMemberCreateInput; +}; + + +export type MutationCreateWorkspaceMembersArgs = { + data: Array; +}; + + +export type MutationDeleteActivitiesArgs = { + filter: ActivityFilterInput; +}; + + +export type MutationDeleteActivityArgs = { + id: Scalars['ID']; +}; + + +export type MutationDeleteActivityTargetArgs = { + id: Scalars['ID']; +}; + + +export type MutationDeleteActivityTargetsArgs = { + filter: ActivityTargetFilterInput; +}; + + +export type MutationDeleteApiKeyArgs = { + id: Scalars['ID']; +}; + + +export type MutationDeleteApiKeysArgs = { + filter: ApiKeyFilterInput; +}; + + +export type MutationDeleteAttachmentArgs = { + id: Scalars['ID']; +}; + + +export type MutationDeleteAttachmentsArgs = { + filter: AttachmentFilterInput; +}; + + +export type MutationDeleteBlocklistArgs = { + id: Scalars['ID']; +}; + + +export type MutationDeleteBlocklistsArgs = { + filter: BlocklistFilterInput; +}; + + +export type MutationDeleteCommentArgs = { + id: Scalars['ID']; +}; + + +export type MutationDeleteCommentsArgs = { + filter: CommentFilterInput; +}; + + +export type MutationDeleteCompaniesArgs = { + filter: CompanyFilterInput; +}; + + +export type MutationDeleteCompanyArgs = { + id: Scalars['ID']; +}; + + +export type MutationDeleteConnectedAccountArgs = { + id: Scalars['ID']; +}; + + +export type MutationDeleteConnectedAccountsArgs = { + filter: ConnectedAccountFilterInput; +}; + + +export type MutationDeleteFavoriteArgs = { + id: Scalars['ID']; +}; + + +export type MutationDeleteFavoritesArgs = { + filter: FavoriteFilterInput; +}; + + +export type MutationDeleteMessageArgs = { + id: Scalars['ID']; +}; + + +export type MutationDeleteMessageChannelArgs = { + id: Scalars['ID']; +}; + + +export type MutationDeleteMessageChannelMessageAssociationArgs = { + id: Scalars['ID']; +}; + + +export type MutationDeleteMessageChannelMessageAssociationsArgs = { + filter: MessageChannelMessageAssociationFilterInput; +}; + + +export type MutationDeleteMessageChannelsArgs = { + filter: MessageChannelFilterInput; +}; + + +export type MutationDeleteMessageParticipantArgs = { + id: Scalars['ID']; +}; + + +export type MutationDeleteMessageParticipantsArgs = { + filter: MessageParticipantFilterInput; +}; + + +export type MutationDeleteMessageThreadArgs = { + id: Scalars['ID']; +}; + + +export type MutationDeleteMessageThreadsArgs = { + filter: MessageThreadFilterInput; +}; + + +export type MutationDeleteMessagesArgs = { + filter: MessageFilterInput; +}; + + +export type MutationDeleteOneObjectArgs = { + input: DeleteOneObjectInput; +}; + + +export type MutationDeleteOpportunitiesArgs = { + filter: OpportunityFilterInput; +}; + + +export type MutationDeleteOpportunityArgs = { + id: Scalars['ID']; +}; + + +export type MutationDeletePeopleArgs = { + filter: PersonFilterInput; +}; + + +export type MutationDeletePersonArgs = { + id: Scalars['ID']; +}; + + +export type MutationDeletePipelineStepArgs = { + id: Scalars['ID']; +}; + + +export type MutationDeletePipelineStepsArgs = { + filter: PipelineStepFilterInput; +}; + + +export type MutationDeleteViewArgs = { + id: Scalars['ID']; +}; + + +export type MutationDeleteViewFieldArgs = { + id: Scalars['ID']; +}; + + +export type MutationDeleteViewFieldsArgs = { + filter: ViewFieldFilterInput; +}; + + +export type MutationDeleteViewFilterArgs = { + id: Scalars['ID']; +}; + + +export type MutationDeleteViewFiltersArgs = { + filter: ViewFilterFilterInput; +}; + + +export type MutationDeleteViewSortArgs = { + id: Scalars['ID']; +}; + + +export type MutationDeleteViewSortsArgs = { + filter: ViewSortFilterInput; +}; + + +export type MutationDeleteViewsArgs = { + filter: ViewFilterInput; +}; + + +export type MutationDeleteWebhookArgs = { + id: Scalars['ID']; +}; + + +export type MutationDeleteWebhooksArgs = { + filter: WebhookFilterInput; +}; + + +export type MutationDeleteWorkspaceMemberArgs = { + id: Scalars['ID']; +}; + + +export type MutationDeleteWorkspaceMembersArgs = { + filter: WorkspaceMemberFilterInput; +}; + + +export type MutationEmailPasswordResetLinkArgs = { + email: Scalars['String']; +}; + + +export type MutationExecuteQuickActionOnActivityArgs = { + id: Scalars['ID']; +}; + + +export type MutationExecuteQuickActionOnActivityTargetArgs = { + id: Scalars['ID']; +}; + + +export type MutationExecuteQuickActionOnApiKeyArgs = { + id: Scalars['ID']; +}; + + +export type MutationExecuteQuickActionOnAttachmentArgs = { + id: Scalars['ID']; +}; + + +export type MutationExecuteQuickActionOnBlocklistArgs = { + id: Scalars['ID']; +}; + + +export type MutationExecuteQuickActionOnCommentArgs = { + id: Scalars['ID']; +}; + + +export type MutationExecuteQuickActionOnCompanyArgs = { + id: Scalars['ID']; +}; + + +export type MutationExecuteQuickActionOnConnectedAccountArgs = { + id: Scalars['ID']; +}; + + +export type MutationExecuteQuickActionOnFavoriteArgs = { + id: Scalars['ID']; +}; + + +export type MutationExecuteQuickActionOnMessageArgs = { + id: Scalars['ID']; +}; + + +export type MutationExecuteQuickActionOnMessageChannelArgs = { + id: Scalars['ID']; +}; + + +export type MutationExecuteQuickActionOnMessageChannelMessageAssociationArgs = { + id: Scalars['ID']; +}; + + +export type MutationExecuteQuickActionOnMessageParticipantArgs = { + id: Scalars['ID']; +}; + + +export type MutationExecuteQuickActionOnMessageThreadArgs = { + id: Scalars['ID']; +}; + + +export type MutationExecuteQuickActionOnOpportunityArgs = { + id: Scalars['ID']; +}; + + +export type MutationExecuteQuickActionOnPersonArgs = { + id: Scalars['ID']; +}; + + +export type MutationExecuteQuickActionOnPipelineStepArgs = { + id: Scalars['ID']; +}; + + +export type MutationExecuteQuickActionOnViewArgs = { + id: Scalars['ID']; +}; + + +export type MutationExecuteQuickActionOnViewFieldArgs = { + id: Scalars['ID']; +}; + + +export type MutationExecuteQuickActionOnViewFilterArgs = { + id: Scalars['ID']; +}; + + +export type MutationExecuteQuickActionOnViewSortArgs = { + id: Scalars['ID']; +}; + + +export type MutationExecuteQuickActionOnWebhookArgs = { + id: Scalars['ID']; +}; + + +export type MutationExecuteQuickActionOnWorkspaceMemberArgs = { + id: Scalars['ID']; +}; + + +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 MutationUpdateActivitiesArgs = { + data: ActivityUpdateInput; + filter: ActivityFilterInput; +}; + + +export type MutationUpdateActivityArgs = { + data: ActivityUpdateInput; + id: Scalars['ID']; +}; + + +export type MutationUpdateActivityTargetArgs = { + data: ActivityTargetUpdateInput; + id: Scalars['ID']; +}; + + +export type MutationUpdateActivityTargetsArgs = { + data: ActivityTargetUpdateInput; + filter: ActivityTargetFilterInput; +}; + + +export type MutationUpdateApiKeyArgs = { + data: ApiKeyUpdateInput; + id: Scalars['ID']; +}; + + +export type MutationUpdateApiKeysArgs = { + data: ApiKeyUpdateInput; + filter: ApiKeyFilterInput; +}; + + +export type MutationUpdateAttachmentArgs = { + data: AttachmentUpdateInput; + id: Scalars['ID']; +}; + + +export type MutationUpdateAttachmentsArgs = { + data: AttachmentUpdateInput; + filter: AttachmentFilterInput; +}; + + +export type MutationUpdateBlocklistArgs = { + data: BlocklistUpdateInput; + id: Scalars['ID']; +}; + + +export type MutationUpdateBlocklistsArgs = { + data: BlocklistUpdateInput; + filter: BlocklistFilterInput; +}; + + +export type MutationUpdateCommentArgs = { + data: CommentUpdateInput; + id: Scalars['ID']; +}; + + +export type MutationUpdateCommentsArgs = { + data: CommentUpdateInput; + filter: CommentFilterInput; +}; + + +export type MutationUpdateCompaniesArgs = { + data: CompanyUpdateInput; + filter: CompanyFilterInput; +}; + + +export type MutationUpdateCompanyArgs = { + data: CompanyUpdateInput; + id: Scalars['ID']; +}; + + +export type MutationUpdateConnectedAccountArgs = { + data: ConnectedAccountUpdateInput; + id: Scalars['ID']; +}; + + +export type MutationUpdateConnectedAccountsArgs = { + data: ConnectedAccountUpdateInput; + filter: ConnectedAccountFilterInput; +}; + + +export type MutationUpdateFavoriteArgs = { + data: FavoriteUpdateInput; + id: Scalars['ID']; +}; + + +export type MutationUpdateFavoritesArgs = { + data: FavoriteUpdateInput; + filter: FavoriteFilterInput; +}; + + +export type MutationUpdateMessageArgs = { + data: MessageUpdateInput; + id: Scalars['ID']; +}; + + +export type MutationUpdateMessageChannelArgs = { + data: MessageChannelUpdateInput; + id: Scalars['ID']; +}; + + +export type MutationUpdateMessageChannelMessageAssociationArgs = { + data: MessageChannelMessageAssociationUpdateInput; + id: Scalars['ID']; +}; + + +export type MutationUpdateMessageChannelMessageAssociationsArgs = { + data: MessageChannelMessageAssociationUpdateInput; + filter: MessageChannelMessageAssociationFilterInput; +}; + + +export type MutationUpdateMessageChannelsArgs = { + data: MessageChannelUpdateInput; + filter: MessageChannelFilterInput; +}; + + +export type MutationUpdateMessageParticipantArgs = { + data: MessageParticipantUpdateInput; + id: Scalars['ID']; +}; + + +export type MutationUpdateMessageParticipantsArgs = { + data: MessageParticipantUpdateInput; + filter: MessageParticipantFilterInput; +}; + + +export type MutationUpdateMessageThreadArgs = { + data: MessageThreadUpdateInput; + id: Scalars['ID']; +}; + + +export type MutationUpdateMessageThreadsArgs = { + data: MessageThreadUpdateInput; + filter: MessageThreadFilterInput; +}; + + +export type MutationUpdateMessagesArgs = { + data: MessageUpdateInput; + filter: MessageFilterInput; +}; + + +export type MutationUpdateOpportunitiesArgs = { + data: OpportunityUpdateInput; + filter: OpportunityFilterInput; +}; + + +export type MutationUpdateOpportunityArgs = { + data: OpportunityUpdateInput; + id: Scalars['ID']; +}; + + +export type MutationUpdatePasswordViaResetTokenArgs = { + newPassword: Scalars['String']; + passwordResetToken: Scalars['String']; +}; + + +export type MutationUpdatePeopleArgs = { + data: PersonUpdateInput; + filter: PersonFilterInput; +}; + + +export type MutationUpdatePersonArgs = { + data: PersonUpdateInput; + id: Scalars['ID']; +}; + + +export type MutationUpdatePipelineStepArgs = { + data: PipelineStepUpdateInput; + id: Scalars['ID']; +}; + + +export type MutationUpdatePipelineStepsArgs = { + data: PipelineStepUpdateInput; + filter: PipelineStepFilterInput; +}; + + +export type MutationUpdateViewArgs = { + data: ViewUpdateInput; + id: Scalars['ID']; +}; + + +export type MutationUpdateViewFieldArgs = { + data: ViewFieldUpdateInput; + id: Scalars['ID']; +}; + + +export type MutationUpdateViewFieldsArgs = { + data: ViewFieldUpdateInput; + filter: ViewFieldFilterInput; +}; + + +export type MutationUpdateViewFilterArgs = { + data: ViewFilterUpdateInput; + id: Scalars['ID']; +}; + + +export type MutationUpdateViewFiltersArgs = { + data: ViewFilterUpdateInput; + filter: ViewFilterFilterInput; +}; + + +export type MutationUpdateViewSortArgs = { + data: ViewSortUpdateInput; + id: Scalars['ID']; +}; + + +export type MutationUpdateViewSortsArgs = { + data: ViewSortUpdateInput; + filter: ViewSortFilterInput; +}; + + +export type MutationUpdateViewsArgs = { + data: ViewUpdateInput; + filter: ViewFilterInput; +}; + + +export type MutationUpdateWebhookArgs = { + data: WebhookUpdateInput; + id: Scalars['ID']; +}; + + +export type MutationUpdateWebhooksArgs = { + data: WebhookUpdateInput; + filter: WebhookFilterInput; +}; + + +export type MutationUpdateWorkspaceArgs = { + data: UpdateWorkspaceInput; +}; + + +export type MutationUpdateWorkspaceMemberArgs = { + data: WorkspaceMemberUpdateInput; + id: Scalars['ID']; +}; + + +export type MutationUpdateWorkspaceMembersArgs = { + data: WorkspaceMemberUpdateInput; + filter: WorkspaceMemberFilterInput; +}; + + +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 = { + /** Array of edges. */ + edges: Array; + /** Paging information */ + pageInfo: PageInfo; + /** Fetch total count of records */ + totalCount: Scalars['Int']; +}; + +export type ObjectFieldsConnection = { + /** Array of edges. */ + edges: Array; + /** Paging information */ + pageInfo: PageInfo; + /** Fetch total count of records */ + totalCount: Scalars['Int']; +}; + +/** An opportunity */ +export type Opportunity = { + /** Activities tied to the opportunity */ + activityTargets?: Maybe; + /** Opportunity amount */ + amount?: Maybe; + /** Attachments linked to the opportunity. */ + attachments?: Maybe; + /** Opportunity close date */ + closeDate?: Maybe; + /** Opportunity company */ + company?: Maybe; + /** Opportunity company id foreign key */ + companyId?: Maybe; + createdAt: Scalars['DateTime']; + deletedAt?: Maybe; + /** Favorites linked to the opportunity */ + favorites?: Maybe; + id: Scalars['ID']; + /** The opportunity name */ + name: Scalars['String']; + /** Opportunity pipeline step */ + pipelineStep?: Maybe; + /** Opportunity pipeline step id foreign key */ + pipelineStepId?: Maybe; + /** Opportunity point of contact */ + pointOfContact?: Maybe; + /** Opportunity point of contact id foreign key */ + pointOfContactId?: Maybe; + /** Position */ + position?: Maybe; + /** Opportunity probability */ + probability: Scalars['String']; + /** Opportunity stage */ + stage: OpportunityStageEnum; + updatedAt: Scalars['DateTime']; +}; + + +/** An opportunity */ +export type OpportunityActivityTargetsArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + + +/** An opportunity */ +export type OpportunityAttachmentsArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + + +/** An opportunity */ +export type OpportunityFavoritesArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + +/** An opportunity */ +export type OpportunityConnection = { + edges: Array; + pageInfo: PageInfo; + /** Total number of records in the connection */ + totalCount?: Maybe; +}; + +/** An opportunity */ +export type OpportunityCreateInput = { + /** Opportunity amount */ + amount?: InputMaybe; + /** Opportunity close date */ + closeDate?: InputMaybe; + /** Opportunity company id foreign key */ + companyId?: InputMaybe; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + id?: InputMaybe; + /** The opportunity name */ + name?: InputMaybe; + /** Opportunity pipeline step id foreign key */ + pipelineStepId?: InputMaybe; + /** Opportunity point of contact id foreign key */ + pointOfContactId?: InputMaybe; + /** Position */ + position?: InputMaybe; + /** Opportunity probability */ + probability?: InputMaybe; + /** Opportunity stage */ + stage?: InputMaybe; + updatedAt?: InputMaybe; +}; + +/** An opportunity */ +export type OpportunityEdge = { + cursor: Scalars['Cursor']; + node: Opportunity; +}; + +/** An opportunity */ +export type OpportunityFilterInput = { + /** Opportunity amount */ + amount?: InputMaybe; + and?: InputMaybe>>; + /** Opportunity close date */ + closeDate?: InputMaybe; + /** Opportunity company id foreign key */ + companyId?: InputMaybe; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + id?: InputMaybe; + /** The opportunity name */ + name?: InputMaybe; + not?: InputMaybe; + or?: InputMaybe>>; + /** Opportunity pipeline step id foreign key */ + pipelineStepId?: InputMaybe; + /** Opportunity point of contact id foreign key */ + pointOfContactId?: InputMaybe; + /** Position */ + position?: InputMaybe; + /** Opportunity probability */ + probability?: InputMaybe; + /** Opportunity stage */ + stage?: InputMaybe; + updatedAt?: InputMaybe; +}; + +/** An opportunity */ +export type OpportunityOrderByInput = { + /** Opportunity amount */ + amount?: InputMaybe; + /** Opportunity close date */ + closeDate?: InputMaybe; + /** Opportunity company id foreign key */ + companyId?: InputMaybe; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + id?: InputMaybe; + /** The opportunity name */ + name?: InputMaybe; + /** Opportunity pipeline step id foreign key */ + pipelineStepId?: InputMaybe; + /** Opportunity point of contact id foreign key */ + pointOfContactId?: InputMaybe; + /** Position */ + position?: InputMaybe; + /** Opportunity probability */ + probability?: InputMaybe; + /** Opportunity stage */ + stage?: InputMaybe; + updatedAt?: InputMaybe; +}; + +/** Opportunity stage */ +export enum OpportunityStageEnum { + /** Customer */ + Customer = 'CUSTOMER', + /** Meeting */ + Meeting = 'MEETING', + /** New */ + New = 'NEW', + /** Proposal */ + Proposal = 'PROPOSAL', + /** Screening */ + Screening = 'SCREENING' +} + +export type OpportunityStageEnumFilter = { + eq?: InputMaybe; + in?: InputMaybe>>; + is?: InputMaybe; + neq?: InputMaybe; +}; + +/** An opportunity */ +export type OpportunityUpdateInput = { + /** Opportunity amount */ + amount?: InputMaybe; + /** Opportunity close date */ + closeDate?: InputMaybe; + /** Opportunity company id foreign key */ + companyId?: InputMaybe; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + id?: InputMaybe; + /** The opportunity name */ + name?: InputMaybe; + /** Opportunity pipeline step id foreign key */ + pipelineStepId?: InputMaybe; + /** Opportunity point of contact id foreign key */ + pointOfContactId?: InputMaybe; + /** Position */ + position?: InputMaybe; + /** Opportunity probability */ + probability?: InputMaybe; + /** Opportunity stage */ + stage?: InputMaybe; + updatedAt?: InputMaybe; +}; + +/** This enum is used to specify the order of results */ +export enum OrderByDirection { + /** Ascending order, nulls first */ + AscNullsFirst = 'AscNullsFirst', + /** Ascending order, nulls last */ + AscNullsLast = 'AscNullsLast', + /** Descending order, nulls first */ + DescNullsFirst = 'DescNullsFirst', + /** Descending order, nulls last */ + DescNullsLast = 'DescNullsLast' +} + +export type PageInfo = { + /** The cursor of the last returned record. */ + endCursor?: Maybe; + /** true if paging forward and there are more records. */ + hasNextPage: Scalars['Boolean']; + /** true if paging backwards and there are more records. */ + hasPreviousPage: Scalars['Boolean']; + /** The cursor of the first returned record. */ + startCursor?: Maybe; +}; + +/** A person */ +export type Person = { + /** Activities tied to the contact */ + activityTargets?: Maybe; + /** Attachments linked to the contact. */ + attachments?: Maybe; + /** Contact’s avatar */ + avatarUrl: Scalars['String']; + /** Contact’s city */ + city: Scalars['String']; + /** Contact’s company */ + company?: Maybe; + /** Contact’s company id foreign key */ + companyId?: Maybe; + createdAt: Scalars['DateTime']; + deletedAt?: Maybe; + /** Contact’s Email */ + email: Scalars['String']; + /** Favorites linked to the contact */ + favorites?: Maybe; + id: Scalars['ID']; + /** Contact’s job title */ + jobTitle: Scalars['String']; + /** Contact’s Linkedin account */ + linkedinLink?: Maybe; + /** Message Participants */ + messageParticipants?: Maybe; + /** Contact’s name */ + name?: Maybe; + /** Contact’s phone number */ + phone: Scalars['String']; + /** Point of Contact for Opportunities */ + pointOfContactForOpportunities?: Maybe; + /** Record Position */ + position?: Maybe; + updatedAt: Scalars['DateTime']; + /** Contact’s X/Twitter account */ + xLink?: Maybe; +}; + + +/** A person */ +export type PersonActivityTargetsArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + + +/** A person */ +export type PersonAttachmentsArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + + +/** A person */ +export type PersonFavoritesArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + + +/** A person */ +export type PersonMessageParticipantsArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + + +/** A person */ +export type PersonPointOfContactForOpportunitiesArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + +/** A person */ +export type PersonConnection = { + edges: Array; + pageInfo: PageInfo; + /** Total number of records in the connection */ + totalCount?: Maybe; +}; + +/** A person */ +export type PersonCreateInput = { + /** Contact’s avatar */ + avatarUrl?: InputMaybe; + /** Contact’s city */ + city?: InputMaybe; + /** Contact’s company id foreign key */ + companyId?: InputMaybe; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + /** Contact’s Email */ + email?: InputMaybe; + id?: InputMaybe; + /** Contact’s job title */ + jobTitle?: InputMaybe; + /** Contact’s Linkedin account */ + linkedinLink?: InputMaybe; + /** Contact’s name */ + name?: InputMaybe; + /** Contact’s phone number */ + phone?: InputMaybe; + /** Record Position */ + position?: InputMaybe; + updatedAt?: InputMaybe; + /** Contact’s X/Twitter account */ + xLink?: InputMaybe; +}; + +/** A person */ +export type PersonEdge = { + cursor: Scalars['Cursor']; + node: Person; +}; + +/** A person */ +export type PersonFilterInput = { + and?: InputMaybe>>; + /** Contact’s avatar */ + avatarUrl?: InputMaybe; + /** Contact’s city */ + city?: InputMaybe; + /** Contact’s company id foreign key */ + companyId?: InputMaybe; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + /** Contact’s Email */ + email?: InputMaybe; + id?: InputMaybe; + /** Contact’s job title */ + jobTitle?: InputMaybe; + /** Contact’s Linkedin account */ + linkedinLink?: InputMaybe; + /** Contact’s name */ + name?: InputMaybe; + not?: InputMaybe; + or?: InputMaybe>>; + /** Contact’s phone number */ + phone?: InputMaybe; + /** Record Position */ + position?: InputMaybe; + updatedAt?: InputMaybe; + /** Contact’s X/Twitter account */ + xLink?: InputMaybe; +}; + +/** A person */ +export type PersonOrderByInput = { + /** Contact’s avatar */ + avatarUrl?: InputMaybe; + /** Contact’s city */ + city?: InputMaybe; + /** Contact’s company id foreign key */ + companyId?: InputMaybe; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + /** Contact’s Email */ + email?: InputMaybe; + id?: InputMaybe; + /** Contact’s job title */ + jobTitle?: InputMaybe; + /** Contact’s Linkedin account */ + linkedinLink?: InputMaybe; + /** Contact’s name */ + name?: InputMaybe; + /** Contact’s phone number */ + phone?: InputMaybe; + /** Record Position */ + position?: InputMaybe; + updatedAt?: InputMaybe; + /** Contact’s X/Twitter account */ + xLink?: InputMaybe; +}; + +/** A person */ +export type PersonUpdateInput = { + /** Contact’s avatar */ + avatarUrl?: InputMaybe; + /** Contact’s city */ + city?: InputMaybe; + /** Contact’s company id foreign key */ + companyId?: InputMaybe; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + /** Contact’s Email */ + email?: InputMaybe; + id?: InputMaybe; + /** Contact’s job title */ + jobTitle?: InputMaybe; + /** Contact’s Linkedin account */ + linkedinLink?: InputMaybe; + /** Contact’s name */ + name?: InputMaybe; + /** Contact’s phone number */ + phone?: InputMaybe; + /** Record Position */ + position?: InputMaybe; + updatedAt?: InputMaybe; + /** Contact’s X/Twitter account */ + xLink?: InputMaybe; +}; + +/** A pipeline step */ +export type PipelineStep = { + /** Pipeline Step color */ + color: Scalars['String']; + createdAt: Scalars['DateTime']; + deletedAt?: Maybe; + id: Scalars['ID']; + /** Pipeline Step name */ + name: Scalars['String']; + /** Opportunities linked to the step. */ + opportunities?: Maybe; + /** Pipeline Step position */ + position?: Maybe; + updatedAt: Scalars['DateTime']; +}; + + +/** A pipeline step */ +export type PipelineStepOpportunitiesArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + +/** A pipeline step */ +export type PipelineStepConnection = { + edges: Array; + pageInfo: PageInfo; + /** Total number of records in the connection */ + totalCount?: Maybe; +}; + +/** A pipeline step */ +export type PipelineStepCreateInput = { + /** Pipeline Step color */ + color?: InputMaybe; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + id?: InputMaybe; + /** Pipeline Step name */ + name?: InputMaybe; + /** Pipeline Step position */ + position?: InputMaybe; + updatedAt?: InputMaybe; +}; + +/** A pipeline step */ +export type PipelineStepEdge = { + cursor: Scalars['Cursor']; + node: PipelineStep; +}; + +/** A pipeline step */ +export type PipelineStepFilterInput = { + and?: InputMaybe>>; + /** Pipeline Step color */ + color?: InputMaybe; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + id?: InputMaybe; + /** Pipeline Step name */ + name?: InputMaybe; + not?: InputMaybe; + or?: InputMaybe>>; + /** Pipeline Step position */ + position?: InputMaybe; + updatedAt?: InputMaybe; +}; + +/** A pipeline step */ +export type PipelineStepOrderByInput = { + /** Pipeline Step color */ + color?: InputMaybe; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + id?: InputMaybe; + /** Pipeline Step name */ + name?: InputMaybe; + /** Pipeline Step position */ + position?: InputMaybe; + updatedAt?: InputMaybe; +}; + +/** A pipeline step */ +export type PipelineStepUpdateInput = { + /** Pipeline Step color */ + color?: InputMaybe; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + id?: InputMaybe; + /** Pipeline Step name */ + name?: InputMaybe; + /** Pipeline Step position */ + position?: InputMaybe; + updatedAt?: InputMaybe; +}; + +export type ProductPriceEntity = { + created: Scalars['Float']; + recurringInterval: Scalars['String']; + stripePriceId: Scalars['String']; + unitAmount: Scalars['Float']; +}; + +export type ProductPricesEntity = { + productPrices: Array; + totalNumberOfPrices: Scalars['Int']; +}; + +export type Query = { + activities: ActivityConnection; + activity: Activity; + activityDuplicates: ActivityConnection; + activityTarget: ActivityTarget; + activityTargetDuplicates: ActivityTargetConnection; + activityTargets: ActivityTargetConnection; + apiKey: ApiKey; + apiKeyDuplicates: ApiKeyConnection; + apiKeys: ApiKeyConnection; + attachment: Attachment; + attachmentDuplicates: AttachmentConnection; + attachments: AttachmentConnection; + blocklist: Blocklist; + blocklistDuplicates: BlocklistConnection; + blocklists: BlocklistConnection; + checkUserExists: UserExists; + checkWorkspaceInviteHashIsValid: WorkspaceInviteHashValid; + clientConfig: ClientConfig; + comment: Comment; + commentDuplicates: CommentConnection; + comments: CommentConnection; + companies: CompanyConnection; + company: Company; + companyDuplicates: CompanyConnection; + connectedAccount: ConnectedAccount; + connectedAccountDuplicates: ConnectedAccountConnection; + connectedAccounts: ConnectedAccountConnection; + currentUser: User; + currentWorkspace: Workspace; + favorite: Favorite; + favoriteDuplicates: FavoriteConnection; + favorites: FavoriteConnection; + findWorkspaceFromInviteHash: Workspace; + getProductPrices: ProductPricesEntity; + getTimelineThreadsFromCompanyId: TimelineThreadsWithTotal; + getTimelineThreadsFromPersonId: TimelineThreadsWithTotal; + message: Message; + messageChannel: MessageChannel; + messageChannelDuplicates: MessageChannelConnection; + messageChannelMessageAssociation: MessageChannelMessageAssociation; + messageChannelMessageAssociationDuplicates: MessageChannelMessageAssociationConnection; + messageChannelMessageAssociations: MessageChannelMessageAssociationConnection; + messageChannels: MessageChannelConnection; + messageDuplicates: MessageConnection; + messageParticipant: MessageParticipant; + messageParticipantDuplicates: MessageParticipantConnection; + messageParticipants: MessageParticipantConnection; + messageThread: MessageThread; + messageThreadDuplicates: MessageThreadConnection; + messageThreads: MessageThreadConnection; + messages: MessageConnection; + object: Object; + objects: ObjectConnection; + opportunities: OpportunityConnection; + opportunity: Opportunity; + opportunityDuplicates: OpportunityConnection; + people: PersonConnection; + person: Person; + personDuplicates: PersonConnection; + pipelineStep: PipelineStep; + pipelineStepDuplicates: PipelineStepConnection; + pipelineSteps: PipelineStepConnection; + validatePasswordResetToken: ValidatePasswordResetToken; + view: View; + viewDuplicates: ViewConnection; + viewField: ViewField; + viewFieldDuplicates: ViewFieldConnection; + viewFields: ViewFieldConnection; + viewFilter: ViewFilter; + viewFilterDuplicates: ViewFilterConnection; + viewFilters: ViewFilterConnection; + viewSort: ViewSort; + viewSortDuplicates: ViewSortConnection; + viewSorts: ViewSortConnection; + views: ViewConnection; + webhook: Webhook; + webhookDuplicates: WebhookConnection; + webhooks: WebhookConnection; + workspaceMember: WorkspaceMember; + workspaceMemberDuplicates: WorkspaceMemberConnection; + workspaceMembers: WorkspaceMemberConnection; +}; + + +export type QueryActivitiesArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + + +export type QueryActivityArgs = { + filter: ActivityFilterInput; +}; + + +export type QueryActivityDuplicatesArgs = { + data?: InputMaybe; + id?: InputMaybe; +}; + + +export type QueryActivityTargetArgs = { + filter: ActivityTargetFilterInput; +}; + + +export type QueryActivityTargetDuplicatesArgs = { + data?: InputMaybe; + id?: InputMaybe; +}; + + +export type QueryActivityTargetsArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + + +export type QueryApiKeyArgs = { + filter: ApiKeyFilterInput; +}; + + +export type QueryApiKeyDuplicatesArgs = { + data?: InputMaybe; + id?: InputMaybe; +}; + + +export type QueryApiKeysArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + + +export type QueryAttachmentArgs = { + filter: AttachmentFilterInput; +}; + + +export type QueryAttachmentDuplicatesArgs = { + data?: InputMaybe; + id?: InputMaybe; +}; + + +export type QueryAttachmentsArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + + +export type QueryBlocklistArgs = { + filter: BlocklistFilterInput; +}; + + +export type QueryBlocklistDuplicatesArgs = { + data?: InputMaybe; + id?: InputMaybe; +}; + + +export type QueryBlocklistsArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + + +export type QueryCheckUserExistsArgs = { + email: Scalars['String']; +}; + + +export type QueryCheckWorkspaceInviteHashIsValidArgs = { + inviteHash: Scalars['String']; +}; + + +export type QueryCommentArgs = { + filter: CommentFilterInput; +}; + + +export type QueryCommentDuplicatesArgs = { + data?: InputMaybe; + id?: InputMaybe; +}; + + +export type QueryCommentsArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + + +export type QueryCompaniesArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + + +export type QueryCompanyArgs = { + filter: CompanyFilterInput; +}; + + +export type QueryCompanyDuplicatesArgs = { + data?: InputMaybe; + id?: InputMaybe; +}; + + +export type QueryConnectedAccountArgs = { + filter: ConnectedAccountFilterInput; +}; + + +export type QueryConnectedAccountDuplicatesArgs = { + data?: InputMaybe; + id?: InputMaybe; +}; + + +export type QueryConnectedAccountsArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + + +export type QueryFavoriteArgs = { + filter: FavoriteFilterInput; +}; + + +export type QueryFavoriteDuplicatesArgs = { + data?: InputMaybe; + id?: InputMaybe; +}; + + +export type QueryFavoritesArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + + +export type QueryFindWorkspaceFromInviteHashArgs = { + inviteHash: Scalars['String']; +}; + + +export type QueryGetProductPricesArgs = { + product: Scalars['String']; +}; + + +export type QueryGetTimelineThreadsFromCompanyIdArgs = { + companyId: Scalars['ID']; + page: Scalars['Int']; + pageSize: Scalars['Int']; +}; + + +export type QueryGetTimelineThreadsFromPersonIdArgs = { + page: Scalars['Int']; + pageSize: Scalars['Int']; + personId: Scalars['ID']; +}; + + +export type QueryMessageArgs = { + filter: MessageFilterInput; +}; + + +export type QueryMessageChannelArgs = { + filter: MessageChannelFilterInput; +}; + + +export type QueryMessageChannelDuplicatesArgs = { + data?: InputMaybe; + id?: InputMaybe; +}; + + +export type QueryMessageChannelMessageAssociationArgs = { + filter: MessageChannelMessageAssociationFilterInput; +}; + + +export type QueryMessageChannelMessageAssociationDuplicatesArgs = { + data?: InputMaybe; + id?: InputMaybe; +}; + + +export type QueryMessageChannelMessageAssociationsArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + + +export type QueryMessageChannelsArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + + +export type QueryMessageDuplicatesArgs = { + data?: InputMaybe; + id?: InputMaybe; +}; + + +export type QueryMessageParticipantArgs = { + filter: MessageParticipantFilterInput; +}; + + +export type QueryMessageParticipantDuplicatesArgs = { + data?: InputMaybe; + id?: InputMaybe; +}; + + +export type QueryMessageParticipantsArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + + +export type QueryMessageThreadArgs = { + filter: MessageThreadFilterInput; +}; + + +export type QueryMessageThreadDuplicatesArgs = { + data?: InputMaybe; + id?: InputMaybe; +}; + + +export type QueryMessageThreadsArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + + +export type QueryMessagesArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + + +export type QueryOpportunitiesArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + + +export type QueryOpportunityArgs = { + filter: OpportunityFilterInput; +}; + + +export type QueryOpportunityDuplicatesArgs = { + data?: InputMaybe; + id?: InputMaybe; +}; + + +export type QueryPeopleArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + + +export type QueryPersonArgs = { + filter: PersonFilterInput; +}; + + +export type QueryPersonDuplicatesArgs = { + data?: InputMaybe; + id?: InputMaybe; +}; + + +export type QueryPipelineStepArgs = { + filter: PipelineStepFilterInput; +}; + + +export type QueryPipelineStepDuplicatesArgs = { + data?: InputMaybe; + id?: InputMaybe; +}; + + +export type QueryPipelineStepsArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + + +export type QueryValidatePasswordResetTokenArgs = { + passwordResetToken: Scalars['String']; +}; + + +export type QueryViewArgs = { + filter: ViewFilterInput; +}; + + +export type QueryViewDuplicatesArgs = { + data?: InputMaybe; + id?: InputMaybe; +}; + + +export type QueryViewFieldArgs = { + filter: ViewFieldFilterInput; +}; + + +export type QueryViewFieldDuplicatesArgs = { + data?: InputMaybe; + id?: InputMaybe; +}; + + +export type QueryViewFieldsArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + + +export type QueryViewFilterArgs = { + filter: ViewFilterFilterInput; +}; + + +export type QueryViewFilterDuplicatesArgs = { + data?: InputMaybe; + id?: InputMaybe; +}; + + +export type QueryViewFiltersArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + + +export type QueryViewSortArgs = { + filter: ViewSortFilterInput; +}; + + +export type QueryViewSortDuplicatesArgs = { + data?: InputMaybe; + id?: InputMaybe; +}; + + +export type QueryViewSortsArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + + +export type QueryViewsArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + + +export type QueryWebhookArgs = { + filter: WebhookFilterInput; +}; + + +export type QueryWebhookDuplicatesArgs = { + data?: InputMaybe; + id?: InputMaybe; +}; + + +export type QueryWebhooksArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + + +export type QueryWorkspaceMemberArgs = { + filter: WorkspaceMemberFilterInput; +}; + + +export type QueryWorkspaceMemberDuplicatesArgs = { + data?: InputMaybe; + id?: InputMaybe; +}; + + +export type QueryWorkspaceMembersArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + +export type RefreshToken = { + createdAt: Scalars['DateTime']; + expiresAt: Scalars['DateTime']; + id: Scalars['ID']; + updatedAt: Scalars['DateTime']; +}; + +export type RefreshTokenEdge = { + /** Cursor for this node. */ + cursor: Scalars['ConnectionCursor']; + /** The node containing the RefreshToken */ + node: RefreshToken; +}; + +export type RelationConnection = { + /** Array of edges. */ + edges: Array; + /** Paging information */ + pageInfo: PageInfo; + /** Fetch total count of records */ + totalCount: Scalars['Int']; +}; + +export type 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 Sentry = { + dsn?: Maybe; +}; + +/** Sort Directions */ +export enum SortDirection { + Asc = 'ASC', + Desc = 'DESC' +} + +/** Sort Nulls Options */ +export enum SortNulls { + NullsFirst = 'NULLS_FIRST', + NullsLast = 'NULLS_LAST' +} + +export type StringFilter = { + eq?: InputMaybe; + gt?: InputMaybe; + gte?: InputMaybe; + ilike?: InputMaybe; + in?: InputMaybe>; + iregex?: InputMaybe; + is?: InputMaybe; + like?: InputMaybe; + lt?: InputMaybe; + lte?: InputMaybe; + neq?: InputMaybe; + regex?: InputMaybe; + startsWith?: InputMaybe; +}; + +export type Support = { + supportDriver: Scalars['String']; + supportFrontChatId?: Maybe; +}; + +export type Telemetry = { + anonymizationEnabled: Scalars['Boolean']; + enabled: Scalars['Boolean']; +}; + +export type TimelineThread = { + firstParticipant: TimelineThreadParticipant; + id: Scalars['ID']; + lastMessageBody: Scalars['String']; + lastMessageReceivedAt: Scalars['DateTime']; + lastTwoParticipants: Array; + numberOfMessagesInThread: Scalars['Float']; + participantCount: Scalars['Float']; + read: Scalars['Boolean']; + subject: Scalars['String']; + visibility: Scalars['String']; +}; + +export type TimelineThreadParticipant = { + avatarUrl: Scalars['String']; + displayName: Scalars['String']; + firstName: Scalars['String']; + handle: Scalars['String']; + lastName: Scalars['String']; + personId?: Maybe; + workspaceMemberId?: Maybe; +}; + +export type TimelineThreadsWithTotal = { + timelineThreads: Array; + totalNumberOfThreads: Scalars['Int']; +}; + +export type TransientToken = { + transientToken: AuthToken; +}; + +export type UuidFilter = { + eq?: InputMaybe; + in?: InputMaybe>>; + is?: InputMaybe; + neq?: InputMaybe; +}; + +export type UpdateWorkspaceInput = { + allowImpersonation?: InputMaybe; + displayName?: InputMaybe; + domainName?: InputMaybe; + inviteHash?: InputMaybe; + logo?: InputMaybe; +}; + +export type User = { + canImpersonate: Scalars['Boolean']; + createdAt: Scalars['DateTime']; + defaultAvatarUrl?: Maybe; + defaultWorkspace: Workspace; + deletedAt?: Maybe; + disabled?: Maybe; + email: Scalars['String']; + emailVerified: Scalars['Boolean']; + firstName: Scalars['String']; + id: Scalars['ID']; + lastName: Scalars['String']; + passwordHash?: Maybe; + passwordResetToken?: Maybe; + passwordResetTokenExpiresAt?: Maybe; + supportUserHash?: Maybe; + updatedAt: Scalars['DateTime']; + workspaceMember?: Maybe; +}; + +export type UserEdge = { + /** Cursor for this node. */ + cursor: Scalars['ConnectionCursor']; + /** The node containing the User */ + node: User; +}; + +export type UserExists = { + exists: Scalars['Boolean']; +}; + +export type ValidatePasswordResetToken = { + email: Scalars['String']; + id: Scalars['String']; +}; + +export type Verify = { + tokens: AuthTokenPair; + user: User; +}; + +/** (System) Views */ +export type View = { + createdAt: Scalars['DateTime']; + deletedAt?: Maybe; + id: Scalars['ID']; + /** Describes if the view is in compact mode */ + isCompact: Scalars['Boolean']; + /** View name */ + name: Scalars['String']; + /** View target object */ + objectMetadataId: Scalars['ID']; + /** View type */ + type: Scalars['String']; + updatedAt: Scalars['DateTime']; + /** View Fields */ + viewFields?: Maybe; + /** View Filters */ + viewFilters?: Maybe; + /** View Sorts */ + viewSorts?: Maybe; +}; + + +/** (System) Views */ +export type ViewViewFieldsArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + + +/** (System) Views */ +export type ViewViewFiltersArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + + +/** (System) Views */ +export type ViewViewSortsArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + +/** (System) Views */ +export type ViewConnection = { + edges: Array; + pageInfo: PageInfo; + /** Total number of records in the connection */ + totalCount?: Maybe; +}; + +/** (System) Views */ +export type ViewCreateInput = { + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + id?: InputMaybe; + /** Describes if the view is in compact mode */ + isCompact?: InputMaybe; + /** View name */ + name?: InputMaybe; + /** View target object */ + objectMetadataId: Scalars['ID']; + /** View type */ + type?: InputMaybe; + updatedAt?: InputMaybe; +}; + +/** (System) Views */ +export type ViewEdge = { + cursor: Scalars['Cursor']; + node: View; +}; + +/** (System) View Fields */ +export type ViewField = { + createdAt: Scalars['DateTime']; + deletedAt?: Maybe; + /** View Field target field */ + fieldMetadataId: Scalars['ID']; + id: Scalars['ID']; + /** View Field visibility */ + isVisible: Scalars['Boolean']; + /** View Field position */ + position: Scalars['Float']; + /** View Field size */ + size: Scalars['Float']; + updatedAt: Scalars['DateTime']; + /** View Field related view */ + view?: Maybe; + /** View Field related view id foreign key */ + viewId?: Maybe; +}; + +/** (System) View Fields */ +export type ViewFieldConnection = { + edges: Array; + pageInfo: PageInfo; + /** Total number of records in the connection */ + totalCount?: Maybe; +}; + +/** (System) View Fields */ +export type ViewFieldCreateInput = { + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + /** View Field target field */ + fieldMetadataId: Scalars['ID']; + id?: InputMaybe; + /** View Field visibility */ + isVisible?: InputMaybe; + /** View Field position */ + position?: InputMaybe; + /** View Field size */ + size?: InputMaybe; + updatedAt?: InputMaybe; + /** View Field related view id foreign key */ + viewId?: InputMaybe; +}; + +/** (System) View Fields */ +export type ViewFieldEdge = { + cursor: Scalars['Cursor']; + node: ViewField; +}; + +/** (System) View Fields */ +export type ViewFieldFilterInput = { + and?: InputMaybe>>; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + /** View Field target field */ + fieldMetadataId?: InputMaybe; + id?: InputMaybe; + /** View Field visibility */ + isVisible?: InputMaybe; + not?: InputMaybe; + or?: InputMaybe>>; + /** View Field position */ + position?: InputMaybe; + /** View Field size */ + size?: InputMaybe; + updatedAt?: InputMaybe; + /** View Field related view id foreign key */ + viewId?: InputMaybe; +}; + +/** (System) View Fields */ +export type ViewFieldOrderByInput = { + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + /** View Field target field */ + fieldMetadataId?: InputMaybe; + id?: InputMaybe; + /** View Field visibility */ + isVisible?: InputMaybe; + /** View Field position */ + position?: InputMaybe; + /** View Field size */ + size?: InputMaybe; + updatedAt?: InputMaybe; + /** View Field related view id foreign key */ + viewId?: InputMaybe; +}; + +/** (System) View Fields */ +export type ViewFieldUpdateInput = { + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + /** View Field target field */ + fieldMetadataId?: InputMaybe; + id?: InputMaybe; + /** View Field visibility */ + isVisible?: InputMaybe; + /** View Field position */ + position?: InputMaybe; + /** View Field size */ + size?: InputMaybe; + updatedAt?: InputMaybe; + /** View Field related view id foreign key */ + viewId?: InputMaybe; +}; + +/** (System) View Filters */ +export type ViewFilter = { + createdAt: Scalars['DateTime']; + deletedAt?: Maybe; + /** View Filter Display Value */ + displayValue: Scalars['String']; + /** View Filter target field */ + fieldMetadataId: Scalars['ID']; + id: Scalars['ID']; + /** View Filter operand */ + operand: Scalars['String']; + updatedAt: Scalars['DateTime']; + /** View Filter value */ + value: Scalars['String']; + /** View Filter related view */ + view?: Maybe; + /** View Filter related view id foreign key */ + viewId?: Maybe; +}; + +/** (System) View Filters */ +export type ViewFilterConnection = { + edges: Array; + pageInfo: PageInfo; + /** Total number of records in the connection */ + totalCount?: Maybe; +}; + +/** (System) View Filters */ +export type ViewFilterCreateInput = { + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + /** View Filter Display Value */ + displayValue?: InputMaybe; + /** View Filter target field */ + fieldMetadataId: Scalars['ID']; + id?: InputMaybe; + /** View Filter operand */ + operand?: InputMaybe; + updatedAt?: InputMaybe; + /** View Filter value */ + value?: InputMaybe; + /** View Filter related view id foreign key */ + viewId?: InputMaybe; +}; + +/** (System) View Filters */ +export type ViewFilterEdge = { + cursor: Scalars['Cursor']; + node: ViewFilter; +}; + +/** (System) View Filters */ +export type ViewFilterFilterInput = { + and?: InputMaybe>>; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + /** View Filter Display Value */ + displayValue?: InputMaybe; + /** View Filter target field */ + fieldMetadataId?: InputMaybe; + id?: InputMaybe; + not?: InputMaybe; + /** View Filter operand */ + operand?: InputMaybe; + or?: InputMaybe>>; + updatedAt?: InputMaybe; + /** View Filter value */ + value?: InputMaybe; + /** View Filter related view id foreign key */ + viewId?: InputMaybe; +}; + +/** (System) Views */ +export type ViewFilterInput = { + and?: InputMaybe>>; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + id?: InputMaybe; + /** Describes if the view is in compact mode */ + isCompact?: InputMaybe; + /** View name */ + name?: InputMaybe; + not?: InputMaybe; + /** View target object */ + objectMetadataId?: InputMaybe; + or?: InputMaybe>>; + /** View type */ + type?: InputMaybe; + updatedAt?: InputMaybe; +}; + +/** (System) View Filters */ +export type ViewFilterOrderByInput = { + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + /** View Filter Display Value */ + displayValue?: InputMaybe; + /** View Filter target field */ + fieldMetadataId?: InputMaybe; + id?: InputMaybe; + /** View Filter operand */ + operand?: InputMaybe; + updatedAt?: InputMaybe; + /** View Filter value */ + value?: InputMaybe; + /** View Filter related view id foreign key */ + viewId?: InputMaybe; +}; + +/** (System) View Filters */ +export type ViewFilterUpdateInput = { + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + /** View Filter Display Value */ + displayValue?: InputMaybe; + /** View Filter target field */ + fieldMetadataId?: InputMaybe; + id?: InputMaybe; + /** View Filter operand */ + operand?: InputMaybe; + updatedAt?: InputMaybe; + /** View Filter value */ + value?: InputMaybe; + /** View Filter related view id foreign key */ + viewId?: InputMaybe; +}; + +/** (System) Views */ +export type ViewOrderByInput = { + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + id?: InputMaybe; + /** Describes if the view is in compact mode */ + isCompact?: InputMaybe; + /** View name */ + name?: InputMaybe; + /** View target object */ + objectMetadataId?: InputMaybe; + /** View type */ + type?: InputMaybe; + updatedAt?: InputMaybe; +}; + +/** (System) View Sorts */ +export type ViewSort = { + createdAt: Scalars['DateTime']; + deletedAt?: Maybe; + /** View Sort direction */ + direction: Scalars['String']; + /** View Sort target field */ + fieldMetadataId: Scalars['ID']; + id: Scalars['ID']; + updatedAt: Scalars['DateTime']; + /** View Sort related view */ + view?: Maybe; + /** View Sort related view id foreign key */ + viewId?: Maybe; +}; + +/** (System) View Sorts */ +export type ViewSortConnection = { + edges: Array; + pageInfo: PageInfo; + /** Total number of records in the connection */ + totalCount?: Maybe; +}; + +/** (System) View Sorts */ +export type ViewSortCreateInput = { + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + /** View Sort direction */ + direction?: InputMaybe; + /** View Sort target field */ + fieldMetadataId: Scalars['ID']; + id?: InputMaybe; + updatedAt?: InputMaybe; + /** View Sort related view id foreign key */ + viewId?: InputMaybe; +}; + +/** (System) View Sorts */ +export type ViewSortEdge = { + cursor: Scalars['Cursor']; + node: ViewSort; +}; + +/** (System) View Sorts */ +export type ViewSortFilterInput = { + and?: InputMaybe>>; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + /** View Sort direction */ + direction?: InputMaybe; + /** View Sort target field */ + fieldMetadataId?: InputMaybe; + id?: InputMaybe; + not?: InputMaybe; + or?: InputMaybe>>; + updatedAt?: InputMaybe; + /** View Sort related view id foreign key */ + viewId?: InputMaybe; +}; + +/** (System) View Sorts */ +export type ViewSortOrderByInput = { + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + /** View Sort direction */ + direction?: InputMaybe; + /** View Sort target field */ + fieldMetadataId?: InputMaybe; + id?: InputMaybe; + updatedAt?: InputMaybe; + /** View Sort related view id foreign key */ + viewId?: InputMaybe; +}; + +/** (System) View Sorts */ +export type ViewSortUpdateInput = { + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + /** View Sort direction */ + direction?: InputMaybe; + /** View Sort target field */ + fieldMetadataId?: InputMaybe; + id?: InputMaybe; + updatedAt?: InputMaybe; + /** View Sort related view id foreign key */ + viewId?: InputMaybe; +}; + +/** (System) Views */ +export type ViewUpdateInput = { + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + id?: InputMaybe; + /** Describes if the view is in compact mode */ + isCompact?: InputMaybe; + /** View name */ + name?: InputMaybe; + /** View target object */ + objectMetadataId?: InputMaybe; + /** View type */ + type?: InputMaybe; + updatedAt?: InputMaybe; +}; + +/** A webhook */ +export type Webhook = { + createdAt: Scalars['DateTime']; + deletedAt?: Maybe; + id: Scalars['ID']; + /** Webhook operation */ + operation: Scalars['String']; + /** Webhook target url */ + targetUrl: Scalars['String']; + updatedAt: Scalars['DateTime']; +}; + +/** A webhook */ +export type WebhookConnection = { + edges: Array; + pageInfo: PageInfo; + /** Total number of records in the connection */ + totalCount?: Maybe; +}; + +/** A webhook */ +export type WebhookCreateInput = { + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + id?: InputMaybe; + /** Webhook operation */ + operation?: InputMaybe; + /** Webhook target url */ + targetUrl?: InputMaybe; + updatedAt?: InputMaybe; +}; + +/** A webhook */ +export type WebhookEdge = { + cursor: Scalars['Cursor']; + node: Webhook; +}; + +/** A webhook */ +export type WebhookFilterInput = { + and?: InputMaybe>>; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + id?: InputMaybe; + not?: InputMaybe; + /** Webhook operation */ + operation?: InputMaybe; + or?: InputMaybe>>; + /** Webhook target url */ + targetUrl?: InputMaybe; + updatedAt?: InputMaybe; +}; + +/** A webhook */ +export type WebhookOrderByInput = { + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + id?: InputMaybe; + /** Webhook operation */ + operation?: InputMaybe; + /** Webhook target url */ + targetUrl?: InputMaybe; + updatedAt?: InputMaybe; +}; + +/** A webhook */ +export type WebhookUpdateInput = { + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + id?: InputMaybe; + /** Webhook operation */ + operation?: InputMaybe; + /** Webhook target url */ + targetUrl?: InputMaybe; + updatedAt?: InputMaybe; +}; + +export type Workspace = { + activationStatus: Scalars['String']; + allowImpersonation: Scalars['Boolean']; + createdAt: Scalars['DateTime']; + deletedAt?: Maybe; + displayName?: Maybe; + domainName?: Maybe; + featureFlags?: Maybe>; + id: Scalars['ID']; + inviteHash?: Maybe; + logo?: Maybe; + subscriptionStatus: Scalars['String']; + updatedAt: Scalars['DateTime']; +}; + + +export type WorkspaceFeatureFlagsArgs = { + filter?: FeatureFlagFilter; + sorting?: Array; +}; + +export type WorkspaceEdge = { + /** Cursor for this node. */ + cursor: Scalars['ConnectionCursor']; + /** The node containing the Workspace */ + node: Workspace; +}; + +export type WorkspaceInviteHashValid = { + isValid: Scalars['Boolean']; +}; + +/** A workspace member */ +export type WorkspaceMember = { + /** Account owner for companies */ + accountOwnerForCompanies?: Maybe; + /** Activities assigned to the workspace member */ + assignedActivities?: Maybe; + /** Activities created by the workspace member */ + authoredActivities?: Maybe; + /** Attachments created by the workspace member */ + authoredAttachments?: Maybe; + /** Authored comments */ + authoredComments?: Maybe; + /** Workspace member avatar */ + avatarUrl: Scalars['String']; + /** Blocklisted handles */ + blocklist?: Maybe; + /** Preferred color scheme */ + colorScheme: Scalars['String']; + /** Connected accounts */ + connectedAccounts?: Maybe; + createdAt: Scalars['DateTime']; + deletedAt?: Maybe; + /** Favorites linked to the workspace member */ + favorites?: Maybe; + id: Scalars['ID']; + /** Preferred language */ + locale: Scalars['String']; + /** Message Participants */ + messageParticipants?: Maybe; + /** Workspace member name */ + name: FullName; + updatedAt: Scalars['DateTime']; + /** Related user email address */ + userEmail: Scalars['String']; + /** Associated User Id */ + userId: Scalars['ID']; +}; + + +/** A workspace member */ +export type WorkspaceMemberAccountOwnerForCompaniesArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + + +/** A workspace member */ +export type WorkspaceMemberAssignedActivitiesArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + + +/** A workspace member */ +export type WorkspaceMemberAuthoredActivitiesArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + + +/** A workspace member */ +export type WorkspaceMemberAuthoredAttachmentsArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + + +/** A workspace member */ +export type WorkspaceMemberAuthoredCommentsArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + + +/** A workspace member */ +export type WorkspaceMemberBlocklistArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + + +/** A workspace member */ +export type WorkspaceMemberConnectedAccountsArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + + +/** A workspace member */ +export type WorkspaceMemberFavoritesArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + + +/** A workspace member */ +export type WorkspaceMemberMessageParticipantsArgs = { + after?: InputMaybe; + before?: InputMaybe; + filter?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; +}; + +/** A workspace member */ +export type WorkspaceMemberConnection = { + edges: Array; + pageInfo: PageInfo; + /** Total number of records in the connection */ + totalCount?: Maybe; +}; + +/** A workspace member */ +export type WorkspaceMemberCreateInput = { + /** Workspace member avatar */ + avatarUrl?: InputMaybe; + /** Preferred color scheme */ + colorScheme?: InputMaybe; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + id?: InputMaybe; + /** Preferred language */ + locale?: InputMaybe; + /** Workspace member name */ + name?: InputMaybe; + updatedAt?: InputMaybe; + /** Related user email address */ + userEmail?: InputMaybe; + /** Associated User Id */ + userId: Scalars['ID']; +}; + +/** A workspace member */ +export type WorkspaceMemberEdge = { + cursor: Scalars['Cursor']; + node: WorkspaceMember; +}; + +/** A workspace member */ +export type WorkspaceMemberFilterInput = { + and?: InputMaybe>>; + /** Workspace member avatar */ + avatarUrl?: InputMaybe; + /** Preferred color scheme */ + colorScheme?: InputMaybe; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + id?: InputMaybe; + /** Preferred language */ + locale?: InputMaybe; + /** Workspace member name */ + name?: InputMaybe; + not?: InputMaybe; + or?: InputMaybe>>; + updatedAt?: InputMaybe; + /** Related user email address */ + userEmail?: InputMaybe; + /** Associated User Id */ + userId?: InputMaybe; +}; + +/** A workspace member */ +export type WorkspaceMemberOrderByInput = { + /** Workspace member avatar */ + avatarUrl?: InputMaybe; + /** Preferred color scheme */ + colorScheme?: InputMaybe; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + id?: InputMaybe; + /** Preferred language */ + locale?: InputMaybe; + /** Workspace member name */ + name?: InputMaybe; + updatedAt?: InputMaybe; + /** Related user email address */ + userEmail?: InputMaybe; + /** Associated User Id */ + userId?: InputMaybe; +}; + +/** A workspace member */ +export type WorkspaceMemberUpdateInput = { + /** Workspace member avatar */ + avatarUrl?: InputMaybe; + /** Preferred color scheme */ + colorScheme?: InputMaybe; + createdAt?: InputMaybe; + deletedAt?: InputMaybe; + id?: InputMaybe; + /** Preferred language */ + locale?: InputMaybe; + /** Workspace member name */ + name?: InputMaybe; + updatedAt?: InputMaybe; + /** Related user email address */ + userEmail?: InputMaybe; + /** Associated User Id */ + userId?: InputMaybe; +}; + +export type Field = { + createdAt: Scalars['DateTime']; + defaultValue?: Maybe; + description?: Maybe; + fromRelationMetadata?: Maybe; + icon?: Maybe; + id: Scalars['ID']; + isActive?: Maybe; + isCustom?: Maybe; + isNullable?: Maybe; + isSystem?: Maybe; + label: Scalars['String']; + name: Scalars['String']; + options?: Maybe; + toRelationMetadata?: Maybe; + type: FieldMetadataType; + updatedAt: Scalars['DateTime']; +}; + +export type 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 = { + createdAt: Scalars['DateTime']; + dataSourceId: Scalars['String']; + description?: Maybe; + fields: ObjectFieldsConnection; + icon?: Maybe; + id: Scalars['ID']; + imageIdentifierFieldMetadataId?: Maybe; + isActive: Scalars['Boolean']; + isCustom: Scalars['Boolean']; + isSystem: Scalars['Boolean']; + labelIdentifierFieldMetadataId?: Maybe; + 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 = { + /** Cursor for this node. */ + cursor: Scalars['ConnectionCursor']; + /** The node containing the object */ + node: Object; +}; + +export type 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 = { + /** Cursor for this node. */ + cursor: Scalars['ConnectionCursor']; + /** The node containing the relation */ + node: Relation; +}; + +export type FindCompanyQueryVariables = Exact<{ + filter: CompanyFilterInput; +}>; + + +export type FindCompanyQuery = { companies: { edges: Array<{ node: { linkedinLink?: { url?: string | null, label?: string | null } | null } }> } }; + + +export const FindCompanyDocument = gql` + query FindCompany($filter: CompanyFilterInput!) { + companies(filter: $filter) { + edges { + node { + linkedinLink { + url + label + } + } + } + } +} + `; + +/** + * __useFindCompanyQuery__ + * + * To run a query within a React component, call `useFindCompanyQuery` and pass it any options that fit your needs. + * When your component renders, `useFindCompanyQuery` 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 } = useFindCompanyQuery({ + * variables: { + * filter: // value for 'filter' + * }, + * }); + */ +export function useFindCompanyQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(FindCompanyDocument, options); + } +export function useFindCompanyLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(FindCompanyDocument, options); + } +export type FindCompanyQueryHookResult = ReturnType; +export type FindCompanyLazyQueryHookResult = ReturnType; +export type FindCompanyQueryResult = Apollo.QueryResult; \ No newline at end of file diff --git a/packages/twenty-chrome-extension/src/graphql/company/mutations.ts b/packages/twenty-chrome-extension/src/graphql/company/mutations.ts new file mode 100644 index 0000000000..36bfabf401 --- /dev/null +++ b/packages/twenty-chrome-extension/src/graphql/company/mutations.ts @@ -0,0 +1,9 @@ +import { gql } from '@apollo/client'; + +export const CREATE_COMPANY = gql` + mutation CreateOneCompany($input: CompanyCreateInput!) { + createCompany(data: $input) { + id + } + } +`; diff --git a/packages/twenty-chrome-extension/src/graphql/company/queries.ts b/packages/twenty-chrome-extension/src/graphql/company/queries.ts new file mode 100644 index 0000000000..b3fceedb29 --- /dev/null +++ b/packages/twenty-chrome-extension/src/graphql/company/queries.ts @@ -0,0 +1,17 @@ +import { gql } from '@apollo/client'; + +export const FIND_COMPANY = gql` + query FindCompany($filter: CompanyFilterInput!) { + companies(filter: $filter) { + edges { + node { + name + linkedinLink { + url + label + } + } + } + } + } +`; diff --git a/packages/twenty-chrome-extension/src/graphql/person/mutations.ts b/packages/twenty-chrome-extension/src/graphql/person/mutations.ts new file mode 100644 index 0000000000..947d3a4e0c --- /dev/null +++ b/packages/twenty-chrome-extension/src/graphql/person/mutations.ts @@ -0,0 +1,9 @@ +import { gql } from '@apollo/client'; + +export const CREATE_PERSON = gql` + mutation CreateOnePerson($input: PersonCreateInput!) { + createPerson(data: $input) { + id + } + } +`; diff --git a/packages/twenty-chrome-extension/src/graphql/person/queries.ts b/packages/twenty-chrome-extension/src/graphql/person/queries.ts new file mode 100644 index 0000000000..83f402c1c2 --- /dev/null +++ b/packages/twenty-chrome-extension/src/graphql/person/queries.ts @@ -0,0 +1,20 @@ +import { gql } from '@apollo/client'; + +export const FIND_PERSON = gql` + query FindPerson($filter: PersonFilterInput!) { + people(filter: $filter) { + edges { + node { + name { + firstName + lastName + } + linkedinLink { + url + label + } + } + } + } + } +`; diff --git a/packages/twenty-chrome-extension/src/utils/apolloClient.ts b/packages/twenty-chrome-extension/src/utils/apolloClient.ts new file mode 100644 index 0000000000..bc145454bb --- /dev/null +++ b/packages/twenty-chrome-extension/src/utils/apolloClient.ts @@ -0,0 +1,18 @@ +import { ApolloClient, InMemoryCache } from '@apollo/client'; + +const getApolloClient = async () => { + const { apiKey } = await chrome.storage.local.get('apiKey'); + const { serverBaseUrl } = await chrome.storage.local.get('serverBaseUrl'); + + return new ApolloClient({ + cache: new InMemoryCache(), + uri: `${ + serverBaseUrl ? serverBaseUrl : import.meta.env.VITE_SERVER_BASE_URL + }/graphql`, + headers: { + Authorization: `Bearer ${apiKey}`, + }, + }); +}; + +export default getApolloClient; diff --git a/packages/twenty-chrome-extension/src/utils/requestDb.ts b/packages/twenty-chrome-extension/src/utils/requestDb.ts index 140d9da975..727a73b25b 100644 --- a/packages/twenty-chrome-extension/src/utils/requestDb.ts +++ b/packages/twenty-chrome-extension/src/utils/requestDb.ts @@ -1,31 +1,34 @@ -const requestDb = async (query: string) => { - const { apiKey } = await chrome.storage.local.get('apiKey'); - const { serverBaseUrl } = await chrome.storage.local.get('serverBaseUrl'); +import { OperationVariables } from '@apollo/client'; +import { DocumentNode } from 'graphql'; - const options = { - method: 'POST', - body: JSON.stringify({ query }), - headers: { - 'Content-Type': 'application/json', - Accept: 'application/json', - Authorization: `Bearer ${apiKey}`, - }, - }; +import getApolloClient from '~/utils/apolloClient'; - const response = await fetch( - `${ - serverBaseUrl ? serverBaseUrl : import.meta.env.VITE_SERVER_BASE_URL - }/graphql`, - options, - ); +export const callQuery = async ( + query: DocumentNode, + variables?: OperationVariables, +): Promise => { + const client = await getApolloClient(); - if (!response.ok) { - // TODO: Handle error gracefully and remove the console statement. - /* eslint-disable no-console */ - console.error(response); - } + const { data, error } = await client.query({ query, variables }); - return await response.json(); + if (error) throw new Error(error.message); + + if (data) return data; + + return null; }; -export default requestDb; +export const callMutation = async ( + mutation: DocumentNode, + variables?: OperationVariables, +): Promise => { + const client = await getApolloClient(); + + const { data, errors } = await client.mutate({ mutation, variables }); + + if (errors) throw new Error(errors[0].message); + + if (data) return data; + + return null; +}; diff --git a/packages/twenty-chrome-extension/tsconfig.json b/packages/twenty-chrome-extension/tsconfig.json index 53e26a8532..43eb06cc54 100644 --- a/packages/twenty-chrome-extension/tsconfig.json +++ b/packages/twenty-chrome-extension/tsconfig.json @@ -1,8 +1,8 @@ { "compilerOptions": { - "target": "ES2020", + "target": "ES2022", "useDefineForClassFields": true, - "lib": ["ES2020", "DOM", "DOM.Iterable"], + "lib": ["ES2022", "DOM", "DOM.Iterable"], "module": "ESNext", "skipLibCheck": true, "esModuleInterop": true, diff --git a/packages/twenty-chrome-extension/vite.config.ts b/packages/twenty-chrome-extension/vite.config.ts index 8cef925430..c360a7d24b 100644 --- a/packages/twenty-chrome-extension/vite.config.ts +++ b/packages/twenty-chrome-extension/vite.config.ts @@ -25,6 +25,7 @@ export default defineConfig(() => { rollupOptions: { output: { chunkFileNames: 'assets/chunk-[hash].js' }, }, + target: 'ES2022', }, // Adding this to fix websocket connection error.