From 984fc76b9476dd0341ca25c70d13cb54621d91e5 Mon Sep 17 00:00:00 2001 From: gitstart-twenty <140154534+gitstart-twenty@users.noreply.github.com> Date: Thu, 21 Dec 2023 01:36:58 +0800 Subject: [PATCH] Fix and enhance storybook:pages tests (#3085) * Fix and enhance storybook:pages tests Co-authored-by: gitstart-app[bot] <57568882+gitstart-app[bot]@users.noreply.github.com> * Fix and enhance storybook:pages tests Co-authored-by: v1b3m Co-authored-by: gitstart-app[bot] <57568882+gitstart-app[bot]@users.noreply.github.com> * fix SettingsObjectFieldPreview Co-authored-by: v1b3m Co-authored-by: gitstart-app[bot] <57568882+gitstart-app[bot]@users.noreply.github.com> * Fix lint Co-authored-by: v1b3m Co-authored-by: gitstart-app[bot] <57568882+gitstart-app[bot]@users.noreply.github.com> * Fix jest Co-authored-by: v1b3m Co-authored-by: gitstart-app[bot] <57568882+gitstart-app[bot]@users.noreply.github.com> * Add more fixes Co-authored-by: v1b3m Co-authored-by: gitstart-app[bot] <57568882+gitstart-app[bot]@users.noreply.github.com> * Fix App.stories.tsx Co-authored-by: v1b3m Co-authored-by: gitstart-app[bot] <57568882+gitstart-app[bot]@users.noreply.github.com> * Fix tests * Fix according to review --------- Co-authored-by: gitstart-twenty Co-authored-by: gitstart-app[bot] <57568882+gitstart-app[bot]@users.noreply.github.com> Co-authored-by: v1b3m Co-authored-by: Charles Bochet --- .github/workflows/ci-front.yaml | 10 +- .../ObjectMetadataItemsDecorator.tsx | 9 + .../src/__stories__/App.stories.tsx | 10 +- .../src/modules/activities/types/Activity.ts | 1 + .../states/currentWorkspaceMemberState.ts | 5 +- .../modules/auth/utils/getOnboardingStatus.ts | 5 +- .../__stories__/CommandMenu.stories.tsx | 18 +- .../src/modules/companies/types/Company.ts | 4 +- .../modules/pipeline/types/PipelineStep.ts | 2 + .../SettingsObjectFieldPreview.stories.tsx | 26 +- ...gsObjectFieldTypeSelectSection.stories.tsx | 12 +- .../workspace-member/types/WorkspaceMember.ts | 3 + .../src/pages/auth/PlanRequired.tsx | 7 - .../__stories__/CreateProfile.stories.tsx | 20 +- .../__stories__/CreateWorkspace.stories.tsx | 14 +- .../auth/__stories__/PlanRequired.stories.tsx | 24 +- .../auth/__stories__/SignInUp.stories.tsx | 18 +- .../__stories__/Opportunities.stories.tsx | 13 +- .../ObjectMetadataItemsDecorator.tsx | 27 +- .../src/testing/decorators/PageDecorator.tsx | 53 +- .../twenty-front/src/testing/graphqlMocks.ts | 127 +- .../src/testing/mock-data/activities.ts | 89 +- .../src/testing/mock-data/companies.ts | 62 +- .../src/testing/mock-data/config.ts | 28 + .../src/testing/mock-data/metadata.ts | 7062 +++++++++++++++-- .../src/testing/mock-data/pipeline-steps.ts | 45 + .../src/testing/mock-data/users.ts | 158 +- 27 files changed, 6935 insertions(+), 917 deletions(-) create mode 100644 Users/v1b3m/Dev/GitStart/client-twenty/packages/twenty-front/src/testing/decorators/ObjectMetadataItemsDecorator.tsx create mode 100644 packages/twenty-front/src/testing/mock-data/config.ts create mode 100644 packages/twenty-front/src/testing/mock-data/pipeline-steps.ts diff --git a/.github/workflows/ci-front.yaml b/.github/workflows/ci-front.yaml index 955bfd430..9f1666a4d 100644 --- a/.github/workflows/ci-front.yaml +++ b/.github/workflows/ci-front.yaml @@ -68,11 +68,11 @@ jobs: run: cd packages/twenty-front && npx playwright install - name: Build Storybook run: yarn nx storybook:pages:build --quiet twenty-front - # - name: Run storybook tests - # run: | - # cd packages/twenty-front && npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \ - # "npx http-server storybook-static --silent --port 6006" \ - # "yarn storybook:pages:coverage" + - name: Run storybook tests + run: | + cd packages/twenty-front && npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \ + "npx http-server storybook-static --silent --port 6006" \ + "yarn storybook:pages:coverage" front-modules-sb-test: needs: front-yarn-install runs-on: ci-4-cores diff --git a/Users/v1b3m/Dev/GitStart/client-twenty/packages/twenty-front/src/testing/decorators/ObjectMetadataItemsDecorator.tsx b/Users/v1b3m/Dev/GitStart/client-twenty/packages/twenty-front/src/testing/decorators/ObjectMetadataItemsDecorator.tsx new file mode 100644 index 000000000..0eab23f8a --- /dev/null +++ b/Users/v1b3m/Dev/GitStart/client-twenty/packages/twenty-front/src/testing/decorators/ObjectMetadataItemsDecorator.tsx @@ -0,0 +1,9 @@ +import { Decorator } from '@storybook/react'; + +import { ObjectMetadataItemsProvider } from '@/object-metadata/components/ObjectMetadataItemsProvider'; + +export const ObjectMetadataItemsDecorator: Decorator = (Story) => ( + + + +); diff --git a/packages/twenty-front/src/__stories__/App.stories.tsx b/packages/twenty-front/src/__stories__/App.stories.tsx index 979aece22..9c9c3547e 100644 --- a/packages/twenty-front/src/__stories__/App.stories.tsx +++ b/packages/twenty-front/src/__stories__/App.stories.tsx @@ -3,9 +3,10 @@ import { MemoryRouter } from 'react-router-dom'; import { Meta, StoryObj } from '@storybook/react'; import { ClientConfigProvider } from '@/client-config/components/ClientConfigProvider'; +import { ObjectMetadataItemsProvider } from '@/object-metadata/components/ObjectMetadataItemsProvider'; +import { SnackBarProviderScope } from '@/ui/feedback/snack-bar-manager/scopes/SnackBarProviderScope'; import { UserProvider } from '@/users/components/UserProvider'; import { App } from '~/App'; -import { SnackBarDecorator } from '~/testing/decorators/SnackBarDecorator'; import { FullHeightStorybookLayout } from '~/testing/FullHeightStorybookLayout'; import { graphqlMocks } from '~/testing/graphqlMocks'; @@ -13,14 +14,17 @@ const meta: Meta = { title: 'App/App', component: App, decorators: [ - SnackBarDecorator, (Story) => ( - + + + + + diff --git a/packages/twenty-front/src/modules/activities/types/Activity.ts b/packages/twenty-front/src/modules/activities/types/Activity.ts index da3da72eb..6e58e0750 100644 --- a/packages/twenty-front/src/modules/activities/types/Activity.ts +++ b/packages/twenty-front/src/modules/activities/types/Activity.ts @@ -10,6 +10,7 @@ export type Activity = { createdAt: string; updatedAt: string; completedAt: string | null; + reminderAt: string | null; dueAt: string | null; activityTargets: ActivityTarget[]; type: ActivityType; diff --git a/packages/twenty-front/src/modules/auth/states/currentWorkspaceMemberState.ts b/packages/twenty-front/src/modules/auth/states/currentWorkspaceMemberState.ts index 219bfa5ff..6cdf64737 100644 --- a/packages/twenty-front/src/modules/auth/states/currentWorkspaceMemberState.ts +++ b/packages/twenty-front/src/modules/auth/states/currentWorkspaceMemberState.ts @@ -2,7 +2,10 @@ import { atom } from 'recoil'; import { WorkspaceMember } from '@/workspace-member/types/WorkspaceMember'; -export const currentWorkspaceMemberState = atom({ +export const currentWorkspaceMemberState = atom | null>({ key: 'currentWorkspaceMemberState', default: null, }); diff --git a/packages/twenty-front/src/modules/auth/utils/getOnboardingStatus.ts b/packages/twenty-front/src/modules/auth/utils/getOnboardingStatus.ts index 309ad1fd2..4d8f533ef 100644 --- a/packages/twenty-front/src/modules/auth/utils/getOnboardingStatus.ts +++ b/packages/twenty-front/src/modules/auth/utils/getOnboardingStatus.ts @@ -17,7 +17,10 @@ export const getOnboardingStatus = ({ isBillingEnabled, }: { isLoggedIn: boolean; - currentWorkspaceMember: WorkspaceMember | null; + currentWorkspaceMember: Omit< + WorkspaceMember, + 'createdAt' | 'updatedAt' | 'userId' + > | null; currentWorkspace: CurrentWorkspace | null; isBillingEnabled?: boolean; }) => { diff --git a/packages/twenty-front/src/modules/command-menu/components/__stories__/CommandMenu.stories.tsx b/packages/twenty-front/src/modules/command-menu/components/__stories__/CommandMenu.stories.tsx index ae27d8032..defa58c4a 100644 --- a/packages/twenty-front/src/modules/command-menu/components/__stories__/CommandMenu.stories.tsx +++ b/packages/twenty-front/src/modules/command-menu/components/__stories__/CommandMenu.stories.tsx @@ -1,14 +1,17 @@ import { useEffect } from 'react'; import { Meta, StoryObj } from '@storybook/react'; import { expect, userEvent, within } from '@storybook/test'; +import { RecoilRoot, useSetRecoilState } from 'recoil'; +import { currentWorkspaceState } from '@/auth/states/currentWorkspaceState'; import { useCommandMenu } from '@/command-menu/hooks/useCommandMenu'; import { CommandType } from '@/command-menu/types/Command'; import { IconCheckbox, IconNotes } from '@/ui/display/icon'; +import { SnackBarProviderScope } from '@/ui/feedback/snack-bar-manager/scopes/SnackBarProviderScope'; import { ComponentWithRouterDecorator } from '~/testing/decorators/ComponentWithRouterDecorator'; import { ObjectMetadataItemsDecorator } from '~/testing/decorators/ObjectMetadataItemsDecorator'; -import { SnackBarDecorator } from '~/testing/decorators/SnackBarDecorator'; import { graphqlMocks } from '~/testing/graphqlMocks'; +import { mockDefaultWorkspace } from '~/testing/mock-data/users'; import { sleep } from '~/testing/sleep'; import { CommandMenu } from '../CommandMenu'; @@ -20,11 +23,13 @@ const meta: Meta = { component: CommandMenu, decorators: [ ObjectMetadataItemsDecorator, - ComponentWithRouterDecorator, (Story) => { + const setCurrentWorkspace = useSetRecoilState(currentWorkspaceState); const { addToCommandMenu, setToIntitialCommandMenu, toggleCommandMenu } = useCommandMenu(); + setCurrentWorkspace(mockDefaultWorkspace); + useEffect(() => { setToIntitialCommandMenu(); addToCommandMenu([ @@ -50,7 +55,14 @@ const meta: Meta = { return ; }, - SnackBarDecorator, + (Story) => ( + + + + + + ), + ComponentWithRouterDecorator, ], parameters: { msw: graphqlMocks, diff --git a/packages/twenty-front/src/modules/companies/types/Company.ts b/packages/twenty-front/src/modules/companies/types/Company.ts index f5cf7cb5e..e346d4491 100644 --- a/packages/twenty-front/src/modules/companies/types/Company.ts +++ b/packages/twenty-front/src/modules/companies/types/Company.ts @@ -7,8 +7,8 @@ export type Company = { domainName: string; address: string; accountOwnerId: string | null; - linkedinUrl: { url: string; label: string }; - xUrl: { url: string; label: string }; + linkedinLink: { url: string; label: string }; + xLink: { url: string; label: string }; annualRecurringRevenue: { amountMicros: number | null; currencyCode: string }; employees: number | null; idealCustomerProfile: boolean; diff --git a/packages/twenty-front/src/modules/pipeline/types/PipelineStep.ts b/packages/twenty-front/src/modules/pipeline/types/PipelineStep.ts index f5bf63f21..76773be08 100644 --- a/packages/twenty-front/src/modules/pipeline/types/PipelineStep.ts +++ b/packages/twenty-front/src/modules/pipeline/types/PipelineStep.ts @@ -3,4 +3,6 @@ export type PipelineStep = { name: string; color: string; position: number; + createdAt: string; + updatedAt: string; }; diff --git a/packages/twenty-front/src/modules/settings/data-model/components/__stories__/SettingsObjectFieldPreview.stories.tsx b/packages/twenty-front/src/modules/settings/data-model/components/__stories__/SettingsObjectFieldPreview.stories.tsx index f2bae91d2..c101aa464 100644 --- a/packages/twenty-front/src/modules/settings/data-model/components/__stories__/SettingsObjectFieldPreview.stories.tsx +++ b/packages/twenty-front/src/modules/settings/data-model/components/__stories__/SettingsObjectFieldPreview.stories.tsx @@ -1,15 +1,16 @@ import { MemoryRouter } from 'react-router-dom'; import { Meta, StoryObj } from '@storybook/react'; +import { RecoilRoot } from 'recoil'; -import { ObjectMetadataItemsProvider } from '@/object-metadata/components/ObjectMetadataItemsProvider'; +import { RelationPickerScope } from '@/object-record/relation-picker/scopes/RelationPickerScope'; import { SnackBarProviderScope } from '@/ui/feedback/snack-bar-manager/scopes/SnackBarProviderScope'; import { Field, FieldMetadataType } from '~/generated-metadata/graphql'; import { ComponentDecorator } from '~/testing/decorators/ComponentDecorator'; +import { ObjectMetadataItemsDecorator } from '~/testing/decorators/ObjectMetadataItemsDecorator'; import { graphqlMocks } from '~/testing/graphqlMocks'; import { mockedCompaniesMetadata, mockedPeopleMetadata, - mockedWorkspacesMetadata, } from '~/testing/mock-data/metadata'; import { SettingsObjectFieldPreview } from '../SettingsObjectFieldPreview'; @@ -19,18 +20,21 @@ const meta: Meta = { component: SettingsObjectFieldPreview, decorators: [ ComponentDecorator, + ObjectMetadataItemsDecorator, (Story) => ( - - - - - + + + + + + + ), ], args: { fieldMetadata: mockedCompaniesMetadata.node.fields.edges.find( ({ node }) => node.type === FieldMetadataType.Text, - )?.node, + )?.node as Field, objectMetadataId: mockedCompaniesMetadata.node.id, }, parameters: { @@ -119,9 +123,9 @@ export const Relation: Story = { export const CustomObject: Story = { args: { - fieldMetadata: mockedWorkspacesMetadata.node.fields.edges.find( - ({ node }) => node.type === FieldMetadataType.Text, + fieldMetadata: mockedCompaniesMetadata.node.fields.edges.find( + ({ node }) => node.isCustom, )?.node as Field, - objectMetadataId: mockedWorkspacesMetadata.node.id, + objectMetadataId: mockedCompaniesMetadata.node.id, }, }; diff --git a/packages/twenty-front/src/modules/settings/data-model/components/__stories__/SettingsObjectFieldTypeSelectSection.stories.tsx b/packages/twenty-front/src/modules/settings/data-model/components/__stories__/SettingsObjectFieldTypeSelectSection.stories.tsx index 607e3e517..a57e33904 100644 --- a/packages/twenty-front/src/modules/settings/data-model/components/__stories__/SettingsObjectFieldTypeSelectSection.stories.tsx +++ b/packages/twenty-front/src/modules/settings/data-model/components/__stories__/SettingsObjectFieldTypeSelectSection.stories.tsx @@ -2,13 +2,14 @@ import { MemoryRouter } from 'react-router-dom'; import { Meta, StoryObj } from '@storybook/react'; import { userEvent, within } from '@storybook/test'; -import { ObjectMetadataItemsProvider } from '@/object-metadata/components/ObjectMetadataItemsProvider'; +import { RelationPickerScope } from '@/object-record/relation-picker/scopes/RelationPickerScope'; import { SnackBarProviderScope } from '@/ui/feedback/snack-bar-manager/scopes/SnackBarProviderScope'; import { FieldMetadataType, RelationMetadataType, } from '~/generated-metadata/graphql'; import { ComponentDecorator } from '~/testing/decorators/ComponentDecorator'; +import { ObjectMetadataItemsDecorator } from '~/testing/decorators/ObjectMetadataItemsDecorator'; import { graphqlMocks } from '~/testing/graphqlMocks'; import { mockedCompaniesMetadata, @@ -31,12 +32,13 @@ const meta: Meta = { component: SettingsObjectFieldTypeSelectSection, decorators: [ ComponentDecorator, + ObjectMetadataItemsDecorator, (Story) => ( - - + + - - + + ), ], args: { diff --git a/packages/twenty-front/src/modules/workspace-member/types/WorkspaceMember.ts b/packages/twenty-front/src/modules/workspace-member/types/WorkspaceMember.ts index 241d4f79d..af7cd775a 100644 --- a/packages/twenty-front/src/modules/workspace-member/types/WorkspaceMember.ts +++ b/packages/twenty-front/src/modules/workspace-member/types/WorkspaceMember.ts @@ -9,4 +9,7 @@ export type WorkspaceMember = { avatarUrl?: string | null; locale: string; colorScheme?: ColorScheme; + createdAt: string; + updatedAt: string; + userId: string; }; diff --git a/packages/twenty-front/src/pages/auth/PlanRequired.tsx b/packages/twenty-front/src/pages/auth/PlanRequired.tsx index 69dc681fa..0b93c6222 100644 --- a/packages/twenty-front/src/pages/auth/PlanRequired.tsx +++ b/packages/twenty-front/src/pages/auth/PlanRequired.tsx @@ -4,8 +4,6 @@ import { useRecoilValue } from 'recoil'; import { Logo } from '@/auth/components/Logo'; import { SubTitle } from '@/auth/components/SubTitle'; import { Title } from '@/auth/components/Title'; -import { useOnboardingStatus } from '@/auth/hooks/useOnboardingStatus'; -import { OnboardingStatus } from '@/auth/utils/getOnboardingStatus'; import { billingState } from '@/client-config/states/billingState'; import { PageHotkeyScope } from '@/types/PageHotkeyScope'; import { MainButton } from '@/ui/input/button/components/MainButton'; @@ -18,7 +16,6 @@ const StyledButtonContainer = styled.div` `; export const PlanRequired = () => { - const onboardingStatus = useOnboardingStatus(); const billing = useRecoilValue(billingState); const handleButtonClick = () => { @@ -29,10 +26,6 @@ export const PlanRequired = () => { handleButtonClick, ]); - if (onboardingStatus === OnboardingStatus.Completed) { - return null; - } - return ( <> diff --git a/packages/twenty-front/src/pages/auth/__stories__/CreateProfile.stories.tsx b/packages/twenty-front/src/pages/auth/__stories__/CreateProfile.stories.tsx index 9668af5dc..302883712 100644 --- a/packages/twenty-front/src/pages/auth/__stories__/CreateProfile.stories.tsx +++ b/packages/twenty-front/src/pages/auth/__stories__/CreateProfile.stories.tsx @@ -1,11 +1,16 @@ +import { getOperationName } from '@apollo/client/utilities'; import { Meta, StoryObj } from '@storybook/react'; import { within } from '@storybook/test'; +import { graphql, HttpResponse } from 'msw'; import { AppPath } from '@/types/AppPath'; +import { GET_CURRENT_USER } from '@/users/graphql/queries/getCurrentUser'; import { PageDecorator, PageDecoratorArgs, } from '~/testing/decorators/PageDecorator'; +import { graphqlMocks } from '~/testing/graphqlMocks'; +import { mockedOnboardingUsersData } from '~/testing/mock-data/users'; import { CreateProfile } from '../CreateProfile'; @@ -14,7 +19,20 @@ const meta: Meta = { component: CreateProfile, decorators: [PageDecorator], args: { routePath: AppPath.CreateProfile }, - parameters: {}, + parameters: { + msw: { + handlers: [ + graphql.query(getOperationName(GET_CURRENT_USER) ?? '', () => { + return HttpResponse.json({ + data: { + currentUser: mockedOnboardingUsersData[0], + }, + }); + }), + graphqlMocks.handlers, + ], + }, + }, }; export default meta; diff --git a/packages/twenty-front/src/pages/auth/__stories__/CreateWorkspace.stories.tsx b/packages/twenty-front/src/pages/auth/__stories__/CreateWorkspace.stories.tsx index 88270a0d3..facfecc8b 100644 --- a/packages/twenty-front/src/pages/auth/__stories__/CreateWorkspace.stories.tsx +++ b/packages/twenty-front/src/pages/auth/__stories__/CreateWorkspace.stories.tsx @@ -1,21 +1,31 @@ import { Meta, StoryObj } from '@storybook/react'; import { within } from '@storybook/test'; +import { useSetRecoilState } from 'recoil'; +import { currentWorkspaceState } from '@/auth/states/currentWorkspaceState'; import { AppPath } from '@/types/AppPath'; import { PageDecorator, PageDecoratorArgs, } from '~/testing/decorators/PageDecorator'; +import { graphqlMocks } from '~/testing/graphqlMocks'; import { CreateWorkspace } from '../CreateWorkspace'; const meta: Meta = { title: 'Pages/Auth/CreateWorkspace', component: CreateWorkspace, - decorators: [PageDecorator], + decorators: [ + (Story) => { + const setCurrentWorkspace = useSetRecoilState(currentWorkspaceState); + setCurrentWorkspace(null); + return ; + }, + PageDecorator, + ], args: { routePath: AppPath.CreateWorkspace }, parameters: { - msw: [], + msw: graphqlMocks, }, }; diff --git a/packages/twenty-front/src/pages/auth/__stories__/PlanRequired.stories.tsx b/packages/twenty-front/src/pages/auth/__stories__/PlanRequired.stories.tsx index 2289be551..f325f824c 100644 --- a/packages/twenty-front/src/pages/auth/__stories__/PlanRequired.stories.tsx +++ b/packages/twenty-front/src/pages/auth/__stories__/PlanRequired.stories.tsx @@ -1,12 +1,16 @@ +import { getOperationName } from '@apollo/client/utilities'; import { Meta, StoryObj } from '@storybook/react'; import { within } from '@storybook/test'; +import { graphql, HttpResponse } from 'msw'; import { AppPath } from '@/types/AppPath'; +import { GET_CURRENT_USER } from '@/users/graphql/queries/getCurrentUser'; import { PageDecorator, PageDecoratorArgs, } from '~/testing/decorators/PageDecorator'; import { graphqlMocks } from '~/testing/graphqlMocks'; +import { mockedOnboardingUsersData } from '~/testing/mock-data/users'; import { PlanRequired } from '../PlanRequired'; @@ -16,9 +20,23 @@ const meta: Meta = { decorators: [PageDecorator], args: { routePath: AppPath.PlanRequired }, parameters: { - msw: graphqlMocks, - cookie: { - tokenPair: '{}', + msw: { + handlers: [ + graphql.query(getOperationName(GET_CURRENT_USER) ?? '', () => { + return HttpResponse.json({ + data: { + currentUser: { + ...mockedOnboardingUsersData[0], + defaultWorkspace: { + ...mockedOnboardingUsersData[0].defaultWorkspace, + subscriptionStatus: 'incomplete', + }, + }, + }, + }); + }), + graphqlMocks.handlers, + ], }, }, }; diff --git a/packages/twenty-front/src/pages/auth/__stories__/SignInUp.stories.tsx b/packages/twenty-front/src/pages/auth/__stories__/SignInUp.stories.tsx index 6ed11a704..2c40e0359 100644 --- a/packages/twenty-front/src/pages/auth/__stories__/SignInUp.stories.tsx +++ b/packages/twenty-front/src/pages/auth/__stories__/SignInUp.stories.tsx @@ -1,12 +1,16 @@ +import { getOperationName } from '@apollo/client/utilities'; import { Meta, StoryObj } from '@storybook/react'; import { fireEvent, within } from '@storybook/test'; +import { graphql, HttpResponse } from 'msw'; import { AppPath } from '@/types/AppPath'; +import { GET_CURRENT_USER } from '@/users/graphql/queries/getCurrentUser'; import { PageDecorator, PageDecoratorArgs, } from '~/testing/decorators/PageDecorator'; import { graphqlMocks } from '~/testing/graphqlMocks'; +import { mockedOnboardingUsersData } from '~/testing/mock-data/users'; import { SignInUp } from '../SignInUp'; @@ -16,9 +20,17 @@ const meta: Meta = { decorators: [PageDecorator], args: { routePath: AppPath.SignIn }, parameters: { - msw: graphqlMocks, - cookie: { - tokenPair: '{}', + msw: { + handlers: [ + graphql.query(getOperationName(GET_CURRENT_USER) ?? '', () => { + return HttpResponse.json({ + data: { + currentUser: mockedOnboardingUsersData[0], + }, + }); + }), + graphqlMocks.handlers, + ], }, }, }; diff --git a/packages/twenty-front/src/pages/opportunities/__stories__/Opportunities.stories.tsx b/packages/twenty-front/src/pages/opportunities/__stories__/Opportunities.stories.tsx index 6c0d87c89..b0ac3886c 100644 --- a/packages/twenty-front/src/pages/opportunities/__stories__/Opportunities.stories.tsx +++ b/packages/twenty-front/src/pages/opportunities/__stories__/Opportunities.stories.tsx @@ -1,6 +1,7 @@ import { Meta, StoryObj } from '@storybook/react'; import { userEvent, within } from '@storybook/test'; +import { ObjectMetadataItemsRelationPickerEffect } from '@/object-metadata/components/ObjectMetadataItemsRelationPickerEffect'; import { AppPath } from '@/types/AppPath'; import { PageDecorator, @@ -13,7 +14,17 @@ import { Opportunities } from '../Opportunities'; const meta: Meta = { title: 'Pages/Opportunities/Default', component: Opportunities, - decorators: [PageDecorator], + decorators: [ + (Story) => { + return ( + <> + + + + ); + }, + PageDecorator, + ], args: { routePath: AppPath.OpportunitiesPage }, parameters: { msw: graphqlMocks, diff --git a/packages/twenty-front/src/testing/decorators/ObjectMetadataItemsDecorator.tsx b/packages/twenty-front/src/testing/decorators/ObjectMetadataItemsDecorator.tsx index 0eab23f8a..193c520ee 100644 --- a/packages/twenty-front/src/testing/decorators/ObjectMetadataItemsDecorator.tsx +++ b/packages/twenty-front/src/testing/decorators/ObjectMetadataItemsDecorator.tsx @@ -1,9 +1,24 @@ +import { useEffect } from 'react'; import { Decorator } from '@storybook/react'; +import { useRecoilState } from 'recoil'; -import { ObjectMetadataItemsProvider } from '@/object-metadata/components/ObjectMetadataItemsProvider'; +import { useFindManyObjectMetadataItems } from '@/object-metadata/hooks/useFindManyObjectMetadataItems'; +import { objectMetadataItemsState } from '@/object-metadata/states/objectMetadataItemsState'; +import { isDeeplyEqual } from '~/utils/isDeeplyEqual'; -export const ObjectMetadataItemsDecorator: Decorator = (Story) => ( - - - -); +export const ObjectMetadataItemsDecorator: Decorator = (Story) => { + const { objectMetadataItems: newObjectMetadataItems } = + useFindManyObjectMetadataItems(); + + const [objectMetadataItems, setObjectMetadataItems] = useRecoilState( + objectMetadataItemsState, + ); + + useEffect(() => { + if (!isDeeplyEqual(objectMetadataItems, newObjectMetadataItems)) { + setObjectMetadataItems(newObjectMetadataItems); + } + }, [newObjectMetadataItems, objectMetadataItems, setObjectMetadataItems]); + + return ; +}; diff --git a/packages/twenty-front/src/testing/decorators/PageDecorator.tsx b/packages/twenty-front/src/testing/decorators/PageDecorator.tsx index b96a224ea..c3df0d1fb 100644 --- a/packages/twenty-front/src/testing/decorators/PageDecorator.tsx +++ b/packages/twenty-front/src/testing/decorators/PageDecorator.tsx @@ -1,13 +1,16 @@ import { HelmetProvider } from 'react-helmet-async'; import { MemoryRouter, Route, Routes } from 'react-router-dom'; +import { ApolloProvider } from '@apollo/client'; import { Decorator } from '@storybook/react'; import { RecoilRoot } from 'recoil'; -import { RelationPickerScope } from '@/object-record/relation-picker/scopes/RelationPickerScope'; +import { ApolloMetadataClientProvider } from '@/object-metadata/components/ApolloMetadataClientProvider'; +import { ObjectMetadataItemsProvider } from '@/object-metadata/components/ObjectMetadataItemsProvider'; import { SnackBarProviderScope } from '@/ui/feedback/snack-bar-manager/scopes/SnackBarProviderScope'; import { ClientConfigProvider } from '~/modules/client-config/components/ClientConfigProvider'; import { DefaultLayout } from '~/modules/ui/layout/page/DefaultLayout'; import { UserProvider } from '~/modules/users/components/UserProvider'; +import { mockedClient } from '~/testing/mockedClient'; import { FullHeightStorybookLayout } from '../FullHeightStorybookLayout'; @@ -34,26 +37,32 @@ export const PageDecorator: Decorator<{ routeParams: RouteParams; }> = (Story, { args }) => ( - - - - - - - - - - } /> - - - - - - - - - + + + + + + + + + + + + } /> + + + + + + + + + + + ); diff --git a/packages/twenty-front/src/testing/graphqlMocks.ts b/packages/twenty-front/src/testing/graphqlMocks.ts index efdbc8c27..80fd899cf 100644 --- a/packages/twenty-front/src/testing/graphqlMocks.ts +++ b/packages/twenty-front/src/testing/graphqlMocks.ts @@ -4,27 +4,30 @@ import { graphql, HttpResponse } from 'msw'; import { CREATE_EVENT } from '@/analytics/graphql/queries/createEvent'; import { GET_CLIENT_CONFIG } from '@/client-config/graphql/queries/getClientConfig'; import { FIND_MANY_OBJECT_METADATA_ITEMS } from '@/object-metadata/graphql/queries'; +import { GET_CURRENT_USER } from '@/users/graphql/queries/getCurrentUser'; +import { REACT_APP_SERVER_BASE_URL } from '~/config'; import { mockedActivities } from '~/testing/mock-data/activities'; +import { mockedCompaniesData } from '~/testing/mock-data/companies'; +import { mockedClientConfig } from '~/testing/mock-data/config'; +import { mockedPipelineSteps } from '~/testing/mock-data/pipeline-steps'; +import { mockedUsersData } from '~/testing/mock-data/users'; -import { mockedCompaniesData } from './mock-data/companies'; import { mockedObjectMetadataItems } from './mock-data/metadata'; import { mockedPeopleData } from './mock-data/people'; import { mockedViewFieldsData } from './mock-data/view-fields'; import { mockedViewsData } from './mock-data/views'; -const metadataGraphql = graphql.link( - `${process.env.REACT_APP_SERVER_BASE_URL}/metadata`, -); +const metadataGraphql = graphql.link(`${REACT_APP_SERVER_BASE_URL}/metadata`); export const graphqlMocks = { handlers: [ - // graphql.query(getOperationName(GET_CURRENT_USER) ?? '', () => { - // return HttpResponse.json({ - // data: { - // currentUser: mockedUsersData[0], - // }, - // }); - // }), + graphql.query(getOperationName(GET_CURRENT_USER) ?? '', () => { + return HttpResponse.json({ + data: { + currentUser: mockedUsersData[0], + }, + }); + }), graphql.mutation(getOperationName(CREATE_EVENT) ?? '', () => { return HttpResponse.json({ data: { @@ -35,18 +38,7 @@ export const graphqlMocks = { graphql.query(getOperationName(GET_CLIENT_CONFIG) ?? '', () => { return HttpResponse.json({ data: { - clientConfig: { - signInPrefilled: true, - dataModelSettingsEnabled: true, - developersSettingsEnabled: true, - debugMode: false, - authProviders: { google: true, password: true, magicLink: false }, - telemetry: { enabled: false, anonymizationEnabled: true }, - support: { - supportDriver: 'front', - supportFrontChatId: null, - }, - }, + clientConfig: mockedClientConfig, }, }); }), @@ -112,7 +104,29 @@ export const graphqlMocks = { data: { companies: { edges: mockedCompaniesData.map((company) => ({ - node: company, + node: { + ...company, + favorites: { + edges: [], + __typename: 'FavoriteConnection', + }, + attachments: { + edges: [], + __typename: 'AttachmentConnection', + }, + people: { + edges: [], + __typename: 'PersonConnection', + }, + opportunities: { + edges: [], + __typename: 'OpportunityConnection', + }, + activityTargets: { + edges: [], + __typename: 'ActivityTargetConnection', + }, + }, cursor: null, })), pageInfo: { @@ -147,8 +161,16 @@ export const graphqlMocks = { return HttpResponse.json({ data: { activities: { - edges: mockedActivities.map((activities) => ({ - node: activities, + edges: mockedActivities.map(({ activityTargets, ...rest }) => ({ + node: { + ...rest, + activityTargets: { + edges: activityTargets.map((t) => ({ node: t })), + }, + attachments: { + edges: [], + }, + }, cursor: null, })), pageInfo: { @@ -161,5 +183,58 @@ export const graphqlMocks = { }, }); }), + graphql.query('FindManyFavorites', () => { + return HttpResponse.json({ + data: { + favorites: { + edges: [], + pageInfo: { + hasNextPage: false, + hasPreviousPage: false, + startCursor: null, + endCursor: null, + }, + }, + }, + }); + }), + graphql.query('FindManyPipelineSteps', () => { + return HttpResponse.json({ + data: { + pipelineSteps: { + edges: mockedPipelineSteps.map((step) => ({ + node: { + ...step, + opportunities: { + edges: [], + }, + }, + cursor: null, + })), + pageInfo: { + hasNextPage: false, + hasPreviousPage: false, + startCursor: null, + endCursor: null, + }, + }, + }, + }); + }), + graphql.query('FindManyOpportunities', () => { + return HttpResponse.json({ + data: { + opportunities: { + edges: [], + pageInfo: { + hasNextPage: false, + hasPreviousPage: false, + startCursor: null, + endCursor: null, + }, + }, + }, + }); + }), ], }; diff --git a/packages/twenty-front/src/testing/mock-data/activities.ts b/packages/twenty-front/src/testing/mock-data/activities.ts index 4539b8128..0ea1407e3 100644 --- a/packages/twenty-front/src/testing/mock-data/activities.ts +++ b/packages/twenty-front/src/testing/mock-data/activities.ts @@ -18,9 +18,11 @@ type MockedActivity = Pick< | 'authorId' | 'dueAt' | 'completedAt' + | 'reminderAt' + | 'assigneeId' > & { - author: Pick; - assignee: Pick; + author: WorkspaceMember; + assignee: WorkspaceMember; comments: Comment[]; activityTargets: Array< Pick< @@ -40,33 +42,35 @@ type MockedActivity = Pick< >; }; +const workspaceMember: WorkspaceMember = { + id: '374fe3a5-df1e-4119-afe0-2a62a2ba481e', + name: { + firstName: 'Charles', + lastName: 'Test', + }, + avatarUrl: '', + locale: 'en', + createdAt: '2023-04-26T10:23:42.33625+00:00', + updatedAt: '2023-04-26T10:23:42.33625+00:00', + userId: 'e2409670-1088-46b4-858e-f20a598d9d0f', + colorScheme: 'Light', +}; + export const mockedTasks: Array = [ { - id: '89bb825c-171e-4bcc-9cf7-43448d6fb230', + id: 'c554852c-b28a-4307-a41d-a7a0fdde3386', createdAt: '2023-04-26T10:12:42.33625+00:00', updatedAt: '2023-04-26T10:23:42.33625+00:00', + reminderAt: null, title: 'My very first task', type: 'Task', body: '', dueAt: '2023-04-26T10:12:42.33625+00:00', completedAt: null, - author: { - id: '374fe3a5-df1e-4119-afe0-2a62a2ba481e', - name: { - firstName: 'Charles', - lastName: 'Test', - }, - avatarUrl: '', - }, - assignee: { - id: '374fe3a5-df1e-4119-afe0-2a62a2ba481e', - name: { - firstName: 'Charles', - lastName: 'Test', - }, - avatarUrl: '', - }, - authorId: '374fe3a5-df1e-4119-afe0-2a62a2ba481e', + author: workspaceMember, + assignee: workspaceMember, + assigneeId: workspaceMember.id, + authorId: workspaceMember.id, comments: [], activityTargets: [], __typename: 'Activity', @@ -75,31 +79,19 @@ export const mockedTasks: Array = [ export const mockedActivities: Array = [ { - id: '89bb825c-171e-4bcc-9cf7-43448d6fb230', + id: '3ecaa1be-aac7-463a-a38e-64078dd451d5', createdAt: '2023-04-26T10:12:42.33625+00:00', updatedAt: '2023-04-26T10:23:42.33625+00:00', + reminderAt: null, title: 'My very first note', type: 'Note', body: '', dueAt: '2023-04-26T10:12:42.33625+00:00', completedAt: null, - author: { - id: '374fe3a5-df1e-4119-afe0-2a62a2ba481e', - name: { - firstName: 'Charles', - lastName: 'Test', - }, - avatarUrl: '', - }, - assignee: { - id: '374fe3a5-df1e-4119-afe0-2a62a2ba481e', - name: { - firstName: 'Charles', - lastName: 'Test', - }, - avatarUrl: '', - }, - authorId: '374fe3a5-df1e-4119-afe0-2a62a2ba481e', + author: workspaceMember, + assignee: workspaceMember, + assigneeId: workspaceMember.id, + authorId: workspaceMember.id, comments: [], activityTargets: [ { @@ -149,28 +141,19 @@ export const mockedActivities: Array = [ id: '89bb825c-171e-4bcc-9cf7-43448d6fb278a', createdAt: new Date().toISOString(), updatedAt: new Date().toISOString(), + reminderAt: null, title: 'Another note', body: '', type: 'Note', completedAt: null, dueAt: '2029-08-26T10:12:42.33625+00:00', author: { - id: '374fe3a5-df1e-4119-afe0-2a62a2ba481e', - name: { - firstName: 'Charles', - lastName: 'Test', - }, - avatarUrl: '', + ...workspaceMember, + colorScheme: 'Dark', }, - assignee: { - id: '374fe3a5-df1e-4119-afe0-2a62a2ba481e', - name: { - firstName: 'Charles', - lastName: 'Test', - }, - avatarUrl: '', - }, - authorId: '374fe3a5-df1e-4119-afe0-2a62a2ba481e', + assignee: { ...workspaceMember, colorScheme: 'Dark' }, + assigneeId: workspaceMember.id, + authorId: workspaceMember.id, comments: [], activityTargets: [ { diff --git a/packages/twenty-front/src/testing/mock-data/companies.ts b/packages/twenty-front/src/testing/mock-data/companies.ts index 880ab5223..d5a96d4c7 100644 --- a/packages/twenty-front/src/testing/mock-data/companies.ts +++ b/packages/twenty-front/src/testing/mock-data/companies.ts @@ -4,21 +4,8 @@ import { WorkspaceMember } from '@/workspace-member/types/WorkspaceMember'; import { mockedUsersData } from './users'; -type MockedCompany = Pick< - Company, - | 'id' - | 'name' - | 'domainName' - | 'createdAt' - | 'address' - | 'employees' - | 'linkedinUrl' - | 'xUrl' - | 'annualRecurringRevenue' - | 'idealCustomerProfile' - | 'accountOwnerId' -> & { - accountOwner: Pick | null; +type MockedCompany = Omit & { + accountOwner: WorkspaceMember | null; Favorite: Pick | null; }; @@ -28,13 +15,14 @@ export const mockedCompaniesData: Array = [ domainName: 'airbnb.com', name: 'Airbnb', createdAt: '2023-04-26T10:08:54.724515+00:00', + updatedAt: '2023-04-26T10:23:42.33625+00:00', address: '17 rue de clignancourt', employees: 12, - linkedinUrl: { + linkedinLink: { url: 'https://www.linkedin.com/company/airbnb/', label: 'https://www.linkedin.com/company/airbnb/', }, - xUrl: { + xLink: { url: 'https://twitter.com/airbnb', label: 'https://twitter.com/airbnb', }, @@ -49,6 +37,11 @@ export const mockedCompaniesData: Array = [ }, avatarUrl: null, id: mockedUsersData[0].id, + locale: 'en', + colorScheme: 'Light', + updatedAt: '2023-04-26T10:23:42.33625+00:00', + createdAt: '2023-04-26T10:23:42.33625+00:00', + userId: mockedUsersData[0].id, }, }, { @@ -56,14 +49,15 @@ export const mockedCompaniesData: Array = [ domainName: 'aircall.io', name: 'Aircall', createdAt: '2023-04-26T10:12:42.33625+00:00', + updatedAt: '2023-04-26T10:23:42.33625+00:00', address: '', employees: 1, accountOwnerId: null, - linkedinUrl: { + linkedinLink: { url: 'https://www.linkedin.com/company/aircall/', label: 'https://www.linkedin.com/company/aircall/', }, - xUrl: { + xLink: { url: 'https://twitter.com/aircall', label: 'https://twitter.com/aircall', }, @@ -77,13 +71,14 @@ export const mockedCompaniesData: Array = [ domainName: 'algolia.com', name: 'Algolia', createdAt: '2023-04-26T10:10:32.530184+00:00', + updatedAt: '2023-04-26T10:23:42.33625+00:00', address: '', employees: 1, - linkedinUrl: { + linkedinLink: { url: 'https://www.linkedin.com/company/algolia/', label: 'https://www.linkedin.com/company/algolia/', }, - xUrl: { + xLink: { url: 'https://twitter.com/algolia', label: 'https://twitter.com/algolia', }, @@ -98,13 +93,14 @@ export const mockedCompaniesData: Array = [ domainName: 'apple.com', name: 'Apple', createdAt: '2023-03-21T06:30:25.39474+00:00', + updatedAt: '2023-04-26T10:23:42.33625+00:00', address: '', employees: 10, - linkedinUrl: { + linkedinLink: { url: 'https://www.linkedin.com/company/apple/', label: 'https://www.linkedin.com/company/apple/', }, - xUrl: { + xLink: { url: 'https://twitter.com/apple', label: 'https://twitter.com/apple', }, @@ -119,13 +115,14 @@ export const mockedCompaniesData: Array = [ domainName: 'qonto.com', name: 'Qonto', createdAt: '2023-04-26T10:13:29.712485+00:00', + updatedAt: '2023-04-26T10:23:42.33625+00:00', address: '10 rue de la Paix', employees: 1, - linkedinUrl: { + linkedinLink: { url: 'https://www.linkedin.com/company/qonto/', label: 'https://www.linkedin.com/company/qonto/', }, - xUrl: { + xLink: { url: 'https://twitter.com/qonto', label: 'https://twitter.com/qonto', }, @@ -140,13 +137,14 @@ export const mockedCompaniesData: Array = [ domainName: 'facebook.com', name: 'Facebook', createdAt: '2023-04-26T10:09:25.656555+00:00', + updatedAt: '2023-04-26T10:23:42.33625+00:00', address: '', employees: 1, - linkedinUrl: { + linkedinLink: { url: 'https://www.linkedin.com/company/facebook/', label: 'https://www.linkedin.com/company/facebook/', }, - xUrl: { + xLink: { url: 'https://twitter.com/facebook', label: 'https://twitter.com/facebook', }, @@ -161,13 +159,14 @@ export const mockedCompaniesData: Array = [ domainName: 'sequoia.com', name: 'Sequoia', createdAt: '2023-04-26T10:09:25.656555+00:00', + updatedAt: '2023-04-26T10:23:42.33625+00:00', address: '', employees: 1, - linkedinUrl: { + linkedinLink: { url: 'https://www.linkedin.com/company/sequoia/', label: 'https://www.linkedin.com/company/sequoia/', }, - xUrl: { + xLink: { url: 'https://twitter.com/sequoia', label: 'https://twitter.com/sequoia', }, @@ -187,10 +186,11 @@ export const mockedEmptyCompanyData = { accountOwner: null, annualRecurringRevenue: null, createdAt: null, + updatedAt: null, employees: null, idealCustomerProfile: null, - linkedinUrl: null, - xUrl: null, + linkedinLink: null, + xLink: null, _activityCount: null, __typename: 'Company', }; diff --git a/packages/twenty-front/src/testing/mock-data/config.ts b/packages/twenty-front/src/testing/mock-data/config.ts new file mode 100644 index 000000000..281c2502f --- /dev/null +++ b/packages/twenty-front/src/testing/mock-data/config.ts @@ -0,0 +1,28 @@ +export const mockedClientConfig = { + signInPrefilled: true, + dataModelSettingsEnabled: true, + developersSettingsEnabled: true, + debugMode: false, + authProviders: { + google: true, + password: true, + magicLink: false, + __typename: 'AuthProviders', + }, + telemetry: { + enabled: false, + anonymizationEnabled: true, + __typename: 'Telemetry', + }, + support: { + supportDriver: 'front', + supportFrontChatId: null, + __typename: 'Support', + }, + billing: { + isBillingEnabled: true, + billingUrl: '', + __typename: 'Billing', + }, + __typename: 'ClientConfig', +}; diff --git a/packages/twenty-front/src/testing/mock-data/metadata.ts b/packages/twenty-front/src/testing/mock-data/metadata.ts index f7730cd7d..5d5754f96 100644 --- a/packages/twenty-front/src/testing/mock-data/metadata.ts +++ b/packages/twenty-front/src/testing/mock-data/metadata.ts @@ -1,12 +1,9 @@ -import { - FieldMetadataType, - RelationMetadataType, -} from '~/generated-metadata/graphql'; - export const mockedPeopleMetadata = { + __typename: 'objectEdge', node: { __typename: 'object', - id: '20202020-c64b-44bc-bd2c-502c99f49dca', + id: '251787a4-9e47-4251-aaea-ea83f74cee80', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', nameSingular: 'person', namePlural: 'people', labelSingular: 'Person', @@ -16,71 +13,18 @@ export const mockedPeopleMetadata = { isCustom: false, isActive: true, isSystem: false, - createdAt: '2023-11-24T03:29:18.207Z', - updatedAt: '2023-11-24T03:29:18.207Z', + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + labelIdentifierFieldMetadataId: null, + imageIdentifierFieldMetadataId: null, fields: { + __typename: 'ObjectFieldsConnection', edges: [ { + __typename: 'fieldEdge', node: { __typename: 'field', - id: '20202020-2bf4-42b8-8718-a3e852bfa6a6', - type: 'DATE_TIME', - name: 'updatedAt', - label: 'Update date', - description: null, - icon: 'IconCalendar', - isCustom: false, - isActive: true, - isSystem: true, - isNullable: false, - createdAt: '2023-11-24T03:29:18.268Z', - updatedAt: '2023-11-24T03:29:18.268Z', - fromRelationMetadata: null, - toRelationMetadata: null, - }, - }, - { - node: { - __typename: 'field', - id: '20202020-03cd-4cd0-9afc-92077b69f24f', - type: 'UUID', - name: 'id', - label: 'Id', - description: null, - icon: null, - isCustom: false, - isActive: true, - isSystem: true, - isNullable: false, - createdAt: '2023-11-24T03:29:18.268Z', - updatedAt: '2023-11-24T03:29:18.268Z', - fromRelationMetadata: null, - toRelationMetadata: null, - }, - }, - { - node: { - __typename: 'field', - id: '20202020-486f-45f9-bbdf-aac18b1831c0', - type: 'TEXT', - name: 'phone', - label: 'Phone', - description: 'Contact’s phone number', - icon: 'IconPhone', - isCustom: false, - isActive: true, - isSystem: false, - isNullable: true, - createdAt: '2023-11-24T03:29:18.268Z', - updatedAt: '2023-11-24T03:29:18.268Z', - fromRelationMetadata: null, - toRelationMetadata: null, - }, - }, - { - node: { - __typename: 'field', - id: '20202020-dcf6-445a-b543-37e55de43c25', + id: '273867e0-1bc7-499f-92d6-a4ec49425138', type: 'LINK', name: 'linkedinLink', label: 'Linkedin', @@ -90,73 +34,121 @@ export const mockedPeopleMetadata = { isActive: true, isSystem: false, isNullable: true, - createdAt: '2023-11-24T03:29:18.268Z', - updatedAt: '2023-11-24T03:29:18.268Z', + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', fromRelationMetadata: null, toRelationMetadata: null, + defaultValue: null, + options: null, }, }, { + __typename: 'fieldEdge', node: { __typename: 'field', - id: '20202020-64e1-4080-b6ad-db03c3809f8b', - type: 'UUID', - name: 'companyId', - label: 'Company ID (foreign key)', - description: 'Foreign key for company', - icon: null, - isCustom: false, - isActive: true, - isSystem: true, - isNullable: true, - createdAt: '2023-11-24T03:29:18.268Z', - updatedAt: '2023-11-24T03:29:18.268Z', - fromRelationMetadata: null, - toRelationMetadata: null, - }, - }, - { - node: { - __typename: 'field', - id: '20202020-bb05-45cb-aa2a-71b58d49dd23', - type: 'TEXT', - name: 'avatarUrl', - label: 'Avatar', - description: 'Contact’s avatar', - icon: 'IconFileUpload', - isCustom: false, - isActive: true, - isSystem: true, - isNullable: true, - createdAt: '2023-11-24T03:29:18.268Z', - updatedAt: '2023-11-24T03:29:18.268Z', - fromRelationMetadata: null, - toRelationMetadata: null, - }, - }, - { - node: { - __typename: 'field', - id: '20202020-a3a7-4f63-9303-10226f6055be', - type: 'LINK', - name: 'xLink', - label: 'X', - description: 'Contact’s X/Twitter account', - icon: 'IconBrandX', + id: 'dbdd6cad-20a9-4caa-8965-d1e02d7ab380', + type: 'RELATION', + name: 'favorites', + label: 'Favorites', + description: 'Favorites linked to the contact', + icon: 'IconHeart', isCustom: false, isActive: true, isSystem: false, isNullable: true, - createdAt: '2023-11-24T03:29:18.268Z', - updatedAt: '2023-11-24T03:29:18.268Z', - fromRelationMetadata: null, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: { + __typename: 'relation', + id: 'b3d452bc-e683-4dc6-86ec-37766ea8b30c', + relationType: 'ONE_TO_MANY', + toObjectMetadata: { + __typename: 'object', + id: '59683254-31b8-4d3c-82ab-d936a56beb48', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'favorite', + namePlural: 'favorites', + }, + toFieldMetadataId: 'a0e7e269-d28c-49c6-8fe3-e89acef1cbf3', + }, toRelationMetadata: null, + defaultValue: null, + options: null, }, }, { + __typename: 'fieldEdge', node: { __typename: 'field', - id: '20202020-3b86-413e-ab56-0ebd1a583ff3', + id: 'c606dfb1-a24c-4f9b-b626-0df1c845e6e8', + type: 'RELATION', + name: 'messageRecipients', + label: 'Message Recipients', + description: 'Message Recipients', + icon: 'IconUserCircle', + isCustom: false, + isActive: true, + isSystem: false, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: { + __typename: 'relation', + id: 'fcc9ed16-2fa4-4809-8a1d-01ce0c481130', + relationType: 'ONE_TO_MANY', + toObjectMetadata: { + __typename: 'object', + id: 'dd41deae-84d5-4a66-8947-260b0c72677c', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'messageRecipient', + namePlural: 'messageRecipients', + }, + toFieldMetadataId: '88ab56e5-828e-4fb2-a37c-314b8803f361', + }, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '586d0acc-f68b-4f08-aea9-410d88f351aa', + type: 'RELATION', + name: 'opportunities', + label: 'Opportunities', + description: 'Opportunities linked to the contact.', + icon: 'IconTargetArrow', + isCustom: false, + isActive: true, + isSystem: false, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: { + __typename: 'relation', + id: 'e63587c4-c565-4f77-9b8c-a639ae366dea', + relationType: 'ONE_TO_MANY', + toObjectMetadata: { + __typename: 'object', + id: '941ad274-2d26-4e90-94d9-5e446aa5b91e', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'opportunity', + namePlural: 'opportunities', + }, + toFieldMetadataId: '48067b53-f99f-4700-bf3a-6569d1646b21', + }, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '8f830af2-bac2-4c97-95bf-bc2336523200', type: 'TEXT', name: 'jobTitle', label: 'Job Title', @@ -166,35 +158,21 @@ export const mockedPeopleMetadata = { isActive: true, isSystem: false, isNullable: true, - createdAt: '2023-11-24T03:29:18.268Z', - updatedAt: '2023-11-24T03:29:18.268Z', + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', fromRelationMetadata: null, toRelationMetadata: null, + defaultValue: { + value: '', + }, + options: null, }, }, { + __typename: 'fieldEdge', node: { __typename: 'field', - id: '20202020-8a96-4e4b-86fd-ea126530e0c1', - type: 'EMAIL', - name: 'email', - label: 'Email', - description: 'Contact’s Email', - icon: 'IconMail', - isCustom: false, - isActive: true, - isSystem: false, - isNullable: true, - createdAt: '2023-11-24T03:29:18.268Z', - updatedAt: '2023-11-24T03:29:18.268Z', - fromRelationMetadata: null, - toRelationMetadata: null, - }, - }, - { - node: { - __typename: 'field', - id: '20202020-9b56-4888-bfe3-f6f59aa999e3', + id: '669ac2ca-a16e-4b82-8d86-0fe2f55ab01b', type: 'FULL_NAME', name: 'name', label: 'Name', @@ -204,358 +182,80 @@ export const mockedPeopleMetadata = { isActive: true, isSystem: false, isNullable: true, - createdAt: '2023-11-24T03:29:18.268Z', - updatedAt: '2023-11-24T03:29:18.268Z', + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', fromRelationMetadata: null, toRelationMetadata: null, - }, - }, - { - node: { - __typename: 'field', - id: '20202020-78f8-4b4c-90ff-86adf77590f5', - type: 'TEXT', - name: 'city', - label: 'City', - description: 'Contact’s city', - icon: 'IconMap', - isCustom: false, - isActive: true, - isSystem: false, - isNullable: true, - createdAt: '2023-11-24T03:29:18.268Z', - updatedAt: '2023-11-24T03:29:18.268Z', - fromRelationMetadata: null, - toRelationMetadata: null, - }, - }, - { - node: { - __typename: 'field', - id: '20202020-bec0-4cf0-bf1c-8b2ed21f027a', - type: 'DATE_TIME', - name: 'createdAt', - label: 'Creation date', - description: null, - icon: 'IconCalendar', - isCustom: false, - isActive: true, - isSystem: false, - isNullable: false, - createdAt: '2023-11-24T03:29:18.268Z', - updatedAt: '2023-11-24T03:29:18.268Z', - fromRelationMetadata: null, - toRelationMetadata: null, - }, - }, - { - node: { - id: '531d5d57-1104-4ba9-b47b-6e526fc46cb6', - type: FieldMetadataType.Relation, - name: 'company', - label: 'Company', - description: '', - placeholder: null, - icon: 'IconBuildingSkyscraper', - isCustom: false, - isActive: true, - isNullable: true, - createdAt: '', - updatedAt: '', - fromRelationMetadata: null, - toRelationMetadata: { - id: 'b53f8e8d-357c-4e75-8789-ecf95de200c9', - relationType: RelationMetadataType.OneToMany, - toObjectMetadata: { - id: 'a3195559-cc20-4749-9565-572a2f506581', - dataSourceId: '', - nameSingular: 'company', - namePlural: 'companies', - }, - toFieldMetadataId: 'a578ffb2-13db-483c-ace7-5c30a13dff2d', + defaultValue: { + lastName: '', + firstName: '', }, - }, - }, - ], - pageInfo: { - hasNextPage: false, - hasPreviousPage: false, - startCursor: null, - endCursor: null, - }, - totalCount: 12, - }, - }, -}; - -export const mockedCompaniesMetadata = { - node: { - id: 'a3195559-cc20-4749-9565-572a2f506581', - dataSourceId: '', - nameSingular: 'company', - namePlural: 'companies', - labelSingular: 'Company', - labelPlural: 'Companies', - description: null, - icon: 'IconBuildingSkyscraper', - isCustom: false, - isActive: true, - createdAt: '', - updatedAt: '', - fields: { - edges: [ - { - node: { - id: '397eabc0-c5a1-4550-8e68-839c878a8d0e', - type: FieldMetadataType.Text, - name: 'name', - label: 'Name', - description: 'The company name.', - placeholder: null, - icon: 'IconBuildingSkyscraper', - isCustom: false, - isActive: true, - isNullable: false, - createdAt: '', - updatedAt: '', - fromRelationMetadata: null, - toRelationMetadata: null, + options: null, }, }, { - node: { - id: '7ad234c7-f3b9-4efc-813c-43dc97070b07', - type: FieldMetadataType.Link, - name: 'URL', - label: 'URL', - description: - 'The company website URL. We use this url to fetch the company icon.', - placeholder: null, - icon: 'IconLink', - isCustom: false, - isActive: true, - isNullable: true, - createdAt: '', - updatedAt: '', - fromRelationMetadata: null, - toRelationMetadata: null, - }, - }, - { - node: { - id: 'a578ffb2-13db-483c-ace7-5c30a13dff2d', - type: FieldMetadataType.Relation, - name: 'people', - label: 'People', - description: 'People linked to the company.', - placeholder: null, - icon: 'IconUsers', - isCustom: false, - isActive: true, - isNullable: true, - createdAt: '', - updatedAt: '', - fromRelationMetadata: { - id: '91f07688-2243-43a4-91b4-e2984669fe8e', - relationType: RelationMetadataType.OneToMany, - toObjectMetadata: { - id: mockedPeopleMetadata.node.id, - nameSingular: mockedPeopleMetadata.node.nameSingular, - namePlural: mockedPeopleMetadata.node.namePlural, - }, - toFieldMetadataId: '531d5d57-1104-4ba9-b47b-6e526fc46cb6', - }, - toRelationMetadata: null, - }, - }, - { - node: { - id: 'b7fd622d-7d8b-4f5a-b148-a7e9fd2c4660', - type: FieldMetadataType.Number, - name: 'employees', - label: 'Employees', - description: 'Number of employees in the company.', - placeholder: null, - icon: 'IconUsers', - isCustom: true, - isActive: true, - isNullable: true, - createdAt: '', - updatedAt: '', - fromRelationMetadata: null, - toRelationMetadata: null, - }, - }, - { - node: { - id: '60ab27ed-a959-471e-b583-887387f7accd', - type: FieldMetadataType.Link, - name: 'linkedinUrl', - label: 'Linkedin URL', - description: null, - placeholder: null, - icon: 'IconBrandLinkedin', - isCustom: false, - isActive: true, - isNullable: true, - createdAt: '', - updatedAt: '', - fromRelationMetadata: null, - toRelationMetadata: null, - }, - }, - { - node: { - id: '6daadb98-83ca-4c85-bca5-7792a7d958ad', - type: FieldMetadataType.Boolean, - name: 'idealCustomerProfile', - label: 'ICP', - description: '', - placeholder: null, - icon: 'IconTarget', - isCustom: true, - isActive: false, - isNullable: true, - createdAt: '', - updatedAt: '', - fromRelationMetadata: null, - toRelationMetadata: null, - }, - }, - { - node: { - id: 'd9e366d5-d43d-4f71-ac97-f1d32768f79b', - type: FieldMetadataType.Currency, - name: 'annualRecurringRevenue', - label: 'ARR', - description: '', - placeholder: null, - icon: 'IconMoneybag', - isCustom: false, - isActive: true, - isNullable: false, - createdAt: '', - updatedAt: '', - fromRelationMetadata: null, - toRelationMetadata: null, - }, - }, - { - node: { - id: '39c55b95-f8cf-49a3-9713-fc52bbd117ae', - type: FieldMetadataType.DateTime, - name: 'createdAt', - label: 'Created At', - description: '', - placeholder: null, - icon: 'IconCalendar', - isCustom: false, - isActive: false, - isNullable: false, - createdAt: '', - updatedAt: '', - fromRelationMetadata: null, - toRelationMetadata: null, - }, - }, - ], - pageInfo: { - hasNextPage: false, - hasPreviousPage: false, - startCursor: null, - endCursor: null, - }, - totalCount: 8, - }, - }, -}; - -export const mockedWorkspacesMetadata = { - node: { - id: 'c973efa3-436e-47ea-8dbc-983ed869c04d', - dataSourceId: '', - nameSingular: 'workspace', - namePlural: 'workspaces', - labelSingular: 'Workspace', - labelPlural: 'Workspaces', - description: null, - icon: 'IconApps', - isCustom: true, - isActive: true, - createdAt: '', - updatedAt: '', - fields: { - edges: [ - { - node: { - id: 'f955402c-9e8f-4b91-a82c-95f6de392b99', - type: 'TEXT', - name: 'slug', - label: 'Slug', - description: null, - placeholder: null, - icon: 'IconSlash', - isCustom: true, - isActive: true, - isNullable: true, - createdAt: '', - updatedAt: '', - fromRelationMetadata: null, - toRelationMetadata: null, - }, - }, - ], - pageInfo: { - hasNextPage: false, - hasPreviousPage: false, - startCursor: null, - endCursor: null, - }, - totalCount: 1, - }, - }, -}; - -export const mockedActivitiesMetadata = { - node: { - __typename: 'object', - id: '20202020-8ee3-4f67-84ab-1b7a6eb5a448', - nameSingular: 'activity', - namePlural: 'activities', - labelSingular: 'Activity', - labelPlural: 'Activities', - description: 'An activity', - icon: 'IconCheckbox', - isCustom: false, - isActive: true, - isSystem: true, - createdAt: '2023-11-24T03:29:18.207Z', - updatedAt: '2023-11-24T03:29:18.207Z', - fields: { - edges: [ - { + __typename: 'fieldEdge', node: { __typename: 'field', - id: '20202020-4694-4ec6-9084-8d932ebb3066', - type: 'UUID', - name: 'assigneeId', - label: 'Assignee id (foreign key)', - description: 'Acitivity assignee id foreign key', - icon: null, + id: '92ee0bc9-5010-4153-ab93-6c269ff370c4', + type: 'TEXT', + name: 'avatarUrl', + label: 'Avatar', + description: 'Contact’s avatar', + icon: 'IconFileUpload', isCustom: false, isActive: true, isSystem: true, isNullable: true, - createdAt: '2023-11-24T03:29:18.228Z', - updatedAt: '2023-11-24T03:29:18.228Z', + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', fromRelationMetadata: null, toRelationMetadata: null, + defaultValue: { + value: '', + }, + options: null, }, }, { + __typename: 'fieldEdge', node: { __typename: 'field', - id: '20202020-88df-4202-bf82-6a06c6963280', + id: '2766f41a-1f8f-413f-88a3-1e3fec0e1821', + type: 'RELATION', + name: 'pointOfContactForOpportunities', + label: 'POC for Opportunities', + description: 'Point of Contact for Opportunities', + icon: 'IconTargetArrow', + isCustom: false, + isActive: true, + isSystem: false, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: { + __typename: 'relation', + id: '5b6296d8-8557-4a3c-a963-109a5888b3b3', + relationType: 'ONE_TO_MANY', + toObjectMetadata: { + __typename: 'object', + id: '941ad274-2d26-4e90-94d9-5e446aa5b91e', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'opportunity', + namePlural: 'opportunities', + }, + toFieldMetadataId: '6510e80d-546a-4a27-9346-06590c81f068', + }, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '7861e85d-826d-413e-8bd4-da3493a79898', type: 'DATE_TIME', name: 'updatedAt', label: 'Update date', @@ -565,73 +265,147 @@ export const mockedActivitiesMetadata = { isActive: true, isSystem: true, isNullable: false, - createdAt: '2023-11-24T03:29:18.228Z', - updatedAt: '2023-11-24T03:29:18.228Z', + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', fromRelationMetadata: null, toRelationMetadata: null, + defaultValue: { + type: 'now', + }, + options: null, }, }, { + __typename: 'fieldEdge', node: { __typename: 'field', - id: '20202020-aff0-4961-be8a-0e5c2598b9a6', + id: '10dda10c-8797-4a7b-a8ee-6123eadc4423', + type: 'UUID', + name: 'companyId', + label: 'Company id (foreign key)', + description: 'Contact’s company id foreign key', + icon: 'IconBuildingSkyscraper', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '2f1238a1-de77-40a7-a698-0912f8daf4e8', type: 'TEXT', - name: 'body', - label: 'Body', - description: 'Activity body', - icon: 'IconList', + name: 'phone', + label: 'Phone', + description: 'Contact’s phone number', + icon: 'IconPhone', isCustom: false, isActive: true, isSystem: false, isNullable: true, - createdAt: '2023-11-24T03:29:18.228Z', - updatedAt: '2023-11-24T03:29:18.228Z', + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', fromRelationMetadata: null, toRelationMetadata: null, + defaultValue: { + value: '', + }, + options: null, }, }, { + __typename: 'fieldEdge', node: { __typename: 'field', - id: '20202020-cd46-44f4-bf22-b0aa20d009da', - type: 'DATE_TIME', - name: 'reminderAt', - label: 'Reminder Date', - description: 'Activity reminder date', - icon: 'IconCalendarEvent', + id: 'ee0ce363-c3b4-4638-ab88-660566e3016f', + type: 'RELATION', + name: 'company', + label: 'Company', + description: 'Contact’s company', + icon: 'IconBuildingSkyscraper', isCustom: false, isActive: true, isSystem: false, isNullable: true, - createdAt: '2023-11-24T03:29:18.228Z', - updatedAt: '2023-11-24T03:29:18.228Z', + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', fromRelationMetadata: null, - toRelationMetadata: null, + toRelationMetadata: { + __typename: 'relation', + id: 'ccf90524-24b0-4b9a-bb01-b904c4f1328e', + relationType: 'ONE_TO_MANY', + fromObjectMetadata: { + __typename: 'object', + id: '2a603764-1a2f-4043-bbfa-dea375391fad', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'company', + namePlural: 'companies', + }, + fromFieldMetadataId: 'd991026f-54af-4411-a913-28b39403c24f', + }, + defaultValue: null, + options: null, }, }, { + __typename: 'fieldEdge', node: { __typename: 'field', - id: '20202020-2584-4797-95a8-5cc90d48c040', + id: '7db4da02-bcea-4f0e-bb5d-cf702e9529cc', type: 'TEXT', - name: 'title', - label: 'Title', - description: 'Activity title', - icon: 'IconNotes', + name: 'city', + label: 'City', + description: 'Contact’s city', + icon: 'IconMap', isCustom: false, isActive: true, isSystem: false, isNullable: true, - createdAt: '2023-11-24T03:29:18.228Z', - updatedAt: '2023-11-24T03:29:18.228Z', + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', fromRelationMetadata: null, toRelationMetadata: null, + defaultValue: { + value: '', + }, + options: null, }, }, { + __typename: 'fieldEdge', node: { __typename: 'field', - id: '20202020-f695-419c-b928-c488323d6df3', + id: '5a751ba4-5097-4fa8-acd1-5fe164368233', + type: 'LINK', + name: 'xLink', + label: 'X', + description: 'Contact’s X/Twitter account', + icon: 'IconBrandX', + isCustom: false, + isActive: true, + isSystem: false, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '8f0adf02-281a-42db-ad73-37d0d62416e0', type: 'UUID', name: 'id', label: 'Id', @@ -641,73 +415,820 @@ export const mockedActivitiesMetadata = { isActive: true, isSystem: true, isNullable: false, - createdAt: '2023-11-24T03:29:18.228Z', - updatedAt: '2023-11-24T03:29:18.228Z', + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', fromRelationMetadata: null, toRelationMetadata: null, + defaultValue: { + type: 'uuid', + }, + options: null, }, }, { + __typename: 'fieldEdge', node: { __typename: 'field', - id: '20202020-3acb-46bb-b993-0dc49fa2a48d', + id: '0eb1a396-06a5-4b6a-8003-82e6839a2afb', + type: 'RELATION', + name: 'attachments', + label: 'Attachments', + description: 'Attachments linked to the contact.', + icon: 'IconFileImport', + isCustom: false, + isActive: true, + isSystem: false, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: { + __typename: 'relation', + id: 'a65ae523-9786-4064-8f42-346ce8055345', + relationType: 'ONE_TO_MANY', + toObjectMetadata: { + __typename: 'object', + id: 'e25b094b-c6a9-4f56-856b-3c3072c33adf', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'attachment', + namePlural: 'attachments', + }, + toFieldMetadataId: 'cb2bac7e-0db7-4f10-95f2-d8d122cad29c', + }, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '17692850-3850-4e3a-824a-03aa199847f6', + type: 'RELATION', + name: 'activityTargets', + label: 'Activities', + description: 'Activities tied to the contact', + icon: 'IconCheckbox', + isCustom: false, + isActive: true, + isSystem: false, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: { + __typename: 'relation', + id: '6100b5ae-72b3-4a02-94e9-d923c7a78d92', + relationType: 'ONE_TO_MANY', + toObjectMetadata: { + __typename: 'object', + id: 'b0327d82-d8a3-4e1d-9b4b-dfbff04d951a', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'activityTarget', + namePlural: 'activityTargets', + }, + toFieldMetadataId: 'e6508bb6-0dfd-417a-b0f4-d84bc1f44883', + }, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '5ecd8da2-7578-4ca9-9f59-45889ac608fa', + type: 'EMAIL', + name: 'email', + label: 'Email', + description: 'Contact’s Email', + icon: 'IconMail', + isCustom: false, + isActive: true, + isSystem: false, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + value: '', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '63d42400-5bf0-4978-811a-f161f72c834c', + type: 'DATE_TIME', + name: 'createdAt', + label: 'Creation date', + description: null, + icon: 'IconCalendar', + isCustom: false, + isActive: true, + isSystem: false, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'now', + }, + options: null, + }, + }, + ], + pageInfo: { + __typename: 'PageInfo', + hasNextPage: false, + hasPreviousPage: false, + startCursor: 'YXJyYXljb25uZWN0aW9uOjA=', + endCursor: 'YXJyYXljb25uZWN0aW9uOjE4', + }, + totalCount: 19, + }, + }, +}; + +export const mockedCompaniesMetadata = { + __typename: 'objectEdge', + node: { + __typename: 'object', + id: '2a603764-1a2f-4043-bbfa-dea375391fad', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'company', + namePlural: 'companies', + labelSingular: 'Company', + labelPlural: 'Companies', + description: 'A company', + icon: 'IconBuildingSkyscraper', + isCustom: false, + isActive: true, + isSystem: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + labelIdentifierFieldMetadataId: null, + imageIdentifierFieldMetadataId: null, + fields: { + __typename: 'ObjectFieldsConnection', + edges: [ + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'c03b0e35-b095-42b6-b10f-3e04ef9adf8e', + type: 'LINK', + name: 'linkedinLink', + label: 'Linkedin', + description: 'The company Linkedin account', + icon: 'IconBrandLinkedin', + isCustom: false, + isActive: true, + isSystem: false, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'aaf9520e-7723-418d-a464-42cf41db5b0e', + type: 'NUMBER', + name: 'employees', + label: 'Employees', + description: 'Number of employees in the company', + icon: 'IconUsers', + isCustom: false, + isActive: true, + isSystem: false, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'ea8a043d-58c8-4b13-a041-74fb31c79e42', + type: 'TEXT', + name: 'domainName', + label: 'Domain Name', + description: + 'The company website URL. We use this url to fetch the company icon', + icon: 'IconLink', + isCustom: false, + isActive: true, + isSystem: false, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + value: '', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '775870d6-16c1-4c94-9b58-c88bdca489e8', + type: 'RELATION', + name: 'favorites', + label: 'Favorites', + description: 'Favorites linked to the company', + icon: 'IconHeart', + isCustom: false, + isActive: true, + isSystem: false, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: { + __typename: 'relation', + id: '4df88275-6b23-4bd4-b7a7-0893d366d8e0', + relationType: 'ONE_TO_MANY', + toObjectMetadata: { + __typename: 'object', + id: '59683254-31b8-4d3c-82ab-d936a56beb48', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'favorite', + namePlural: 'favorites', + }, + toFieldMetadataId: 'dcd5343e-98db-4cf7-aded-2c9c0da0a220', + }, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '1987f9fb-1f75-42a6-93e2-652811855f5b', + type: 'TEXT', + name: 'name', + label: 'Name', + description: 'The company name', + icon: 'IconBuildingSkyscraper', + isCustom: false, + isActive: true, + isSystem: false, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + value: '', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '4ab25246-cf21-4265-9241-885111814e25', + type: 'DATE_TIME', + name: 'updatedAt', + label: 'Update date', + description: null, + icon: 'IconCalendar', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'now', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '72268a05-1ac6-4b4c-b0f1-91dc82aa1f57', type: 'UUID', - name: 'authorId', - label: 'Author id (foreign key)', - description: 'Activity author id foreign key', + name: 'accountOwnerId', + label: 'Account Owner id (foreign key)', + description: + 'Your team member responsible for managing the company account id foreign key', + icon: 'IconUserCircle', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'e51b0291-33e5-401e-b595-3940a28bc5ce', + type: 'LINK', + name: 'xLink', + label: 'X', + description: 'The company Twitter/X account', + icon: 'IconBrandX', + isCustom: false, + isActive: true, + isSystem: false, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'de0dace0-f7f8-4317-95e8-f80f6f72c7e4', + type: 'RELATION', + name: 'accountOwner', + label: 'Account Owner', + description: + 'Your team member responsible for managing the company account', + icon: 'IconUserCircle', + isCustom: false, + isActive: true, + isSystem: false, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: { + __typename: 'relation', + id: 'b6d74797-0a27-449e-8f7b-26f94de4f707', + relationType: 'ONE_TO_MANY', + fromObjectMetadata: { + __typename: 'object', + id: 'bdc465d2-f9a8-4ec2-8f3d-50dd2ad4021e', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'workspaceMember', + namePlural: 'workspaceMembers', + }, + fromFieldMetadataId: 'f1c10310-ab4f-484b-bd03-f5f3890e964e', + }, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '6c9e87b5-e554-48f6-b6a8-3fce9ab9328b', + type: 'BOOLEAN', + name: 'idealCustomerProfile', + label: 'ICP', + description: + 'Ideal Customer Profile: Indicates whether the company is the most suitable and valuable customer for you', + icon: 'IconTarget', + isCustom: false, + isActive: true, + isSystem: false, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '67500175-d2d8-4b84-a6c6-4b0a0a5cca23', + type: 'RELATION', + name: 'attachments', + label: 'Attachments', + description: 'Attachments linked to the company.', + icon: 'IconFileImport', + isCustom: false, + isActive: true, + isSystem: false, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: { + __typename: 'relation', + id: '857f84a7-9934-4b3c-a7c6-3d1db427df73', + relationType: 'ONE_TO_MANY', + toObjectMetadata: { + __typename: 'object', + id: 'e25b094b-c6a9-4f56-856b-3c3072c33adf', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'attachment', + namePlural: 'attachments', + }, + toFieldMetadataId: '6e103463-aee5-4be3-af12-52cacd566c3a', + }, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'ed7fb62c-5e1a-4f35-82ff-5c59efc28edb', + type: 'DATE_TIME', + name: 'createdAt', + label: 'Creation date', + description: null, + icon: 'IconCalendar', + isCustom: false, + isActive: true, + isSystem: false, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'now', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'a5109540-d918-4f33-b80c-235a5816d44b', + type: 'UUID', + name: 'id', + label: 'Id', + description: null, icon: null, isCustom: false, isActive: true, isSystem: true, isNullable: false, - createdAt: '2023-11-24T03:29:18.228Z', - updatedAt: '2023-11-24T03:29:18.228Z', + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', fromRelationMetadata: null, toRelationMetadata: null, + defaultValue: { + type: 'uuid', + }, + options: null, }, }, { + __typename: 'fieldEdge', node: { __typename: 'field', - id: '20202020-0924-48f0-a8c2-d2dd4e2098e2', - type: 'DATE_TIME', - name: 'completedAt', - label: 'Completion Date', - description: 'Activity completion date', - icon: 'IconCheck', + id: '6b50c2a4-85b5-41ff-a774-8331ad7b3b61', + type: 'CURRENCY', + name: 'annualRecurringRevenue', + label: 'ARR', + description: + 'Annual Recurring Revenue: The actual or estimated annual revenue of the company', + icon: 'IconMoneybag', isCustom: false, isActive: true, isSystem: false, isNullable: true, - createdAt: '2023-11-24T03:29:18.228Z', - updatedAt: '2023-11-24T03:29:18.228Z', + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', fromRelationMetadata: null, toRelationMetadata: null, + defaultValue: null, + options: null, }, }, { + __typename: 'fieldEdge', node: { __typename: 'field', - id: '20202020-a243-4b94-a4b4-25705af86be2', + id: '00b695d6-e0c6-4029-9932-817b19ae0380', + type: 'RELATION', + name: 'opportunities', + label: 'Opportunities', + description: 'Opportunities linked to the company.', + icon: 'IconTargetArrow', + isCustom: false, + isActive: true, + isSystem: false, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: { + __typename: 'relation', + id: 'afe2078f-6c52-45ef-bb2e-f43b0ee28ecc', + relationType: 'ONE_TO_MANY', + toObjectMetadata: { + __typename: 'object', + id: '941ad274-2d26-4e90-94d9-5e446aa5b91e', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'opportunity', + namePlural: 'opportunities', + }, + toFieldMetadataId: '70b02b3a-8077-4ce1-ab8b-c5e854c31b13', + }, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'aec12544-a9e8-464f-b7f7-b6f1ce3faebe', type: 'TEXT', - name: 'type', - label: 'Type', - description: 'Activity type', + name: 'address', + label: 'Address', + description: 'The company address', + icon: 'IconMap', + isCustom: false, + isActive: true, + isSystem: false, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + value: '', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'd991026f-54af-4411-a913-28b39403c24f', + type: 'RELATION', + name: 'people', + label: 'People', + description: 'People linked to the company.', + icon: 'IconUsers', + isCustom: false, + isActive: true, + isSystem: false, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: { + __typename: 'relation', + id: 'ccf90524-24b0-4b9a-bb01-b904c4f1328e', + relationType: 'ONE_TO_MANY', + toObjectMetadata: { + __typename: 'object', + id: '251787a4-9e47-4251-aaea-ea83f74cee80', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'person', + namePlural: 'people', + }, + toFieldMetadataId: 'ee0ce363-c3b4-4638-ab88-660566e3016f', + }, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '9a1a00ee-1595-4b00-8a33-fefb02e25c98', + type: 'RELATION', + name: 'activityTargets', + label: 'Activities', + description: 'Activities tied to the company', icon: 'IconCheckbox', isCustom: false, isActive: true, isSystem: false, - isNullable: false, - createdAt: '2023-11-24T03:29:18.228Z', - updatedAt: '2023-11-24T03:29:18.228Z', - fromRelationMetadata: null, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: { + __typename: 'relation', + id: '49028648-0380-481d-b6ba-004193f83e97', + relationType: 'ONE_TO_MANY', + toObjectMetadata: { + __typename: 'object', + id: 'b0327d82-d8a3-4e1d-9b4b-dfbff04d951a', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'activityTarget', + namePlural: 'activityTargets', + }, + toFieldMetadataId: 'd9ea410b-2441-44ef-85da-03650aad5818', + }, toRelationMetadata: null, + defaultValue: null, + options: null, }, }, { + __typename: 'fieldEdge', node: { __typename: 'field', - id: '20202020-65a2-4d9c-b640-bac54007a14d', + id: '726f398f-7007-49f9-8b03-f71813c9fcf2', + type: 'TEXT', + name: 'industry', + label: 'Industry', + description: 'The industry the company is involved in', + icon: 'IconUsers', + isCustom: true, + isActive: true, + isSystem: false, + isNullable: true, + createdAt: '2023-12-20T12:25:25.057Z', + updatedAt: '2023-12-20T12:25:25.057Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + ], + pageInfo: { + __typename: 'PageInfo', + hasNextPage: false, + hasPreviousPage: false, + startCursor: 'YXJyYXljb25uZWN0aW9uOjA=', + endCursor: 'YXJyYXljb25uZWN0aW9uOjE3', + }, + totalCount: 18, + }, + }, +}; + +export const mockedPipelineStepsMetadata = { + __typename: 'objectEdge', + node: { + __typename: 'object', + id: 'afa12866-0de4-4f97-97fa-cd8a7c953037', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'pipelineStep', + namePlural: 'pipelineSteps', + labelSingular: 'Pipeline Step', + labelPlural: 'Pipeline Steps', + description: 'A pipeline step', + icon: 'IconLayoutKanban', + isCustom: false, + isActive: true, + isSystem: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + labelIdentifierFieldMetadataId: null, + imageIdentifierFieldMetadataId: null, + fields: { + __typename: 'ObjectFieldsConnection', + edges: [ + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '202efca6-9820-4e4a-9a27-f362dc5b46ed', + type: 'UUID', + name: 'id', + label: 'Id', + description: null, + icon: null, + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'uuid', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'c9b9d516-10d2-4eca-94ce-a872547f429f', + type: 'TEXT', + name: 'color', + label: 'Color', + description: 'Pipeline Step color', + icon: 'IconColorSwatch', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + value: '', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '7928241f-6fe9-4ab2-84c6-7e84c5bea05f', + type: 'DATE_TIME', + name: 'updatedAt', + label: 'Update date', + description: null, + icon: 'IconCalendar', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'now', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'ad3e919f-4258-4e21-8caf-bf122f17ca5c', + type: 'RELATION', + name: 'opportunities', + label: 'Opportunities', + description: 'Opportunities linked to the step.', + icon: 'IconTargetArrow', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: { + __typename: 'relation', + id: '7b0474c4-d82d-4c1d-96de-c6728b53339a', + relationType: 'ONE_TO_MANY', + toObjectMetadata: { + __typename: 'object', + id: '941ad274-2d26-4e90-94d9-5e446aa5b91e', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'opportunity', + namePlural: 'opportunities', + }, + toFieldMetadataId: '4756a816-8a18-433a-9414-c756db4727e8', + }, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'c26ba58c-5629-4a6b-ae7f-5c06d3045a9b', type: 'DATE_TIME', name: 'createdAt', label: 'Creation date', @@ -717,16 +1238,1313 @@ export const mockedActivitiesMetadata = { isActive: true, isSystem: true, isNullable: false, - createdAt: '2023-11-24T03:29:18.228Z', - updatedAt: '2023-11-24T03:29:18.228Z', + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', fromRelationMetadata: null, toRelationMetadata: null, + defaultValue: { + type: 'now', + }, + options: null, }, }, { + __typename: 'fieldEdge', node: { __typename: 'field', - id: '20202020-20e1-4366-b386-750bdca2dfe3', + id: '4f383c05-3f9b-433a-8617-20ed3861e490', + type: 'TEXT', + name: 'name', + label: 'Name', + description: 'Pipeline Step name', + icon: 'IconCurrencyDollar', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + value: '', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '8c712fbc-306f-4534-86c1-caae09b840a2', + type: 'NUMBER', + name: 'position', + label: 'Position', + description: 'Pipeline Step position', + icon: 'IconHierarchy2', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + value: 0, + }, + options: null, + }, + }, + ], + pageInfo: { + __typename: 'PageInfo', + hasNextPage: false, + hasPreviousPage: false, + startCursor: 'YXJyYXljb25uZWN0aW9uOjA=', + endCursor: 'YXJyYXljb25uZWN0aW9uOjY=', + }, + totalCount: 7, + }, + }, +}; + +export const mockedActivityTargetsMetadata = { + __typename: 'objectEdge', + node: { + __typename: 'object', + id: 'b0327d82-d8a3-4e1d-9b4b-dfbff04d951a', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'activityTarget', + namePlural: 'activityTargets', + labelSingular: 'Activity Target', + labelPlural: 'Activity Targets', + description: 'An activity target', + icon: 'IconCheckbox', + isCustom: false, + isActive: true, + isSystem: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + labelIdentifierFieldMetadataId: null, + imageIdentifierFieldMetadataId: null, + fields: { + __typename: 'ObjectFieldsConnection', + edges: [ + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '55d3c728-fd31-4012-a7f1-f90571f9f7eb', + type: 'UUID', + name: 'activityId', + label: 'Activity id (foreign key)', + description: 'ActivityTarget activity id foreign key', + icon: 'IconNotes', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '1d8071b7-06bd-4c34-94cc-05cd7d672945', + type: 'UUID', + name: 'personId', + label: 'Person id (foreign key)', + description: 'ActivityTarget person id foreign key', + icon: 'IconUser', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'd9ea410b-2441-44ef-85da-03650aad5818', + type: 'RELATION', + name: 'company', + label: 'Company', + description: 'ActivityTarget company', + icon: 'IconBuildingSkyscraper', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: { + __typename: 'relation', + id: '49028648-0380-481d-b6ba-004193f83e97', + relationType: 'ONE_TO_MANY', + fromObjectMetadata: { + __typename: 'object', + id: '2a603764-1a2f-4043-bbfa-dea375391fad', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'company', + namePlural: 'companies', + }, + fromFieldMetadataId: '9a1a00ee-1595-4b00-8a33-fefb02e25c98', + }, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '9de09afd-3a18-46dc-8be8-01c6972738c6', + type: 'UUID', + name: 'companyId', + label: 'Company id (foreign key)', + description: 'ActivityTarget company id foreign key', + icon: 'IconBuildingSkyscraper', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'd9c9707b-17c3-4bfd-a786-f7f4289b977a', + type: 'DATE_TIME', + name: 'updatedAt', + label: 'Update date', + description: null, + icon: 'IconCalendar', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'now', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '2aded974-bfa4-4ba4-b4c9-91346ac2762b', + type: 'RELATION', + name: 'activity', + label: 'Activity', + description: 'ActivityTarget activity', + icon: 'IconNotes', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: { + __typename: 'relation', + id: 'a47ced1e-6070-4b11-b5ab-1a3d2268d8a2', + relationType: 'ONE_TO_MANY', + fromObjectMetadata: { + __typename: 'object', + id: 'c8682a80-0b92-4d0e-9405-53ab7e8b225f', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'activity', + namePlural: 'activities', + }, + fromFieldMetadataId: '63bf5a31-2b3c-47ca-bb75-f1efb053ec58', + }, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'e6508bb6-0dfd-417a-b0f4-d84bc1f44883', + type: 'RELATION', + name: 'person', + label: 'Person', + description: 'ActivityTarget person', + icon: 'IconUser', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: { + __typename: 'relation', + id: '6100b5ae-72b3-4a02-94e9-d923c7a78d92', + relationType: 'ONE_TO_MANY', + fromObjectMetadata: { + __typename: 'object', + id: '251787a4-9e47-4251-aaea-ea83f74cee80', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'person', + namePlural: 'people', + }, + fromFieldMetadataId: '17692850-3850-4e3a-824a-03aa199847f6', + }, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'dc80d52d-31ea-4a72-bb9a-482ed86b6bc5', + type: 'DATE_TIME', + name: 'createdAt', + label: 'Creation date', + description: null, + icon: 'IconCalendar', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'now', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '5e8876b8-4492-4a35-ae57-da3bc725e9f1', + type: 'UUID', + name: 'id', + label: 'Id', + description: null, + icon: null, + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'uuid', + }, + options: null, + }, + }, + ], + pageInfo: { + __typename: 'PageInfo', + hasNextPage: false, + hasPreviousPage: false, + startCursor: 'YXJyYXljb25uZWN0aW9uOjA=', + endCursor: 'YXJyYXljb25uZWN0aW9uOjg=', + }, + totalCount: 9, + }, + }, +}; + +export const mockedFavoritesMetadata = { + __typename: 'objectEdge', + node: { + __typename: 'object', + id: '59683254-31b8-4d3c-82ab-d936a56beb48', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'favorite', + namePlural: 'favorites', + labelSingular: 'Favorite', + labelPlural: 'Favorites', + description: 'A favorite', + icon: 'IconHeart', + isCustom: false, + isActive: true, + isSystem: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + labelIdentifierFieldMetadataId: null, + imageIdentifierFieldMetadataId: null, + fields: { + __typename: 'ObjectFieldsConnection', + edges: [ + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'a63cbf75-68a5-4e80-8dff-b26982070afe', + type: 'DATE_TIME', + name: 'createdAt', + label: 'Creation date', + description: null, + icon: 'IconCalendar', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'now', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '7ff19811-b2fe-428e-89e1-7c2ab79d6ba4', + type: 'NUMBER', + name: 'position', + label: 'Position', + description: 'Favorite position', + icon: 'IconList', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + value: 0, + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '818f4137-f4eb-4899-aed9-c59f7924a0ad', + type: 'DATE_TIME', + name: 'updatedAt', + label: 'Update date', + description: null, + icon: 'IconCalendar', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'now', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'e9bab8b3-7a1b-4184-b66b-4a9d744b285f', + type: 'UUID', + name: 'id', + label: 'Id', + description: null, + icon: null, + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'uuid', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'a0e7e269-d28c-49c6-8fe3-e89acef1cbf3', + type: 'RELATION', + name: 'person', + label: 'Person', + description: 'Favorite person', + icon: 'IconUser', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: { + __typename: 'relation', + id: 'b3d452bc-e683-4dc6-86ec-37766ea8b30c', + relationType: 'ONE_TO_MANY', + fromObjectMetadata: { + __typename: 'object', + id: '251787a4-9e47-4251-aaea-ea83f74cee80', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'person', + namePlural: 'people', + }, + fromFieldMetadataId: 'dbdd6cad-20a9-4caa-8965-d1e02d7ab380', + }, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '39655326-9472-4552-a96c-934192e7b6b1', + type: 'UUID', + name: 'workspaceMemberId', + label: 'Workspace Member id (foreign key)', + description: 'Favorite workspace member id foreign key', + icon: 'IconCircleUser', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'dcd5343e-98db-4cf7-aded-2c9c0da0a220', + type: 'RELATION', + name: 'company', + label: 'Company', + description: 'Favorite company', + icon: 'IconBuildingSkyscraper', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: { + __typename: 'relation', + id: '4df88275-6b23-4bd4-b7a7-0893d366d8e0', + relationType: 'ONE_TO_MANY', + fromObjectMetadata: { + __typename: 'object', + id: '2a603764-1a2f-4043-bbfa-dea375391fad', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'company', + namePlural: 'companies', + }, + fromFieldMetadataId: '775870d6-16c1-4c94-9b58-c88bdca489e8', + }, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '46f6b12a-b720-4f64-9637-85e9b3b660ac', + type: 'UUID', + name: 'companyId', + label: 'Company id (foreign key)', + description: 'Favorite company id foreign key', + icon: 'IconBuildingSkyscraper', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '9b9b9be4-34ee-4ed2-9ecf-772a619584ef', + type: 'UUID', + name: 'personId', + label: 'Person id (foreign key)', + description: 'Favorite person id foreign key', + icon: 'IconUser', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'efc8bec2-de4a-4d67-9187-31394bb35119', + type: 'RELATION', + name: 'workspaceMember', + label: 'Workspace Member', + description: 'Favorite workspace member', + icon: 'IconCircleUser', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: { + __typename: 'relation', + id: '4e7e4ec6-2543-47c0-87cc-0c394e98271e', + relationType: 'ONE_TO_MANY', + fromObjectMetadata: { + __typename: 'object', + id: 'bdc465d2-f9a8-4ec2-8f3d-50dd2ad4021e', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'workspaceMember', + namePlural: 'workspaceMembers', + }, + fromFieldMetadataId: 'da7c9f08-5de0-4807-96d4-018ff7072d15', + }, + defaultValue: null, + options: null, + }, + }, + ], + pageInfo: { + __typename: 'PageInfo', + hasNextPage: false, + hasPreviousPage: false, + startCursor: 'YXJyYXljb25uZWN0aW9uOjA=', + endCursor: 'YXJyYXljb25uZWN0aW9uOjk=', + }, + totalCount: 10, + }, + }, +}; + +export const mockedMessageRecipientsMetadata = { + __typename: 'objectEdge', + node: { + __typename: 'object', + id: 'dd41deae-84d5-4a66-8947-260b0c72677c', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'messageRecipient', + namePlural: 'messageRecipients', + labelSingular: 'Message Recipient', + labelPlural: 'Message Recipients', + description: 'Message Recipients', + icon: 'IconUserCircle', + isCustom: false, + isActive: true, + isSystem: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + labelIdentifierFieldMetadataId: null, + imageIdentifierFieldMetadataId: null, + fields: { + __typename: 'ObjectFieldsConnection', + edges: [ + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '37369429-26fb-4521-963c-1aa17d1a65f2', + type: 'UUID', + name: 'personId', + label: 'Person id (foreign key)', + description: 'Person id foreign key', + icon: 'IconUser', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '22883ca2-34e2-40ab-9e7b-fde5836cb5d2', + type: 'RELATION', + name: 'workspaceMember', + label: 'Workspace Member', + description: 'Workspace member', + icon: 'IconCircleUser', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: { + __typename: 'relation', + id: 'ffcedbc0-adb7-4f74-83bb-ff7e3c270183', + relationType: 'ONE_TO_MANY', + fromObjectMetadata: { + __typename: 'object', + id: 'bdc465d2-f9a8-4ec2-8f3d-50dd2ad4021e', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'workspaceMember', + namePlural: 'workspaceMembers', + }, + fromFieldMetadataId: 'f13cce91-5f98-4eb0-8c6e-c1cf41ad168f', + }, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '5791f58e-b4f9-4415-a604-88155073a24a', + type: 'TEXT', + name: 'displayName', + label: 'Display Name', + description: 'Display Name', + icon: 'IconUser', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + value: '', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '0f5d742d-103c-46fb-845e-26320ec57391', + type: 'UUID', + name: 'id', + label: 'Id', + description: null, + icon: null, + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'uuid', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '5ac3d613-474d-4cc3-b01b-f0ff4772004f', + type: 'UUID', + name: 'messageId', + label: 'Message id (foreign key)', + description: 'Message id foreign key', + icon: 'IconMessage', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '88ab56e5-828e-4fb2-a37c-314b8803f361', + type: 'RELATION', + name: 'person', + label: 'Person', + description: 'Person', + icon: 'IconUser', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: { + __typename: 'relation', + id: 'fcc9ed16-2fa4-4809-8a1d-01ce0c481130', + relationType: 'ONE_TO_MANY', + fromObjectMetadata: { + __typename: 'object', + id: '251787a4-9e47-4251-aaea-ea83f74cee80', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'person', + namePlural: 'people', + }, + fromFieldMetadataId: 'c606dfb1-a24c-4f9b-b626-0df1c845e6e8', + }, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '663612f4-7eb8-4b21-886e-730f3b047ee7', + type: 'RELATION', + name: 'message', + label: 'Message', + description: 'Message', + icon: 'IconMessage', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: { + __typename: 'relation', + id: '020d2fe4-33c3-4fe1-a2cc-35a23d73d046', + relationType: 'ONE_TO_MANY', + fromObjectMetadata: { + __typename: 'object', + id: '6f4cd2fa-2e6f-41be-a2cc-98e497a1d2f5', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'message', + namePlural: 'message', + }, + fromFieldMetadataId: '9c58971b-4e40-4f49-b125-ff014f909744', + }, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '501a7d34-f158-4b13-b26d-f04d966a2012', + type: 'TEXT', + name: 'role', + label: 'Role', + description: 'Role', + icon: 'IconAt', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + value: 'from', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'f6c7f0fd-77a7-4d64-8b6a-e495a3cad2db', + type: 'DATE_TIME', + name: 'updatedAt', + label: 'Update date', + description: null, + icon: 'IconCalendar', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'now', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'fbdb9c94-d18f-43f8-a214-d6e87782c177', + type: 'UUID', + name: 'workspaceMemberId', + label: 'Workspace Member id (foreign key)', + description: 'Workspace member id foreign key', + icon: 'IconCircleUser', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '1f3c5781-fdd0-4c75-9b90-7486583830f8', + type: 'TEXT', + name: 'handle', + label: 'Handle', + description: 'Handle', + icon: 'IconAt', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + value: '', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '9df1cbaf-1b9f-462a-a341-cefbb8a05fcd', + type: 'DATE_TIME', + name: 'createdAt', + label: 'Creation date', + description: null, + icon: 'IconCalendar', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'now', + }, + options: null, + }, + }, + ], + pageInfo: { + __typename: 'PageInfo', + hasNextPage: false, + hasPreviousPage: false, + startCursor: 'YXJyYXljb25uZWN0aW9uOjA=', + endCursor: 'YXJyYXljb25uZWN0aW9uOjEx', + }, + totalCount: 12, + }, + }, +}; + +export const mockedActivitiesMetadata = { + __typename: 'objectEdge', + node: { + __typename: 'object', + id: 'c8682a80-0b92-4d0e-9405-53ab7e8b225f', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'activity', + namePlural: 'activities', + labelSingular: 'Activity', + labelPlural: 'Activities', + description: 'An activity', + icon: 'IconCheckbox', + isCustom: false, + isActive: true, + isSystem: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + labelIdentifierFieldMetadataId: null, + imageIdentifierFieldMetadataId: null, + fields: { + __typename: 'ObjectFieldsConnection', + edges: [ + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '64744680-c85f-45ca-ba74-55986558d58f', + type: 'DATE_TIME', + name: 'reminderAt', + label: 'Reminder Date', + description: 'Activity reminder date', + icon: 'IconCalendarEvent', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'ee8f3269-ad40-4ee8-9989-4b6978ddb487', + type: 'TEXT', + name: 'title', + label: 'Title', + description: 'Activity title', + icon: 'IconNotes', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + value: '', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'ce7bdaf6-445c-472a-b069-34fe73ac849c', + type: 'DATE_TIME', + name: 'updatedAt', + label: 'Update date', + description: null, + icon: 'IconCalendar', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'now', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'f47a1319-bdec-4d9e-8179-17cb9df81dd6', + type: 'RELATION', + name: 'comments', + label: 'Comments', + description: 'Activity comments', + icon: 'IconComment', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: { + __typename: 'relation', + id: 'f4a1e4f4-8a26-4c7d-8973-6fdbc816fc6d', + relationType: 'ONE_TO_MANY', + toObjectMetadata: { + __typename: 'object', + id: '5f5658c9-a4c8-4463-b8ba-66fb3a1efacc', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'comment', + namePlural: 'comments', + }, + toFieldMetadataId: '1309d13f-9945-4f8b-99e8-371fbb51b99d', + }, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'a6bd62f1-3e4c-4be0-ab64-0e7248d7d9eb', + type: 'RELATION', + name: 'assignee', + label: 'Assignee', + description: 'Acitivity assignee', + icon: 'IconUserCircle', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: { + __typename: 'relation', + id: '0de81eae-1ffb-4cb5-b081-ab18d5641d50', + relationType: 'ONE_TO_MANY', + fromObjectMetadata: { + __typename: 'object', + id: 'bdc465d2-f9a8-4ec2-8f3d-50dd2ad4021e', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'workspaceMember', + namePlural: 'workspaceMembers', + }, + fromFieldMetadataId: '9a722ce5-1721-4406-a695-4a207f6f50c7', + }, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '5ba12c78-4e7d-422d-821a-a647b959689b', + type: 'UUID', + name: 'id', + label: 'Id', + description: null, + icon: null, + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'uuid', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '763c2a4a-e7ba-445f-9ecd-6d1d20c8b408', + type: 'RELATION', + name: 'attachments', + label: 'Attachments', + description: 'Activity attachments', + icon: 'IconFileImport', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: { + __typename: 'relation', + id: 'a45591f3-8a30-49d0-92b3-59c4110dfee7', + relationType: 'ONE_TO_MANY', + toObjectMetadata: { + __typename: 'object', + id: 'e25b094b-c6a9-4f56-856b-3c3072c33adf', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'attachment', + namePlural: 'attachments', + }, + toFieldMetadataId: 'd8ce8a44-872e-482e-ac9d-87f6637f5776', + }, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '87b74ce7-8029-4b36-8b2f-6e565b65429a', + type: 'TEXT', + name: 'type', + label: 'Type', + description: 'Activity type', + icon: 'IconCheckbox', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + value: 'Note', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '3cea79b3-4419-4872-b1e3-6ab7623fb918', + type: 'TEXT', + name: 'body', + label: 'Body', + description: 'Activity body', + icon: 'IconList', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + value: '', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '4c652e71-ec1d-418f-b102-26e56d1d0c03', + type: 'UUID', + name: 'assigneeId', + label: 'Assignee id (foreign key)', + description: 'Acitivity assignee id foreign key', + icon: 'IconUserCircle', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '3cdd5fbe-8e16-493d-9638-425af94f313e', + type: 'DATE_TIME', + name: 'completedAt', + label: 'Completion Date', + description: 'Activity completion date', + icon: 'IconCheck', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'c40dd76b-da9d-48aa-af28-4d42f2ac1dea', type: 'DATE_TIME', name: 'dueAt', label: 'Due Date', @@ -734,32 +2552,3429 @@ export const mockedActivitiesMetadata = { icon: 'IconCalendarEvent', isCustom: false, isActive: true, - isSystem: false, + isSystem: true, isNullable: true, - createdAt: '2023-11-24T03:29:18.228Z', - updatedAt: '2023-11-24T03:29:18.228Z', + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', fromRelationMetadata: null, toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '63bf5a31-2b3c-47ca-bb75-f1efb053ec58', + type: 'RELATION', + name: 'activityTargets', + label: 'Targets', + description: 'Activity targets', + icon: 'IconCheckbox', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: { + __typename: 'relation', + id: 'a47ced1e-6070-4b11-b5ab-1a3d2268d8a2', + relationType: 'ONE_TO_MANY', + toObjectMetadata: { + __typename: 'object', + id: 'b0327d82-d8a3-4e1d-9b4b-dfbff04d951a', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'activityTarget', + namePlural: 'activityTargets', + }, + toFieldMetadataId: '2aded974-bfa4-4ba4-b4c9-91346ac2762b', + }, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '46782ee3-181c-484b-9aa9-27e57b61cc81', + type: 'RELATION', + name: 'author', + label: 'Author', + description: 'Activity author', + icon: 'IconUserCircle', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: { + __typename: 'relation', + id: '519a92c5-8b0a-4a85-b0bc-be8d1607da5a', + relationType: 'ONE_TO_MANY', + fromObjectMetadata: { + __typename: 'object', + id: 'bdc465d2-f9a8-4ec2-8f3d-50dd2ad4021e', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'workspaceMember', + namePlural: 'workspaceMembers', + }, + fromFieldMetadataId: '4d91396b-99ff-486f-aa23-aa90bfca4aff', + }, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'fa996207-da7a-43e0-ba7d-406e5146e03f', + type: 'UUID', + name: 'authorId', + label: 'Author id (foreign key)', + description: 'Activity author id foreign key', + icon: 'IconUserCircle', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'dd65a576-a91b-4865-aae8-287e64d6a192', + type: 'DATE_TIME', + name: 'createdAt', + label: 'Creation date', + description: null, + icon: 'IconCalendar', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'now', + }, + options: null, }, }, ], pageInfo: { + __typename: 'PageInfo', hasNextPage: false, hasPreviousPage: false, - startCursor: null, - endCursor: null, + startCursor: 'YXJyYXljb25uZWN0aW9uOjA=', + endCursor: 'YXJyYXljb25uZWN0aW9uOjE1', + }, + totalCount: 16, + }, + }, +}; + +export const mockedAttachmentsMetadata = { + __typename: 'objectEdge', + node: { + __typename: 'object', + id: 'e25b094b-c6a9-4f56-856b-3c3072c33adf', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'attachment', + namePlural: 'attachments', + labelSingular: 'Attachment', + labelPlural: 'Attachments', + description: 'An attachment', + icon: 'IconFileImport', + isCustom: false, + isActive: true, + isSystem: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + labelIdentifierFieldMetadataId: null, + imageIdentifierFieldMetadataId: null, + fields: { + __typename: 'ObjectFieldsConnection', + edges: [ + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'c0d56fea-22a3-42e6-b715-f0bc07dafe4c', + type: 'UUID', + name: 'authorId', + label: 'Author id (foreign key)', + description: 'Attachment author id foreign key', + icon: 'IconCircleUser', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '78bcb420-9281-4eeb-8eb6-b2f3047acc09', + type: 'RELATION', + name: 'author', + label: 'Author', + description: 'Attachment author', + icon: 'IconCircleUser', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: { + __typename: 'relation', + id: '2d64b1ba-c7c2-4d96-bba3-ae2f7c2be7bc', + relationType: 'ONE_TO_MANY', + fromObjectMetadata: { + __typename: 'object', + id: 'bdc465d2-f9a8-4ec2-8f3d-50dd2ad4021e', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'workspaceMember', + namePlural: 'workspaceMembers', + }, + fromFieldMetadataId: 'dbd81b2e-f282-4846-970a-d9fbf1ab0f67', + }, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '1ce97b92-8efa-4260-bd96-efe207182424', + type: 'DATE_TIME', + name: 'updatedAt', + label: 'Update date', + description: null, + icon: 'IconCalendar', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'now', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'a121231f-4264-49b4-afff-04db4021d484', + type: 'TEXT', + name: 'name', + label: 'Name', + description: 'Attachment name', + icon: 'IconFileUpload', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + value: '', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'f6edc5fd-601d-4576-8828-d749ed6e0dde', + type: 'UUID', + name: 'id', + label: 'Id', + description: null, + icon: null, + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'uuid', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '26fda4b8-c242-429c-9139-1ced619244d1', + type: 'UUID', + name: 'personId', + label: 'Person id (foreign key)', + description: 'Attachment person id foreign key', + icon: 'IconUser', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '6e103463-aee5-4be3-af12-52cacd566c3a', + type: 'RELATION', + name: 'company', + label: 'Company', + description: 'Attachment company', + icon: 'IconBuildingSkyscraper', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: { + __typename: 'relation', + id: '857f84a7-9934-4b3c-a7c6-3d1db427df73', + relationType: 'ONE_TO_MANY', + fromObjectMetadata: { + __typename: 'object', + id: '2a603764-1a2f-4043-bbfa-dea375391fad', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'company', + namePlural: 'companies', + }, + fromFieldMetadataId: '67500175-d2d8-4b84-a6c6-4b0a0a5cca23', + }, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'e4a17720-25f2-42ca-8f26-2557e1d2d31c', + type: 'DATE_TIME', + name: 'createdAt', + label: 'Creation date', + description: null, + icon: 'IconCalendar', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'now', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'ae6f3e07-7858-4999-93a0-557fe2ee5f0e', + type: 'UUID', + name: 'companyId', + label: 'Company id (foreign key)', + description: 'Attachment company id foreign key', + icon: 'IconBuildingSkyscraper', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'f550d5cb-7e06-47b0-9e50-c5ad68beb0f6', + type: 'UUID', + name: 'activityId', + label: 'Activity id (foreign key)', + description: 'Attachment activity id foreign key', + icon: 'IconNotes', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'ba8f371a-238f-4bb1-9099-275f60281d22', + type: 'TEXT', + name: 'fullPath', + label: 'Full path', + description: 'Attachment full path', + icon: 'IconLink', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + value: '', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'cb2bac7e-0db7-4f10-95f2-d8d122cad29c', + type: 'RELATION', + name: 'person', + label: 'Person', + description: 'Attachment person', + icon: 'IconUser', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: { + __typename: 'relation', + id: 'a65ae523-9786-4064-8f42-346ce8055345', + relationType: 'ONE_TO_MANY', + fromObjectMetadata: { + __typename: 'object', + id: '251787a4-9e47-4251-aaea-ea83f74cee80', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'person', + namePlural: 'people', + }, + fromFieldMetadataId: '0eb1a396-06a5-4b6a-8003-82e6839a2afb', + }, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'ab9ec58a-d20c-48e0-b5ca-7050810fdb2d', + type: 'TEXT', + name: 'type', + label: 'Type', + description: 'Attachment type', + icon: 'IconList', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + value: '', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'd8ce8a44-872e-482e-ac9d-87f6637f5776', + type: 'RELATION', + name: 'activity', + label: 'Activity', + description: 'Attachment activity', + icon: 'IconNotes', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: { + __typename: 'relation', + id: 'a45591f3-8a30-49d0-92b3-59c4110dfee7', + relationType: 'ONE_TO_MANY', + fromObjectMetadata: { + __typename: 'object', + id: 'c8682a80-0b92-4d0e-9405-53ab7e8b225f', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'activity', + namePlural: 'activities', + }, + fromFieldMetadataId: '763c2a4a-e7ba-445f-9ecd-6d1d20c8b408', + }, + defaultValue: null, + options: null, + }, + }, + ], + pageInfo: { + __typename: 'PageInfo', + hasNextPage: false, + hasPreviousPage: false, + startCursor: 'YXJyYXljb25uZWN0aW9uOjA=', + endCursor: 'YXJyYXljb25uZWN0aW9uOjEz', + }, + totalCount: 14, + }, + }, +}; + +export const mockedWorkspaceMembersMetadata = { + __typename: 'objectEdge', + node: { + __typename: 'object', + id: 'bdc465d2-f9a8-4ec2-8f3d-50dd2ad4021e', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'workspaceMember', + namePlural: 'workspaceMembers', + labelSingular: 'Workspace Member', + labelPlural: 'Workspace Members', + description: 'A workspace member', + icon: 'IconUserCircle', + isCustom: false, + isActive: true, + isSystem: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + labelIdentifierFieldMetadataId: null, + imageIdentifierFieldMetadataId: null, + fields: { + __typename: 'ObjectFieldsConnection', + edges: [ + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '2f6a7242-efd0-4cb8-8d54-d298df37690d', + type: 'TEXT', + name: 'locale', + label: 'Language', + description: 'Preferred language', + icon: 'IconLanguage', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + value: 'en', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'f13cce91-5f98-4eb0-8c6e-c1cf41ad168f', + type: 'RELATION', + name: 'messageRecipients', + label: 'Message Recipients', + description: 'Message Recipients', + icon: 'IconUserCircle', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: { + __typename: 'relation', + id: 'ffcedbc0-adb7-4f74-83bb-ff7e3c270183', + relationType: 'ONE_TO_MANY', + toObjectMetadata: { + __typename: 'object', + id: 'dd41deae-84d5-4a66-8947-260b0c72677c', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'messageRecipient', + namePlural: 'messageRecipients', + }, + toFieldMetadataId: '22883ca2-34e2-40ab-9e7b-fde5836cb5d2', + }, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'dcfbc338-ef39-42f6-9712-128d5efe2c04', + type: 'DATE_TIME', + name: 'updatedAt', + label: 'Update date', + description: null, + icon: 'IconCalendar', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'now', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '4d91396b-99ff-486f-aa23-aa90bfca4aff', + type: 'RELATION', + name: 'authoredActivities', + label: 'Authored activities', + description: 'Activities created by the workspace member', + icon: 'IconCheckbox', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: { + __typename: 'relation', + id: '519a92c5-8b0a-4a85-b0bc-be8d1607da5a', + relationType: 'ONE_TO_MANY', + toObjectMetadata: { + __typename: 'object', + id: 'c8682a80-0b92-4d0e-9405-53ab7e8b225f', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'activity', + namePlural: 'activities', + }, + toFieldMetadataId: '46782ee3-181c-484b-9aa9-27e57b61cc81', + }, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'ccb7f96a-fd64-49a4-b5c3-e9cceb436dbd', + type: 'FULL_NAME', + name: 'name', + label: 'Name', + description: 'Workspace member name', + icon: 'IconCircleUser', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + lastName: '', + firstName: '', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'da7c9f08-5de0-4807-96d4-018ff7072d15', + type: 'RELATION', + name: 'favorites', + label: 'Favorites', + description: 'Favorites linked to the workspace member', + icon: 'IconHeart', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: { + __typename: 'relation', + id: '4e7e4ec6-2543-47c0-87cc-0c394e98271e', + relationType: 'ONE_TO_MANY', + toObjectMetadata: { + __typename: 'object', + id: '59683254-31b8-4d3c-82ab-d936a56beb48', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'favorite', + namePlural: 'favorites', + }, + toFieldMetadataId: 'efc8bec2-de4a-4d67-9187-31394bb35119', + }, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'ed36d8bc-dcbd-4d4a-8b18-02e04b13fbf7', + type: 'TEXT', + name: 'colorScheme', + label: 'Color Scheme', + description: 'Preferred color scheme', + icon: 'IconColorSwatch', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + value: 'Light', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '099a5f31-0b9a-4d1a-81dc-811f0f1f0b33', + type: 'RELATION', + name: 'authoredComments', + label: 'Authored comments', + description: 'Authored comments', + icon: 'IconComment', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: { + __typename: 'relation', + id: '8e2a5be9-ff83-4106-bfe0-0877423559d0', + relationType: 'ONE_TO_MANY', + toObjectMetadata: { + __typename: 'object', + id: '5f5658c9-a4c8-4463-b8ba-66fb3a1efacc', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'comment', + namePlural: 'comments', + }, + toFieldMetadataId: 'e2c01385-7707-49e0-835c-facbf8a6e4a9', + }, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '016b24b5-cd59-48fa-81ce-ba13670ce7d2', + type: 'DATE_TIME', + name: 'createdAt', + label: 'Creation date', + description: null, + icon: 'IconCalendar', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'now', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '2c8bb89a-c60c-49bf-81ce-7074ac41caf5', + type: 'RELATION', + name: 'connectedAccounts', + label: 'Connected accounts', + description: 'Connected accounts', + icon: 'IconAt', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: { + __typename: 'relation', + id: '7fd3bdb5-e043-495d-82b1-d75c22b70bac', + relationType: 'ONE_TO_MANY', + toObjectMetadata: { + __typename: 'object', + id: '539d1682-9999-43dc-94c1-7ad52640ac7d', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'connectedAccount', + namePlural: 'connectedAccounts', + }, + toFieldMetadataId: '912a9a56-4e00-4cd2-8908-b0d113c9f615', + }, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'f1c10310-ab4f-484b-bd03-f5f3890e964e', + type: 'RELATION', + name: 'accountOwnerForCompanies', + label: 'Account Owner For Companies', + description: 'Account owner for companies', + icon: 'IconBriefcase', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: { + __typename: 'relation', + id: 'b6d74797-0a27-449e-8f7b-26f94de4f707', + relationType: 'ONE_TO_MANY', + toObjectMetadata: { + __typename: 'object', + id: '2a603764-1a2f-4043-bbfa-dea375391fad', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'company', + namePlural: 'companies', + }, + toFieldMetadataId: 'de0dace0-f7f8-4317-95e8-f80f6f72c7e4', + }, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '318a3e81-5b82-4c2d-8487-f3b8d5be9096', + type: 'UUID', + name: 'id', + label: 'Id', + description: null, + icon: null, + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'uuid', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '14b83650-bfd2-4810-be57-4d532697051a', + type: 'UUID', + name: 'userId', + label: 'User Id', + description: 'Associated User Id', + icon: 'IconCircleUsers', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'e208d831-5ab7-4382-971a-2314ab2ef139', + type: 'TEXT', + name: 'avatarUrl', + label: 'Avatar Url', + description: 'Workspace member avatar', + icon: 'IconFileUpload', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + value: '', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'dbd81b2e-f282-4846-970a-d9fbf1ab0f67', + type: 'RELATION', + name: 'authoredAttachments', + label: 'Authored attachments', + description: 'Attachments created by the workspace member', + icon: 'IconFileImport', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: { + __typename: 'relation', + id: '2d64b1ba-c7c2-4d96-bba3-ae2f7c2be7bc', + relationType: 'ONE_TO_MANY', + toObjectMetadata: { + __typename: 'object', + id: 'e25b094b-c6a9-4f56-856b-3c3072c33adf', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'attachment', + namePlural: 'attachments', + }, + toFieldMetadataId: '78bcb420-9281-4eeb-8eb6-b2f3047acc09', + }, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '9a722ce5-1721-4406-a695-4a207f6f50c7', + type: 'RELATION', + name: 'assignedActivities', + label: 'Assigned activities', + description: 'Activities assigned to the workspace member', + icon: 'IconCheckbox', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: { + __typename: 'relation', + id: '0de81eae-1ffb-4cb5-b081-ab18d5641d50', + relationType: 'ONE_TO_MANY', + toObjectMetadata: { + __typename: 'object', + id: 'c8682a80-0b92-4d0e-9405-53ab7e8b225f', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'activity', + namePlural: 'activities', + }, + toFieldMetadataId: 'a6bd62f1-3e4c-4be0-ab64-0e7248d7d9eb', + }, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + ], + pageInfo: { + __typename: 'PageInfo', + hasNextPage: false, + hasPreviousPage: false, + startCursor: 'YXJyYXljb25uZWN0aW9uOjA=', + endCursor: 'YXJyYXljb25uZWN0aW9uOjE1', + }, + totalCount: 16, + }, + }, +}; + +export const mockedWebhooksMetadata = { + __typename: 'objectEdge', + node: { + __typename: 'object', + id: 'cf24395f-3f89-4edd-b1d6-9c696cc8cb04', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'webhook', + namePlural: 'webhooks', + labelSingular: 'Webhook', + labelPlural: 'Webhooks', + description: 'A webhook', + icon: 'IconRobot', + isCustom: false, + isActive: true, + isSystem: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + labelIdentifierFieldMetadataId: null, + imageIdentifierFieldMetadataId: null, + fields: { + __typename: 'ObjectFieldsConnection', + edges: [ + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'ed41012d-df17-4752-8e79-04adaa513164', + type: 'DATE_TIME', + name: 'createdAt', + label: 'Creation date', + description: null, + icon: 'IconCalendar', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'now', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'bff23b96-0a20-42ba-bdce-fbc72c97f31f', + type: 'TEXT', + name: 'targetUrl', + label: 'Target Url', + description: 'Webhook target url', + icon: 'IconLink', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + value: '', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'db25a5ad-8149-4d27-9e02-01f374c8d1b4', + type: 'UUID', + name: 'id', + label: 'Id', + description: null, + icon: null, + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'uuid', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'efcdbbd3-fd10-4b1e-88df-92d3c6dc50da', + type: 'DATE_TIME', + name: 'updatedAt', + label: 'Update date', + description: null, + icon: 'IconCalendar', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'now', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'bb357656-272c-413c-bdd9-9aff9c7a17bf', + type: 'TEXT', + name: 'operation', + label: 'Operation', + description: 'Webhook operation', + icon: 'IconCheckbox', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + value: '', + }, + options: null, + }, + }, + ], + pageInfo: { + __typename: 'PageInfo', + hasNextPage: false, + hasPreviousPage: false, + startCursor: 'YXJyYXljb25uZWN0aW9uOjA=', + endCursor: 'YXJyYXljb25uZWN0aW9uOjQ=', + }, + totalCount: 5, + }, + }, +}; + +export const mockedMessagesMetadata = { + __typename: 'objectEdge', + node: { + __typename: 'object', + id: '6f4cd2fa-2e6f-41be-a2cc-98e497a1d2f5', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'message', + namePlural: 'message', + labelSingular: 'Message', + labelPlural: 'Messages', + description: 'Message', + icon: 'IconMessage', + isCustom: false, + isActive: true, + isSystem: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + labelIdentifierFieldMetadataId: null, + imageIdentifierFieldMetadataId: null, + fields: { + __typename: 'ObjectFieldsConnection', + edges: [ + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '2ea89a33-045e-4231-9c25-0eef7ff419c0', + type: 'UUID', + name: 'id', + label: 'Id', + description: null, + icon: null, + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'uuid', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '4a57cd16-1b56-4d0a-a09e-7ce2840c0412', + type: 'TEXT', + name: 'headerMessageId', + label: 'Header message Id', + description: 'Message id from the message header', + icon: 'IconHash', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + value: '', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '9699f1af-50a2-43f7-9b72-32a64ca5496a', + type: 'TEXT', + name: 'body', + label: 'Body', + description: 'Body', + icon: 'IconMessage', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + value: '', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'ed57984a-2d5f-4e1a-a61f-18cbbc75cbd0', + type: 'DATE_TIME', + name: 'createdAt', + label: 'Creation date', + description: null, + icon: 'IconCalendar', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'now', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '0c98eb7f-6db3-43d3-84d8-3c46a384ac5e', + type: 'RELATION', + name: 'messageThread', + label: 'Message Thread Id', + description: 'Message Thread Id', + icon: 'IconHash', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: { + __typename: 'relation', + id: '5ea18f96-cfb4-45af-b716-d09bfb4bb282', + relationType: 'ONE_TO_MANY', + fromObjectMetadata: { + __typename: 'object', + id: 'a8162839-fbd1-4a37-998b-f4a2714020d1', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'messageThread', + namePlural: 'messageThreads', + }, + fromFieldMetadataId: '0d3c8828-2edb-4658-bd95-d01e4d102696', + }, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '86e6e65a-2d43-47a3-8d39-e88ed6b5aad8', + type: 'DATE_TIME', + name: 'updatedAt', + label: 'Update date', + description: null, + icon: 'IconCalendar', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'now', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '9c58971b-4e40-4f49-b125-ff014f909744', + type: 'RELATION', + name: 'messageRecipients', + label: 'Message Recipients', + description: 'Message Recipients', + icon: 'IconUserCircle', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: { + __typename: 'relation', + id: '020d2fe4-33c3-4fe1-a2cc-35a23d73d046', + relationType: 'ONE_TO_MANY', + toObjectMetadata: { + __typename: 'object', + id: 'dd41deae-84d5-4a66-8947-260b0c72677c', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'messageRecipient', + namePlural: 'messageRecipients', + }, + toFieldMetadataId: '663612f4-7eb8-4b21-886e-730f3b047ee7', + }, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'dbed6e60-ca97-488d-bb02-2f65f3ff73dd', + type: 'TEXT', + name: 'externalId', + label: 'External Id', + description: 'Message id from the messaging provider', + icon: 'IconHash', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + value: '', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'c15dc3af-1cbd-488a-a207-3715ab28c9e3', + type: 'TEXT', + name: 'direction', + label: 'Direction', + description: 'Direction', + icon: 'IconDirection', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + value: 'incoming', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '3ef72ad1-5292-4c23-83bf-7db622b59d19', + type: 'UUID', + name: 'messageThreadId', + label: 'Message Thread Id id (foreign key)', + description: 'Message Thread Id id foreign key', + icon: 'IconHash', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'b167f44d-07b0-4750-8878-1fdbe9b4bec9', + type: 'TEXT', + name: 'subject', + label: 'Subject', + description: 'Subject', + icon: 'IconMessage', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + value: '', + }, + options: null, + }, + }, + ], + pageInfo: { + __typename: 'PageInfo', + hasNextPage: false, + hasPreviousPage: false, + startCursor: 'YXJyYXljb25uZWN0aW9uOjA=', + endCursor: 'YXJyYXljb25uZWN0aW9uOjEw', }, totalCount: 11, }, }, }; +export const mockedOpportunitiesMetadata = { + __typename: 'objectEdge', + node: { + __typename: 'object', + id: '941ad274-2d26-4e90-94d9-5e446aa5b91e', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'opportunity', + namePlural: 'opportunities', + labelSingular: 'Opportunity', + labelPlural: 'Opportunities', + description: 'An opportunity', + icon: 'IconTargetArrow', + isCustom: false, + isActive: true, + isSystem: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + labelIdentifierFieldMetadataId: null, + imageIdentifierFieldMetadataId: null, + fields: { + __typename: 'ObjectFieldsConnection', + edges: [ + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '6510e80d-546a-4a27-9346-06590c81f068', + type: 'RELATION', + name: 'pointOfContact', + label: 'Point of Contact', + description: 'Opportunity point of contact', + icon: 'IconUser', + isCustom: false, + isActive: true, + isSystem: false, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: { + __typename: 'relation', + id: '5b6296d8-8557-4a3c-a963-109a5888b3b3', + relationType: 'ONE_TO_MANY', + fromObjectMetadata: { + __typename: 'object', + id: '251787a4-9e47-4251-aaea-ea83f74cee80', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'person', + namePlural: 'people', + }, + fromFieldMetadataId: '2766f41a-1f8f-413f-88a3-1e3fec0e1821', + }, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '48067b53-f99f-4700-bf3a-6569d1646b21', + type: 'RELATION', + name: 'person', + label: 'Person', + description: 'Opportunity person', + icon: 'IconUser', + isCustom: false, + isActive: true, + isSystem: false, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: { + __typename: 'relation', + id: 'e63587c4-c565-4f77-9b8c-a639ae366dea', + relationType: 'ONE_TO_MANY', + fromObjectMetadata: { + __typename: 'object', + id: '251787a4-9e47-4251-aaea-ea83f74cee80', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'person', + namePlural: 'people', + }, + fromFieldMetadataId: '586d0acc-f68b-4f08-aea9-410d88f351aa', + }, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '2bb053ec-1abf-4bf8-af01-acfbc0f78953', + type: 'UUID', + name: 'companyId', + label: 'Company id (foreign key)', + description: 'Opportunity company id foreign key', + icon: 'IconBuildingSkyscraper', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '2aabeef9-7a6b-41a0-a80e-f3c0047c6920', + type: 'CURRENCY', + name: 'amount', + label: 'Amount', + description: 'Opportunity amount', + icon: 'IconCurrencyDollar', + isCustom: false, + isActive: true, + isSystem: false, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'ba1df486-c07e-460a-92bc-5aa7e72dbbf1', + type: 'UUID', + name: 'id', + label: 'Id', + description: null, + icon: null, + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'uuid', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '2dc6e877-d4d5-4ab2-9368-4e0a9bab6157', + type: 'UUID', + name: 'pointOfContactId', + label: 'Point of Contact id (foreign key)', + description: 'Opportunity point of contact id foreign key', + icon: 'IconUser', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '480e430d-ec7b-4297-93fd-0c6463b9fad3', + type: 'UUID', + name: 'pipelineStepId', + label: 'Pipeline Step id (foreign key)', + description: 'Opportunity pipeline step id foreign key', + icon: 'IconKanban', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '4756a816-8a18-433a-9414-c756db4727e8', + type: 'RELATION', + name: 'pipelineStep', + label: 'Pipeline Step', + description: 'Opportunity pipeline step', + icon: 'IconKanban', + isCustom: false, + isActive: true, + isSystem: false, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: { + __typename: 'relation', + id: '7b0474c4-d82d-4c1d-96de-c6728b53339a', + relationType: 'ONE_TO_MANY', + fromObjectMetadata: { + __typename: 'object', + id: 'afa12866-0de4-4f97-97fa-cd8a7c953037', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'pipelineStep', + namePlural: 'pipelineSteps', + }, + fromFieldMetadataId: 'ad3e919f-4258-4e21-8caf-bf122f17ca5c', + }, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'b8226269-3631-4ca2-a2f3-50bd1046d7d2', + type: 'TEXT', + name: 'probability', + label: 'Probability', + description: 'Opportunity probability', + icon: 'IconProgressCheck', + isCustom: false, + isActive: true, + isSystem: false, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + value: '0', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '085b69d5-6dd5-445d-871f-7f963f82d949', + type: 'DATE_TIME', + name: 'createdAt', + label: 'Creation date', + description: null, + icon: 'IconCalendar', + isCustom: false, + isActive: true, + isSystem: false, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'now', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '306da353-c580-451c-bf6f-8b80c230c545', + type: 'DATE_TIME', + name: 'updatedAt', + label: 'Update date', + description: null, + icon: 'IconCalendar', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'now', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '70b02b3a-8077-4ce1-ab8b-c5e854c31b13', + type: 'RELATION', + name: 'company', + label: 'Company', + description: 'Opportunity company', + icon: 'IconBuildingSkyscraper', + isCustom: false, + isActive: true, + isSystem: false, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: { + __typename: 'relation', + id: 'afe2078f-6c52-45ef-bb2e-f43b0ee28ecc', + relationType: 'ONE_TO_MANY', + fromObjectMetadata: { + __typename: 'object', + id: '2a603764-1a2f-4043-bbfa-dea375391fad', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'company', + namePlural: 'companies', + }, + fromFieldMetadataId: '00b695d6-e0c6-4029-9932-817b19ae0380', + }, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '22ce66e0-35fa-48a4-ae8a-4fefdde9500d', + type: 'UUID', + name: 'personId', + label: 'Person id (foreign key)', + description: 'Opportunity person id foreign key', + icon: 'IconUser', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'd1db261a-73ca-4546-a0d0-c2110826c030', + type: 'DATE_TIME', + name: 'closeDate', + label: 'Close date', + description: 'Opportunity close date', + icon: 'IconCalendarEvent', + isCustom: false, + isActive: true, + isSystem: false, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + ], + pageInfo: { + __typename: 'PageInfo', + hasNextPage: false, + hasPreviousPage: false, + startCursor: 'YXJyYXljb25uZWN0aW9uOjA=', + endCursor: 'YXJyYXljb25uZWN0aW9uOjEz', + }, + totalCount: 14, + }, + }, +}; + +export const mockedAPIKeysMetadata = { + __typename: 'objectEdge', + node: { + __typename: 'object', + id: 'd5c37777-3450-4e30-80a2-66853331ca99', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'apiKey', + namePlural: 'apiKeys', + labelSingular: 'Api Key', + labelPlural: 'Api Keys', + description: 'An api key', + icon: 'IconRobot', + isCustom: false, + isActive: true, + isSystem: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + labelIdentifierFieldMetadataId: null, + imageIdentifierFieldMetadataId: null, + fields: { + __typename: 'ObjectFieldsConnection', + edges: [ + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'bdda452a-c123-4fa3-8543-d04c2c43836f', + type: 'DATE_TIME', + name: 'revokedAt', + label: 'Revocation date', + description: 'ApiKey revocation date', + icon: 'IconCalendar', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'dd217f48-d1bf-4451-9b8d-e06feb7365f9', + type: 'DATE_TIME', + name: 'createdAt', + label: 'Creation date', + description: null, + icon: 'IconCalendar', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'now', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '3fd655ef-3dc6-4edf-84cf-3f398150412b', + type: 'DATE_TIME', + name: 'expiresAt', + label: 'Expiration date', + description: 'ApiKey expiration date', + icon: 'IconCalendar', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '5f404704-d084-420e-a2bf-ab3108da12ae', + type: 'TEXT', + name: 'name', + label: 'Name', + description: 'ApiKey name', + icon: 'IconLink', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + value: '', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '948db156-f5de-4ddf-ad95-34fabc7cb273', + type: 'DATE_TIME', + name: 'updatedAt', + label: 'Update date', + description: null, + icon: 'IconCalendar', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'now', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '2204f9d1-274d-4bd5-be9c-3598da520df0', + type: 'UUID', + name: 'id', + label: 'Id', + description: null, + icon: null, + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'uuid', + }, + options: null, + }, + }, + ], + pageInfo: { + __typename: 'PageInfo', + hasNextPage: false, + hasPreviousPage: false, + startCursor: 'YXJyYXljb25uZWN0aW9uOjA=', + endCursor: 'YXJyYXljb25uZWN0aW9uOjU=', + }, + totalCount: 6, + }, + }, +}; + +export const mockedComments = { + __typename: 'objectEdge', + node: { + __typename: 'object', + id: '5f5658c9-a4c8-4463-b8ba-66fb3a1efacc', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'comment', + namePlural: 'comments', + labelSingular: 'Comment', + labelPlural: 'Comments', + description: 'A comment', + icon: 'IconMessageCircle', + isCustom: false, + isActive: true, + isSystem: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + labelIdentifierFieldMetadataId: null, + imageIdentifierFieldMetadataId: null, + fields: { + __typename: 'ObjectFieldsConnection', + edges: [ + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '041ee9d8-f3b7-418d-b9b6-b295817515a6', + type: 'UUID', + name: 'id', + label: 'Id', + description: null, + icon: null, + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'uuid', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '1309d13f-9945-4f8b-99e8-371fbb51b99d', + type: 'RELATION', + name: 'activity', + label: 'Activity', + description: 'Comment activity', + icon: 'IconNotes', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: { + __typename: 'relation', + id: 'f4a1e4f4-8a26-4c7d-8973-6fdbc816fc6d', + relationType: 'ONE_TO_MANY', + fromObjectMetadata: { + __typename: 'object', + id: 'c8682a80-0b92-4d0e-9405-53ab7e8b225f', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'activity', + namePlural: 'activities', + }, + fromFieldMetadataId: 'f47a1319-bdec-4d9e-8179-17cb9df81dd6', + }, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '56a98ada-9a34-48d2-abb4-67c8eb1af7ab', + type: 'TEXT', + name: 'body', + label: 'Body', + description: 'Comment body', + icon: 'IconLink', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + value: '', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '18f0a3c3-60f2-44ed-8338-9f1a36fcec63', + type: 'DATE_TIME', + name: 'createdAt', + label: 'Creation date', + description: null, + icon: 'IconCalendar', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'now', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '0cba4da0-9dc9-43e1-964e-813c0c96f396', + type: 'UUID', + name: 'authorId', + label: 'Author id (foreign key)', + description: 'Comment author id foreign key', + icon: 'IconCircleUser', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '539d818a-1d68-4e5d-94c3-439a17a8a25e', + type: 'UUID', + name: 'activityId', + label: 'Activity id (foreign key)', + description: 'Comment activity id foreign key', + icon: 'IconNotes', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '31828911-06a3-48d3-9f96-95d403c282f0', + type: 'DATE_TIME', + name: 'updatedAt', + label: 'Update date', + description: null, + icon: 'IconCalendar', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'now', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'e2c01385-7707-49e0-835c-facbf8a6e4a9', + type: 'RELATION', + name: 'author', + label: 'Author', + description: 'Comment author', + icon: 'IconCircleUser', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: { + __typename: 'relation', + id: '8e2a5be9-ff83-4106-bfe0-0877423559d0', + relationType: 'ONE_TO_MANY', + fromObjectMetadata: { + __typename: 'object', + id: 'bdc465d2-f9a8-4ec2-8f3d-50dd2ad4021e', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'workspaceMember', + namePlural: 'workspaceMembers', + }, + fromFieldMetadataId: '099a5f31-0b9a-4d1a-81dc-811f0f1f0b33', + }, + defaultValue: null, + options: null, + }, + }, + ], + pageInfo: { + __typename: 'PageInfo', + hasNextPage: false, + hasPreviousPage: false, + startCursor: 'YXJyYXljb25uZWN0aW9uOjA=', + endCursor: 'YXJyYXljb25uZWN0aW9uOjc=', + }, + totalCount: 8, + }, + }, +}; + +export const mockedMessageThreads = { + __typename: 'objectEdge', + node: { + __typename: 'object', + id: 'a8162839-fbd1-4a37-998b-f4a2714020d1', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'messageThread', + namePlural: 'messageThreads', + labelSingular: 'Message Thread', + labelPlural: 'Message Threads', + description: 'Message Thread', + icon: 'IconMessage', + isCustom: false, + isActive: true, + isSystem: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + labelIdentifierFieldMetadataId: null, + imageIdentifierFieldMetadataId: null, + fields: { + __typename: 'ObjectFieldsConnection', + edges: [ + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '1a56aa47-2549-4548-8ed3-cdcb06766430', + type: 'TEXT', + name: 'externalId', + label: 'External Id', + description: 'Thread id from the messaging provider', + icon: 'IconMessage', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + value: '', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '8aaf7a27-88d4-4ad3-98ce-cb2c14b1f17f', + type: 'DATE_TIME', + name: 'createdAt', + label: 'Creation date', + description: null, + icon: 'IconCalendar', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'now', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'bd65743c-8d13-4e99-82cd-b1d3f365d0c4', + type: 'RELATION', + name: 'messageChannel', + label: 'Message Channel Id', + description: 'Message Channel Id', + icon: 'IconHash', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: { + __typename: 'relation', + id: '179ef8b5-41f8-4d0f-98b6-30d487431354', + relationType: 'ONE_TO_MANY', + fromObjectMetadata: { + __typename: 'object', + id: 'a7088839-1354-45c5-93db-d1dc0a17a4b0', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'messageChannel', + namePlural: 'messageChannels', + }, + fromFieldMetadataId: 'db09596c-c968-41de-95ba-ae8d3c36fc00', + }, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '0d3c8828-2edb-4658-bd95-d01e4d102696', + type: 'RELATION', + name: 'messages', + label: 'Messages', + description: 'Messages from the thread.', + icon: 'IconMessage', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: { + __typename: 'relation', + id: '5ea18f96-cfb4-45af-b716-d09bfb4bb282', + relationType: 'ONE_TO_MANY', + toObjectMetadata: { + __typename: 'object', + id: '6f4cd2fa-2e6f-41be-a2cc-98e497a1d2f5', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'message', + namePlural: 'message', + }, + toFieldMetadataId: '0c98eb7f-6db3-43d3-84d8-3c46a384ac5e', + }, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '68ed1fad-af5f-414b-8e51-1e82f3862edd', + type: 'TEXT', + name: 'subject', + label: 'Subject', + description: 'Subject', + icon: 'IconMessage', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + value: '', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '6d69c800-9750-424a-ab1c-3501fd13f9e8', + type: 'UUID', + name: 'id', + label: 'Id', + description: null, + icon: null, + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'uuid', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'dcf4ec4a-7d64-456e-b682-42903604d56f', + type: 'DATE_TIME', + name: 'updatedAt', + label: 'Update date', + description: null, + icon: 'IconCalendar', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'now', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '1cf2b8d8-23fa-4f99-b0ee-f02ef6df5aa3', + type: 'TEXT', + name: 'visibility', + label: 'Visibility', + description: 'Visibility', + icon: 'IconEyeglass', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + value: 'default', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'cf4b8230-1b00-4fe8-ac1a-7786e950d00c', + type: 'UUID', + name: 'messageChannelId', + label: 'Message Channel Id id (foreign key)', + description: 'Message Channel Id id foreign key', + icon: 'IconHash', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + ], + pageInfo: { + __typename: 'PageInfo', + hasNextPage: false, + hasPreviousPage: false, + startCursor: 'YXJyYXljb25uZWN0aW9uOjA=', + endCursor: 'YXJyYXljb25uZWN0aW9uOjg=', + }, + totalCount: 9, + }, + }, +}; + +export const mockedMessageChannels = { + __typename: 'objectEdge', + node: { + __typename: 'object', + id: 'a7088839-1354-45c5-93db-d1dc0a17a4b0', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'messageChannel', + namePlural: 'messageChannels', + labelSingular: 'Message Channel', + labelPlural: 'Message Channels', + description: 'Message Channels', + icon: 'IconMessage', + isCustom: false, + isActive: true, + isSystem: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + labelIdentifierFieldMetadataId: null, + imageIdentifierFieldMetadataId: null, + fields: { + __typename: 'ObjectFieldsConnection', + edges: [ + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '44744cbd-2066-496c-8bb8-e3dd29cfe42c', + type: 'TEXT', + name: 'visibility', + label: 'Visibility', + description: 'Visibility', + icon: 'IconEyeglass', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + value: 'metadata', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'db09596c-c968-41de-95ba-ae8d3c36fc00', + type: 'RELATION', + name: 'messageThreads', + label: 'Message Threads', + description: 'Threads from the channel.', + icon: 'IconMessage', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: { + __typename: 'relation', + id: '179ef8b5-41f8-4d0f-98b6-30d487431354', + relationType: 'ONE_TO_MANY', + toObjectMetadata: { + __typename: 'object', + id: 'a8162839-fbd1-4a37-998b-f4a2714020d1', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'messageThread', + namePlural: 'messageThreads', + }, + toFieldMetadataId: 'bd65743c-8d13-4e99-82cd-b1d3f365d0c4', + }, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '68fee565-c541-4356-bcaa-b85791e2ad76', + type: 'DATE_TIME', + name: 'createdAt', + label: 'Creation date', + description: null, + icon: 'IconCalendar', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'now', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'afd3e543-00de-4fa4-9451-fd94dde9885b', + type: 'TEXT', + name: 'type', + label: 'Type', + description: 'Type', + icon: 'IconMessage', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + value: '', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'd9e6b266-a1fa-4da9-b73f-c5432863a4c9', + type: 'DATE_TIME', + name: 'updatedAt', + label: 'Update date', + description: null, + icon: 'IconCalendar', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'now', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'de960b13-1353-4201-b577-e684141cdb01', + type: 'UUID', + name: 'id', + label: 'Id', + description: null, + icon: null, + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'uuid', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '1ee38bde-c912-44aa-b5d5-de2b49b8fd85', + type: 'UUID', + name: 'connectedAccountId', + label: 'Connected Account id (foreign key)', + description: 'Connected Account id foreign key', + icon: 'IconUserCircle', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '504eac1b-5186-48dd-8136-3bb236455b13', + type: 'TEXT', + name: 'handle', + label: 'Handle', + description: 'Handle', + icon: 'IconAt', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + value: '', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '14fcf47f-b60e-4dc8-80a0-df6e16f513ac', + type: 'RELATION', + name: 'connectedAccount', + label: 'Connected Account', + description: 'Connected Account', + icon: 'IconUserCircle', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: { + __typename: 'relation', + id: '4a2d8c75-3d39-4860-9373-2bc7faf35feb', + relationType: 'ONE_TO_MANY', + fromObjectMetadata: { + __typename: 'object', + id: '539d1682-9999-43dc-94c1-7ad52640ac7d', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'connectedAccount', + namePlural: 'connectedAccounts', + }, + fromFieldMetadataId: '6cb6a33d-6eb1-4bba-b1f8-a1d3f40c9158', + }, + defaultValue: null, + options: null, + }, + }, + ], + pageInfo: { + __typename: 'PageInfo', + hasNextPage: false, + hasPreviousPage: false, + startCursor: 'YXJyYXljb25uZWN0aW9uOjA=', + endCursor: 'YXJyYXljb25uZWN0aW9uOjg=', + }, + totalCount: 9, + }, + }, +}; + +export const mockedConnectedAccounts = { + __typename: 'objectEdge', + node: { + __typename: 'object', + id: '539d1682-9999-43dc-94c1-7ad52640ac7d', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'connectedAccount', + namePlural: 'connectedAccounts', + labelSingular: 'Connected Account', + labelPlural: 'Connected Accounts', + description: 'A connected account', + icon: 'IconAt', + isCustom: false, + isActive: true, + isSystem: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + labelIdentifierFieldMetadataId: null, + imageIdentifierFieldMetadataId: null, + fields: { + __typename: 'ObjectFieldsConnection', + edges: [ + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'f3a558db-f935-44ee-9cf6-70d55d72d45f', + type: 'TEXT', + name: 'handle', + label: 'handle', + description: + 'The account handle (email, username, phone number, etc.)', + icon: 'IconMail', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + value: '', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'f8e1de81-a11b-4346-a964-599fb49ee3bc', + type: 'DATE_TIME', + name: 'updatedAt', + label: 'Update date', + description: null, + icon: 'IconCalendar', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'now', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'c60d4c3f-0cd7-4e92-9a7f-ae3a77f4a0ad', + type: 'TEXT', + name: 'accessToken', + label: 'Access Token', + description: 'Messaging provider access token', + icon: 'IconKey', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + value: '', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '6cb6a33d-6eb1-4bba-b1f8-a1d3f40c9158', + type: 'RELATION', + name: 'messageChannels', + label: 'Message Channel', + description: 'Message Channel', + icon: 'IconMessage', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: { + __typename: 'relation', + id: '4a2d8c75-3d39-4860-9373-2bc7faf35feb', + relationType: 'ONE_TO_MANY', + toObjectMetadata: { + __typename: 'object', + id: 'a7088839-1354-45c5-93db-d1dc0a17a4b0', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'messageChannel', + namePlural: 'messageChannels', + }, + toFieldMetadataId: '14fcf47f-b60e-4dc8-80a0-df6e16f513ac', + }, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'd50a4e5e-555d-4a2d-9609-1f1e502c92fe', + type: 'TEXT', + name: 'refreshToken', + label: 'Refresh Token', + description: 'Messaging provider refresh token', + icon: 'IconKey', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + value: '', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '912a9a56-4e00-4cd2-8908-b0d113c9f615', + type: 'RELATION', + name: 'accountOwner', + label: 'Account Owner', + description: 'Account Owner', + icon: 'IconUserCircle', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: { + __typename: 'relation', + id: '7fd3bdb5-e043-495d-82b1-d75c22b70bac', + relationType: 'ONE_TO_MANY', + fromObjectMetadata: { + __typename: 'object', + id: 'bdc465d2-f9a8-4ec2-8f3d-50dd2ad4021e', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'workspaceMember', + namePlural: 'workspaceMembers', + }, + fromFieldMetadataId: '2c8bb89a-c60c-49bf-81ce-7074ac41caf5', + }, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '74d6f4ec-b8a6-467d-b212-28821cd67591', + type: 'TEXT', + name: 'provider', + label: 'provider', + description: 'The account provider', + icon: 'IconSettings', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + value: '', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '0facb6d5-6e9e-4a3a-96f0-5343707bfdb3', + type: 'UUID', + name: 'id', + label: 'Id', + description: null, + icon: null, + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'uuid', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'c05cd42e-e6b9-41ac-bd09-253e6036c964', + type: 'DATE_TIME', + name: 'createdAt', + label: 'Creation date', + description: null, + icon: 'IconCalendar', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'now', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'af5be9ca-6f69-45f8-ad6f-787beea6bb05', + type: 'UUID', + name: 'accountOwnerId', + label: 'Account Owner id (foreign key)', + description: 'Account Owner id foreign key', + icon: 'IconUserCircle', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + ], + pageInfo: { + __typename: 'PageInfo', + hasNextPage: false, + hasPreviousPage: false, + startCursor: 'YXJyYXljb25uZWN0aW9uOjA=', + endCursor: 'YXJyYXljb25uZWN0aW9uOjk=', + }, + totalCount: 10, + }, + }, +}; + export const mockedObjectMetadataItems = { edges: [ { + __typename: 'objectEdge', node: { - id: 'b25eb5e6-9fdc-4df2-a039-40ccea4c8032', - dataSourceId: '', + __typename: 'object', + id: 'eda22943-ffd5-4524-a8c4-ffc65edbf152', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'viewFilter', + namePlural: 'viewFilters', + labelSingular: 'View Filter', + labelPlural: 'View Filters', + description: '(System) View Filters', + icon: 'IconFilterBolt', + isCustom: false, + isActive: true, + isSystem: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + labelIdentifierFieldMetadataId: null, + imageIdentifierFieldMetadataId: null, + fields: { + __typename: 'ObjectFieldsConnection', + edges: [ + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'e99cb806-f707-454b-99a3-b1521337f891', + type: 'DATE_TIME', + name: 'createdAt', + label: 'Creation date', + description: null, + icon: 'IconCalendar', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'now', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'd90df531-be28-4ca3-92d4-d660bbad1b12', + type: 'DATE_TIME', + name: 'updatedAt', + label: 'Update date', + description: null, + icon: 'IconCalendar', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'now', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '5c24c599-34c5-4efe-adc6-e066be7ad20e', + type: 'RELATION', + name: 'view', + label: 'View', + description: 'View Filter related view', + icon: 'IconLayoutCollage', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: { + __typename: 'relation', + id: '1ac6a89a-7a45-441f-b9a6-848f9aaa0833', + relationType: 'ONE_TO_MANY', + fromObjectMetadata: { + __typename: 'object', + id: '98ee2e85-7510-49f9-848e-c1a21acdc664', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'view', + namePlural: 'views', + }, + fromFieldMetadataId: '5c1342d5-199c-4746-8d3a-60d17a09d187', + }, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '83b506e3-e211-4d8e-bc00-3d1ca5fc9acf', + type: 'TEXT', + name: 'operand', + label: 'Operand', + description: 'View Filter operand', + icon: null, + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + value: 'Contains', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '028f1b4c-f127-4141-bf57-c47f685e7553', + type: 'UUID', + name: 'id', + label: 'Id', + description: null, + icon: null, + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'uuid', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'fb48b84b-62cb-4846-ab5e-e48fa034f848', + type: 'UUID', + name: 'viewId', + label: 'View id (foreign key)', + description: 'View Filter related view id foreign key', + icon: 'IconLayoutCollage', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '32a978a4-8ce5-491f-acc8-c3f4612c810e', + type: 'TEXT', + name: 'displayValue', + label: 'Display Value', + description: 'View Filter Display Value', + icon: null, + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + value: '', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '2fd8dbd6-6378-4905-bd22-6ec12b387e1c', + type: 'TEXT', + name: 'value', + label: 'Value', + description: 'View Filter value', + icon: null, + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + value: '', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '2d467958-3869-400e-a65b-63ab0232dd2b', + type: 'UUID', + name: 'fieldMetadataId', + label: 'Field Metadata Id', + description: 'View Filter target field', + icon: null, + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + ], + pageInfo: { + __typename: 'PageInfo', + hasNextPage: false, + hasPreviousPage: false, + startCursor: 'YXJyYXljb25uZWN0aW9uOjA=', + endCursor: 'YXJyYXljb25uZWN0aW9uOjg=', + }, + totalCount: 9, + }, + }, + }, + { + __typename: 'objectEdge', + node: { + __typename: 'object', + id: '98ee2e85-7510-49f9-848e-c1a21acdc664', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', nameSingular: 'view', namePlural: 'views', labelSingular: 'View', @@ -768,203 +5983,750 @@ export const mockedObjectMetadataItems = { icon: 'IconLayoutCollage', isCustom: false, isActive: true, - createdAt: '', - updatedAt: '', + isSystem: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + labelIdentifierFieldMetadataId: null, + imageIdentifierFieldMetadataId: null, fields: { + __typename: 'ObjectFieldsConnection', edges: [ { + __typename: 'fieldEdge', node: { - id: '5db475e7-8208-402d-97a1-62c9ce344dd4', - type: 'TEXT', - name: 'objectMetadataId', - label: 'Object Metadata Id', - description: 'View target object', + __typename: 'field', + id: '4ee74e9c-9c7a-4d18-81a2-83f007dd4614', + type: 'UUID', + name: 'id', + label: 'Id', + description: null, icon: null, - placeholder: null, isCustom: false, isActive: true, + isSystem: true, isNullable: false, - createdAt: '', - updatedAt: '', + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', fromRelationMetadata: null, toRelationMetadata: null, + defaultValue: { + type: 'uuid', + }, + options: null, }, }, { + __typename: 'fieldEdge', node: { - id: 'ddc89a56-9add-4110-aa53-4ecdbba36767', - type: 'TEXT', - name: 'type', - label: 'Type', - description: 'View type', - icon: null, - placeholder: null, + __typename: 'field', + id: '58aa8432-7109-42b2-8b85-7745fef42b9e', + type: 'RELATION', + name: 'viewFields', + label: 'View Fields', + description: 'View Fields', + icon: 'IconTag', isCustom: false, isActive: true, - isNullable: false, - createdAt: '', - updatedAt: '', - fromRelationMetadata: null, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: { + __typename: 'relation', + id: '1ba54f4e-6e09-40a8-bc02-65b5ece7dafc', + relationType: 'ONE_TO_MANY', + toObjectMetadata: { + __typename: 'object', + id: '07c68965-1479-4e44-91ca-3e45784e9337', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'viewField', + namePlural: 'viewFields', + }, + toFieldMetadataId: '7c7866c9-4bf0-4f3b-89b6-5b889858a895', + }, toRelationMetadata: null, + defaultValue: null, + options: null, }, }, { + __typename: 'fieldEdge', node: { - id: '35fa806b-5d9d-446d-bd0e-1a6874b871ee', + __typename: 'field', + id: '1fc13345-82fd-4e70-934b-4fa4b03ffd64', type: 'TEXT', name: 'name', label: 'Name', description: 'View name', icon: null, - placeholder: null, isCustom: false, isActive: true, + isSystem: true, isNullable: false, - createdAt: '', - updatedAt: '', + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', fromRelationMetadata: null, toRelationMetadata: null, + defaultValue: { + value: '', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '803e8f8b-1e14-4d8d-b449-87bfdc3807ca', + type: 'UUID', + name: 'objectMetadataId', + label: 'Object Metadata Id', + description: 'View target object', + icon: null, + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'caa56736-cc74-4922-9ac1-eb99ca31d9d6', + type: 'DATE_TIME', + name: 'createdAt', + label: 'Creation date', + description: null, + icon: 'IconCalendar', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'now', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '5c1342d5-199c-4746-8d3a-60d17a09d187', + type: 'RELATION', + name: 'viewFilters', + label: 'View Filters', + description: 'View Filters', + icon: 'IconFilterBolt', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: { + __typename: 'relation', + id: '1ac6a89a-7a45-441f-b9a6-848f9aaa0833', + relationType: 'ONE_TO_MANY', + toObjectMetadata: { + __typename: 'object', + id: 'eda22943-ffd5-4524-a8c4-ffc65edbf152', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'viewFilter', + namePlural: 'viewFilters', + }, + toFieldMetadataId: '5c24c599-34c5-4efe-adc6-e066be7ad20e', + }, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '8b930e70-e1f0-4656-93ba-8e720cd45062', + type: 'DATE_TIME', + name: 'updatedAt', + label: 'Update date', + description: null, + icon: 'IconCalendar', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'now', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'bdbecafb-972e-43f4-9296-c5a59bad449d', + type: 'RELATION', + name: 'viewSorts', + label: 'View Sorts', + description: 'View Sorts', + icon: 'IconArrowsSort', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: { + __typename: 'relation', + id: '22a37761-f528-4a9b-8194-1fed1df69019', + relationType: 'ONE_TO_MANY', + toObjectMetadata: { + __typename: 'object', + id: '0591699b-2304-4f81-8c32-543693c5ae4e', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'viewSort', + namePlural: 'viewSorts', + }, + toFieldMetadataId: 'bff11820-ffa2-4283-80b3-3777583f6f97', + }, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '3546f837-5b46-449a-a127-e73d3849352d', + type: 'TEXT', + name: 'type', + label: 'Type', + description: 'View type', + icon: null, + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + value: 'table', + }, + options: null, }, }, ], pageInfo: { + __typename: 'PageInfo', hasNextPage: false, hasPreviousPage: false, - startCursor: null, - endCursor: null, + startCursor: 'YXJyYXljb25uZWN0aW9uOjA=', + endCursor: 'YXJyYXljb25uZWN0aW9uOjg=', }, - totalCount: 3, + totalCount: 9, }, }, }, { + __typename: 'objectEdge', node: { - id: 'c419540f-ff6e-47bf-9d87-3aa366afd8e4', - dataSourceId: '', + __typename: 'object', + id: '07c68965-1479-4e44-91ca-3e45784e9337', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', nameSingular: 'viewField', namePlural: 'viewFields', labelSingular: 'View Field', labelPlural: 'View Fields', description: '(System) View Fields', - icon: 'IconColumns3', + icon: 'IconTag', isCustom: false, isActive: true, - createdAt: '', - updatedAt: '', + isSystem: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + labelIdentifierFieldMetadataId: null, + imageIdentifierFieldMetadataId: null, fields: { + __typename: 'ObjectFieldsConnection', edges: [ { + __typename: 'fieldEdge', node: { - id: '1d718fcf-5a17-4694-91a4-4d3968a51aa4', - type: 'TEXT', - name: 'viewId', - label: 'View Id', - description: 'View Field related view', - icon: null, - placeholder: null, - isCustom: false, - isActive: true, - isNullable: false, - createdAt: '', - updatedAt: '', - fromRelationMetadata: null, - toRelationMetadata: null, - }, - }, - { - node: { - id: '8ead2e86-7b60-4a47-9b4f-ad008e744d52', - type: 'NUMBER', - name: 'position', - label: 'Position', - description: 'View Field position', - icon: null, - placeholder: null, - isCustom: false, - isActive: true, - isNullable: false, - createdAt: '', - updatedAt: '', - fromRelationMetadata: null, - toRelationMetadata: null, - }, - }, - { - node: { - id: '4d77c2dd-2b04-4989-b11e-cb0e386d1b4d', - type: 'TEXT', - name: 'fieldMetadataId', - label: 'Field Metadata Id', - description: 'View Field target field', - icon: null, - placeholder: null, - isCustom: false, - isActive: true, - isNullable: false, - createdAt: '', - updatedAt: '', - fromRelationMetadata: null, - toRelationMetadata: null, - }, - }, - { - node: { - id: '0f5ab566-9fc4-44b7-85c5-1e05db9f6b49', - type: 'BOOLEAN', - name: 'isVisible', - label: 'Visible', - description: 'View Field visibility', - icon: null, - placeholder: null, - isCustom: false, - isActive: true, - isNullable: false, - createdAt: '', - updatedAt: '', - fromRelationMetadata: null, - toRelationMetadata: null, - }, - }, - { - node: { - id: '21268ece-7002-4b04-a442-f25278f8ca13', + __typename: 'field', + id: 'e73c3bd2-3c2e-48dc-92b9-6e217ff27c05', type: 'NUMBER', name: 'size', label: 'Size', description: 'View Field size', - icon: null, - placeholder: null, + icon: 'IconEye', isCustom: false, isActive: true, + isSystem: true, isNullable: false, - createdAt: '', - updatedAt: '', + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', fromRelationMetadata: null, toRelationMetadata: null, + defaultValue: { + value: 0, + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '9e066f59-5fbb-451b-9788-0f8560f224c9', + type: 'UUID', + name: 'fieldMetadataId', + label: 'Field Metadata Id', + description: 'View Field target field', + icon: 'IconTag', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '1034c249-d94a-40d8-a28c-966fd3c1a2fc', + type: 'DATE_TIME', + name: 'createdAt', + label: 'Creation date', + description: null, + icon: 'IconCalendar', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'now', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'b5ec1333-8f24-4f75-a603-147b98eb9ce3', + type: 'NUMBER', + name: 'position', + label: 'Position', + description: 'View Field position', + icon: 'IconList', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + value: 0, + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '3160b24b-37b9-4072-89e0-1d189b7089c7', + type: 'BOOLEAN', + name: 'isVisible', + label: 'Visible', + description: 'View Field visibility', + icon: 'IconEye', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + value: true, + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '7c7866c9-4bf0-4f3b-89b6-5b889858a895', + type: 'RELATION', + name: 'view', + label: 'View', + description: 'View Field related view', + icon: 'IconLayoutCollage', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: { + __typename: 'relation', + id: '1ba54f4e-6e09-40a8-bc02-65b5ece7dafc', + relationType: 'ONE_TO_MANY', + fromObjectMetadata: { + __typename: 'object', + id: '98ee2e85-7510-49f9-848e-c1a21acdc664', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'view', + namePlural: 'views', + }, + fromFieldMetadataId: '58aa8432-7109-42b2-8b85-7745fef42b9e', + }, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'f033cd69-d43f-42d0-bdd8-7000dd97fb86', + type: 'UUID', + name: 'viewId', + label: 'View id (foreign key)', + description: 'View Field related view id foreign key', + icon: 'IconLayoutCollage', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '590769a6-fd78-4b38-99b7-317ee231e002', + type: 'UUID', + name: 'id', + label: 'Id', + description: null, + icon: null, + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'uuid', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '4ecfdfa2-14bb-44f0-9557-052b3a350c33', + type: 'DATE_TIME', + name: 'updatedAt', + label: 'Update date', + description: null, + icon: 'IconCalendar', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'now', + }, + options: null, }, }, ], pageInfo: { + __typename: 'PageInfo', hasNextPage: false, hasPreviousPage: false, - startCursor: null, - endCursor: null, + startCursor: 'YXJyYXljb25uZWN0aW9uOjA=', + endCursor: 'YXJyYXljb25uZWN0aW9uOjg=', }, - totalCount: 5, + totalCount: 9, + }, + }, + }, + { + __typename: 'objectEdge', + node: { + __typename: 'object', + id: '0591699b-2304-4f81-8c32-543693c5ae4e', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'viewSort', + namePlural: 'viewSorts', + labelSingular: 'View Sort', + labelPlural: 'View Sorts', + description: '(System) View Sorts', + icon: 'IconArrowsSort', + isCustom: false, + isActive: true, + isSystem: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + labelIdentifierFieldMetadataId: null, + imageIdentifierFieldMetadataId: null, + fields: { + __typename: 'ObjectFieldsConnection', + edges: [ + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'a6e7a588-4f86-4d68-ab71-2c7bf1833c40', + type: 'DATE_TIME', + name: 'createdAt', + label: 'Creation date', + description: null, + icon: 'IconCalendar', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'now', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '281526dd-aa6a-4419-8ee9-ae643f481bf5', + type: 'TEXT', + name: 'direction', + label: 'Direction', + description: 'View Sort direction', + icon: null, + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + value: 'asc', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '08ff332d-72d6-4dc8-a466-bdc396a948cd', + type: 'UUID', + name: 'viewId', + label: 'View id (foreign key)', + description: 'View Sort related view id foreign key', + icon: 'IconLayoutCollage', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'a823ec90-fbc1-4be7-803b-5d79937e2278', + type: 'UUID', + name: 'fieldMetadataId', + label: 'Field Metadata Id', + description: 'View Sort target field', + icon: 'IconTag', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: null, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '22f8022c-809a-4e7e-8e15-155e5ae5a40c', + type: 'DATE_TIME', + name: 'updatedAt', + label: 'Update date', + description: null, + icon: 'IconCalendar', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'now', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: '481db089-dd64-4acd-b514-e627f134c8ee', + type: 'UUID', + name: 'id', + label: 'Id', + description: null, + icon: null, + isCustom: false, + isActive: true, + isSystem: true, + isNullable: false, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: null, + defaultValue: { + type: 'uuid', + }, + options: null, + }, + }, + { + __typename: 'fieldEdge', + node: { + __typename: 'field', + id: 'bff11820-ffa2-4283-80b3-3777583f6f97', + type: 'RELATION', + name: 'view', + label: 'View', + description: 'View Sort related view', + icon: 'IconLayoutCollage', + isCustom: false, + isActive: true, + isSystem: true, + isNullable: true, + createdAt: '2023-12-15T15:29:39.070Z', + updatedAt: '2023-12-15T15:29:39.070Z', + fromRelationMetadata: null, + toRelationMetadata: { + __typename: 'relation', + id: '22a37761-f528-4a9b-8194-1fed1df69019', + relationType: 'ONE_TO_MANY', + fromObjectMetadata: { + __typename: 'object', + id: '98ee2e85-7510-49f9-848e-c1a21acdc664', + dataSourceId: 'cabbcaa6-05d6-41f4-920f-9144172a4f08', + nameSingular: 'view', + namePlural: 'views', + }, + fromFieldMetadataId: 'bdbecafb-972e-43f4-9296-c5a59bad449d', + }, + defaultValue: null, + options: null, + }, + }, + ], + pageInfo: { + __typename: 'PageInfo', + hasNextPage: false, + hasPreviousPage: false, + startCursor: 'YXJyYXljb25uZWN0aW9uOjA=', + endCursor: 'YXJyYXljb25uZWN0aW9uOjY=', + }, + totalCount: 7, }, }, }, mockedPeopleMetadata, mockedCompaniesMetadata, - mockedWorkspacesMetadata, - mockedPeopleMetadata, + mockedPipelineStepsMetadata, + mockedActivityTargetsMetadata, mockedActivitiesMetadata, + mockedFavoritesMetadata, + mockedWorkspaceMembersMetadata, + mockedOpportunitiesMetadata, + mockedAPIKeysMetadata, ], pageInfo: { + __typename: 'PageInfo', hasNextPage: false, hasPreviousPage: false, - startCursor: null, - endCursor: null, + startCursor: 'YXJyYXljb25uZWN0aW9uOjA=', + endCursor: 'YXJyYXljb25uZWN0aW9uOjk=', }, - totalCount: 6, + totalCount: 13, }; diff --git a/packages/twenty-front/src/testing/mock-data/pipeline-steps.ts b/packages/twenty-front/src/testing/mock-data/pipeline-steps.ts new file mode 100644 index 000000000..341bde89b --- /dev/null +++ b/packages/twenty-front/src/testing/mock-data/pipeline-steps.ts @@ -0,0 +1,45 @@ +import { PipelineStep } from '@/pipeline/types/PipelineStep'; + +const dates = { + updatedAt: '2021-06-01T10:23:42.33625+00:00', + createdAt: '2021-06-01T10:23:42.33625+00:00', +}; + +export const mockedPipelineSteps: Array = [ + { + id: '6edf4ead-006a-46e1-9c6d-228f1d0143c9', + color: 'red', + name: 'New', + position: 0, + ...dates, + }, + { + id: '30b14887-d592-427d-bd97-6e670158db02', + color: 'sky', + name: 'Meeting', + position: 2, + ...dates, + }, + { + id: 'bea8bb7b-5467-48a6-9a8a-a8fa500123fe', + + color: 'yellow', + name: 'Customer', + position: 4, + ...dates, + }, + { + id: 'd8361722-03fb-4e65-bd4f-ec9e52e5ec0a', + color: 'purple', + name: 'Screening', + position: 1, + ...dates, + }, + { + id: 'db5a6648-d80d-4020-af64-4817ab4a12e8', + color: 'turquoise', + name: 'Proposal', + position: 3, + ...dates, + }, +]; diff --git a/packages/twenty-front/src/testing/mock-data/users.ts b/packages/twenty-front/src/testing/mock-data/users.ts index 359557aec..677ed0dc2 100644 --- a/packages/twenty-front/src/testing/mock-data/users.ts +++ b/packages/twenty-front/src/testing/mock-data/users.ts @@ -1,24 +1,19 @@ -import { Activity } from '@/activities/types/Activity'; -import { Attachment } from '@/attachments/types/Attachment'; -import { Company } from '@/companies/types/Company'; import { WorkspaceMember } from '@/workspace-member/types/WorkspaceMember'; import { User, Workspace } from '~/generated/graphql'; type MockedUser = Pick< User, - 'id' | 'email' | 'firstName' | 'lastName' | 'canImpersonate' | '__typename' + | 'id' + | 'email' + | 'firstName' + | 'lastName' + | 'canImpersonate' + | '__typename' + | 'supportUserHash' > & { - workspaceMember: Pick & { - workspace: Pick< - Workspace, - 'id' | 'displayName' | 'domainName' | 'inviteHash' | 'logo' | '__typename' - >; - assignedActivities: Array; - authoredActivities: Array; - authoredAttachments: Array; - companies: Array; - comments: Array; - }; + workspaceMember: WorkspaceMember; + locale: string; + defaultWorkspace: Workspace; }; export const avatarUrl = @@ -26,6 +21,41 @@ export const avatarUrl = export const workspaceLogoUrl = '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='; +export const mockDefaultWorkspace: Workspace = { + id: '7dfbc3f7-6e5e-4128-957e-8d86808cdf6w', + displayName: 'Twenty', + domainName: 'twenty.com', + inviteHash: 'twenty.com-invite-hash', + logo: workspaceLogoUrl, + allowImpersonation: true, + subscriptionStatus: 'active', + featureFlags: [ + { + id: '0eada9a3-ccf4-4fcc-b25c-0c5d746e0fac', + key: 'IS_RELATION_FIELD_TYPE_ENABLED', + value: true, + workspaceId: '7dfbc3f7-6e5e-4128-957e-8d86808cdf6b', + __typename: 'FeatureFlag', + }, + ], + createdAt: '2023-04-26T10:23:42.33625+00:00', + updatedAt: '2023-04-26T10:23:42.33625+00:00', +}; + +const workspaceMember: WorkspaceMember = { + id: '7dfbc3f7-6e5e-4128-957e-8d86808cdf6b', + colorScheme: 'Light', + avatarUrl, + locale: 'en', + name: { + firstName: 'Charles', + lastName: 'Test', + }, + createdAt: '2023-04-26T10:23:42.33625+00:00', + updatedAt: '2023-04-26T10:23:42.33625+00:00', + userId: '2603c1f9-0172-4ea6-986c-eeaccdf7f4cf', +}; + export const mockedUsersData: Array = [ { id: '7dfbc3f7-6e5e-4128-957e-8d86808cdf6d', @@ -34,31 +64,12 @@ export const mockedUsersData: Array = [ firstName: 'Charles', lastName: 'Test', canImpersonate: false, - defaultWorkspace: { - id: '20202020-1c25-4d02-bf25-6aeccf7ea419', - displayName: 'Apple', - logo: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAAAXNSR0IArs4c6QAAELpJREFUeF7tnXnwr3MVx1+WS5Hthoss1R0lNSTUKGQdt6EscVVCKVPKUqmUKcu0WJI2ppJUt0kNwmRN0dBCtolKpqIVIdl3qXnX8xs/1+937/d5vp/lnOc5n3++/zyfzznnfc77+zyf7ZxFiBYIBALTIrBIYBMIBALTIxAEiegIBBaAQBAkwiMQCIJEDIyJgP5IlwRmAreOOZar7vEGceWuYsrOBg4E5gKzgMlxMqiYGZSxxcLLnyDFwU7AF4A1FqL+osB//JnYTeMgSDfc+tLrhcBZwHotDFoMeLLF864fDYK4dl9n5XcBTm3mFW0HWRz4d9tOXp8Pgnj1XDe9d2+Ioc+kri3eIF2Ri35mEdgAuLzjG2N+o2IOYtbNoVhbBGYA1wPrtO24gOcH9dUxKGMTBomHofYE5iVWVKtX43yeJVYn/3BBkPwY15BwXcuVqVF1fBB4zqgP9+G5IEgfvPiUDSsAdwBaacrRrgY2zjGw1TGDIFY9016vjYCr2ndr1eMQ4NhWPZw/HARx7sBG/Z2BMwuY8nzgLwXkmBERBDHjis6KaG/je517t+s4uHgZnMHt4sH809sCFxXS8l5g+UKyzIgJgphxRWtFdI7qpta9unc4Ejiie3efPYMgPv2muxmPFFZdy7ta5h1UC4L4dPcDwNIFVX8YWKqgPDOigiBmXDGyIhcAc0Z+Os2D+wFfSTOUr1GCIL78tTXw4woqD+qA4mR8gyAVoq2jSAVpjXsY2l95Y0ed3XcLgvhx4S+BV1ZQdwng8QpyTYgMgphww0KVeDFw40KfSv/AD4Ad0w/rZ8QgiA9fPQQ8u4Kqg7o9OBW+QZAKUddSpLKNKLFC6XYocFRpodbkBUGseeSZ+uj7P9fx9ems1yZkjTeWOW8EQcy55GkKab9D+x6l2+rALaWFWpQXBLHolad0Kr1jLsknAAfYhqWcdkGQcli3lbQKcFvbTmM+fxew4phj9Kp7EMSuOy8Btiys3qD3PKbCOghSOAJbiCud//alwA0t9BvEo0EQm25+GfDrgqrtC5xcUJ4bUUEQm666ENiukGrK6P6+QrLciQmC2HTZE4B2sXO305saILnluB0/CGLPdSKGCJK7nQu8PrcQ7+MHQex5cENACdpytu8Cb8kpoC9jB0HsefI44OCMaul8lc5ZRRsBgSDICCAVfuQ3gJZcczQVzqlx8DGHLUXGDIIUgbmVEGUOSZ0gQSXTdL6q9M58K8MtPhwEsecVBXNKvyjTuwrolN54tIdsB41SOqKD+OgyBQIpA/kNwDmBcncEgiDdscvVMwVBzmuWcFOMlctOF+MGQey5aZyg/hWwGaBj8tESIBAESQBi4iG6EOQ0YO8K6UgTm25vuCCIPZ+MMkkXiZQGSBebcm8q2kOooEZBkIJgjyhKV11nNitZIoI+l/4O/Aw4A7gCeHTEscZ5TLExcRdeeihpXZe32zg6VO87ZILoctDzgPWbZdC1gdWAZRqv3An8Dris+bfWHkLfAkQEWA94E7A9oJIKz1pIVAoDJXX4M/DTZuNRNdhVP6R3bSgEUSAor+37m0ls1404ff4ogdvnmqpO3ibDKpugNKIfbXbrU/tfxPkRcHTzphNerltqgCyBMQs4vjnOnSttjv5N9S8q4l1ryfhJumgHXee7di10hH4yDDoVINnHACqh4K71jSAigv69dAGoxH2K+R3+W+Cdzb9nzWBYFfgqsEPiXflxbBJZDgJO8fSp2heCKCBUFmDdcTyYuO9PgL2aCXbioaccTnOHTzVBWOPPoY2Nyvk7t9BiQxu9nvGsd4JoUq3a4Pq12rT6oznLYRk+M0QEvbH0GaMSad6aVua2sUwUrwTRZPPKZgXGU1BoUi+iKDlb15ICqhOiVSeRbmVPxi9A1283b1tz5ngkyKebVRhzYLZUSGTRP/9nRzgaoiXpPZv5VV8Tu2nBQyuN+jQ10zwRRP+WWnvvY1JlBYdWwU5s5lLaU9ClKS02KLu7CDKUphMCm1iZyHshyOFDrNE9FEZMYafmbWtZSKBtnSDS7w/A7AEHy5BNf3OzIVsNA8sEWRZQMuVcm3zVQA/BrRComtjOKkFq1eRr5bl4uBgC1SrtWiTIps3xjWLohyAXCFQpKGqNIFtYW+ZzETrDUfIbwD4lzbVEkI2aXfGS9ocsfwh8oNkkLaK5FYLoXoYuBUULBEZBQH+m14zy4LjPWCCINsF0j8CCLuPiGf3LIaDDmdlvVloIyvudHrQrFwohaSoE7m6uJmdFpzZBdERd52+iBQJtECh2bqsmQXYEzm6DSjwbCDQ5ArTaWSQ/QC2CzAAeC3cHAi0R0N2Ri1v2GevxWgS5qcmgMZby0XkwCNwDKMdA8T/VGgSZA1wwGNeGoeMioDeG3hxVWg2CjJI5sAoYIdQcAp8EPl5Tq9IE+Vpzh7qmzSHbBwLKNTyvtqolCaINwewbO7UBDflJEFByO53grd5KEuRSYPPqFocC1hHYAzjVipKlCKJjAS4z61lx1ED00HxD8w4zrRRBLgS2M2N1KGIRgfObBNqmdCtBEOVx0iX8aIHAdAgUOVfVBf4SBImMJF08M6w+SgRYfBNwFIhLEOSJSomkR7E/nqmPwM6Wz+TlJojS9fyxvg9CA6MI3Gw9pVNugig58WuMOifUqo+AsmTqspzZlpsgRY4km0U3FFsQAqoT8g7rEOUkyDpNjT/rGIR+dRDQ6qb5P9CcBDnX4rp2nVgIqfMhoOpX7/aASk6CxOqVhwioo6PSybrYG8tFkDiYWCfwPEi9vim97UHXbKl2VDzyHBcIhJKlEVDe5d+XFtpVXq43iG6BbdVVqejXWwQ0Kdfk3E3LRRCtbev4QLRAYDICKq/m6o8zF0HML99F3FZBYGPg6iqSOwrNQZBlgPs66hPd+o2Ai72PyS7IQZAtgUv67eewrgMCOq3r7rM7B0FU2vjgDgBGl34j8HNAxZFctRwE0Tfmhq5QCGVLILB/U+a6hKxkMnIQRFnwlkumYQzUFwRe1FQsdmVPDoLoCIGrtW5XHvOrbJF6HqnhyUGQWOJN7aV+jJcj1rIjk0PpIEh2t7kUkCPWsgORWunFAJ3ijRYITEbA3RGTCeVTE0Tr3KavUEbcVkFACcv15+mupSZI7KK7C4EiCuurQkWT3LXUBFkJuMMdCqFwbgSCIA3CqwK35kY7xneHQHxiNS5bDbjFnftC4dwIxCS9QXgV4LbcaMf4LhFI/TlfBITUSsccpIjbXApxd9RdKKcmyLLAvS7dF0rnRsB8FsWpAEhNkCiUkzvM/I7vKlnDBMypCRI76X4DOLfm7wG+nFtI6vFTE0TjaUkvWiAwPwKXAa/1Bktqgsj+OKzoLQrK6KsKx/oEd9VyEERvkBzjugI2lJ0SAXcrWTkCOXJiBTumQ2Bdbxn/cxBEO+naUY8WCMyPwBnAbp5gyUGQSDvqKQLK6qrr2Mrs7qblIMhhwJFuEAhFSyOg0xb/LC20q7wcBNkcuLSrQtGv9wicDaiyrYuWgyDLAyoMHy0QmA6BHHGXBe0cisZmYRZX9WrQvYF5HizKQRDZHXshHrxfT0c3NwxzEUR3QnQ3JFogMB0CmodoPmK65SLIyR5qYJv2TP+Vc3ENNxdBYiWr/wGewsKjgENTDJRrjFwEifxYuTzWv3GXAh62alYugsjeONVr1eu29Lrd8nw1J0H+BqxuyxehjVEEjrB6+iInQQ4HZHi0QGAUBEzWD8lJkEgiN0pYxDMTCOiTXHPXxy1BkpMgMQ+x5Gkfumiyrkm7mZabIP8AZpmxNhTxgIA2mc3cJ8pNkA8Cn/HgldDRFAI3A7MtaJSbIJFIzoKXfeqgVdA1a6uemyCyL4p61vayX/m6NvHcmntqJQhyEbCtXx+F5pUR0Mlf3TF6sIYeJQjyEuCGGsaFzF4h8Grg8tIWlSBILPeW9mp/5emU+L4lzStFkGuBDUoaFrJ6i8ADzeS9yLXuUgTZCLiqty4Lw2ogcBLwrtyCSxEkPrNye3KY4+t4ylxACemytJIEUXbvzbJYEYMOHQGd3xJRkl/hLUmQFwDaIY0WCORCQG8UbU5rnpKklSSIFI5NwyRui0GmQSB5tpTSBDkOODjcGwhkQuD41PFVmiBLACqkEi0QyIFA8kKhpQkiUP4KrJEDnRhz0AhoX2RmagRqEOQVwDWpDYnxBo/ALsBZqVGoQRDZoMmUKuJGCwRSIZAllrMMOoLFHwaOGeG5eCQQGAWBC4HXjfJg22dqESQywLf1VDy/IARWAO7JAVEtgsiW07zVq8vhgBhzbAT+1VyqGnugqQaoSZBY8s3i0sENmvWeSE2CyJO/ADYZnEvD4FQIJN85n1+x2gRZOuW5mVSoxzhuEHgr8J2c2tYmiGy7Gtgwp5Exdi8R0MHERXNbZoEg8RbJ7eV+jr8/cGJu0ywQRDaqbLSK7kQLBEZBoMjbQ4pYIcgM4LFRkIlnAoGmvN8pJZCwQhDZKoPfXsLokOEagewrV5PRsUQQ6RVVqVzHbhHltwYuKSLJ0CfWhL17Ad8qZXzIcYdA1l3zqdCw9gaRjvcBy7hzXShcAgGVRVB5hGLNIkGiMlUx97sSpM8qfV4VbRYJIgB08WWnokiEMOsI6P7Qk6WVtEoQ4RAZUEpHg115ewCn1lDPMkEiXWmNiLAns2pJNssEkasuBray57PQqCACKuqp4p5VmnWCCJS4v14lNEwIPQA4oaYmHggSKUtrRkg92UoPtVY98f+X7IEg0lOVclUxN9pwEND5PH09VG1eCCKQ7gBWqopWCC+FwBbNCe9S8qaV44kgceK3ergUUeB8YPsikkYQ4okgMkf313WPPVo/EdBqlVatzDRvBBFw3wT2NoNgKJISgeWas3gpxxxrLI8EkcG3AyuPZXl0tobA7k2uNFN6eSWIzuWo7JZX/U0FgQFlTM07JuPhOcBif8RAZCdQQSlDlTrUZPNMEAGquYjmJNF8IqAbpEs2XwMmLfBOEIGqG4i6iRjNHwKzrRd27QNBFBbXAev5i49Ba7wr8H3rCPSFIML5TmBF64CHfv9D4CjgUA9Y9IkgskX1sU1tNHkIgsI6ng7MLSyzs7g+EUQgKFfrQ83ErzMo0TEbAlXulY9jTd8IMkGS++NNMk5YZOn7Q2BOlpEzDtpHgggu2XUrsEpG7HIMraQE+kzUfEqnlx9shCwLzGpOM6sWuDe/nQzsmwOw3GN6A7otHio3rbLTFpvyf50JnARcCzzaUkltru0AvBfYuEQpgJb6TTx+EPDFjn2rd+s7QQTw5wE5qXbT2+Ec4CPAjRmU0YabNk4/Yeic2vrA9RlsLTbkEAgiMF8FXFEM1acLOq/5vCiZEVCLFfs0fw6qv1K6/QlYu0ndVFp2UnlDIYhAU9Dok+vlSRGcerC7AJUHU/3u2k2fYvOaz7HcuujoyG4eNgBHBWJIBJnARK/9ywFNdlM23Z/+UrMB9kjKgROOtQ3wdWDNhGNODHUscEiGcasOOUSCTAC+aTMnWH4MD2hirYD7GHD3GOOU7iq/K8/tcc0Rna5xoIWG/WplPSwBWldgSuhWSoZ23j8EHAjMXIhQXQm9DDi+qVFRPetGIpA0T9EexdsA1R3XZ9lUsaFN2Csb+y+wkHUkkf3TDhMEeSY0izcBoqDRypM2HfVPqVzBQ2yKkcEWNgqCDDHkw+aREQiCjAxVPDhEBIIgQ/R62DwyAkGQkaGKB4eIwH8BiW3y2J/F45oAAAAASUVORK5CYII=', - inviteHash: 'apple.dev-invite-hash', - allowImpersonation: true, - }, - workspaceMember: { - id: '7dfbc3f7-6e5e-4128-957e-8d86808cdf6b', - name: { firstName: 'Charles', lastName: 'Test' }, - workspace: { - __typename: 'Workspace', - id: '7dfbc3f7-6e5e-4128-957e-8d86808cdf6b', - displayName: 'Twenty', - domainName: 'twenty.com', - inviteHash: 'twenty.com-invite-hash', - logo: workspaceLogoUrl, - }, - authoredAttachments: [], - assignedActivities: [], - authoredActivities: [], - companies: [], - comments: [], - }, - } as MockedUser, + supportUserHash: + 'a95afad9ff6f0b364e2a3fd3e246a1a852c22b6e55a3ca33745a86c201f9c10d', + workspaceMember, + defaultWorkspace: mockDefaultWorkspace, + locale: 'en', + }, { id: '7dfbc3f7-6e5e-4128-957e-8d86808cdf6c', __typename: 'User', @@ -66,22 +77,19 @@ export const mockedUsersData: Array = [ firstName: 'Felix', lastName: 'Test', canImpersonate: false, + supportUserHash: + '54ac3986035961724cdb9a7a30c70e6463a4b68f0ecd2014c727171a82144b74', workspaceMember: { - id: '7dfbc3f7-6e5e-4128-957e-8d86808cdf6b', - workspace: { - __typename: 'Workspace', - id: '7dfbc3f7-6e5e-4128-957e-8d86808cdf6b', - displayName: 'Twenty', - domainName: 'twenty.com', - inviteHash: 'twenty.com-invite-hash', - logo: workspaceLogoUrl, + ...workspaceMember, + id: '7dfbc3f7-6e5e-4128-957e-8d86808cdf6c', + name: { + firstName: 'Felix', + lastName: 'Test', }, - authoredAttachments: [], - assignedActivities: [], - authoredActivities: [], - companies: [], - comments: [], + userId: '81aeb270-d689-4515-bd5d-35dbe956da3b', }, + defaultWorkspace: mockDefaultWorkspace, + locale: 'en', }, ]; @@ -93,22 +101,20 @@ export const mockedOnboardingUsersData: Array = [ firstName: '', lastName: '', canImpersonate: false, + supportUserHash: + '4fb61d34ed3a4aeda2476d4b308b5162db9e1809b2b8277e6fdc6efc4a609254', workspaceMember: { - id: '7dfbc3f7-6e5e-4128-957e-8d86808cdf6b', - workspace: { - __typename: 'Workspace', - id: '7dfbc3f7-6e5e-4128-957e-8d86808cdf6b', - displayName: '', - domainName: '', - inviteHash: 'twenty.com-invite-hash-1', - logo: '', + ...workspaceMember, + id: 'd454f075-c72f-4ebe-bac7-d28e75e74a23', + name: { + firstName: '', + lastName: '', }, - authoredAttachments: [], - assignedActivities: [], - authoredActivities: [], - companies: [], - comments: [], + + userId: '7f793378-b939-43b7-8642-292c9510754c', }, + defaultWorkspace: mockDefaultWorkspace, + locale: 'en', }, { id: '7dfbc3f7-6e5e-4128-957e-8d86808cdf6d', @@ -117,21 +123,11 @@ export const mockedOnboardingUsersData: Array = [ firstName: '', lastName: '', canImpersonate: false, - workspaceMember: { - id: '7dfbc3f7-6e5e-4128-957e-8d86808cdf6b', - workspace: { - __typename: 'Workspace', - id: '7dfbc3f7-6e5e-4128-957e-8d86808cdf6b', - displayName: 'Test', - domainName: 'test.com', - inviteHash: 'twenty.com-invite-hash-2', - logo: '', - }, - authoredAttachments: [], - assignedActivities: [], - authoredActivities: [], - companies: [], - comments: [], + workspaceMember, + defaultWorkspace: { + ...mockDefaultWorkspace, + displayName: '', }, + locale: 'en', }, ];