diff --git a/packages/twenty-apps/internal/twenty-partners/src/views/my-deals.view.ts b/packages/twenty-apps/internal/twenty-partners/src/views/my-deals.view.ts index e3c1cf152e..4f74addef9 100644 --- a/packages/twenty-apps/internal/twenty-partners/src/views/my-deals.view.ts +++ b/packages/twenty-apps/internal/twenty-partners/src/views/my-deals.view.ts @@ -11,7 +11,9 @@ import { PARTNER_ON_OPPORTUNITY_FIELD_ID } from 'src/fields/partner-on-opportuni export const MY_DEALS_VIEW_UNIVERSAL_IDENTIFIER = '09c9b985-6dce-43ec-a6b3-5e878e1aec74'; -const OPPORTUNITY_NAME_FIELD_ID = '20202020-8609-4f65-a2d9-44009eb422b5'; +const OPPORTUNITY_NAME_FIELD_ID = + STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.fields.name + .universalIdentifier; const OPPORTUNITY_AMOUNT_FIELD_ID = '20202020-583e-4642-8533-db761d5fa82f'; // Partner-facing list of opportunities assigned to the partner (partner relation set). diff --git a/packages/twenty-apps/internal/twenty-partners/src/views/open-briefs.view.ts b/packages/twenty-apps/internal/twenty-partners/src/views/open-briefs.view.ts index fde063e84c..5774c0cc96 100644 --- a/packages/twenty-apps/internal/twenty-partners/src/views/open-briefs.view.ts +++ b/packages/twenty-apps/internal/twenty-partners/src/views/open-briefs.view.ts @@ -24,7 +24,7 @@ export default defineView({ position: 5, fields: [ // Name - { universalIdentifier: '74595afa-c9c4-45b6-b362-803fb5574fbd', fieldMetadataUniversalIdentifier: '20202020-8609-4f65-a2d9-44009eb422b5', position: 0, isVisible: true, size: 200 }, + { universalIdentifier: '74595afa-c9c4-45b6-b362-803fb5574fbd', fieldMetadataUniversalIdentifier: STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.opportunity.fields.name.universalIdentifier, position: 0, isVisible: true, size: 200 }, // Need (B1 brief field) { universalIdentifier: 'a24d52c4-9d0b-4145-a8fb-a4e21e002f58', fieldMetadataUniversalIdentifier: OPPORTUNITY_NEED_FIELD_ID, position: 1, isVisible: true, size: 280 }, // Requirements (B1 brief field) diff --git a/packages/twenty-front/src/modules/command-menu/hooks/__tests__/useWorkflowCommandMenu.test.tsx b/packages/twenty-front/src/modules/command-menu/hooks/__tests__/useWorkflowCommandMenu.test.tsx index 57fdfbe6d3..db43bc3060 100644 --- a/packages/twenty-front/src/modules/command-menu/hooks/__tests__/useWorkflowCommandMenu.test.tsx +++ b/packages/twenty-front/src/modules/command-menu/hooks/__tests__/useWorkflowCommandMenu.test.tsx @@ -19,6 +19,7 @@ import { getJestMetadataAndApolloMocksAndCommandMenuWrapper } from '~/testing/je import { getTestEnrichedObjectMetadataItemsMock } from '~/testing/utils/getTestEnrichedObjectMetadataItemsMock'; jest.mock('uuid', () => ({ + ...jest.requireActual('uuid'), v4: jest.fn().mockReturnValue('mocked-uuid'), })); diff --git a/packages/twenty-front/src/modules/object-record/hooks/__tests__/useCreateManyRecords.test.tsx b/packages/twenty-front/src/modules/object-record/hooks/__tests__/useCreateManyRecords.test.tsx index 094bd9a3f7..5df87c061f 100644 --- a/packages/twenty-front/src/modules/object-record/hooks/__tests__/useCreateManyRecords.test.tsx +++ b/packages/twenty-front/src/modules/object-record/hooks/__tests__/useCreateManyRecords.test.tsx @@ -12,6 +12,7 @@ import { useRefetchAggregateQueries } from '@/object-record/hooks/useRefetchAggr import { getJestMetadataAndApolloMocksWrapper } from '~/testing/jest/getJestMetadataAndApolloMocksWrapper'; jest.mock('uuid', () => ({ + ...jest.requireActual('uuid'), v4: jest.fn(), })); diff --git a/packages/twenty-front/src/modules/object-record/hooks/__tests__/useCreateOneRecord.test.tsx b/packages/twenty-front/src/modules/object-record/hooks/__tests__/useCreateOneRecord.test.tsx index 8efd6c7924..06a74e280e 100644 --- a/packages/twenty-front/src/modules/object-record/hooks/__tests__/useCreateOneRecord.test.tsx +++ b/packages/twenty-front/src/modules/object-record/hooks/__tests__/useCreateOneRecord.test.tsx @@ -12,6 +12,7 @@ import { getJestMetadataAndApolloMocksWrapper } from '~/testing/jest/getJestMeta const PERSON_ID = 'a7286b9a-c039-4a89-9567-2dfa7953cda9'; jest.mock('uuid', () => ({ + ...jest.requireActual('uuid'), v4: jest.fn(() => 'a7286b9a-c039-4a89-9567-2dfa7953cda9'), })); diff --git a/packages/twenty-front/src/modules/object-record/spreadsheet-import/hooks/__tests__/useOpenObjectRecordsSpreadsheetImportDialog.test.ts b/packages/twenty-front/src/modules/object-record/spreadsheet-import/hooks/__tests__/useOpenObjectRecordsSpreadsheetImportDialog.test.ts index 974068a304..e5096b31a6 100644 --- a/packages/twenty-front/src/modules/object-record/spreadsheet-import/hooks/__tests__/useOpenObjectRecordsSpreadsheetImportDialog.test.ts +++ b/packages/twenty-front/src/modules/object-record/spreadsheet-import/hooks/__tests__/useOpenObjectRecordsSpreadsheetImportDialog.test.ts @@ -11,6 +11,7 @@ import { getJestMetadataAndApolloMocksWrapper } from '~/testing/jest/getJestMeta const COMPANY_ID = 'cb2e9f4b-20c3-4759-9315-4ffeecfaf71a'; jest.mock('uuid', () => ({ + ...jest.requireActual('uuid'), v4: jest.fn(() => 'cb2e9f4b-20c3-4759-9315-4ffeecfaf71a'), })); diff --git a/packages/twenty-front/src/modules/page-layout/hooks/__tests__/useCreatePageLayoutGraphWidget.test.tsx b/packages/twenty-front/src/modules/page-layout/hooks/__tests__/useCreatePageLayoutGraphWidget.test.tsx index 4ac6c5598f..95c456d0a7 100644 --- a/packages/twenty-front/src/modules/page-layout/hooks/__tests__/useCreatePageLayoutGraphWidget.test.tsx +++ b/packages/twenty-front/src/modules/page-layout/hooks/__tests__/useCreatePageLayoutGraphWidget.test.tsx @@ -20,6 +20,7 @@ import { } from './PageLayoutTestWrapper'; jest.mock('uuid', () => ({ + ...jest.requireActual('uuid'), v4: jest.fn(() => 'mock-uuid'), })); diff --git a/packages/twenty-front/src/modules/page-layout/hooks/__tests__/useCreatePageLayoutTab.test.tsx b/packages/twenty-front/src/modules/page-layout/hooks/__tests__/useCreatePageLayoutTab.test.tsx index c494941281..5b3390c4e1 100644 --- a/packages/twenty-front/src/modules/page-layout/hooks/__tests__/useCreatePageLayoutTab.test.tsx +++ b/packages/twenty-front/src/modules/page-layout/hooks/__tests__/useCreatePageLayoutTab.test.tsx @@ -16,6 +16,7 @@ import { } from './PageLayoutTestWrapper'; jest.mock('uuid', () => ({ + ...jest.requireActual('uuid'), v4: jest.fn(), })); diff --git a/packages/twenty-front/src/modules/page-layout/hooks/__tests__/useDuplicatePageLayoutTab.test.tsx b/packages/twenty-front/src/modules/page-layout/hooks/__tests__/useDuplicatePageLayoutTab.test.tsx index 3383f59183..dcec7290e5 100644 --- a/packages/twenty-front/src/modules/page-layout/hooks/__tests__/useDuplicatePageLayoutTab.test.tsx +++ b/packages/twenty-front/src/modules/page-layout/hooks/__tests__/useDuplicatePageLayoutTab.test.tsx @@ -27,6 +27,7 @@ import { } from './PageLayoutTestWrapper'; jest.mock('uuid', () => ({ + ...jest.requireActual('uuid'), v4: jest.fn(), })); diff --git a/packages/twenty-front/src/modules/side-panel/hooks/__tests__/useNavigateSidePanel.test.tsx b/packages/twenty-front/src/modules/side-panel/hooks/__tests__/useNavigateSidePanel.test.tsx index 3837d2be7b..5bc6f2a240 100644 --- a/packages/twenty-front/src/modules/side-panel/hooks/__tests__/useNavigateSidePanel.test.tsx +++ b/packages/twenty-front/src/modules/side-panel/hooks/__tests__/useNavigateSidePanel.test.tsx @@ -14,6 +14,7 @@ import { getJestMetadataAndApolloMocksAndCommandMenuWrapper } from '~/testing/je import { getTestEnrichedObjectMetadataItemsMock } from '~/testing/utils/getTestEnrichedObjectMetadataItemsMock'; jest.mock('uuid', () => ({ + ...jest.requireActual('uuid'), v4: jest.fn().mockReturnValue('mocked-uuid'), })); diff --git a/packages/twenty-front/src/modules/side-panel/hooks/__tests__/useOpenCalendarEventInSidePanel.test.tsx b/packages/twenty-front/src/modules/side-panel/hooks/__tests__/useOpenCalendarEventInSidePanel.test.tsx index f7652d6068..3dc0775950 100644 --- a/packages/twenty-front/src/modules/side-panel/hooks/__tests__/useOpenCalendarEventInSidePanel.test.tsx +++ b/packages/twenty-front/src/modules/side-panel/hooks/__tests__/useOpenCalendarEventInSidePanel.test.tsx @@ -20,6 +20,7 @@ import { getJestMetadataAndApolloMocksAndCommandMenuWrapper } from '~/testing/je import { getTestEnrichedObjectMetadataItemsMock } from '~/testing/utils/getTestEnrichedObjectMetadataItemsMock'; jest.mock('uuid', () => ({ + ...jest.requireActual('uuid'), v4: jest.fn().mockReturnValue('mocked-uuid'), })); diff --git a/packages/twenty-front/src/modules/side-panel/hooks/__tests__/useOpenRecordInSidePanel.test.tsx b/packages/twenty-front/src/modules/side-panel/hooks/__tests__/useOpenRecordInSidePanel.test.tsx index 9ecbfdd058..fa72ce6b92 100644 --- a/packages/twenty-front/src/modules/side-panel/hooks/__tests__/useOpenRecordInSidePanel.test.tsx +++ b/packages/twenty-front/src/modules/side-panel/hooks/__tests__/useOpenRecordInSidePanel.test.tsx @@ -20,6 +20,7 @@ import { getJestMetadataAndApolloMocksAndCommandMenuWrapper } from '~/testing/je import { getTestEnrichedObjectMetadataItemsMock } from '~/testing/utils/getTestEnrichedObjectMetadataItemsMock'; jest.mock('uuid', () => ({ + ...jest.requireActual('uuid'), v4: jest.fn().mockReturnValue('mocked-uuid'), })); diff --git a/packages/twenty-front/src/modules/ui/feedback/dialog-manager/hooks/__tests__/useDialogManager.test.tsx b/packages/twenty-front/src/modules/ui/feedback/dialog-manager/hooks/__tests__/useDialogManager.test.tsx index 5140067a8d..ea0bed8842 100644 --- a/packages/twenty-front/src/modules/ui/feedback/dialog-manager/hooks/__tests__/useDialogManager.test.tsx +++ b/packages/twenty-front/src/modules/ui/feedback/dialog-manager/hooks/__tests__/useDialogManager.test.tsx @@ -13,7 +13,10 @@ import { } from '@/ui/utilities/state/jotai/jotaiStore'; const mockedUuid = 'mocked-uuid'; -jest.mock('uuid'); +jest.mock('uuid', () => ({ + ...jest.requireActual('uuid'), + v4: jest.fn(), +})); (uuidv4 as jest.Mock).mockReturnValue(mockedUuid); diff --git a/packages/twenty-front/src/modules/workflow/workflow-diagram/utils/__tests__/generateWorkflowRunDiagram.test.ts b/packages/twenty-front/src/modules/workflow/workflow-diagram/utils/__tests__/generateWorkflowRunDiagram.test.ts index 007c9dd6c0..f70e68d124 100644 --- a/packages/twenty-front/src/modules/workflow/workflow-diagram/utils/__tests__/generateWorkflowRunDiagram.test.ts +++ b/packages/twenty-front/src/modules/workflow/workflow-diagram/utils/__tests__/generateWorkflowRunDiagram.test.ts @@ -7,7 +7,10 @@ import { FieldMetadataType } from 'twenty-shared/types'; import { StepStatus, type WorkflowRunStepInfos } from 'twenty-shared/workflow'; import { v4 as uuidv4 } from 'uuid'; -jest.mock('uuid'); +jest.mock('uuid', () => ({ + ...jest.requireActual('uuid'), + v4: jest.fn(), +})); beforeEach(() => { let counter = 0; diff --git a/packages/twenty-front/src/modules/workflow/workflow-diagram/utils/__tests__/getWorkflowVersionDiagram.test.ts b/packages/twenty-front/src/modules/workflow/workflow-diagram/utils/__tests__/getWorkflowVersionDiagram.test.ts index 9e61ffb6c0..54a15986dc 100644 --- a/packages/twenty-front/src/modules/workflow/workflow-diagram/utils/__tests__/getWorkflowVersionDiagram.test.ts +++ b/packages/twenty-front/src/modules/workflow/workflow-diagram/utils/__tests__/getWorkflowVersionDiagram.test.ts @@ -1,7 +1,10 @@ import { getWorkflowVersionDiagram } from '@/workflow/workflow-diagram/utils/getWorkflowVersionDiagram'; import { v4 as uuidv4 } from 'uuid'; -jest.mock('uuid'); +jest.mock('uuid', () => ({ + ...jest.requireActual('uuid'), + v4: jest.fn(), +})); beforeEach(() => { let counter = 0; diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/hooks/__tests__/useCreateStep.test.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/hooks/__tests__/useCreateStep.test.tsx index 9390d5c16f..15dec13d5e 100644 --- a/packages/twenty-front/src/modules/workflow/workflow-steps/hooks/__tests__/useCreateStep.test.tsx +++ b/packages/twenty-front/src/modules/workflow/workflow-steps/hooks/__tests__/useCreateStep.test.tsx @@ -32,7 +32,10 @@ jest.mock('@/workflow/hooks/useGetUpdatableWorkflowVersionOrThrow', () => ({ }), })); -jest.mock('uuid', () => ({ v4: () => 'step-id' })); +jest.mock('uuid', () => ({ + ...jest.requireActual('uuid'), + v4: () => 'step-id', +})); const wrapper = ({ children }: { children: React.ReactNode }) => { const workflowVisualizerComponentInstanceId = diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/form-action/utils/__tests__/getDefaultFormFieldSettings.test.ts b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/form-action/utils/__tests__/getDefaultFormFieldSettings.test.ts index 72fa2a6445..010080f6c0 100644 --- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/form-action/utils/__tests__/getDefaultFormFieldSettings.test.ts +++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/form-action/utils/__tests__/getDefaultFormFieldSettings.test.ts @@ -3,6 +3,7 @@ import { v4 } from 'uuid'; import { getDefaultFormFieldSettings } from '@/workflow/workflow-steps/workflow-actions/form-action/utils/getDefaultFormFieldSettings'; jest.mock('uuid', () => ({ + ...jest.requireActual('uuid'), v4: jest.fn(() => 'test-uuid-123'), })); diff --git a/packages/twenty-sdk/src/cli/__tests__/apps/minimal-app/__integration__/app-dev/expected-manifest.ts b/packages/twenty-sdk/src/cli/__tests__/apps/minimal-app/__integration__/app-dev/expected-manifest.ts index 1da69c1e3c..4352c8f69d 100644 --- a/packages/twenty-sdk/src/cli/__tests__/apps/minimal-app/__integration__/app-dev/expected-manifest.ts +++ b/packages/twenty-sdk/src/cli/__tests__/apps/minimal-app/__integration__/app-dev/expected-manifest.ts @@ -33,10 +33,10 @@ export const EXPECTED_MANIFEST: Manifest = { onDelete: RelationOnDeleteAction.SET_NULL, joinColumnName: 'targetMyNoteId', }, - universalIdentifier: '7e28b1ea-9a94-5d36-bc03-3f12f476867a', + universalIdentifier: '55153e55-1bdc-590d-8fb1-40eafec88ef0', objectUniversalIdentifier: '20202020-6736-4337-b5c4-8b39fae325a5', relationTargetFieldMetadataUniversalIdentifier: - '12c84c1c-6e3f-54c5-a9a8-e93c7b46ac35', + '559713af-d9c0-5894-a972-9a3951661a2b', relationTargetObjectMetadataUniversalIdentifier: 'e1e2e3e4-e5e6-4000-8000-000000000030', type: FieldMetadataType.MORPH_RELATION, @@ -53,10 +53,10 @@ export const EXPECTED_MANIFEST: Manifest = { onDelete: RelationOnDeleteAction.SET_NULL, joinColumnName: 'targetMyNoteId', }, - universalIdentifier: '721b12d8-7a3d-5e13-b8d5-62b3ad8cb8b5', + universalIdentifier: '80596d88-f896-5108-8cff-302a2eb61668', objectUniversalIdentifier: '20202020-bd3d-4c60-8dca-571c71d4447a', relationTargetFieldMetadataUniversalIdentifier: - '56a872c8-7a1e-563d-8772-3978c2c5c220', + '8f8e42e3-77de-5b0a-b444-d96b6d3c7600', relationTargetObjectMetadataUniversalIdentifier: 'e1e2e3e4-e5e6-4000-8000-000000000030', type: FieldMetadataType.MORPH_RELATION, @@ -73,10 +73,10 @@ export const EXPECTED_MANIFEST: Manifest = { onDelete: RelationOnDeleteAction.SET_NULL, joinColumnName: 'targetMyNoteId', }, - universalIdentifier: '94b6f269-fc9a-5bcd-af5b-2bdac69f276b', + universalIdentifier: '67bf90bd-f3d0-58ce-a96e-648364249812', objectUniversalIdentifier: '20202020-fff0-4b44-be82-bda313884400', relationTargetFieldMetadataUniversalIdentifier: - '011595e8-7524-5ec7-9fbc-4bd3c42d7d24', + '0cbc9a5c-34b2-5d39-97a2-878662cb13d5', relationTargetObjectMetadataUniversalIdentifier: 'e1e2e3e4-e5e6-4000-8000-000000000030', type: FieldMetadataType.MORPH_RELATION, @@ -93,10 +93,10 @@ export const EXPECTED_MANIFEST: Manifest = { onDelete: RelationOnDeleteAction.SET_NULL, joinColumnName: 'targetMyNoteId', }, - universalIdentifier: '50da3cfa-dea5-5c9b-b1b7-cb615e1df4c3', + universalIdentifier: '2689365b-e6ce-5b14-a2b5-6daafbfe91f8', objectUniversalIdentifier: '20202020-5a9a-44e8-95df-771cd06d0fb1', relationTargetFieldMetadataUniversalIdentifier: - 'dd734fa3-26c3-53dd-91aa-577c313e1fa4', + 'affdd37c-4460-53fc-998b-ffb04bb3a470', relationTargetObjectMetadataUniversalIdentifier: 'e1e2e3e4-e5e6-4000-8000-000000000030', type: FieldMetadataType.MORPH_RELATION, @@ -129,7 +129,7 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Id', name: 'id', type: FieldMetadataType.UUID, - universalIdentifier: '5bdb4f57-a349-56d0-b421-845fd55b3026', + universalIdentifier: 'a717a3ba-e257-5269-95c4-1b8ca4cb8bcf', }, { defaultValue: null, @@ -139,7 +139,7 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Name', name: 'name', type: FieldMetadataType.TEXT, - universalIdentifier: '86cc7b06-26de-5b7b-bf4a-31fa246dfd90', + universalIdentifier: '9a7f457a-6c15-581e-8f28-e2c680f75f97', }, { defaultValue: 'now', @@ -149,7 +149,7 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Creation date', name: 'createdAt', type: FieldMetadataType.DATE_TIME, - universalIdentifier: 'abe3bc69-1a51-5814-a722-74f5a025e92a', + universalIdentifier: 'f24a236a-e36a-5bab-91db-d43e3f4b8247', }, { defaultValue: 'now', @@ -159,7 +159,7 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Last update', name: 'updatedAt', type: FieldMetadataType.DATE_TIME, - universalIdentifier: 'c296d408-9720-5a86-8586-3490fbf04b86', + universalIdentifier: '875c1f2e-19f0-5200-96ba-ac1cb4c1fd33', }, { defaultValue: null, @@ -169,7 +169,7 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Deleted at', name: 'deletedAt', type: FieldMetadataType.DATE_TIME, - universalIdentifier: '488333a2-f4ff-5790-88ef-21f07f8f1985', + universalIdentifier: 'cc58b328-40e1-5087-b550-ad700e53490b', }, { defaultValue: { @@ -182,7 +182,7 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Created by', name: 'createdBy', type: FieldMetadataType.ACTOR, - universalIdentifier: 'fba6e01b-6579-554e-ad64-a676003c8e68', + universalIdentifier: '6f34f940-966a-52c2-a8f2-f2f04115d88e', }, { defaultValue: { @@ -195,7 +195,7 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Updated by', name: 'updatedBy', type: FieldMetadataType.ACTOR, - universalIdentifier: 'fa60f87d-15c8-5ff7-9da0-191fa14a922f', + universalIdentifier: '37515dfb-8ae0-5326-a391-9e66205f6530', }, { defaultValue: 0, @@ -205,7 +205,7 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Position', name: 'position', type: FieldMetadataType.POSITION, - universalIdentifier: '4a5d7791-ddc9-53ee-bc46-699da7373290', + universalIdentifier: 'a418b503-74d0-500d-b4c0-75f364394e20', }, { defaultValue: null, @@ -215,7 +215,7 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Search vector', name: 'searchVector', type: FieldMetadataType.TS_VECTOR, - universalIdentifier: '0f00bc3b-f313-5206-8496-842af20a538a', + universalIdentifier: '45718beb-e0d7-5bde-811c-29ff01b0fcfd', }, { name: 'timelineActivities', @@ -227,9 +227,9 @@ export const EXPECTED_MANIFEST: Manifest = { universalSettings: { relationType: RelationType.ONE_TO_MANY, }, - universalIdentifier: '12c84c1c-6e3f-54c5-a9a8-e93c7b46ac35', + universalIdentifier: '559713af-d9c0-5894-a972-9a3951661a2b', relationTargetFieldMetadataUniversalIdentifier: - '7e28b1ea-9a94-5d36-bc03-3f12f476867a', + '55153e55-1bdc-590d-8fb1-40eafec88ef0', relationTargetObjectMetadataUniversalIdentifier: '20202020-6736-4337-b5c4-8b39fae325a5', }, @@ -243,9 +243,9 @@ export const EXPECTED_MANIFEST: Manifest = { universalSettings: { relationType: RelationType.ONE_TO_MANY, }, - universalIdentifier: '56a872c8-7a1e-563d-8772-3978c2c5c220', + universalIdentifier: '8f8e42e3-77de-5b0a-b444-d96b6d3c7600', relationTargetFieldMetadataUniversalIdentifier: - '721b12d8-7a3d-5e13-b8d5-62b3ad8cb8b5', + '80596d88-f896-5108-8cff-302a2eb61668', relationTargetObjectMetadataUniversalIdentifier: '20202020-bd3d-4c60-8dca-571c71d4447a', }, @@ -259,9 +259,9 @@ export const EXPECTED_MANIFEST: Manifest = { universalSettings: { relationType: RelationType.ONE_TO_MANY, }, - universalIdentifier: '011595e8-7524-5ec7-9fbc-4bd3c42d7d24', + universalIdentifier: '0cbc9a5c-34b2-5d39-97a2-878662cb13d5', relationTargetFieldMetadataUniversalIdentifier: - '94b6f269-fc9a-5bcd-af5b-2bdac69f276b', + '67bf90bd-f3d0-58ce-a96e-648364249812', relationTargetObjectMetadataUniversalIdentifier: '20202020-fff0-4b44-be82-bda313884400', }, @@ -275,9 +275,9 @@ export const EXPECTED_MANIFEST: Manifest = { universalSettings: { relationType: RelationType.ONE_TO_MANY, }, - universalIdentifier: 'dd734fa3-26c3-53dd-91aa-577c313e1fa4', + universalIdentifier: 'affdd37c-4460-53fc-998b-ffb04bb3a470', relationTargetFieldMetadataUniversalIdentifier: - '50da3cfa-dea5-5c9b-b1b7-cb615e1df4c3', + '2689365b-e6ce-5b14-a2b5-6daafbfe91f8', relationTargetObjectMetadataUniversalIdentifier: '20202020-5a9a-44e8-95df-771cd06d0fb1', }, diff --git a/packages/twenty-sdk/src/cli/__tests__/apps/rich-app/__integration__/app-dev/expected-manifest.ts b/packages/twenty-sdk/src/cli/__tests__/apps/rich-app/__integration__/app-dev/expected-manifest.ts index 526b0008ed..ecf18135fc 100644 --- a/packages/twenty-sdk/src/cli/__tests__/apps/rich-app/__integration__/app-dev/expected-manifest.ts +++ b/packages/twenty-sdk/src/cli/__tests__/apps/rich-app/__integration__/app-dev/expected-manifest.ts @@ -292,11 +292,11 @@ export const EXPECTED_MANIFEST: Manifest = { name: 'targetRootNote', objectUniversalIdentifier: '20202020-6736-4337-b5c4-8b39fae325a5', relationTargetFieldMetadataUniversalIdentifier: - '1cdb0b3a-0ae1-59f6-b3f0-59ff99e40525', + 'e1478d59-c947-5926-af8b-4b2f0f842c91', relationTargetObjectMetadataUniversalIdentifier: 'b0b1b2b3-b4b5-4000-8000-000000000001', type: FieldType.MORPH_RELATION, - universalIdentifier: 'a0f6ffdc-a570-58a6-973d-a9bc9a527de8', + universalIdentifier: '7f891268-9376-5d00-b8ec-bc32a023154d', universalSettings: { joinColumnName: 'targetRootNoteId', onDelete: RelationOnDeleteAction.SET_NULL, @@ -312,11 +312,11 @@ export const EXPECTED_MANIFEST: Manifest = { name: 'targetRootNote', objectUniversalIdentifier: '20202020-bd3d-4c60-8dca-571c71d4447a', relationTargetFieldMetadataUniversalIdentifier: - 'aa05ee89-bd8a-5911-a4d5-3355926186bc', + '34a6b8e9-0187-57e1-86c1-41bacf1b2479', relationTargetObjectMetadataUniversalIdentifier: 'b0b1b2b3-b4b5-4000-8000-000000000001', type: FieldType.MORPH_RELATION, - universalIdentifier: '95cad10a-bff6-524d-b6d8-dbc6db7cbf18', + universalIdentifier: 'd72bb002-9952-5651-983e-649436949113', universalSettings: { joinColumnName: 'targetRootNoteId', onDelete: RelationOnDeleteAction.SET_NULL, @@ -332,11 +332,11 @@ export const EXPECTED_MANIFEST: Manifest = { name: 'targetRootNote', objectUniversalIdentifier: '20202020-fff0-4b44-be82-bda313884400', relationTargetFieldMetadataUniversalIdentifier: - '762ad37e-d624-51d8-989c-3a119eef9e7f', + '7a62bbd6-e697-54b0-8c1c-163ac47c0305', relationTargetObjectMetadataUniversalIdentifier: 'b0b1b2b3-b4b5-4000-8000-000000000001', type: FieldType.MORPH_RELATION, - universalIdentifier: 'c327faff-76eb-5baf-8b35-1c31e57306fb', + universalIdentifier: '61252ad6-2311-5054-ae51-b318dfd5fbd8', universalSettings: { joinColumnName: 'targetRootNoteId', onDelete: RelationOnDeleteAction.SET_NULL, @@ -352,11 +352,11 @@ export const EXPECTED_MANIFEST: Manifest = { name: 'targetRootNote', objectUniversalIdentifier: '20202020-5a9a-44e8-95df-771cd06d0fb1', relationTargetFieldMetadataUniversalIdentifier: - 'd4f1b0c8-8cd9-581e-9bf9-917f8c918d76', + '10c1af7e-e541-56bc-b5b3-d0297df3e23d', relationTargetObjectMetadataUniversalIdentifier: 'b0b1b2b3-b4b5-4000-8000-000000000001', type: FieldType.MORPH_RELATION, - universalIdentifier: '36843050-e6e3-5759-99b6-e975426bad73', + universalIdentifier: '2f4f3d69-b78e-5465-9e87-17059959fca8', universalSettings: { joinColumnName: 'targetRootNoteId', onDelete: RelationOnDeleteAction.SET_NULL, @@ -480,11 +480,11 @@ export const EXPECTED_MANIFEST: Manifest = { name: 'targetPostCardRecipient', objectUniversalIdentifier: '20202020-6736-4337-b5c4-8b39fae325a5', relationTargetFieldMetadataUniversalIdentifier: - '02f5efba-4f94-5cc3-9e17-ca7b1fe5f71b', + '8f95b434-ee92-5c0f-95de-9d489af4d40c', relationTargetObjectMetadataUniversalIdentifier: 'e1a2b3c4-5e6f-4a7b-8c9d-0e1f2a3b4c5e', type: FieldType.MORPH_RELATION, - universalIdentifier: '18b6354d-8b0f-5be6-9473-d635aed670a1', + universalIdentifier: 'a865f403-3843-5850-9a60-04e832220954', universalSettings: { joinColumnName: 'targetPostCardRecipientId', onDelete: RelationOnDeleteAction.SET_NULL, @@ -500,11 +500,11 @@ export const EXPECTED_MANIFEST: Manifest = { name: 'targetPostCardRecipient', objectUniversalIdentifier: '20202020-bd3d-4c60-8dca-571c71d4447a', relationTargetFieldMetadataUniversalIdentifier: - '82497ec7-0121-53d6-9518-ae7434ceaf8b', + '0c20df83-8cef-5cd6-9752-b98fb7780904', relationTargetObjectMetadataUniversalIdentifier: 'e1a2b3c4-5e6f-4a7b-8c9d-0e1f2a3b4c5e', type: FieldType.MORPH_RELATION, - universalIdentifier: 'ba74dfd1-e7ee-502d-abad-82e14d595874', + universalIdentifier: '501c46b7-7140-59a0-b703-9844bbcb34b9', universalSettings: { joinColumnName: 'targetPostCardRecipientId', onDelete: RelationOnDeleteAction.SET_NULL, @@ -520,11 +520,11 @@ export const EXPECTED_MANIFEST: Manifest = { name: 'targetPostCardRecipient', objectUniversalIdentifier: '20202020-fff0-4b44-be82-bda313884400', relationTargetFieldMetadataUniversalIdentifier: - '6de8b57e-ed0a-5d35-bd39-bd8874445810', + 'b9642a90-2df5-555b-ab83-23cdce7a4142', relationTargetObjectMetadataUniversalIdentifier: 'e1a2b3c4-5e6f-4a7b-8c9d-0e1f2a3b4c5e', type: FieldType.MORPH_RELATION, - universalIdentifier: '9d5a9f4b-5431-5b90-810a-1e9d8873b302', + universalIdentifier: '721418ff-1b53-58ef-8dd7-b58927c085c6', universalSettings: { joinColumnName: 'targetPostCardRecipientId', onDelete: RelationOnDeleteAction.SET_NULL, @@ -540,11 +540,11 @@ export const EXPECTED_MANIFEST: Manifest = { name: 'targetPostCardRecipient', objectUniversalIdentifier: '20202020-5a9a-44e8-95df-771cd06d0fb1', relationTargetFieldMetadataUniversalIdentifier: - '00459e7e-8ef1-5a9b-b180-26bbb54a2696', + 'd938a2d0-1279-5c48-b758-ac52f9460a76', relationTargetObjectMetadataUniversalIdentifier: 'e1a2b3c4-5e6f-4a7b-8c9d-0e1f2a3b4c5e', type: FieldType.MORPH_RELATION, - universalIdentifier: '85353e69-1e70-51ef-91c3-334d85013a4b', + universalIdentifier: 'feeba797-7ebb-5a36-91cd-7279ff92a2b6', universalSettings: { joinColumnName: 'targetPostCardRecipientId', onDelete: RelationOnDeleteAction.SET_NULL, @@ -561,11 +561,11 @@ export const EXPECTED_MANIFEST: Manifest = { name: 'targetPostCard', objectUniversalIdentifier: '20202020-6736-4337-b5c4-8b39fae325a5', relationTargetFieldMetadataUniversalIdentifier: - '3f8c70b5-abb0-51ec-9109-0a94ce9c04a6', + '9e58820c-78d7-539d-807c-d84362e1eab6', relationTargetObjectMetadataUniversalIdentifier: '54b589ca-eeed-4950-a176-358418b85c05', type: FieldType.MORPH_RELATION, - universalIdentifier: '1bdc52a0-0339-5360-ba17-b615250ef730', + universalIdentifier: '47d21bb5-075f-5ed4-ba89-c0e7322a57cd', universalSettings: { joinColumnName: 'targetPostCardId', onDelete: RelationOnDeleteAction.SET_NULL, @@ -581,11 +581,11 @@ export const EXPECTED_MANIFEST: Manifest = { name: 'targetPostCard', objectUniversalIdentifier: '20202020-bd3d-4c60-8dca-571c71d4447a', relationTargetFieldMetadataUniversalIdentifier: - '547c93e4-c9e7-5880-b251-46230fb59bfa', + '3f0d38c8-a50f-51c7-bdcb-84a715f4b92d', relationTargetObjectMetadataUniversalIdentifier: '54b589ca-eeed-4950-a176-358418b85c05', type: FieldType.MORPH_RELATION, - universalIdentifier: 'fecb8484-7e3c-59f8-a5ef-30882c5c1904', + universalIdentifier: '4d3cf1bd-d87d-5325-8fbc-19f72c252050', universalSettings: { joinColumnName: 'targetPostCardId', onDelete: RelationOnDeleteAction.SET_NULL, @@ -601,11 +601,11 @@ export const EXPECTED_MANIFEST: Manifest = { name: 'targetPostCard', objectUniversalIdentifier: '20202020-fff0-4b44-be82-bda313884400', relationTargetFieldMetadataUniversalIdentifier: - '47deea5c-8559-5ae7-991a-60c9f7102f86', + 'def1f10a-847b-574e-a0a2-177caf02129c', relationTargetObjectMetadataUniversalIdentifier: '54b589ca-eeed-4950-a176-358418b85c05', type: FieldType.MORPH_RELATION, - universalIdentifier: 'ca687361-ac2b-5722-9ad9-cd37427d087a', + universalIdentifier: 'bc1f9abe-e27b-574a-9290-a1c9c8255a6b', universalSettings: { joinColumnName: 'targetPostCardId', onDelete: RelationOnDeleteAction.SET_NULL, @@ -621,11 +621,11 @@ export const EXPECTED_MANIFEST: Manifest = { name: 'targetPostCard', objectUniversalIdentifier: '20202020-5a9a-44e8-95df-771cd06d0fb1', relationTargetFieldMetadataUniversalIdentifier: - 'ecdccc0d-7c31-5126-89d5-0bdf3372257c', + 'b1238c2d-bc9c-53d6-8bee-eb045b9b9086', relationTargetObjectMetadataUniversalIdentifier: '54b589ca-eeed-4950-a176-358418b85c05', type: FieldType.MORPH_RELATION, - universalIdentifier: '17058c96-d5a4-53b1-96ca-786f8c5fc8bd', + universalIdentifier: 'fb610de1-db20-5e78-8e4a-7630e57148eb', universalSettings: { joinColumnName: 'targetPostCardId', onDelete: RelationOnDeleteAction.SET_NULL, @@ -642,11 +642,11 @@ export const EXPECTED_MANIFEST: Manifest = { name: 'targetRecipient', objectUniversalIdentifier: '20202020-6736-4337-b5c4-8b39fae325a5', relationTargetFieldMetadataUniversalIdentifier: - '51d6d2d7-2fa8-5f77-b6cf-a96dbb801fa5', + '1118dd8a-9781-5254-b625-2d0f05eb46fe', relationTargetObjectMetadataUniversalIdentifier: 'd1a2b3c4-5e6f-4a7b-8c9d-0e1f2a3b4c5d', type: FieldType.MORPH_RELATION, - universalIdentifier: 'b01f6937-4859-587b-b3df-92e0a6f65e93', + universalIdentifier: '1ce06ca1-6e9a-53ce-9888-9152b1b2b628', universalSettings: { joinColumnName: 'targetRecipientId', onDelete: RelationOnDeleteAction.SET_NULL, @@ -662,11 +662,11 @@ export const EXPECTED_MANIFEST: Manifest = { name: 'targetRecipient', objectUniversalIdentifier: '20202020-bd3d-4c60-8dca-571c71d4447a', relationTargetFieldMetadataUniversalIdentifier: - '244a7841-9e45-5ed1-a830-83e73c1f13fa', + '15714c1a-d354-5407-8a15-25c117d605f8', relationTargetObjectMetadataUniversalIdentifier: 'd1a2b3c4-5e6f-4a7b-8c9d-0e1f2a3b4c5d', type: FieldType.MORPH_RELATION, - universalIdentifier: '9c87e1b8-74a2-5833-9237-281d561d2a7d', + universalIdentifier: '2081700d-7ce6-5698-a7da-a013feda0eb6', universalSettings: { joinColumnName: 'targetRecipientId', onDelete: RelationOnDeleteAction.SET_NULL, @@ -682,11 +682,11 @@ export const EXPECTED_MANIFEST: Manifest = { name: 'targetRecipient', objectUniversalIdentifier: '20202020-fff0-4b44-be82-bda313884400', relationTargetFieldMetadataUniversalIdentifier: - 'eab71eb1-b457-555a-8a2b-f292cef1671d', + '167f6de7-835e-51e1-b751-34055eef6aa5', relationTargetObjectMetadataUniversalIdentifier: 'd1a2b3c4-5e6f-4a7b-8c9d-0e1f2a3b4c5d', type: FieldType.MORPH_RELATION, - universalIdentifier: '23508618-7ed8-519e-9fee-a57b94dc98e9', + universalIdentifier: 'a93c479c-6206-5714-94ce-affa6e9886aa', universalSettings: { joinColumnName: 'targetRecipientId', onDelete: RelationOnDeleteAction.SET_NULL, @@ -702,11 +702,11 @@ export const EXPECTED_MANIFEST: Manifest = { name: 'targetRecipient', objectUniversalIdentifier: '20202020-5a9a-44e8-95df-771cd06d0fb1', relationTargetFieldMetadataUniversalIdentifier: - '305f1890-04ba-5101-b18f-a1ca25a1d8a7', + 'd0db1844-4fde-5a5a-b037-ebeabd4467af', relationTargetObjectMetadataUniversalIdentifier: 'd1a2b3c4-5e6f-4a7b-8c9d-0e1f2a3b4c5d', type: FieldType.MORPH_RELATION, - universalIdentifier: '20500ff3-2410-5bfc-b2e7-804785c07770', + universalIdentifier: '45752445-c4b6-5e80-8aa1-f5321a838b43', universalSettings: { joinColumnName: 'targetRecipientId', onDelete: RelationOnDeleteAction.SET_NULL, @@ -749,7 +749,7 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Id', name: 'id', type: FieldMetadataType.UUID, - universalIdentifier: 'b5830f92-1abe-5ae7-b689-7821dda00b15', + universalIdentifier: 'a4429f96-5745-511a-b246-67da9f920452', }, { defaultValue: null, @@ -759,7 +759,7 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Name', name: 'name', type: FieldMetadataType.TEXT, - universalIdentifier: 'ae2b2e5a-6c8b-5324-b639-8f17e3bc0420', + universalIdentifier: '10452ca3-30cb-56fa-9e58-73f7b1c9fd65', }, { defaultValue: 'now', @@ -769,7 +769,7 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Creation date', name: 'createdAt', type: FieldMetadataType.DATE_TIME, - universalIdentifier: '7c84a501-41a6-531e-bc5e-8062843f6cba', + universalIdentifier: '777fa853-2198-5623-96f3-119ef5707ad3', }, { defaultValue: 'now', @@ -779,7 +779,7 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Last update', name: 'updatedAt', type: FieldMetadataType.DATE_TIME, - universalIdentifier: '72c2903a-91c9-5f36-8668-b53b083ae4cf', + universalIdentifier: 'e1715fe9-34e1-572c-b62c-f39d737a17df', }, { defaultValue: null, @@ -789,7 +789,7 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Deleted at', name: 'deletedAt', type: FieldMetadataType.DATE_TIME, - universalIdentifier: '007f5d8e-d376-519e-bd07-aea41a53f7d9', + universalIdentifier: 'e3b13370-7241-55f1-ab9a-346b57bf4dcf', }, { defaultValue: { @@ -802,7 +802,7 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Created by', name: 'createdBy', type: FieldMetadataType.ACTOR, - universalIdentifier: '44053354-0d8b-5d66-bfa8-7e7d221de3db', + universalIdentifier: 'd2e3e238-9bfd-5845-9fe8-3e58df09f246', }, { defaultValue: { @@ -815,7 +815,7 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Updated by', name: 'updatedBy', type: FieldMetadataType.ACTOR, - universalIdentifier: '38e2c671-cbf5-5773-a04a-e5a2d6c323c8', + universalIdentifier: '690003ae-f649-537e-b124-d21ef0ee86a1', }, { defaultValue: 0, @@ -825,7 +825,7 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Position', name: 'position', type: FieldMetadataType.POSITION, - universalIdentifier: '3b56cdea-cf85-51d4-a7a0-cd701f76141a', + universalIdentifier: '4b6d383d-4e84-592e-b1ae-30ae27139302', }, { defaultValue: null, @@ -835,7 +835,7 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Search vector', name: 'searchVector', type: FieldMetadataType.TS_VECTOR, - universalIdentifier: '7c6d88f5-a348-51dd-8d0b-74a17e626754', + universalIdentifier: 'a92d59aa-23a1-5191-b840-933183c14846', }, { description: 'Root notes tied to the RootNote', @@ -844,11 +844,11 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Timeline Activities', name: 'timelineActivities', relationTargetFieldMetadataUniversalIdentifier: - 'a0f6ffdc-a570-58a6-973d-a9bc9a527de8', + '7f891268-9376-5d00-b8ec-bc32a023154d', relationTargetObjectMetadataUniversalIdentifier: '20202020-6736-4337-b5c4-8b39fae325a5', type: FieldType.RELATION, - universalIdentifier: '1cdb0b3a-0ae1-59f6-b3f0-59ff99e40525', + universalIdentifier: 'e1478d59-c947-5926-af8b-4b2f0f842c91', universalSettings: { relationType: RelationType.ONE_TO_MANY, }, @@ -860,11 +860,11 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Attachments', name: 'attachments', relationTargetFieldMetadataUniversalIdentifier: - '95cad10a-bff6-524d-b6d8-dbc6db7cbf18', + 'd72bb002-9952-5651-983e-649436949113', relationTargetObjectMetadataUniversalIdentifier: '20202020-bd3d-4c60-8dca-571c71d4447a', type: FieldType.RELATION, - universalIdentifier: 'aa05ee89-bd8a-5911-a4d5-3355926186bc', + universalIdentifier: '34a6b8e9-0187-57e1-86c1-41bacf1b2479', universalSettings: { relationType: RelationType.ONE_TO_MANY, }, @@ -876,11 +876,11 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Note Targets', name: 'noteTargets', relationTargetFieldMetadataUniversalIdentifier: - 'c327faff-76eb-5baf-8b35-1c31e57306fb', + '61252ad6-2311-5054-ae51-b318dfd5fbd8', relationTargetObjectMetadataUniversalIdentifier: '20202020-fff0-4b44-be82-bda313884400', type: FieldType.RELATION, - universalIdentifier: '762ad37e-d624-51d8-989c-3a119eef9e7f', + universalIdentifier: '7a62bbd6-e697-54b0-8c1c-163ac47c0305', universalSettings: { relationType: RelationType.ONE_TO_MANY, }, @@ -892,11 +892,11 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Task Targets', name: 'taskTargets', relationTargetFieldMetadataUniversalIdentifier: - '36843050-e6e3-5759-99b6-e975426bad73', + '2f4f3d69-b78e-5465-9e87-17059959fca8', relationTargetObjectMetadataUniversalIdentifier: '20202020-5a9a-44e8-95df-771cd06d0fb1', type: FieldType.RELATION, - universalIdentifier: 'd4f1b0c8-8cd9-581e-9bf9-917f8c918d76', + universalIdentifier: '10c1af7e-e541-56bc-b5b3-d0297df3e23d', universalSettings: { relationType: RelationType.ONE_TO_MANY, }, @@ -931,7 +931,7 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Id', name: 'id', type: FieldMetadataType.UUID, - universalIdentifier: '2809d745-deb3-5ac0-8328-ea6256ec22b3', + universalIdentifier: 'fe2cec74-a43b-5910-8dd6-7a737fb869ae', }, { defaultValue: null, @@ -941,7 +941,7 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Name', name: 'name', type: FieldMetadataType.TEXT, - universalIdentifier: 'a6ee6cc8-b9a0-5e23-a39e-bc3fee2aa3d3', + universalIdentifier: 'f485cd3a-4c55-5b8f-b926-a83e5e6ba651', }, { defaultValue: 'now', @@ -951,7 +951,7 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Creation date', name: 'createdAt', type: FieldMetadataType.DATE_TIME, - universalIdentifier: '87ad23b6-b04e-5dc1-9907-c1eca54ea6d6', + universalIdentifier: '729b0d02-9030-5440-bd4e-f34b46d5d031', }, { defaultValue: 'now', @@ -961,7 +961,7 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Last update', name: 'updatedAt', type: FieldMetadataType.DATE_TIME, - universalIdentifier: '6d7523dc-c097-5b75-96eb-37502d09cc19', + universalIdentifier: '42381c24-6337-5654-8c44-6649fc6b06a8', }, { defaultValue: null, @@ -971,7 +971,7 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Deleted at', name: 'deletedAt', type: FieldMetadataType.DATE_TIME, - universalIdentifier: 'bd4fe2fa-373a-5fdd-ba09-cb5435781e4c', + universalIdentifier: '5117f25c-d3a2-533b-b3d6-39a424e88d2a', }, { defaultValue: { @@ -984,7 +984,7 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Created by', name: 'createdBy', type: FieldMetadataType.ACTOR, - universalIdentifier: 'c5026f20-ab7a-54e0-900e-37a2d5381aee', + universalIdentifier: '48df9616-8671-522f-87c7-efcd3f2e2604', }, { defaultValue: { @@ -997,7 +997,7 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Updated by', name: 'updatedBy', type: FieldMetadataType.ACTOR, - universalIdentifier: '1dd75ff5-5fd0-51df-b3a3-a12e3aff30df', + universalIdentifier: '5c8eb640-8c91-5712-8b73-85ce5e71abb9', }, { defaultValue: 0, @@ -1007,7 +1007,7 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Position', name: 'position', type: FieldMetadataType.POSITION, - universalIdentifier: '6c5e91f5-e323-555b-84e0-5a1dd7f36b1b', + universalIdentifier: '5a5800dd-743f-533d-ad5c-f983a4bb6324', }, { defaultValue: null, @@ -1017,7 +1017,7 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Search vector', name: 'searchVector', type: FieldMetadataType.TS_VECTOR, - universalIdentifier: '9fa18b19-41b6-5082-b3e2-4e73f7461164', + universalIdentifier: 'c4d0beaf-9035-514b-977c-5059b544c1bb', }, { description: 'Post Card Recipients tied to the PostCardRecipient', @@ -1026,11 +1026,11 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Timeline Activities', name: 'timelineActivities', relationTargetFieldMetadataUniversalIdentifier: - '18b6354d-8b0f-5be6-9473-d635aed670a1', + 'a865f403-3843-5850-9a60-04e832220954', relationTargetObjectMetadataUniversalIdentifier: '20202020-6736-4337-b5c4-8b39fae325a5', type: FieldType.RELATION, - universalIdentifier: '02f5efba-4f94-5cc3-9e17-ca7b1fe5f71b', + universalIdentifier: '8f95b434-ee92-5c0f-95de-9d489af4d40c', universalSettings: { relationType: RelationType.ONE_TO_MANY, }, @@ -1042,11 +1042,11 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Attachments', name: 'attachments', relationTargetFieldMetadataUniversalIdentifier: - 'ba74dfd1-e7ee-502d-abad-82e14d595874', + '501c46b7-7140-59a0-b703-9844bbcb34b9', relationTargetObjectMetadataUniversalIdentifier: '20202020-bd3d-4c60-8dca-571c71d4447a', type: FieldType.RELATION, - universalIdentifier: '82497ec7-0121-53d6-9518-ae7434ceaf8b', + universalIdentifier: '0c20df83-8cef-5cd6-9752-b98fb7780904', universalSettings: { relationType: RelationType.ONE_TO_MANY, }, @@ -1058,11 +1058,11 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Note Targets', name: 'noteTargets', relationTargetFieldMetadataUniversalIdentifier: - '9d5a9f4b-5431-5b90-810a-1e9d8873b302', + '721418ff-1b53-58ef-8dd7-b58927c085c6', relationTargetObjectMetadataUniversalIdentifier: '20202020-fff0-4b44-be82-bda313884400', type: FieldType.RELATION, - universalIdentifier: '6de8b57e-ed0a-5d35-bd39-bd8874445810', + universalIdentifier: 'b9642a90-2df5-555b-ab83-23cdce7a4142', universalSettings: { relationType: RelationType.ONE_TO_MANY, }, @@ -1074,11 +1074,11 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Task Targets', name: 'taskTargets', relationTargetFieldMetadataUniversalIdentifier: - '85353e69-1e70-51ef-91c3-334d85013a4b', + 'feeba797-7ebb-5a36-91cd-7279ff92a2b6', relationTargetObjectMetadataUniversalIdentifier: '20202020-5a9a-44e8-95df-771cd06d0fb1', type: FieldType.RELATION, - universalIdentifier: '00459e7e-8ef1-5a9b-b180-26bbb54a2696', + universalIdentifier: 'd938a2d0-1279-5c48-b758-ac52f9460a76', universalSettings: { relationType: RelationType.ONE_TO_MANY, }, @@ -1086,7 +1086,7 @@ export const EXPECTED_MANIFEST: Manifest = { ], icon: 'IconLink', labelIdentifierFieldMetadataUniversalIdentifier: - 'a6ee6cc8-b9a0-5e23-a39e-bc3fee2aa3d3', + 'f485cd3a-4c55-5b8f-b926-a83e5e6ba651', labelPlural: 'Post Card Recipients', labelSingular: 'Post Card Recipient', namePlural: 'postCardRecipients', @@ -1180,7 +1180,7 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Id', name: 'id', type: FieldMetadataType.UUID, - universalIdentifier: '56e652a3-fac2-54fd-a379-f01b72758268', + universalIdentifier: 'e61745a2-969c-53d1-a809-6c583e9192d5', }, { defaultValue: null, @@ -1190,7 +1190,7 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Name', name: 'name', type: FieldMetadataType.TEXT, - universalIdentifier: 'c59a149f-5861-51a3-a924-2bd2fa31daaa', + universalIdentifier: '3e14e30f-8271-5a13-9c1f-ce5edb932325', }, { defaultValue: 'now', @@ -1200,7 +1200,7 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Creation date', name: 'createdAt', type: FieldMetadataType.DATE_TIME, - universalIdentifier: '236e2ec5-3636-5b97-b19d-f7799cb88d99', + universalIdentifier: 'b60eaf02-b008-5ebc-8fe5-123f8e92cc9e', }, { defaultValue: 'now', @@ -1210,7 +1210,7 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Last update', name: 'updatedAt', type: FieldMetadataType.DATE_TIME, - universalIdentifier: '2cf640eb-09a7-52f2-820b-419071c5ec24', + universalIdentifier: 'd76f15e3-e877-5b62-af97-9dac7c71065b', }, { defaultValue: null, @@ -1220,7 +1220,7 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Deleted at', name: 'deletedAt', type: FieldMetadataType.DATE_TIME, - universalIdentifier: '2eb62b4a-6888-58ab-9887-a879321fff31', + universalIdentifier: 'a5ec9b5d-90ed-587e-8a9b-cd9d1ba43116', }, { defaultValue: { @@ -1233,7 +1233,7 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Created by', name: 'createdBy', type: FieldMetadataType.ACTOR, - universalIdentifier: '36e95d21-9c86-5b6f-8133-a66d09fc8952', + universalIdentifier: '4c72ab36-ca4a-5870-b8cc-652385020c45', }, { defaultValue: { @@ -1246,7 +1246,7 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Updated by', name: 'updatedBy', type: FieldMetadataType.ACTOR, - universalIdentifier: 'dc5231a4-e128-57b0-ac9d-723678d9b239', + universalIdentifier: '2f481c85-025c-51cf-bccd-3375d252bf26', }, { defaultValue: 0, @@ -1256,7 +1256,7 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Position', name: 'position', type: FieldMetadataType.POSITION, - universalIdentifier: '3ad26df7-6345-5f85-aac1-2306cf10eaed', + universalIdentifier: 'e1178a62-d1a5-5e9c-b730-9118c640711d', }, { defaultValue: null, @@ -1266,7 +1266,7 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Search vector', name: 'searchVector', type: FieldMetadataType.TS_VECTOR, - universalIdentifier: 'b49b1a1c-2f6b-52a3-836b-ece89c698627', + universalIdentifier: 'e8569449-73b0-5f19-abc0-f6ad06c40341', }, { description: 'Post cards tied to the PostCard', @@ -1275,11 +1275,11 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Timeline Activities', name: 'timelineActivities', relationTargetFieldMetadataUniversalIdentifier: - '1bdc52a0-0339-5360-ba17-b615250ef730', + '47d21bb5-075f-5ed4-ba89-c0e7322a57cd', relationTargetObjectMetadataUniversalIdentifier: '20202020-6736-4337-b5c4-8b39fae325a5', type: FieldType.RELATION, - universalIdentifier: '3f8c70b5-abb0-51ec-9109-0a94ce9c04a6', + universalIdentifier: '9e58820c-78d7-539d-807c-d84362e1eab6', universalSettings: { relationType: RelationType.ONE_TO_MANY, }, @@ -1291,11 +1291,11 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Attachments', name: 'attachments', relationTargetFieldMetadataUniversalIdentifier: - 'fecb8484-7e3c-59f8-a5ef-30882c5c1904', + '4d3cf1bd-d87d-5325-8fbc-19f72c252050', relationTargetObjectMetadataUniversalIdentifier: '20202020-bd3d-4c60-8dca-571c71d4447a', type: FieldType.RELATION, - universalIdentifier: '547c93e4-c9e7-5880-b251-46230fb59bfa', + universalIdentifier: '3f0d38c8-a50f-51c7-bdcb-84a715f4b92d', universalSettings: { relationType: RelationType.ONE_TO_MANY, }, @@ -1307,11 +1307,11 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Note Targets', name: 'noteTargets', relationTargetFieldMetadataUniversalIdentifier: - 'ca687361-ac2b-5722-9ad9-cd37427d087a', + 'bc1f9abe-e27b-574a-9290-a1c9c8255a6b', relationTargetObjectMetadataUniversalIdentifier: '20202020-fff0-4b44-be82-bda313884400', type: FieldType.RELATION, - universalIdentifier: '47deea5c-8559-5ae7-991a-60c9f7102f86', + universalIdentifier: 'def1f10a-847b-574e-a0a2-177caf02129c', universalSettings: { relationType: RelationType.ONE_TO_MANY, }, @@ -1323,11 +1323,11 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Task Targets', name: 'taskTargets', relationTargetFieldMetadataUniversalIdentifier: - '17058c96-d5a4-53b1-96ca-786f8c5fc8bd', + 'fb610de1-db20-5e78-8e4a-7630e57148eb', relationTargetObjectMetadataUniversalIdentifier: '20202020-5a9a-44e8-95df-771cd06d0fb1', type: FieldType.RELATION, - universalIdentifier: 'ecdccc0d-7c31-5126-89d5-0bdf3372257c', + universalIdentifier: 'b1238c2d-bc9c-53d6-8bee-eb045b9b9086', universalSettings: { relationType: RelationType.ONE_TO_MANY, }, @@ -1367,7 +1367,7 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Id', name: 'id', type: FieldMetadataType.UUID, - universalIdentifier: '71aa41d7-54d0-5447-bf98-f37435b62bc4', + universalIdentifier: '6c8d489d-f871-598c-92b7-929b5883ae0f', }, { defaultValue: null, @@ -1377,7 +1377,7 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Name', name: 'name', type: FieldMetadataType.TEXT, - universalIdentifier: 'ff07c707-df79-58fa-91a4-c60c31f90e6e', + universalIdentifier: 'c400ccb8-cd91-5ae1-81e3-2df8b6f2cf53', }, { defaultValue: 'now', @@ -1387,7 +1387,7 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Creation date', name: 'createdAt', type: FieldMetadataType.DATE_TIME, - universalIdentifier: '8dd42a57-7aca-5e60-89c1-6e0e430dad43', + universalIdentifier: '88b7a0a5-f2d2-5dce-89a6-e0f27577dd3f', }, { defaultValue: 'now', @@ -1397,7 +1397,7 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Last update', name: 'updatedAt', type: FieldMetadataType.DATE_TIME, - universalIdentifier: 'a81e915c-f21d-5163-a547-f04029655bf0', + universalIdentifier: '411c5a73-100a-5255-a54d-de20a5c2ae54', }, { defaultValue: null, @@ -1407,7 +1407,7 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Deleted at', name: 'deletedAt', type: FieldMetadataType.DATE_TIME, - universalIdentifier: '33ba5fa8-dbc3-5a08-b0e0-d85b18ff15e0', + universalIdentifier: 'd3d59a1e-2873-594a-a7de-630cde6980a9', }, { defaultValue: { @@ -1420,7 +1420,7 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Created by', name: 'createdBy', type: FieldMetadataType.ACTOR, - universalIdentifier: '7c377262-63b7-5a79-ba54-f7b8acd804dc', + universalIdentifier: 'f358b82e-1254-581e-8629-4fc4302fdbdf', }, { defaultValue: { @@ -1433,7 +1433,7 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Updated by', name: 'updatedBy', type: FieldMetadataType.ACTOR, - universalIdentifier: '8da8e149-b60e-52e2-878d-73d05c8312b2', + universalIdentifier: '8186fca8-89da-5542-99fe-f0ddf90e1fc1', }, { defaultValue: 0, @@ -1443,7 +1443,7 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Position', name: 'position', type: FieldMetadataType.POSITION, - universalIdentifier: '824e930c-ce9f-5267-bebd-f6db215c3c14', + universalIdentifier: '9a81ba2c-e4b2-56f8-a610-015decebd3aa', }, { defaultValue: null, @@ -1453,7 +1453,7 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Search vector', name: 'searchVector', type: FieldMetadataType.TS_VECTOR, - universalIdentifier: '1f5df24b-8248-59cf-8bb6-362de121d2e4', + universalIdentifier: '41eed58f-1016-5483-b3ff-979f270dd9a6', }, { description: 'Recipients tied to the Recipient', @@ -1462,11 +1462,11 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Timeline Activities', name: 'timelineActivities', relationTargetFieldMetadataUniversalIdentifier: - 'b01f6937-4859-587b-b3df-92e0a6f65e93', + '1ce06ca1-6e9a-53ce-9888-9152b1b2b628', relationTargetObjectMetadataUniversalIdentifier: '20202020-6736-4337-b5c4-8b39fae325a5', type: FieldType.RELATION, - universalIdentifier: '51d6d2d7-2fa8-5f77-b6cf-a96dbb801fa5', + universalIdentifier: '1118dd8a-9781-5254-b625-2d0f05eb46fe', universalSettings: { relationType: RelationType.ONE_TO_MANY, }, @@ -1478,11 +1478,11 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Attachments', name: 'attachments', relationTargetFieldMetadataUniversalIdentifier: - '9c87e1b8-74a2-5833-9237-281d561d2a7d', + '2081700d-7ce6-5698-a7da-a013feda0eb6', relationTargetObjectMetadataUniversalIdentifier: '20202020-bd3d-4c60-8dca-571c71d4447a', type: FieldType.RELATION, - universalIdentifier: '244a7841-9e45-5ed1-a830-83e73c1f13fa', + universalIdentifier: '15714c1a-d354-5407-8a15-25c117d605f8', universalSettings: { relationType: RelationType.ONE_TO_MANY, }, @@ -1494,11 +1494,11 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Note Targets', name: 'noteTargets', relationTargetFieldMetadataUniversalIdentifier: - '23508618-7ed8-519e-9fee-a57b94dc98e9', + 'a93c479c-6206-5714-94ce-affa6e9886aa', relationTargetObjectMetadataUniversalIdentifier: '20202020-fff0-4b44-be82-bda313884400', type: FieldType.RELATION, - universalIdentifier: 'eab71eb1-b457-555a-8a2b-f292cef1671d', + universalIdentifier: '167f6de7-835e-51e1-b751-34055eef6aa5', universalSettings: { relationType: RelationType.ONE_TO_MANY, }, @@ -1510,11 +1510,11 @@ export const EXPECTED_MANIFEST: Manifest = { label: 'Task Targets', name: 'taskTargets', relationTargetFieldMetadataUniversalIdentifier: - '20500ff3-2410-5bfc-b2e7-804785c07770', + '45752445-c4b6-5e80-8aa1-f5321a838b43', relationTargetObjectMetadataUniversalIdentifier: '20202020-5a9a-44e8-95df-771cd06d0fb1', type: FieldType.RELATION, - universalIdentifier: '305f1890-04ba-5101-b18f-a1ca25a1d8a7', + universalIdentifier: 'd0db1844-4fde-5a5a-b037-ebeabd4467af', universalSettings: { relationType: RelationType.ONE_TO_MANY, }, @@ -1522,7 +1522,7 @@ export const EXPECTED_MANIFEST: Manifest = { ], icon: 'IconUser', labelIdentifierFieldMetadataUniversalIdentifier: - 'ff07c707-df79-58fa-91a4-c60c31f90e6e', + 'c400ccb8-cd91-5ae1-81e3-2df8b6f2cf53', labelPlural: 'Recipients', labelSingular: 'Recipient', namePlural: 'recipients', diff --git a/packages/twenty-sdk/src/cli/commands/dev/add.ts b/packages/twenty-sdk/src/cli/commands/dev/add.ts index e7010fe00c..cebeb8163f 100644 --- a/packages/twenty-sdk/src/cli/commands/dev/add.ts +++ b/packages/twenty-sdk/src/cli/commands/dev/add.ts @@ -13,6 +13,7 @@ import { import { assertUnreachable } from 'twenty-shared/utils'; import { v4 } from 'uuid'; +import { getApplicationUniversalIdentifierOrThrow } from '@/cli/utilities/application/get-application-universal-identifier-or-throw'; import { CURRENT_EXECUTION_DIRECTORY } from '@/cli/utilities/config/current-execution-directory'; import { convertToLabel } from '@/cli/utilities/entity/entity-label'; import { appendServerVariablesToAppConfig } from '@/cli/utilities/file/append-server-variables.util'; @@ -45,6 +46,13 @@ export class EntityAddCommand { async execute(entityType?: SyncableEntity, path?: string): Promise { try { + // Generated files embed identifiers derived from the application + // universal identifier, so scaffolding is blocked until it is defined. + const applicationUniversalIdentifier = + await getApplicationUniversalIdentifierOrThrow( + CURRENT_EXECUTION_DIRECTORY, + ); + const entity = entityType ?? (await this.getEntity()); const entityName = this.getFolderName(entity); @@ -55,7 +63,10 @@ export class EntityAddCommand { await ensureDir(appPath); - const { name, file } = await this.getEntityData(entity); + const { name, file } = await this.getEntityData( + entity, + applicationUniversalIdentifier, + ); const filePath = join(appPath, this.getFileName(name, entity)); @@ -74,7 +85,11 @@ export class EntityAddCommand { ); if (entity === SyncableEntity.Object) { - await this.promptAndCreateObjectCompanions(name, path); + await this.promptAndCreateObjectCompanions({ + objectName: name, + applicationUniversalIdentifier, + customPath: path, + }); } if (entity === SyncableEntity.ConnectionProvider) { @@ -89,7 +104,10 @@ export class EntityAddCommand { } } - private async getEntityData(entity: SyncableEntity) { + private async getEntityData( + entity: SyncableEntity, + applicationUniversalIdentifier: string, + ) { switch (entity) { case SyncableEntity.Object: { const entityData = await this.getObjectData(); @@ -192,6 +210,7 @@ export class EntityAddCommand { const file = getViewBaseFile({ name, + applicationUniversalIdentifier, }); return { name, file }; @@ -259,10 +278,15 @@ export class EntityAddCommand { } } - private async promptAndCreateObjectCompanions( - objectName: string, - customPath?: string, - ): Promise { + private async promptAndCreateObjectCompanions({ + objectName, + applicationUniversalIdentifier, + customPath, + }: { + objectName: string; + applicationUniversalIdentifier: string; + customPath?: string; + }): Promise { const { createCompanions } = await inquirer.prompt<{ createCompanions: boolean; }>([ @@ -286,6 +310,7 @@ export class EntityAddCommand { name: `all-${kebabCase(objectName)}`, universalIdentifier: viewUniversalIdentifier, objectUniversalIdentifier: this.lastObjectUniversalIdentifier, + applicationUniversalIdentifier, fields: this.lastNameFieldUniversalIdentifier ? [ { @@ -335,6 +360,7 @@ export class EntityAddCommand { name: `${kebabCase(objectName)}-record-page-fields`, universalIdentifier: fieldsWidgetViewUniversalIdentifier, objectUniversalIdentifier: this.lastObjectUniversalIdentifier, + applicationUniversalIdentifier, type: ViewType.FIELDS_WIDGET, fields: recordPageFieldsViewFields, }); diff --git a/packages/twenty-sdk/src/cli/utilities/application/find-app-config-path.ts b/packages/twenty-sdk/src/cli/utilities/application/find-app-config-path.ts new file mode 100644 index 0000000000..00d7f300be --- /dev/null +++ b/packages/twenty-sdk/src/cli/utilities/application/find-app-config-path.ts @@ -0,0 +1,23 @@ +import { join } from 'path'; + +import { pathExists } from '@/cli/utilities/file/fs-utils'; + +export const APP_CONFIG_CANDIDATE_PATHS = [ + 'src/application.config.ts', + 'src/application-config.ts', + 'src/applicationConfig.ts', +]; + +export const findAppConfigPath = async ( + projectRoot: string, +): Promise => { + for (const candidate of APP_CONFIG_CANDIDATE_PATHS) { + const absolute = join(projectRoot, candidate); + + if (await pathExists(absolute)) { + return absolute; + } + } + + return null; +}; diff --git a/packages/twenty-sdk/src/cli/utilities/application/get-application-universal-identifier-or-throw.ts b/packages/twenty-sdk/src/cli/utilities/application/get-application-universal-identifier-or-throw.ts new file mode 100644 index 0000000000..4b643c149e --- /dev/null +++ b/packages/twenty-sdk/src/cli/utilities/application/get-application-universal-identifier-or-throw.ts @@ -0,0 +1,38 @@ +import { + APP_CONFIG_CANDIDATE_PATHS, + findAppConfigPath, +} from '@/cli/utilities/application/find-app-config-path'; +import { extractManifestFromFile } from '@/cli/utilities/build/manifest/manifest-extract-config-from-file'; + +type ApplicationConfigWithUniversalIdentifier = { + universalIdentifier?: string; +}; + +// Scaffolding derives deterministic identifiers from the application +// universal identifier, so nothing can be generated before defineApplication +// declares one. +export const getApplicationUniversalIdentifierOrThrow = async ( + appPath: string, +): Promise => { + const configPath = await findAppConfigPath(appPath); + + if (configPath === null) { + throw new Error( + `Could not find the application config file (expected one of: ${APP_CONFIG_CANDIDATE_PATHS.join(', ')}). Create it with defineApplication({ universalIdentifier: ... }) before generating entities.`, + ); + } + + const { config } = + await extractManifestFromFile({ + appPath, + filePath: configPath, + }); + + if (!config?.universalIdentifier) { + throw new Error( + `defineApplication in ${configPath} must declare a universalIdentifier before generating entities.`, + ); + } + + return config.universalIdentifier; +}; diff --git a/packages/twenty-sdk/src/cli/utilities/build/manifest/manifest-build.ts b/packages/twenty-sdk/src/cli/utilities/build/manifest/manifest-build.ts index 2346b63833..61a39aedc4 100644 --- a/packages/twenty-sdk/src/cli/utilities/build/manifest/manifest-build.ts +++ b/packages/twenty-sdk/src/cli/utilities/build/manifest/manifest-build.ts @@ -14,10 +14,10 @@ import { validateViewFilterOperands } from '@/cli/utilities/build/manifest/utils import { type ApplicationConfig, type LogicFunctionConfig } from '@/sdk/define'; import { type CommandMenuItemConfig } from '@/sdk/define/command-menu-items/command-menu-item-config'; import { type FrontComponentConfig } from '@/sdk/define/front-component/front-component-config'; +import { type IndexConfig } from '@/sdk/define/indexes/index-config'; import { type PostInstallLogicFunctionConfig } from '@/sdk/define/logic-functions/post-install-logic-function-config'; import { type PreInstallLogicFunctionConfig } from '@/sdk/define/logic-functions/pre-install-logic-function-config'; import { type ObjectConfig } from '@/sdk/define/objects/object-config'; -import { type IndexConfig } from '@/sdk/define/indexes/index-config'; import { type PageLayoutConfig } from '@/sdk/define/page-layouts/page-layout-config'; import { type PageLayoutTabConfig } from '@/sdk/define/page-layouts/page-layout-tab-config'; import { type RoleConfig } from '@/sdk/define/roles/role-config'; @@ -96,6 +96,7 @@ export const buildManifest = async ( const warnings: string[] = []; let applicationConfig: ApplicationConfig | undefined; + const objectConfigs: ObjectConfig[] = []; const objects: ObjectManifest[] = []; const fields: FieldManifest[] = []; const indexes: IndexManifest[] = []; @@ -172,31 +173,7 @@ export const buildManifest = async ( filePath, }); - const { - objectFields: objectFieldsWithDefaults, - fields: reverseRelationFields, - } = getDefaultFieldsInObjectFields(extract.config); - - const labelIdentifierFieldMetadataUniversalIdentifier = - extract.config.labelIdentifierFieldMetadataUniversalIdentifier ?? - objectFieldsWithDefaults.find((field) => field.name === 'name') - ?.universalIdentifier; - - if (!labelIdentifierFieldMetadataUniversalIdentifier) { - errors.push( - `No label identifier field found for object ${extract.config.nameSingular}. Please add a field with name "name" to your object.`, - ); - break; - } - - const objectManifest: ObjectManifest = { - ...extract.config, - fields: objectFieldsWithDefaults.map(addMissingFieldOptionIds), - labelIdentifierFieldMetadataUniversalIdentifier, - }; - - objects.push(objectManifest); - fields.push(...reverseRelationFields); + objectConfigs.push(extract.config); errors.push(...extract.errors); warnings.push(...(extract.warnings ?? [])); @@ -522,6 +499,39 @@ export const buildManifest = async ( ); } + if (applicationConfig) { + for (const objectConfig of objectConfigs) { + const { + objectFields: objectFieldsWithDefaults, + fields: reverseRelationFields, + } = getDefaultFieldsInObjectFields({ + objectConfig, + applicationUniversalIdentifier: applicationConfig.universalIdentifier, + }); + + const labelIdentifierFieldMetadataUniversalIdentifier = + objectConfig.labelIdentifierFieldMetadataUniversalIdentifier ?? + objectFieldsWithDefaults.find((field) => field.name === 'name') + ?.universalIdentifier; + + if (!labelIdentifierFieldMetadataUniversalIdentifier) { + errors.push( + `No label identifier field found for object ${objectConfig.nameSingular}. Please add a field with name "name" to your object.`, + ); + continue; + } + + const objectManifest: ObjectManifest = { + ...objectConfig, + fields: objectFieldsWithDefaults.map(addMissingFieldOptionIds), + labelIdentifierFieldMetadataUniversalIdentifier, + }; + + objects.push(objectManifest); + fields.push(...reverseRelationFields); + } + } + if (postInstallLogicFunctions.length > 1) { errors.push( 'Only one post install logic function is allowed per application', diff --git a/packages/twenty-sdk/src/cli/utilities/build/manifest/utils/__tests__/get-default-fields-in-object-fields.spec.ts b/packages/twenty-sdk/src/cli/utilities/build/manifest/utils/__tests__/get-default-fields-in-object-fields.spec.ts index f57334fd5b..fbeb8da772 100644 --- a/packages/twenty-sdk/src/cli/utilities/build/manifest/utils/__tests__/get-default-fields-in-object-fields.spec.ts +++ b/packages/twenty-sdk/src/cli/utilities/build/manifest/utils/__tests__/get-default-fields-in-object-fields.spec.ts @@ -14,15 +14,32 @@ const baseObjectConfig: ObjectConfig = { fields: [], }; +const applicationUniversalIdentifier = 'b7f8a9c0-1d2e-4f40-8a6b-7c8d9e0f1a2b'; + +const getMockDefaultFieldsInObjectFields = (objectConfig: ObjectConfig) => + getDefaultFieldsInObjectFields({ + objectConfig, + applicationUniversalIdentifier, + }); + +const getMockDefaultObjectFields = (objectConfig: ObjectConfig) => + getDefaultObjectFields({ objectConfig, applicationUniversalIdentifier }); + +const getMockDefaultRelationObjectFields = (objectConfig: ObjectConfig) => + getDefaultRelationObjectFields({ + objectConfig, + applicationUniversalIdentifier, + }); + describe('getDefaultFieldsInObjectFields', () => { it('should return all default fields when objectConfig has no fields', () => { const { objectFields, fields } = - getDefaultFieldsInObjectFields(baseObjectConfig); - const defaultFields = getDefaultObjectFields(baseObjectConfig); + getMockDefaultFieldsInObjectFields(baseObjectConfig); + const defaultFields = getMockDefaultObjectFields(baseObjectConfig); const { objectFields: defaultRelationObjectFields, fields: expectedReverseFields, - } = getDefaultRelationObjectFields(baseObjectConfig); + } = getMockDefaultRelationObjectFields(baseObjectConfig); expect(objectFields).toEqual([ ...defaultFields, @@ -56,10 +73,10 @@ describe('getDefaultFieldsInObjectFields', () => { fields: [customField], }; - const { objectFields } = getDefaultFieldsInObjectFields(objectConfig); - const defaultFields = getDefaultObjectFields(objectConfig); + const { objectFields } = getMockDefaultFieldsInObjectFields(objectConfig); + const defaultFields = getMockDefaultObjectFields(objectConfig); const { objectFields: defaultRelationObjectFields } = - getDefaultRelationObjectFields(objectConfig); + getMockDefaultRelationObjectFields(objectConfig); expect(objectFields[0]).toEqual(customField); expect(objectFields).toHaveLength( @@ -80,7 +97,7 @@ describe('getDefaultFieldsInObjectFields', () => { fields: [customIdField], }; - const { objectFields } = getDefaultFieldsInObjectFields(objectConfig); + const { objectFields } = getMockDefaultFieldsInObjectFields(objectConfig); const idFields = objectFields.filter((f) => f.name === 'id'); @@ -115,10 +132,10 @@ describe('getDefaultFieldsInObjectFields', () => { fields: customFields, }; - const { objectFields } = getDefaultFieldsInObjectFields(objectConfig); - const defaultFields = getDefaultObjectFields(objectConfig); + const { objectFields } = getMockDefaultFieldsInObjectFields(objectConfig); + const defaultFields = getMockDefaultObjectFields(objectConfig); const { objectFields: defaultRelationObjectFields } = - getDefaultRelationObjectFields(objectConfig); + getMockDefaultRelationObjectFields(objectConfig); const overriddenCount = defaultFields.filter((df) => customFields.some((cf) => cf.name === df.name), ).length; @@ -148,7 +165,7 @@ describe('getDefaultFieldsInObjectFields', () => { fields: [customField], }; - const { objectFields } = getDefaultFieldsInObjectFields(objectConfig); + const { objectFields } = getMockDefaultFieldsInObjectFields(objectConfig); expect(objectFields[0]).toEqual(customField); }); @@ -168,13 +185,13 @@ describe('getDefaultFieldsInObjectFields', () => { const originalLength = objectConfig.fields.length; - getDefaultFieldsInObjectFields(objectConfig); + getMockDefaultFieldsInObjectFields(objectConfig); expect(objectConfig.fields).toHaveLength(originalLength); }); it('should return reverse relation fields for each default relation', () => { - const { fields } = getDefaultFieldsInObjectFields(baseObjectConfig); + const { fields } = getMockDefaultFieldsInObjectFields(baseObjectConfig); expect(fields).toHaveLength(4); diff --git a/packages/twenty-sdk/src/cli/utilities/build/manifest/utils/__tests__/get-default-object-fields.spec.ts b/packages/twenty-sdk/src/cli/utilities/build/manifest/utils/__tests__/get-default-object-fields.spec.ts index 5174980a73..b597a5789b 100644 --- a/packages/twenty-sdk/src/cli/utilities/build/manifest/utils/__tests__/get-default-object-fields.spec.ts +++ b/packages/twenty-sdk/src/cli/utilities/build/manifest/utils/__tests__/get-default-object-fields.spec.ts @@ -12,21 +12,31 @@ const mockObjectConfig: ObjectConfig = { fields: [], }; +const mockApplicationUniversalIdentifier = + '3d05dbc0-4bd8-4041-a944-8cd0e26c2be1'; + +const getMockDefaultObjectFields = (objectConfig: ObjectConfig) => + getDefaultObjectFields({ + objectConfig, + applicationUniversalIdentifier: mockApplicationUniversalIdentifier, + }); + const expectedUniversalId = (fieldName: string) => generateDefaultFieldUniversalIdentifier({ + applicationUniversalIdentifier: mockApplicationUniversalIdentifier, objectUniversalIdentifier: mockObjectConfig.universalIdentifier, fieldName, }); describe('getDefaultObjectFields', () => { it('should return an array of 9 default fields', () => { - const fields = getDefaultObjectFields(mockObjectConfig); + const fields = getMockDefaultObjectFields(mockObjectConfig); expect(fields).toHaveLength(9); }); it('should include an id field with UUID type', () => { - const fields = getDefaultObjectFields(mockObjectConfig); + const fields = getMockDefaultObjectFields(mockObjectConfig); const idField = fields.find((field) => field.name === 'id'); expect(idField).toBeDefined(); @@ -43,7 +53,7 @@ describe('getDefaultObjectFields', () => { }); it('should include a name field with TEXT type', () => { - const fields = getDefaultObjectFields(mockObjectConfig); + const fields = getMockDefaultObjectFields(mockObjectConfig); const nameField = fields.find((field) => field.name === 'name'); expect(nameField).toBeDefined(); @@ -60,7 +70,7 @@ describe('getDefaultObjectFields', () => { }); it('should include createdAt, updatedAt and deletedAt fields with DATE_TIME type', () => { - const fields = getDefaultObjectFields(mockObjectConfig); + const fields = getMockDefaultObjectFields(mockObjectConfig); const createdAtField = fields.find((field) => field.name === 'createdAt'); const updatedAtField = fields.find((field) => field.name === 'updatedAt'); const deletedAtField = fields.find((field) => field.name === 'deletedAt'); @@ -103,7 +113,7 @@ describe('getDefaultObjectFields', () => { }); it('should include createdBy and updatedBy fields with ACTOR type', () => { - const fields = getDefaultObjectFields(mockObjectConfig); + const fields = getMockDefaultObjectFields(mockObjectConfig); const createdByField = fields.find((field) => field.name === 'createdBy'); const updatedByField = fields.find((field) => field.name === 'updatedBy'); @@ -133,7 +143,7 @@ describe('getDefaultObjectFields', () => { }); it('should include a position field with POSITION type', () => { - const fields = getDefaultObjectFields(mockObjectConfig); + const fields = getMockDefaultObjectFields(mockObjectConfig); const positionField = fields.find((field) => field.name === 'position'); expect(positionField).toBeDefined(); @@ -150,7 +160,7 @@ describe('getDefaultObjectFields', () => { }); it('should include a searchVector field with TS_VECTOR type', () => { - const fields = getDefaultObjectFields(mockObjectConfig); + const fields = getMockDefaultObjectFields(mockObjectConfig); const searchVectorField = fields.find( (field) => field.name === 'searchVector', ); @@ -169,8 +179,8 @@ describe('getDefaultObjectFields', () => { }); it('should generate deterministic universalIdentifiers based on objectConfig', () => { - const firstResult = getDefaultObjectFields(mockObjectConfig); - const secondResult = getDefaultObjectFields(mockObjectConfig); + const firstResult = getMockDefaultObjectFields(mockObjectConfig); + const secondResult = getMockDefaultObjectFields(mockObjectConfig); firstResult.forEach((field, index) => { expect(field.universalIdentifier).toBe( @@ -185,8 +195,8 @@ describe('getDefaultObjectFields', () => { universalIdentifier: 'ffffffff-ffff-ffff-ffff-ffffffffffff', }; - const fieldsA = getDefaultObjectFields(mockObjectConfig); - const fieldsB = getDefaultObjectFields(otherObjectConfig); + const fieldsA = getMockDefaultObjectFields(mockObjectConfig); + const fieldsB = getMockDefaultObjectFields(otherObjectConfig); fieldsA.forEach((fieldA, index) => { expect(fieldA.universalIdentifier).not.toBe( @@ -196,7 +206,7 @@ describe('getDefaultObjectFields', () => { }); it('should return fields in the expected order', () => { - const fields = getDefaultObjectFields(mockObjectConfig); + const fields = getMockDefaultObjectFields(mockObjectConfig); const fieldNames = fields.map((field) => field.name); expect(fieldNames).toEqual([ diff --git a/packages/twenty-sdk/src/cli/utilities/build/manifest/utils/get-default-fields-in-object-fields.ts b/packages/twenty-sdk/src/cli/utilities/build/manifest/utils/get-default-fields-in-object-fields.ts index c7364eea88..c18ab1cccc 100644 --- a/packages/twenty-sdk/src/cli/utilities/build/manifest/utils/get-default-fields-in-object-fields.ts +++ b/packages/twenty-sdk/src/cli/utilities/build/manifest/utils/get-default-fields-in-object-fields.ts @@ -6,12 +6,22 @@ import { type ObjectFieldManifest, } from 'twenty-shared/application'; -export const getDefaultFieldsInObjectFields = ( - objectConfig: ObjectConfig, -): { objectFields: ObjectFieldManifest[]; fields: FieldManifest[] } => { - const defaultObjectFields = getDefaultObjectFields(objectConfig); +export const getDefaultFieldsInObjectFields = ({ + objectConfig, + applicationUniversalIdentifier, +}: { + objectConfig: ObjectConfig; + applicationUniversalIdentifier: string; +}): { objectFields: ObjectFieldManifest[]; fields: FieldManifest[] } => { + const defaultObjectFields = getDefaultObjectFields({ + objectConfig, + applicationUniversalIdentifier, + }); const { objectFields: defaultRelationObjectFields, fields: reverseFields } = - getDefaultRelationObjectFields(objectConfig); + getDefaultRelationObjectFields({ + objectConfig, + applicationUniversalIdentifier, + }); const objectConfigFieldNames = (objectConfig.fields ?? []).map((f) => f.name); diff --git a/packages/twenty-sdk/src/cli/utilities/build/manifest/utils/get-default-object-fields.ts b/packages/twenty-sdk/src/cli/utilities/build/manifest/utils/get-default-object-fields.ts index ed19ffff7b..061657ea54 100644 --- a/packages/twenty-sdk/src/cli/utilities/build/manifest/utils/get-default-object-fields.ts +++ b/packages/twenty-sdk/src/cli/utilities/build/manifest/utils/get-default-object-fields.ts @@ -3,9 +3,13 @@ import { FieldMetadataType } from 'twenty-shared/types'; import { generateDefaultFieldUniversalIdentifier } from '@/sdk/define/objects/generate-default-field-universal-identifier'; import { type ObjectFieldManifest } from 'twenty-shared/application'; -export const getDefaultObjectFields = ( - objectConfig: ObjectConfig, -): ObjectFieldManifest[] => { +export const getDefaultObjectFields = ({ + objectConfig, + applicationUniversalIdentifier, +}: { + objectConfig: ObjectConfig; + applicationUniversalIdentifier: string; +}): ObjectFieldManifest[] => { const objectUniversalIdentifier = objectConfig.universalIdentifier; const idField: ObjectFieldManifest = { @@ -17,6 +21,7 @@ export const getDefaultObjectFields = ( defaultValue: 'uuid', type: FieldMetadataType.UUID as const, universalIdentifier: generateDefaultFieldUniversalIdentifier({ + applicationUniversalIdentifier, objectUniversalIdentifier, fieldName: 'id', }), @@ -31,6 +36,7 @@ export const getDefaultObjectFields = ( defaultValue: null, type: FieldMetadataType.TEXT as const, universalIdentifier: generateDefaultFieldUniversalIdentifier({ + applicationUniversalIdentifier, objectUniversalIdentifier, fieldName: 'name', }), @@ -45,6 +51,7 @@ export const getDefaultObjectFields = ( defaultValue: 'now', type: FieldMetadataType.DATE_TIME as const, universalIdentifier: generateDefaultFieldUniversalIdentifier({ + applicationUniversalIdentifier, objectUniversalIdentifier, fieldName: 'createdAt', }), @@ -59,6 +66,7 @@ export const getDefaultObjectFields = ( defaultValue: 'now', type: FieldMetadataType.DATE_TIME as const, universalIdentifier: generateDefaultFieldUniversalIdentifier({ + applicationUniversalIdentifier, objectUniversalIdentifier, fieldName: 'updatedAt', }), @@ -73,6 +81,7 @@ export const getDefaultObjectFields = ( defaultValue: null, type: FieldMetadataType.DATE_TIME as const, universalIdentifier: generateDefaultFieldUniversalIdentifier({ + applicationUniversalIdentifier, objectUniversalIdentifier, fieldName: 'deletedAt', }), @@ -87,6 +96,7 @@ export const getDefaultObjectFields = ( defaultValue: { name: "''", source: "'MANUAL'" }, type: FieldMetadataType.ACTOR as const, universalIdentifier: generateDefaultFieldUniversalIdentifier({ + applicationUniversalIdentifier, objectUniversalIdentifier, fieldName: 'createdBy', }), @@ -101,6 +111,7 @@ export const getDefaultObjectFields = ( defaultValue: { name: "''", source: "'MANUAL'" }, type: FieldMetadataType.ACTOR as const, universalIdentifier: generateDefaultFieldUniversalIdentifier({ + applicationUniversalIdentifier, objectUniversalIdentifier, fieldName: 'updatedBy', }), @@ -115,6 +126,7 @@ export const getDefaultObjectFields = ( defaultValue: 0, type: FieldMetadataType.POSITION, universalIdentifier: generateDefaultFieldUniversalIdentifier({ + applicationUniversalIdentifier, objectUniversalIdentifier, fieldName: 'position', }), @@ -129,6 +141,7 @@ export const getDefaultObjectFields = ( defaultValue: null, type: FieldMetadataType.TS_VECTOR, universalIdentifier: generateDefaultFieldUniversalIdentifier({ + applicationUniversalIdentifier, objectUniversalIdentifier, fieldName: 'searchVector', }), diff --git a/packages/twenty-sdk/src/cli/utilities/build/manifest/utils/get-default-relation-object-fields.ts b/packages/twenty-sdk/src/cli/utilities/build/manifest/utils/get-default-relation-object-fields.ts index 5317320dd5..ccbb0a9f31 100644 --- a/packages/twenty-sdk/src/cli/utilities/build/manifest/utils/get-default-relation-object-fields.ts +++ b/packages/twenty-sdk/src/cli/utilities/build/manifest/utils/get-default-relation-object-fields.ts @@ -1,5 +1,5 @@ -import { generateDefaultFieldUniversalIdentifier } from '@/sdk/define/objects/generate-default-field-universal-identifier'; import { RelationType } from '@/sdk/define'; +import { generateDefaultFieldUniversalIdentifier } from '@/sdk/define/objects/generate-default-field-universal-identifier'; import type { ObjectConfig } from '@/sdk/define/objects/object-config'; import { type FieldManifest, @@ -119,9 +119,13 @@ const buildReverseField = ({ }; }; -export const getDefaultRelationObjectFields = ( - objectConfig: ObjectConfig, -): { objectFields: ObjectFieldManifest[]; fields: FieldManifest[] } => { +export const getDefaultRelationObjectFields = ({ + objectConfig, + applicationUniversalIdentifier, +}: { + objectConfig: ObjectConfig; + applicationUniversalIdentifier: string; +}): { objectFields: ObjectFieldManifest[]; fields: FieldManifest[] } => { const objectFields: ObjectFieldManifest[] = []; const fields: FieldManifest[] = []; @@ -130,14 +134,16 @@ export const getDefaultRelationObjectFields = ( const forwardFieldUniversalIdentifier = generateDefaultFieldUniversalIdentifier({ + applicationUniversalIdentifier, objectUniversalIdentifier: objectConfig.universalIdentifier, fieldName: config.fieldName, }); const reverseFieldUniversalIdentifier = generateDefaultFieldUniversalIdentifier({ - objectUniversalIdentifier: objectConfig.universalIdentifier, - fieldName: `${config.fieldName}Inverse`, + applicationUniversalIdentifier, + objectUniversalIdentifier: standardObject.universalIdentifier, + fieldName: config.targetFieldName(objectConfig), }); const forwardField: ObjectFieldManifest = { diff --git a/packages/twenty-sdk/src/cli/utilities/entity/__tests__/get-view-base-file.spec.ts b/packages/twenty-sdk/src/cli/utilities/entity/__tests__/get-view-base-file.spec.ts index 16e20f301e..70220fc96f 100644 --- a/packages/twenty-sdk/src/cli/utilities/entity/__tests__/get-view-base-file.spec.ts +++ b/packages/twenty-sdk/src/cli/utilities/entity/__tests__/get-view-base-file.spec.ts @@ -1,8 +1,21 @@ import { getViewBaseFile } from '@/cli/utilities/entity/entity-view-template'; +const APPLICATION_UNIVERSAL_IDENTIFIER = 'app-abc-123'; + +const getTestViewBaseFile = ( + overrides: Omit< + Parameters[0], + 'applicationUniversalIdentifier' + >, +) => + getViewBaseFile({ + applicationUniversalIdentifier: APPLICATION_UNIVERSAL_IDENTIFIER, + ...overrides, + }); + describe('getViewBaseFile', () => { it('should render proper file using defineView', () => { - const result = getViewBaseFile({ + const result = getTestViewBaseFile({ name: 'my-view', universalIdentifier: '71e45a58-41da-4ae4-8b73-a543c0a9d3d4', objectUniversalIdentifier: 'obj-abc-123', @@ -20,7 +33,7 @@ describe('getViewBaseFile', () => { }); it('should use default objectUniversalIdentifier when not provided', () => { - const result = getViewBaseFile({ + const result = getTestViewBaseFile({ name: 'default-view', }); @@ -28,7 +41,7 @@ describe('getViewBaseFile', () => { }); it('should include commented fields, filters and sorts when no fields provided', () => { - const result = getViewBaseFile({ + const result = getTestViewBaseFile({ name: 'empty-view', }); @@ -38,7 +51,7 @@ describe('getViewBaseFile', () => { }); it('should render fields block when fields are provided', () => { - const result = getViewBaseFile({ + const result = getTestViewBaseFile({ name: 'view-with-fields', fields: [ { @@ -61,7 +74,7 @@ describe('getViewBaseFile', () => { }); it('should apply default values to fields', () => { - const result = getViewBaseFile({ + const result = getTestViewBaseFile({ name: 'view-defaults', fields: [ { @@ -77,7 +90,7 @@ describe('getViewBaseFile', () => { }); it('should generate unique UUID when not provided', () => { - const result = getViewBaseFile({ + const result = getTestViewBaseFile({ name: 'auto-uuid-view', }); @@ -87,7 +100,7 @@ describe('getViewBaseFile', () => { }); it('should use kebab-case for name', () => { - const result = getViewBaseFile({ + const result = getTestViewBaseFile({ name: 'all active contacts', }); @@ -95,7 +108,7 @@ describe('getViewBaseFile', () => { }); it('should generate UUIDs for fields when not provided', () => { - const result = getViewBaseFile({ + const result = getTestViewBaseFile({ name: 'view-auto-field-uuids', fields: [ { @@ -115,7 +128,7 @@ describe('getViewBaseFile', () => { }); it('should emit a generateDefaultFieldUniversalIdentifier call for fields using defaultFieldName', () => { - const result = getViewBaseFile({ + const result = getTestViewBaseFile({ name: 'view-default-field', objectUniversalIdentifier: 'obj-abc-123', fields: [ @@ -132,12 +145,13 @@ describe('getViewBaseFile', () => { expect(result).toContain( 'fieldMetadataUniversalIdentifier: generateDefaultFieldUniversalIdentifier({', ); + expect(result).toContain("applicationUniversalIdentifier: 'app-abc-123'"); expect(result).toContain("objectUniversalIdentifier: 'obj-abc-123'"); expect(result).toContain("fieldName: 'createdAt'"); }); it('should not import generateDefaultFieldUniversalIdentifier when no field uses defaultFieldName', () => { - const result = getViewBaseFile({ + const result = getTestViewBaseFile({ name: 'view-literal-only', fields: [ { diff --git a/packages/twenty-sdk/src/cli/utilities/entity/entity-view-template.ts b/packages/twenty-sdk/src/cli/utilities/entity/entity-view-template.ts index d0c2254e55..27ce1073e5 100644 --- a/packages/twenty-sdk/src/cli/utilities/entity/entity-view-template.ts +++ b/packages/twenty-sdk/src/cli/utilities/entity/entity-view-template.ts @@ -17,10 +17,12 @@ const renderFieldEntry = ({ field, index, objectUniversalIdentifier, + applicationUniversalIdentifier, }: { field: ViewFieldTemplate; index: number; objectUniversalIdentifier: string; + applicationUniversalIdentifier: string; }) => { const universalIdentifier = field.universalIdentifier ?? v4(); const position = field.position ?? index; @@ -30,6 +32,7 @@ const renderFieldEntry = ({ const fieldMetadataUniversalIdentifierLine = 'defaultFieldName' in field ? ` fieldMetadataUniversalIdentifier: generateDefaultFieldUniversalIdentifier({ + applicationUniversalIdentifier: '${applicationUniversalIdentifier}', objectUniversalIdentifier: '${objectUniversalIdentifier}', fieldName: '${field.defaultFieldName}', })` @@ -48,12 +51,14 @@ export const getViewBaseFile = ({ name, universalIdentifier = v4(), objectUniversalIdentifier = 'fill-later', + applicationUniversalIdentifier, fields = [], type, }: { name: string; universalIdentifier?: string; objectUniversalIdentifier?: string; + applicationUniversalIdentifier: string; fields?: ViewFieldTemplate[]; type?: ViewType; }) => { @@ -77,7 +82,12 @@ export const getViewBaseFile = ({ ? ` fields: [ ${fields .map((field, index) => - renderFieldEntry({ field, index, objectUniversalIdentifier }), + renderFieldEntry({ + field, + index, + objectUniversalIdentifier, + applicationUniversalIdentifier, + }), ) .join(',\n')}, ],` diff --git a/packages/twenty-sdk/src/cli/utilities/file/append-server-variables.util.ts b/packages/twenty-sdk/src/cli/utilities/file/append-server-variables.util.ts index 3cbd6fff1a..0639c9aa26 100644 --- a/packages/twenty-sdk/src/cli/utilities/file/append-server-variables.util.ts +++ b/packages/twenty-sdk/src/cli/utilities/file/append-server-variables.util.ts @@ -1,6 +1,6 @@ import { readFile, writeFile } from 'node:fs/promises'; -import { pathExists } from '@/cli/utilities/file/fs-utils'; +import { findAppConfigPath } from '@/cli/utilities/application/find-app-config-path'; // One name + description pair to add to defineApplication.serverVariables. // `isSecret` defaults to false; set true on credentials that should be @@ -11,12 +11,6 @@ export type ServerVariableSpec = { isSecret: boolean; }; -const APP_CONFIG_CANDIDATES = [ - 'src/application.config.ts', - 'src/application-config.ts', - 'src/applicationConfig.ts', -]; - const SERVER_VARIABLES_PATTERN = /serverVariables\s*:\s*\{/; const DEFINE_APPLICATION_PATTERN = /defineApplication\s*\(\s*\{/; @@ -102,20 +96,6 @@ export const appendServerVariablesToAppConfig = async ({ return { status: 'created', file: configPath }; }; -const findAppConfigPath = async ( - projectRoot: string, -): Promise => { - for (const candidate of APP_CONFIG_CANDIDATES) { - const absolute = `${projectRoot}/${candidate}`; - - if (await pathExists(absolute)) { - return absolute; - } - } - - return null; -}; - const renderServerVariableEntries = (variables: ServerVariableSpec[]): string => variables .map( diff --git a/packages/twenty-sdk/src/sdk/define/objects/__tests__/generate-default-field-universal-identifier.spec.ts b/packages/twenty-sdk/src/sdk/define/objects/__tests__/generate-default-field-universal-identifier.spec.ts index 8e0608e14c..21cf69711e 100644 --- a/packages/twenty-sdk/src/sdk/define/objects/__tests__/generate-default-field-universal-identifier.spec.ts +++ b/packages/twenty-sdk/src/sdk/define/objects/__tests__/generate-default-field-universal-identifier.spec.ts @@ -1,19 +1,25 @@ import { generateDefaultFieldUniversalIdentifier } from '@/sdk/define/objects/generate-default-field-universal-identifier'; -describe('generateDefaultFieldUniversalIdentifier', () => { - it('should generate a unique universal identifier', () => { - const objectUniversalIdentifier = '55b79f88-4094-4b3f-a0ac-1a91a55714f2'; +import { getFieldUniversalIdentifier } from 'twenty-shared/application'; +describe('generateDefaultFieldUniversalIdentifier', () => { + const applicationUniversalIdentifier = 'c6061e2c-7b5c-4a63-b6a4-6f2ef2f2fefb'; + const objectUniversalIdentifier = '55b79f88-4094-4b3f-a0ac-1a91a55714f2'; + + it('should generate a unique universal identifier', () => { const uId1 = generateDefaultFieldUniversalIdentifier({ + applicationUniversalIdentifier, objectUniversalIdentifier, fieldName: 'id', }); const uId2 = generateDefaultFieldUniversalIdentifier({ + applicationUniversalIdentifier, objectUniversalIdentifier, fieldName: 'id', }); const anotherUId = generateDefaultFieldUniversalIdentifier({ + applicationUniversalIdentifier, objectUniversalIdentifier, fieldName: 'name', }); @@ -21,4 +27,36 @@ describe('generateDefaultFieldUniversalIdentifier', () => { expect(uId1).toEqual(uId2); expect(uId1).not.toEqual(anotherUId); }); + + it('should match the shared getFieldUniversalIdentifier derivation', () => { + const universalIdentifier = generateDefaultFieldUniversalIdentifier({ + applicationUniversalIdentifier, + objectUniversalIdentifier, + fieldName: 'createdAt', + }); + + expect(universalIdentifier).toEqual( + getFieldUniversalIdentifier({ + applicationUniversalIdentifier, + objectUniversalIdentifier, + name: 'createdAt', + }), + ); + }); + + it('should generate different identifiers for different applications', () => { + const otherApplicationUId = generateDefaultFieldUniversalIdentifier({ + applicationUniversalIdentifier: '0b04e15c-27b2-4741-9046-b32e07469072', + objectUniversalIdentifier, + fieldName: 'id', + }); + + expect(otherApplicationUId).not.toEqual( + generateDefaultFieldUniversalIdentifier({ + applicationUniversalIdentifier, + objectUniversalIdentifier, + fieldName: 'id', + }), + ); + }); }); diff --git a/packages/twenty-sdk/src/sdk/define/objects/generate-default-field-universal-identifier.ts b/packages/twenty-sdk/src/sdk/define/objects/generate-default-field-universal-identifier.ts index e0b815f34f..8892edb5c4 100644 --- a/packages/twenty-sdk/src/sdk/define/objects/generate-default-field-universal-identifier.ts +++ b/packages/twenty-sdk/src/sdk/define/objects/generate-default-field-universal-identifier.ts @@ -1,15 +1,16 @@ -import { v5 } from 'uuid'; - -const UNIVERSAL_IDENTIFIER_NAMESPACE = '142046f0-4d80-48b5-ad56-26ad410e895c'; +import { getFieldUniversalIdentifier } from 'twenty-shared/application'; export const generateDefaultFieldUniversalIdentifier = ({ + applicationUniversalIdentifier, objectUniversalIdentifier, fieldName, }: { + applicationUniversalIdentifier: string; objectUniversalIdentifier: string; fieldName: string; -}) => { - const seed = `${objectUniversalIdentifier}-${fieldName}`; - - return v5(seed, UNIVERSAL_IDENTIFIER_NAMESPACE); -}; +}) => + getFieldUniversalIdentifier({ + applicationUniversalIdentifier, + objectUniversalIdentifier, + name: fieldName, + }); diff --git a/packages/twenty-server/src/database/commands/upgrade-version-command/2-19/2-19-upgrade-version-command.module.ts b/packages/twenty-server/src/database/commands/upgrade-version-command/2-19/2-19-upgrade-version-command.module.ts index 659f4e0e6f..1af0474d49 100644 --- a/packages/twenty-server/src/database/commands/upgrade-version-command/2-19/2-19-upgrade-version-command.module.ts +++ b/packages/twenty-server/src/database/commands/upgrade-version-command/2-19/2-19-upgrade-version-command.module.ts @@ -4,13 +4,16 @@ import { TypeOrmModule } from '@nestjs/typeorm'; import { WorkspaceIteratorModule } from 'src/database/commands/command-runners/workspace-iterator.module'; import { BackfillWorkspaceCustomApplicationRegistrationCommand } from 'src/database/commands/upgrade-version-command/2-19/2-19-workspace-command-1782853718000-backfill-workspace-custom-application-registration.command'; import { BackfillSystemUniqueIndexUniversalIdentifierCommand } from 'src/database/commands/upgrade-version-command/2-19/2-19-workspace-command-1783093620000-backfill-system-unique-index-universal-identifier.command'; +import { BackfillDeterministicFieldUniversalIdentifiersCommand } from 'src/database/commands/upgrade-version-command/2-19/2-19-workspace-command-1783100000000-backfill-deterministic-field-universal-identifiers.command'; import { ApplicationEntity } from 'src/engine/core-modules/application/application.entity'; import { ApplicationModule } from 'src/engine/core-modules/application/application.module'; import { WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.entity'; +import { FieldMetadataEntity } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity'; import { IndexMetadataEntity } from 'src/engine/metadata-modules/index-metadata/index-metadata.entity'; import { WorkspaceMetadataVersionModule } from 'src/engine/metadata-modules/workspace-metadata-version/workspace-metadata-version.module'; import { WorkspaceCacheModule } from 'src/engine/workspace-cache/workspace-cache.module'; import { WorkspaceMigrationModule } from 'src/engine/workspace-manager/workspace-migration/workspace-migration.module'; +import { WorkspaceMigrationRunnerModule } from 'src/engine/workspace-manager/workspace-migration/workspace-migration-runner/workspace-migration-runner.module'; @Module({ imports: [ @@ -18,16 +21,19 @@ import { WorkspaceMigrationModule } from 'src/engine/workspace-manager/workspace TypeOrmModule.forFeature([ WorkspaceEntity, ApplicationEntity, + FieldMetadataEntity, IndexMetadataEntity, ]), WorkspaceIteratorModule, WorkspaceCacheModule, WorkspaceMetadataVersionModule, WorkspaceMigrationModule, + WorkspaceMigrationRunnerModule, ], providers: [ BackfillWorkspaceCustomApplicationRegistrationCommand, BackfillSystemUniqueIndexUniversalIdentifierCommand, + BackfillDeterministicFieldUniversalIdentifiersCommand, ], }) export class V2_19_UpgradeVersionCommandModule {} diff --git a/packages/twenty-server/src/database/commands/upgrade-version-command/2-19/2-19-workspace-command-1783100000000-backfill-deterministic-field-universal-identifiers.command.ts b/packages/twenty-server/src/database/commands/upgrade-version-command/2-19/2-19-workspace-command-1783100000000-backfill-deterministic-field-universal-identifiers.command.ts new file mode 100644 index 0000000000..9280939397 --- /dev/null +++ b/packages/twenty-server/src/database/commands/upgrade-version-command/2-19/2-19-workspace-command-1783100000000-backfill-deterministic-field-universal-identifiers.command.ts @@ -0,0 +1,368 @@ +import { InjectRepository } from '@nestjs/typeorm'; + +import { Command } from 'nest-commander'; +import { getFieldUniversalIdentifier } from 'twenty-shared/application'; +import { STANDARD_OBJECTS } from 'twenty-shared/metadata'; +import { FieldMetadataType } from 'twenty-shared/types'; +import { capitalize, isDefined } from 'twenty-shared/utils'; +import { Repository } from 'typeorm'; +import { v5 } from 'uuid'; + +import { ActiveOrSuspendedWorkspaceCommandRunner } from 'src/database/commands/command-runners/active-or-suspended-workspace.command-runner'; +import { WorkspaceIteratorService } from 'src/database/commands/command-runners/workspace-iterator.service'; +import { type RunOnWorkspaceArgs } from 'src/database/commands/command-runners/workspace.command-runner'; +import { ApplicationEntity } from 'src/engine/core-modules/application/application.entity'; +import { ApplicationService } from 'src/engine/core-modules/application/application.service'; +import { RegisteredWorkspaceCommand } from 'src/engine/core-modules/upgrade/decorators/registered-workspace-command.decorator'; +import { FieldMetadataEntity } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity'; +import { type FlatEntityMaps } from 'src/engine/metadata-modules/flat-entity/types/flat-entity-maps.type'; +import { findFlatEntityByIdInFlatEntityMaps } from 'src/engine/metadata-modules/flat-entity/utils/find-flat-entity-by-id-in-flat-entity-maps.util'; +import { getMetadataFlatEntityMapsKey } from 'src/engine/metadata-modules/flat-entity/utils/get-metadata-flat-entity-maps-key.util'; +import { getMetadataRelatedMetadataNames } from 'src/engine/metadata-modules/flat-entity/utils/get-metadata-related-metadata-names.util'; +import { getMetadataSerializedRelationNames } from 'src/engine/metadata-modules/flat-entity/utils/get-metadata-serialized-relation-names.util'; +import { type FlatFieldMetadata } from 'src/engine/metadata-modules/flat-field-metadata/types/flat-field-metadata.type'; +import { type FlatObjectMetadata } from 'src/engine/metadata-modules/flat-object-metadata/types/flat-object-metadata.type'; +import { PARTIAL_SYSTEM_FLAT_FIELD_METADATAS } from 'src/engine/metadata-modules/object-metadata/constants/partial-system-flat-field-metadatas.constant'; +import { WorkspaceCacheService } from 'src/engine/workspace-cache/services/workspace-cache.service'; +import { WorkspaceMigrationRunnerService } from 'src/engine/workspace-manager/workspace-migration/workspace-migration-runner/services/workspace-migration-runner.service'; + +// Server-owned system field names: their universal identifiers are taken +// over for every application, whatever value they currently hold, since +// validateObjectMetadataSystemFieldsIntegrity now rejects any non-derived +// value at sync time. Fields are picked explicitly so system fields added to +// PARTIAL_SYSTEM_FLAT_FIELD_METADATAS later never alter this shipped +// migration. +const SYSTEM_FIELD_NAMES = new Set([ + PARTIAL_SYSTEM_FLAT_FIELD_METADATAS.id.name, + PARTIAL_SYSTEM_FLAT_FIELD_METADATAS.createdAt.name, + PARTIAL_SYSTEM_FLAT_FIELD_METADATAS.updatedAt.name, + PARTIAL_SYSTEM_FLAT_FIELD_METADATAS.deletedAt.name, + PARTIAL_SYSTEM_FLAT_FIELD_METADATAS.createdBy.name, + PARTIAL_SYSTEM_FLAT_FIELD_METADATAS.updatedBy.name, + PARTIAL_SYSTEM_FLAT_FIELD_METADATAS.position.name, + PARTIAL_SYSTEM_FLAT_FIELD_METADATAS.searchVector.name, +]); + +// The name field is a default field, not a system field: it is only taken +// over where it is guaranteed to be auto-provisioned (workspace-custom +// objects). For installed applications authors may define it themselves, so +// only legacy SDK-derived values are converged; for the standard application +// it is author-provided in STANDARD_OBJECTS and keeps its hardcoded value. +const NAME_FIELD_NAME = 'name'; + +const DEFAULT_RELATION_FORWARD_FIELD_NAMES = new Set([ + 'timelineActivities', + 'attachments', + 'noteTargets', + 'taskTargets', +]); + +const DEFAULT_RELATION_STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS = new Set([ + STANDARD_OBJECTS.timelineActivity.universalIdentifier, + STANDARD_OBJECTS.attachment.universalIdentifier, + STANDARD_OBJECTS.noteTarget.universalIdentifier, + STANDARD_OBJECTS.taskTarget.universalIdentifier, +]); + +// Namespace the SDK used before default field universal identifiers were +// aligned with getFieldUniversalIdentifier; only rows still carrying a +// legacy-derived value are backfilled for installed applications, so +// author-provided identifiers are left untouched. +const LEGACY_SDK_UNIVERSAL_IDENTIFIER_NAMESPACE = + '142046f0-4d80-48b5-ad56-26ad410e895c'; + +const computeLegacySdkDefaultFieldUniversalIdentifier = ({ + objectUniversalIdentifier, + fieldName, +}: { + objectUniversalIdentifier: string; + fieldName: string; +}) => + v5( + `${objectUniversalIdentifier}-${fieldName}`, + LEGACY_SDK_UNIVERSAL_IDENTIFIER_NAMESPACE, + ); + +const isMorphOrRelationFieldMetadataType = (type: FieldMetadataType) => + type === FieldMetadataType.RELATION || + type === FieldMetadataType.MORPH_RELATION; + +@RegisteredWorkspaceCommand('2.19.0', 1783100000000) +@Command({ + name: 'upgrade:2-19:backfill-deterministic-field-universal-identifiers', + description: + 'Recompute the universal identifier of auto-provisioned field metadata (system fields and default relation fields) to the deterministic getFieldUniversalIdentifier derivation.', +}) +export class BackfillDeterministicFieldUniversalIdentifiersCommand extends ActiveOrSuspendedWorkspaceCommandRunner { + constructor( + protected readonly workspaceIteratorService: WorkspaceIteratorService, + private readonly applicationService: ApplicationService, + private readonly workspaceCacheService: WorkspaceCacheService, + private readonly workspaceMigrationRunnerService: WorkspaceMigrationRunnerService, + @InjectRepository(ApplicationEntity) + private readonly applicationRepository: Repository, + @InjectRepository(FieldMetadataEntity) + private readonly fieldMetadataRepository: Repository, + ) { + super(workspaceIteratorService); + } + + override async runOnWorkspace({ + workspaceId, + options, + }: RunOnWorkspaceArgs): Promise { + const isDryRun = options.dryRun ?? false; + + const { twentyStandardFlatApplication, workspaceCustomFlatApplication } = + await this.applicationService.findWorkspaceTwentyStandardAndCustomApplicationOrThrow( + { workspaceId }, + ); + + const applications = await this.applicationRepository.find({ + select: ['id', 'universalIdentifier'], + where: { workspaceId }, + withDeleted: true, + }); + const applicationUniversalIdentifierById = new Map( + applications.map((application) => [ + application.id, + application.universalIdentifier, + ]), + ); + + const { flatFieldMetadataMaps, flatObjectMetadataMaps } = + await this.workspaceCacheService.getOrRecompute(workspaceId, [ + 'flatFieldMetadataMaps', + 'flatObjectMetadataMaps', + ]); + + const updates: { id: string; newUniversalIdentifier: string }[] = []; + + for (const flatFieldMetadata of Object.values( + flatFieldMetadataMaps.byUniversalIdentifier, + )) { + if (!isDefined(flatFieldMetadata)) { + continue; + } + + const flatObjectMetadata = findFlatEntityByIdInFlatEntityMaps({ + flatEntityMaps: flatObjectMetadataMaps, + flatEntityId: flatFieldMetadata.objectMetadataId, + }); + const applicationUniversalIdentifier = + applicationUniversalIdentifierById.get(flatFieldMetadata.applicationId); + + if ( + !isDefined(flatObjectMetadata) || + !isDefined(applicationUniversalIdentifier) + ) { + this.logger.warn( + `Missing object or application for field ${flatFieldMetadata.name} (${flatFieldMetadata.id}) in workspace ${workspaceId}, skipping`, + ); + continue; + } + + const shouldBackfill = this.shouldBackfillFieldMetadata({ + flatFieldMetadata, + flatObjectMetadata, + flatObjectMetadataMaps, + flatFieldMetadataMaps, + twentyStandardApplicationId: twentyStandardFlatApplication.id, + workspaceCustomApplicationId: workspaceCustomFlatApplication.id, + }); + + if (!shouldBackfill) { + continue; + } + + const newUniversalIdentifier = getFieldUniversalIdentifier({ + applicationUniversalIdentifier, + objectUniversalIdentifier: flatObjectMetadata.universalIdentifier, + name: flatFieldMetadata.name, + }); + + if (newUniversalIdentifier === flatFieldMetadata.universalIdentifier) { + continue; + } + + updates.push({ id: flatFieldMetadata.id, newUniversalIdentifier }); + } + + if (updates.length === 0) { + this.logger.log( + `No field universal identifiers to backfill for workspace ${workspaceId}`, + ); + + return; + } + + this.logger.log( + `${isDryRun ? '[DRY RUN] ' : ''}Backfilling ${updates.length} field universal identifier(s) for workspace ${workspaceId}`, + ); + + if (isDryRun) { + return; + } + + await this.fieldMetadataRepository.manager.transaction( + async (entityManager) => { + const transactionalFieldMetadataRepository = + entityManager.getRepository(FieldMetadataEntity); + + for (const { id, newUniversalIdentifier } of updates) { + await transactionalFieldMetadataRepository.update( + { id, workspaceId }, + { universalIdentifier: newUniversalIdentifier }, + ); + } + }, + ); + + const fieldMetadataRelatedNames = [ + 'fieldMetadata', + ...getMetadataRelatedMetadataNames('fieldMetadata'), + ...getMetadataSerializedRelationNames('fieldMetadata'), + 'index', + ] as const; + const allFlatEntityMapsKeys = [ + ...new Set(fieldMetadataRelatedNames.map(getMetadataFlatEntityMapsKey)), + ]; + + await this.workspaceMigrationRunnerService.invalidateCache({ + allFlatEntityMapsKeys, + workspaceId, + }); + + this.logger.log( + `Backfilled ${updates.length} field universal identifier(s) for workspace ${workspaceId}`, + ); + } + + private shouldBackfillFieldMetadata({ + flatFieldMetadata, + flatObjectMetadata, + flatObjectMetadataMaps, + flatFieldMetadataMaps, + twentyStandardApplicationId, + workspaceCustomApplicationId, + }: { + flatFieldMetadata: FlatFieldMetadata; + flatObjectMetadata: FlatObjectMetadata; + flatObjectMetadataMaps: FlatEntityMaps; + flatFieldMetadataMaps: FlatEntityMaps; + twentyStandardApplicationId: string; + workspaceCustomApplicationId: string; + }): boolean { + // System field universal identifiers are server-owned: they are taken + // over for every application. Sync now rejects non-derived values + // (validateObjectMetadataSystemFieldsIntegrity), so converging every row + // here is both safe and required. + if (SYSTEM_FIELD_NAMES.has(flatFieldMetadata.name)) { + return true; + } + + // Standard application: every non-system standard field (including name) + // is author-provided in STANDARD_OBJECTS and keeps its hardcoded value. + if (flatFieldMetadata.applicationId === twentyStandardApplicationId) { + return false; + } + + const relationTargetFlatObjectMetadata = isDefined( + flatFieldMetadata.relationTargetObjectMetadataId, + ) + ? findFlatEntityByIdInFlatEntityMaps({ + flatEntityMaps: flatObjectMetadataMaps, + flatEntityId: flatFieldMetadata.relationTargetObjectMetadataId, + }) + : undefined; + + if (flatFieldMetadata.applicationId === workspaceCustomApplicationId) { + if (flatFieldMetadata.name === NAME_FIELD_NAME) { + return true; + } + + if (!isMorphOrRelationFieldMetadataType(flatFieldMetadata.type)) { + return false; + } + + // Forward default relation fields on custom objects (attachments, + // noteTargets, taskTargets, timelineActivities). + if ( + DEFAULT_RELATION_FORWARD_FIELD_NAMES.has(flatFieldMetadata.name) && + isDefined(relationTargetFlatObjectMetadata) && + DEFAULT_RELATION_STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.has( + relationTargetFlatObjectMetadata.universalIdentifier, + ) + ) { + return true; + } + + // Reverse default relation fields living on the standard relation + // objects and pointing back at the custom object. + if ( + DEFAULT_RELATION_STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.has( + flatObjectMetadata.universalIdentifier, + ) && + isDefined(relationTargetFlatObjectMetadata) && + (flatFieldMetadata.name === + `target${capitalize(relationTargetFlatObjectMetadata.nameSingular)}` || + flatFieldMetadata.name === + relationTargetFlatObjectMetadata.nameSingular) + ) { + return true; + } + + return false; + } + + // Installed applications, remaining auto-provisioned fields (injected + // name field and default relation fields): only rows still carrying an + // SDK-auto-generated (legacy derivation) identifier are backfilled; + // author-provided identifiers must keep matching the application source + // code. + const legacyDefaultUniversalIdentifier = + computeLegacySdkDefaultFieldUniversalIdentifier({ + objectUniversalIdentifier: flatObjectMetadata.universalIdentifier, + fieldName: flatFieldMetadata.name, + }); + + if ( + flatFieldMetadata.universalIdentifier === legacyDefaultUniversalIdentifier + ) { + return true; + } + + // Legacy reverse default relation fields were derived from the custom + // object universal identifier and the forward field name suffixed with + // "Inverse". + const relationTargetFlatFieldMetadata = isDefined( + flatFieldMetadata.relationTargetFieldMetadataId, + ) + ? findFlatEntityByIdInFlatEntityMaps({ + flatEntityMaps: flatFieldMetadataMaps, + flatEntityId: flatFieldMetadata.relationTargetFieldMetadataId, + }) + : undefined; + + if ( + isDefined(relationTargetFlatObjectMetadata) && + isDefined(relationTargetFlatFieldMetadata) + ) { + const legacyReverseUniversalIdentifier = + computeLegacySdkDefaultFieldUniversalIdentifier({ + objectUniversalIdentifier: + relationTargetFlatObjectMetadata.universalIdentifier, + fieldName: `${relationTargetFlatFieldMetadata.name}Inverse`, + }); + + if ( + flatFieldMetadata.universalIdentifier === + legacyReverseUniversalIdentifier + ) { + return true; + } + } + + return false; + } +} diff --git a/packages/twenty-server/src/engine/core-modules/auth/services/google-apis.service.spec.ts b/packages/twenty-server/src/engine/core-modules/auth/services/google-apis.service.spec.ts index 80b24702aa..1a12b2a901 100644 --- a/packages/twenty-server/src/engine/core-modules/auth/services/google-apis.service.spec.ts +++ b/packages/twenty-server/src/engine/core-modules/auth/services/google-apis.service.spec.ts @@ -33,6 +33,7 @@ import { MessageChannelSyncStatusService } from 'src/modules/messaging/common/se import { SyncMessageFoldersService } from 'src/modules/messaging/message-folder-manager/services/sync-message-folders.service'; jest.mock('uuid', () => ({ + ...jest.requireActual('uuid'), v4: jest.fn(() => 'mocked-uuid'), })); diff --git a/packages/twenty-server/src/engine/core-modules/auth/services/microsoft-apis.service.spec.ts b/packages/twenty-server/src/engine/core-modules/auth/services/microsoft-apis.service.spec.ts index 345bd1db0f..4b5771a846 100644 --- a/packages/twenty-server/src/engine/core-modules/auth/services/microsoft-apis.service.spec.ts +++ b/packages/twenty-server/src/engine/core-modules/auth/services/microsoft-apis.service.spec.ts @@ -30,6 +30,7 @@ import { MessageChannelSyncStatusService } from 'src/modules/messaging/common/se import { SyncMessageFoldersService } from 'src/modules/messaging/message-folder-manager/services/sync-message-folders.service'; jest.mock('uuid', () => ({ + ...jest.requireActual('uuid'), v4: jest.fn(() => 'mocked-uuid'), })); diff --git a/packages/twenty-server/src/engine/core-modules/file/file-upload/services/file-upload.service.spec.ts b/packages/twenty-server/src/engine/core-modules/file/file-upload/services/file-upload.service.spec.ts index 5222e5349b..1ea5ae91fc 100644 --- a/packages/twenty-server/src/engine/core-modules/file/file-upload/services/file-upload.service.spec.ts +++ b/packages/twenty-server/src/engine/core-modules/file/file-upload/services/file-upload.service.spec.ts @@ -22,6 +22,7 @@ import { FieldMetadataEntity } from 'src/engine/metadata-modules/field-metadata/ import { getWorkspaceScopedRepositoryToken } from 'src/engine/twenty-orm/workspace-scoped-repository/get-workspace-scoped-repository-token.util'; jest.mock('uuid', () => ({ + ...jest.requireActual('uuid'), v4: jest.fn(() => 'mocked-file-id'), })); diff --git a/packages/twenty-server/src/engine/metadata-modules/flat-field-metadata/utils/generate-morph-or-relation-flat-field-metadata-pair.util.ts b/packages/twenty-server/src/engine/metadata-modules/flat-field-metadata/utils/generate-morph-or-relation-flat-field-metadata-pair.util.ts index 6bf92648ae..511d35a760 100644 --- a/packages/twenty-server/src/engine/metadata-modules/flat-field-metadata/utils/generate-morph-or-relation-flat-field-metadata-pair.util.ts +++ b/packages/twenty-server/src/engine/metadata-modules/flat-field-metadata/utils/generate-morph-or-relation-flat-field-metadata-pair.util.ts @@ -62,6 +62,8 @@ type GenerateMorphOrRelationFlatFieldMetadataPairArgs = { flatApplication: FlatApplication; targetFieldName?: string; junctionTargetFlatFieldMetadata?: FlatFieldMetadata; + sourceFieldUniversalIdentifier?: string; + targetFieldUniversalIdentifier?: string; }; export type SourceTargetMorphOrRelationFlatFieldAndFlatIndex = { @@ -79,6 +81,8 @@ export const generateMorphOrRelationFlatFieldMetadataPair = ({ morphId = null, targetFieldName, junctionTargetFlatFieldMetadata, + sourceFieldUniversalIdentifier: providedSourceFieldUniversalIdentifier, + targetFieldUniversalIdentifier: providedTargetFieldUniversalIdentifier, }: GenerateMorphOrRelationFlatFieldMetadataPairArgs): SourceTargetMorphOrRelationFlatFieldAndFlatIndex => { const sourceFlatFieldMetadataType = createFieldInput.type; @@ -91,8 +95,10 @@ export const generateMorphOrRelationFlatFieldMetadataPair = ({ junctionTargetFieldUniversalIdentifier: junctionTargetFlatFieldMetadata?.universalIdentifier, }); - const sourceFieldUniversalIdentifier = v4(); - const targetFieldUniversalIdentifier = v4(); + const sourceFieldUniversalIdentifier = + providedSourceFieldUniversalIdentifier ?? v4(); + const targetFieldUniversalIdentifier = + providedTargetFieldUniversalIdentifier ?? v4(); const defaultDescriptionFromField = buildDescriptionForRelationFieldMetadataOnFromField({ diff --git a/packages/twenty-server/src/engine/metadata-modules/flat-object-metadata/validators/utils/validate-object-metadata-system-fields-integrity.util.ts b/packages/twenty-server/src/engine/metadata-modules/flat-object-metadata/validators/utils/validate-object-metadata-system-fields-integrity.util.ts index 1c3dea75ab..03190f6fa0 100644 --- a/packages/twenty-server/src/engine/metadata-modules/flat-object-metadata/validators/utils/validate-object-metadata-system-fields-integrity.util.ts +++ b/packages/twenty-server/src/engine/metadata-modules/flat-object-metadata/validators/utils/validate-object-metadata-system-fields-integrity.util.ts @@ -1,4 +1,5 @@ import { msg } from '@lingui/core/macro'; +import { getFieldUniversalIdentifier } from 'twenty-shared/application'; import { isDefined } from 'twenty-shared/utils'; import { findFlatEntityByUniversalIdentifierOrThrow } from 'src/engine/metadata-modules/flat-entity/utils/find-flat-entity-by-universal-identifier-or-throw.util'; @@ -66,6 +67,30 @@ export const validateObjectMetadataSystemFieldsIntegrity = ({ }); } } + + // System field universal identifiers are server-owned and must match + // the deterministic derivation; clients cannot provide custom ones. + // TODO: remove once system fields are generated server side only by + // the metadata side effect engine and stripped from client inputs. + const expectedUniversalIdentifier = getFieldUniversalIdentifier({ + applicationUniversalIdentifier: + universalFlatObjectMetadata.applicationUniversalIdentifier, + objectUniversalIdentifier: + universalFlatObjectMetadata.universalIdentifier, + name: expectedFieldName, + }); + + if ( + universalFlatFieldMetadata.universalIdentifier !== + expectedUniversalIdentifier + ) { + errors.push({ + code: ObjectMetadataExceptionCode.INVALID_SYSTEM_FIELD, + message: `System field ${expectedFieldName} has invalid universalIdentifier: expected ${expectedUniversalIdentifier}, got ${universalFlatFieldMetadata.universalIdentifier}`, + userFriendlyMessage: msg`System field ${expectedFieldName} universal identifier is not deterministic; it is derived by the server and cannot be customized`, + value: universalFlatFieldMetadata.universalIdentifier, + }); + } } } diff --git a/packages/twenty-server/src/engine/metadata-modules/object-metadata/utils/build-default-flat-field-metadatas-for-custom-object.util.ts b/packages/twenty-server/src/engine/metadata-modules/object-metadata/utils/build-default-flat-field-metadatas-for-custom-object.util.ts index 8ea6038467..2830559652 100644 --- a/packages/twenty-server/src/engine/metadata-modules/object-metadata/utils/build-default-flat-field-metadatas-for-custom-object.util.ts +++ b/packages/twenty-server/src/engine/metadata-modules/object-metadata/utils/build-default-flat-field-metadatas-for-custom-object.util.ts @@ -1,5 +1,5 @@ +import { getFieldUniversalIdentifier } from 'twenty-shared/application'; import { FieldMetadataType } from 'twenty-shared/types'; -import { v4 } from 'uuid'; import { PARTIAL_SYSTEM_FLAT_FIELD_METADATAS } from 'src/engine/metadata-modules/object-metadata/constants/partial-system-flat-field-metadatas.constant'; import { type UniversalFlatFieldMetadata } from 'src/engine/workspace-manager/workspace-migration/universal-flat-entity/types/universal-flat-field-metadata.type'; @@ -39,10 +39,17 @@ const buildObjectSystemFlatFieldMetadatas = ({ updatedBy, } = PARTIAL_SYSTEM_FLAT_FIELD_METADATAS; + const computeFieldUniversalIdentifier = (name: string) => + getFieldUniversalIdentifier({ + applicationUniversalIdentifier, + objectUniversalIdentifier: objectMetadataUniversalIdentifier, + name, + }); + return { id: { ...id, - universalIdentifier: v4(), + universalIdentifier: computeFieldUniversalIdentifier(id.name), applicationUniversalIdentifier, objectMetadataUniversalIdentifier, createdAt: now, @@ -50,7 +57,7 @@ const buildObjectSystemFlatFieldMetadatas = ({ }, createdAt: { ...createdAt, - universalIdentifier: v4(), + universalIdentifier: computeFieldUniversalIdentifier(createdAt.name), applicationUniversalIdentifier, objectMetadataUniversalIdentifier, createdAt: now, @@ -58,7 +65,7 @@ const buildObjectSystemFlatFieldMetadatas = ({ }, createdBy: { ...createdBy, - universalIdentifier: v4(), + universalIdentifier: computeFieldUniversalIdentifier(createdBy.name), applicationUniversalIdentifier, objectMetadataUniversalIdentifier, createdAt: now, @@ -66,7 +73,7 @@ const buildObjectSystemFlatFieldMetadatas = ({ }, deletedAt: { ...deletedAt, - universalIdentifier: v4(), + universalIdentifier: computeFieldUniversalIdentifier(deletedAt.name), applicationUniversalIdentifier, objectMetadataUniversalIdentifier, createdAt: now, @@ -74,7 +81,7 @@ const buildObjectSystemFlatFieldMetadatas = ({ }, position: { ...position, - universalIdentifier: v4(), + universalIdentifier: computeFieldUniversalIdentifier(position.name), applicationUniversalIdentifier, objectMetadataUniversalIdentifier, createdAt: now, @@ -82,7 +89,7 @@ const buildObjectSystemFlatFieldMetadatas = ({ }, searchVector: { ...searchVector, - universalIdentifier: v4(), + universalIdentifier: computeFieldUniversalIdentifier(searchVector.name), applicationUniversalIdentifier, objectMetadataUniversalIdentifier, createdAt: now, @@ -91,7 +98,7 @@ const buildObjectSystemFlatFieldMetadatas = ({ }, updatedAt: { ...updatedAt, - universalIdentifier: v4(), + universalIdentifier: computeFieldUniversalIdentifier(updatedAt.name), applicationUniversalIdentifier, objectMetadataUniversalIdentifier, createdAt: now, @@ -99,7 +106,7 @@ const buildObjectSystemFlatFieldMetadatas = ({ }, updatedBy: { ...updatedBy, - universalIdentifier: v4(), + universalIdentifier: computeFieldUniversalIdentifier(updatedBy.name), applicationUniversalIdentifier, objectMetadataUniversalIdentifier, createdAt: now, @@ -125,7 +132,11 @@ export const buildDefaultFlatFieldMetadatasForCustomObject = ({ type: FieldMetadataType.TEXT, isLabelSyncedWithName: false, isUnique: false, - universalIdentifier: v4(), + universalIdentifier: getFieldUniversalIdentifier({ + applicationUniversalIdentifier, + objectUniversalIdentifier: objectMetadataUniversalIdentifier, + name: 'name', + }), name: 'name', label: 'Name', icon: 'IconAbc', diff --git a/packages/twenty-server/src/engine/metadata-modules/object-metadata/utils/build-default-relation-flat-field-metadatas-for-custom-object.util.ts b/packages/twenty-server/src/engine/metadata-modules/object-metadata/utils/build-default-relation-flat-field-metadatas-for-custom-object.util.ts index f1a318d0e3..c0bcbb7408 100644 --- a/packages/twenty-server/src/engine/metadata-modules/object-metadata/utils/build-default-relation-flat-field-metadatas-for-custom-object.util.ts +++ b/packages/twenty-server/src/engine/metadata-modules/object-metadata/utils/build-default-relation-flat-field-metadatas-for-custom-object.util.ts @@ -1,3 +1,4 @@ +import { getFieldUniversalIdentifier } from 'twenty-shared/application'; import { STANDARD_OBJECTS, DEFAULT_RELATIONS_OBJECTS_STANDARD_IDS, @@ -117,6 +118,22 @@ export const buildDefaultRelationFlatFieldMetadatasForCustomObject = ({ const morphId = morphIdByRelationObjectNameSingular[objectMetadataNameSingular]; + // Default relation fields get deterministic universal identifiers so + // that provisioning the same custom object always yields the same + // identifiers (matching the SDK manifest derivation). + const sourceFieldUniversalIdentifier = getFieldUniversalIdentifier({ + applicationUniversalIdentifier: flatApplication.universalIdentifier, + objectUniversalIdentifier: + sourceFlatObjectMetadata.universalIdentifier, + name: targetFlatObjectMetadata.namePlural, + }); + const targetFieldUniversalIdentifier = getFieldUniversalIdentifier({ + applicationUniversalIdentifier: flatApplication.universalIdentifier, + objectUniversalIdentifier: + targetFlatObjectMetadata.universalIdentifier, + name: fieldName, + }); + const { flatFieldMetadatas, indexMetadatas } = generateMorphOrRelationFlatFieldMetadataPair({ sourceFlatObjectMetadata, @@ -128,6 +145,8 @@ export const buildDefaultRelationFlatFieldMetadatasForCustomObject = ({ sourceFlatObjectMetadataJoinColumnName: joinColumnName, morphId, targetFieldName: fieldName, + sourceFieldUniversalIdentifier, + targetFieldUniversalIdentifier, createFieldInput: { icon: standardFieldProperties.icon, type: FieldMetadataType.RELATION, diff --git a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/__tests__/__snapshots__/get-standard-object-metadata-related-entity-ids.util.spec.ts.snap b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/__tests__/__snapshots__/get-standard-object-metadata-related-entity-ids.util.spec.ts.snap index 1bd4919d98..ccfc8c1206 100644 --- a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/__tests__/__snapshots__/get-standard-object-metadata-related-entity-ids.util.spec.ts.snap +++ b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/__tests__/__snapshots__/get-standard-object-metadata-related-entity-ids.util.spec.ts.snap @@ -8,58 +8,58 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object "id": "00000000-0000-0000-0000-000000000002", }, "createdBy": { - "id": "00000000-0000-0000-0000-000000000009", + "id": "00000000-0000-0000-0000-000000000005", }, "deletedAt": { "id": "00000000-0000-0000-0000-000000000004", }, "file": { - "id": "00000000-0000-0000-0000-000000000006", + "id": "00000000-0000-0000-0000-000000000010", }, "fileCategory": { - "id": "00000000-0000-0000-0000-000000000008", + "id": "00000000-0000-0000-0000-000000000012", }, "fullPath": { - "id": "00000000-0000-0000-0000-000000000007", + "id": "00000000-0000-0000-0000-000000000011", }, "id": { "id": "00000000-0000-0000-0000-000000000001", }, "name": { - "id": "00000000-0000-0000-0000-000000000005", + "id": "00000000-0000-0000-0000-000000000009", }, "position": { - "id": "00000000-0000-0000-0000-000000000018", + "id": "00000000-0000-0000-0000-000000000007", }, "searchVector": { - "id": "00000000-0000-0000-0000-000000000019", + "id": "00000000-0000-0000-0000-000000000008", }, "targetCompany": { - "id": "00000000-0000-0000-0000-000000000014", - }, - "targetDashboard": { "id": "00000000-0000-0000-0000-000000000016", }, + "targetDashboard": { + "id": "00000000-0000-0000-0000-000000000018", + }, "targetNote": { - "id": "00000000-0000-0000-0000-000000000012", + "id": "00000000-0000-0000-0000-000000000014", }, "targetOpportunity": { - "id": "00000000-0000-0000-0000-000000000015", + "id": "00000000-0000-0000-0000-000000000017", }, "targetPerson": { - "id": "00000000-0000-0000-0000-000000000013", + "id": "00000000-0000-0000-0000-000000000015", }, "targetTask": { - "id": "00000000-0000-0000-0000-000000000011", + "id": "00000000-0000-0000-0000-000000000013", }, "targetWorkflow": { - "id": "00000000-0000-0000-0000-000000000017", + "id": "00000000-0000-0000-0000-000000000019", }, "updatedAt": { "id": "00000000-0000-0000-0000-000000000003", }, "updatedBy": { - "id": "00000000-0000-0000-0000-000000000010", + "id": "00000000-0000-0000-0000-000000000006", }, }, "id": "00000000-0000-0000-0000-000000000032", @@ -112,31 +112,31 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object "id": "00000000-0000-0000-0000-000000000034", }, "createdBy": { - "id": "00000000-0000-0000-0000-000000000039", + "id": "00000000-0000-0000-0000-000000000037", }, "deletedAt": { "id": "00000000-0000-0000-0000-000000000036", }, "handle": { - "id": "00000000-0000-0000-0000-000000000037", + "id": "00000000-0000-0000-0000-000000000041", }, "id": { "id": "00000000-0000-0000-0000-000000000033", }, "position": { - "id": "00000000-0000-0000-0000-000000000041", + "id": "00000000-0000-0000-0000-000000000039", }, "searchVector": { - "id": "00000000-0000-0000-0000-000000000042", + "id": "00000000-0000-0000-0000-000000000040", }, "updatedAt": { "id": "00000000-0000-0000-0000-000000000035", }, "updatedBy": { - "id": "00000000-0000-0000-0000-000000000040", + "id": "00000000-0000-0000-0000-000000000038", }, "workspaceMember": { - "id": "00000000-0000-0000-0000-000000000038", + "id": "00000000-0000-0000-0000-000000000042", }, }, "id": "00000000-0000-0000-0000-000000000053", @@ -185,40 +185,40 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object "calendarChannelEventAssociation": { "fields": { "calendarChannelId": { - "id": "00000000-0000-0000-0000-000000000058", + "id": "00000000-0000-0000-0000-000000000062", }, "calendarEvent": { - "id": "00000000-0000-0000-0000-000000000059", + "id": "00000000-0000-0000-0000-000000000063", }, "createdAt": { "id": "00000000-0000-0000-0000-000000000055", }, "createdBy": { - "id": "00000000-0000-0000-0000-000000000062", + "id": "00000000-0000-0000-0000-000000000058", }, "deletedAt": { "id": "00000000-0000-0000-0000-000000000057", }, "eventExternalId": { - "id": "00000000-0000-0000-0000-000000000060", + "id": "00000000-0000-0000-0000-000000000064", }, "id": { "id": "00000000-0000-0000-0000-000000000054", }, "position": { - "id": "00000000-0000-0000-0000-000000000064", + "id": "00000000-0000-0000-0000-000000000060", }, "recurringEventExternalId": { - "id": "00000000-0000-0000-0000-000000000061", + "id": "00000000-0000-0000-0000-000000000065", }, "searchVector": { - "id": "00000000-0000-0000-0000-000000000065", + "id": "00000000-0000-0000-0000-000000000061", }, "updatedAt": { "id": "00000000-0000-0000-0000-000000000056", }, "updatedBy": { - "id": "00000000-0000-0000-0000-000000000063", + "id": "00000000-0000-0000-0000-000000000059", }, }, "id": "00000000-0000-0000-0000-000000000079", @@ -276,73 +276,73 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object "calendarEvent": { "fields": { "calendarChannelEventAssociations": { - "id": "00000000-0000-0000-0000-000000000133", + "id": "00000000-0000-0000-0000-000000000137", }, "calendarEventParticipants": { - "id": "00000000-0000-0000-0000-000000000134", + "id": "00000000-0000-0000-0000-000000000138", }, "callRecordings": { - "id": "00000000-0000-0000-0000-000000000135", + "id": "00000000-0000-0000-0000-000000000139", }, "conferenceLink": { - "id": "00000000-0000-0000-0000-000000000132", + "id": "00000000-0000-0000-0000-000000000136", }, "conferenceSolution": { - "id": "00000000-0000-0000-0000-000000000131", + "id": "00000000-0000-0000-0000-000000000135", }, "createdAt": { "id": "00000000-0000-0000-0000-000000000118", }, "createdBy": { - "id": "00000000-0000-0000-0000-000000000136", + "id": "00000000-0000-0000-0000-000000000121", }, "deletedAt": { "id": "00000000-0000-0000-0000-000000000120", }, "description": { - "id": "00000000-0000-0000-0000-000000000128", + "id": "00000000-0000-0000-0000-000000000132", }, "endsAt": { - "id": "00000000-0000-0000-0000-000000000125", + "id": "00000000-0000-0000-0000-000000000129", }, "externalCreatedAt": { - "id": "00000000-0000-0000-0000-000000000126", + "id": "00000000-0000-0000-0000-000000000130", }, "externalUpdatedAt": { - "id": "00000000-0000-0000-0000-000000000127", + "id": "00000000-0000-0000-0000-000000000131", }, "iCalUid": { - "id": "00000000-0000-0000-0000-000000000130", + "id": "00000000-0000-0000-0000-000000000134", }, "id": { "id": "00000000-0000-0000-0000-000000000117", }, "isCanceled": { - "id": "00000000-0000-0000-0000-000000000122", + "id": "00000000-0000-0000-0000-000000000126", }, "isFullDay": { - "id": "00000000-0000-0000-0000-000000000123", + "id": "00000000-0000-0000-0000-000000000127", }, "location": { - "id": "00000000-0000-0000-0000-000000000129", + "id": "00000000-0000-0000-0000-000000000133", }, "position": { - "id": "00000000-0000-0000-0000-000000000138", + "id": "00000000-0000-0000-0000-000000000123", }, "searchVector": { - "id": "00000000-0000-0000-0000-000000000139", - }, - "startsAt": { "id": "00000000-0000-0000-0000-000000000124", }, + "startsAt": { + "id": "00000000-0000-0000-0000-000000000128", + }, "title": { - "id": "00000000-0000-0000-0000-000000000121", + "id": "00000000-0000-0000-0000-000000000125", }, "updatedAt": { "id": "00000000-0000-0000-0000-000000000119", }, "updatedBy": { - "id": "00000000-0000-0000-0000-000000000137", + "id": "00000000-0000-0000-0000-000000000122", }, }, "id": "00000000-0000-0000-0000-000000000164", @@ -433,49 +433,49 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object "calendarEventParticipant": { "fields": { "calendarEvent": { - "id": "00000000-0000-0000-0000-000000000084", + "id": "00000000-0000-0000-0000-000000000088", }, "createdAt": { "id": "00000000-0000-0000-0000-000000000081", }, "createdBy": { - "id": "00000000-0000-0000-0000-000000000091", + "id": "00000000-0000-0000-0000-000000000084", }, "deletedAt": { "id": "00000000-0000-0000-0000-000000000083", }, "displayName": { - "id": "00000000-0000-0000-0000-000000000086", + "id": "00000000-0000-0000-0000-000000000090", }, "handle": { - "id": "00000000-0000-0000-0000-000000000085", + "id": "00000000-0000-0000-0000-000000000089", }, "id": { "id": "00000000-0000-0000-0000-000000000080", }, "isOrganizer": { - "id": "00000000-0000-0000-0000-000000000087", + "id": "00000000-0000-0000-0000-000000000091", }, "person": { - "id": "00000000-0000-0000-0000-000000000089", - }, - "position": { "id": "00000000-0000-0000-0000-000000000093", }, + "position": { + "id": "00000000-0000-0000-0000-000000000086", + }, "responseStatus": { - "id": "00000000-0000-0000-0000-000000000088", + "id": "00000000-0000-0000-0000-000000000092", }, "searchVector": { - "id": "00000000-0000-0000-0000-000000000094", + "id": "00000000-0000-0000-0000-000000000087", }, "updatedAt": { "id": "00000000-0000-0000-0000-000000000082", }, "updatedBy": { - "id": "00000000-0000-0000-0000-000000000092", + "id": "00000000-0000-0000-0000-000000000085", }, "workspaceMember": { - "id": "00000000-0000-0000-0000-000000000090", + "id": "00000000-0000-0000-0000-000000000094", }, }, "id": "00000000-0000-0000-0000-000000000116", @@ -557,67 +557,67 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object "callRecording": { "fields": { "applicationId": { - "id": "00000000-0000-0000-0000-000000000172", + "id": "00000000-0000-0000-0000-000000000176", }, "audio": { - "id": "00000000-0000-0000-0000-000000000178", + "id": "00000000-0000-0000-0000-000000000182", }, "calendarEvent": { - "id": "00000000-0000-0000-0000-000000000181", + "id": "00000000-0000-0000-0000-000000000185", }, "createdAt": { "id": "00000000-0000-0000-0000-000000000166", }, "createdBy": { - "id": "00000000-0000-0000-0000-000000000182", + "id": "00000000-0000-0000-0000-000000000169", }, "deletedAt": { "id": "00000000-0000-0000-0000-000000000168", }, "endedAt": { - "id": "00000000-0000-0000-0000-000000000176", + "id": "00000000-0000-0000-0000-000000000180", }, "externalBotId": { - "id": "00000000-0000-0000-0000-000000000173", + "id": "00000000-0000-0000-0000-000000000177", }, "externalRecordingId": { - "id": "00000000-0000-0000-0000-000000000174", + "id": "00000000-0000-0000-0000-000000000178", }, "id": { "id": "00000000-0000-0000-0000-000000000165", }, "position": { - "id": "00000000-0000-0000-0000-000000000184", - }, - "recordingRequestStatus": { "id": "00000000-0000-0000-0000-000000000171", }, - "searchVector": { - "id": "00000000-0000-0000-0000-000000000185", - }, - "startedAt": { + "recordingRequestStatus": { "id": "00000000-0000-0000-0000-000000000175", }, + "searchVector": { + "id": "00000000-0000-0000-0000-000000000172", + }, + "startedAt": { + "id": "00000000-0000-0000-0000-000000000179", + }, "status": { - "id": "00000000-0000-0000-0000-000000000170", + "id": "00000000-0000-0000-0000-000000000174", }, "summary": { - "id": "00000000-0000-0000-0000-000000000180", + "id": "00000000-0000-0000-0000-000000000184", }, "title": { - "id": "00000000-0000-0000-0000-000000000169", + "id": "00000000-0000-0000-0000-000000000173", }, "transcript": { - "id": "00000000-0000-0000-0000-000000000179", + "id": "00000000-0000-0000-0000-000000000183", }, "updatedAt": { "id": "00000000-0000-0000-0000-000000000167", }, "updatedBy": { - "id": "00000000-0000-0000-0000-000000000183", + "id": "00000000-0000-0000-0000-000000000170", }, "video": { - "id": "00000000-0000-0000-0000-000000000177", + "id": "00000000-0000-0000-0000-000000000181", }, }, "id": "00000000-0000-0000-0000-000000000202", @@ -684,64 +684,64 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object "company": { "fields": { "accountOwner": { - "id": "00000000-0000-0000-0000-000000000216", + "id": "00000000-0000-0000-0000-000000000217", }, "address": { - "id": "00000000-0000-0000-0000-000000000209", + "id": "00000000-0000-0000-0000-000000000213", }, "annualRevenue": { - "id": "00000000-0000-0000-0000-000000000211", + "id": "00000000-0000-0000-0000-000000000215", }, "attachments": { - "id": "00000000-0000-0000-0000-000000000220", + "id": "00000000-0000-0000-0000-000000000221", }, "createdAt": { "id": "00000000-0000-0000-0000-000000000204", }, "createdBy": { - "id": "00000000-0000-0000-0000-000000000213", + "id": "00000000-0000-0000-0000-000000000207", }, "deletedAt": { "id": "00000000-0000-0000-0000-000000000206", }, "domainName": { - "id": "00000000-0000-0000-0000-000000000208", + "id": "00000000-0000-0000-0000-000000000212", }, "id": { "id": "00000000-0000-0000-0000-000000000203", }, "linkedinLink": { - "id": "00000000-0000-0000-0000-000000000210", + "id": "00000000-0000-0000-0000-000000000214", }, "name": { - "id": "00000000-0000-0000-0000-000000000207", + "id": "00000000-0000-0000-0000-000000000211", }, "noteTargets": { - "id": "00000000-0000-0000-0000-000000000218", - }, - "opportunities": { "id": "00000000-0000-0000-0000-000000000219", }, + "opportunities": { + "id": "00000000-0000-0000-0000-000000000220", + }, "people": { - "id": "00000000-0000-0000-0000-000000000215", + "id": "00000000-0000-0000-0000-000000000216", }, "position": { - "id": "00000000-0000-0000-0000-000000000212", + "id": "00000000-0000-0000-0000-000000000209", }, "searchVector": { - "id": "00000000-0000-0000-0000-000000000222", + "id": "00000000-0000-0000-0000-000000000210", }, "taskTargets": { - "id": "00000000-0000-0000-0000-000000000217", + "id": "00000000-0000-0000-0000-000000000218", }, "timelineActivities": { - "id": "00000000-0000-0000-0000-000000000221", + "id": "00000000-0000-0000-0000-000000000222", }, "updatedAt": { "id": "00000000-0000-0000-0000-000000000205", }, "updatedBy": { - "id": "00000000-0000-0000-0000-000000000214", + "id": "00000000-0000-0000-0000-000000000208", }, }, "id": "00000000-0000-0000-0000-000000000251", @@ -844,13 +844,13 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object "dashboard": { "fields": { "attachments": { - "id": "00000000-0000-0000-0000-000000000262", + "id": "00000000-0000-0000-0000-000000000263", }, "createdAt": { "id": "00000000-0000-0000-0000-000000000253", }, "createdBy": { - "id": "00000000-0000-0000-0000-000000000259", + "id": "00000000-0000-0000-0000-000000000256", }, "deletedAt": { "id": "00000000-0000-0000-0000-000000000255", @@ -859,25 +859,25 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object "id": "00000000-0000-0000-0000-000000000252", }, "pageLayoutId": { - "id": "00000000-0000-0000-0000-000000000258", - }, - "position": { - "id": "00000000-0000-0000-0000-000000000257", - }, - "searchVector": { - "id": "00000000-0000-0000-0000-000000000263", - }, - "timelineActivities": { "id": "00000000-0000-0000-0000-000000000261", }, + "position": { + "id": "00000000-0000-0000-0000-000000000258", + }, + "searchVector": { + "id": "00000000-0000-0000-0000-000000000259", + }, + "timelineActivities": { + "id": "00000000-0000-0000-0000-000000000262", + }, "title": { - "id": "00000000-0000-0000-0000-000000000256", + "id": "00000000-0000-0000-0000-000000000260", }, "updatedAt": { "id": "00000000-0000-0000-0000-000000000254", }, "updatedBy": { - "id": "00000000-0000-0000-0000-000000000260", + "id": "00000000-0000-0000-0000-000000000257", }, }, "id": "00000000-0000-0000-0000-000000000269", @@ -909,55 +909,55 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object "id": "00000000-0000-0000-0000-000000000418", }, "createdBy": { - "id": "00000000-0000-0000-0000-000000000431", + "id": "00000000-0000-0000-0000-000000000421", }, "deletedAt": { "id": "00000000-0000-0000-0000-000000000420", }, "deliveryStatus": { - "id": "00000000-0000-0000-0000-000000000429", + "id": "00000000-0000-0000-0000-000000000433", }, "headerMessageId": { - "id": "00000000-0000-0000-0000-000000000421", + "id": "00000000-0000-0000-0000-000000000425", }, "id": { "id": "00000000-0000-0000-0000-000000000417", }, "isDraft": { - "id": "00000000-0000-0000-0000-000000000430", - }, - "messageCampaign": { - "id": "00000000-0000-0000-0000-000000000428", - }, - "messageChannelMessageAssociations": { - "id": "00000000-0000-0000-0000-000000000427", - }, - "messageParticipants": { - "id": "00000000-0000-0000-0000-000000000426", - }, - "messageThread": { - "id": "00000000-0000-0000-0000-000000000422", - }, - "position": { - "id": "00000000-0000-0000-0000-000000000433", - }, - "receivedAt": { - "id": "00000000-0000-0000-0000-000000000425", - }, - "searchVector": { "id": "00000000-0000-0000-0000-000000000434", }, - "subject": { + "messageCampaign": { + "id": "00000000-0000-0000-0000-000000000432", + }, + "messageChannelMessageAssociations": { + "id": "00000000-0000-0000-0000-000000000431", + }, + "messageParticipants": { + "id": "00000000-0000-0000-0000-000000000430", + }, + "messageThread": { + "id": "00000000-0000-0000-0000-000000000426", + }, + "position": { "id": "00000000-0000-0000-0000-000000000423", }, - "text": { + "receivedAt": { + "id": "00000000-0000-0000-0000-000000000429", + }, + "searchVector": { "id": "00000000-0000-0000-0000-000000000424", }, + "subject": { + "id": "00000000-0000-0000-0000-000000000427", + }, + "text": { + "id": "00000000-0000-0000-0000-000000000428", + }, "updatedAt": { "id": "00000000-0000-0000-0000-000000000419", }, "updatedBy": { - "id": "00000000-0000-0000-0000-000000000432", + "id": "00000000-0000-0000-0000-000000000422", }, }, "id": "00000000-0000-0000-0000-000000000443", @@ -1058,46 +1058,46 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object "id": "00000000-0000-0000-0000-000000000314", }, "createdBy": { - "id": "00000000-0000-0000-0000-000000000323", + "id": "00000000-0000-0000-0000-000000000317", }, "deletedAt": { "id": "00000000-0000-0000-0000-000000000316", }, "direction": { - "id": "00000000-0000-0000-0000-000000000322", + "id": "00000000-0000-0000-0000-000000000326", }, "id": { "id": "00000000-0000-0000-0000-000000000313", }, "message": { - "id": "00000000-0000-0000-0000-000000000318", + "id": "00000000-0000-0000-0000-000000000322", }, "messageChannelId": { - "id": "00000000-0000-0000-0000-000000000317", + "id": "00000000-0000-0000-0000-000000000321", }, "messageExternalId": { - "id": "00000000-0000-0000-0000-000000000319", + "id": "00000000-0000-0000-0000-000000000323", }, "messageFolders": { "id": "00000000-0000-0000-0000-000000000327", }, "messageThread": { - "id": "00000000-0000-0000-0000-000000000320", + "id": "00000000-0000-0000-0000-000000000324", }, "messageThreadExternalId": { - "id": "00000000-0000-0000-0000-000000000321", - }, - "position": { "id": "00000000-0000-0000-0000-000000000325", }, + "position": { + "id": "00000000-0000-0000-0000-000000000319", + }, "searchVector": { - "id": "00000000-0000-0000-0000-000000000326", + "id": "00000000-0000-0000-0000-000000000320", }, "updatedAt": { "id": "00000000-0000-0000-0000-000000000315", }, "updatedBy": { - "id": "00000000-0000-0000-0000-000000000324", + "id": "00000000-0000-0000-0000-000000000318", }, }, "id": "00000000-0000-0000-0000-000000000343", @@ -1321,46 +1321,46 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object "id": "00000000-0000-0000-0000-000000000367", }, "createdBy": { - "id": "00000000-0000-0000-0000-000000000377", + "id": "00000000-0000-0000-0000-000000000370", }, "deletedAt": { "id": "00000000-0000-0000-0000-000000000369", }, "displayName": { - "id": "00000000-0000-0000-0000-000000000373", + "id": "00000000-0000-0000-0000-000000000377", }, "handle": { - "id": "00000000-0000-0000-0000-000000000372", + "id": "00000000-0000-0000-0000-000000000376", }, "id": { "id": "00000000-0000-0000-0000-000000000366", }, "message": { - "id": "00000000-0000-0000-0000-000000000370", - }, - "messageCampaign": { - "id": "00000000-0000-0000-0000-000000000376", - }, - "person": { "id": "00000000-0000-0000-0000-000000000374", }, + "messageCampaign": { + "id": "00000000-0000-0000-0000-000000000380", + }, + "person": { + "id": "00000000-0000-0000-0000-000000000378", + }, "position": { - "id": "00000000-0000-0000-0000-000000000379", + "id": "00000000-0000-0000-0000-000000000372", }, "role": { - "id": "00000000-0000-0000-0000-000000000371", + "id": "00000000-0000-0000-0000-000000000375", }, "searchVector": { - "id": "00000000-0000-0000-0000-000000000380", + "id": "00000000-0000-0000-0000-000000000373", }, "updatedAt": { "id": "00000000-0000-0000-0000-000000000368", }, "updatedBy": { - "id": "00000000-0000-0000-0000-000000000378", + "id": "00000000-0000-0000-0000-000000000371", }, "workspaceMember": { - "id": "00000000-0000-0000-0000-000000000375", + "id": "00000000-0000-0000-0000-000000000379", }, }, "id": "00000000-0000-0000-0000-000000000399", @@ -1436,7 +1436,7 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object "id": "00000000-0000-0000-0000-000000000401", }, "createdBy": { - "id": "00000000-0000-0000-0000-000000000406", + "id": "00000000-0000-0000-0000-000000000404", }, "deletedAt": { "id": "00000000-0000-0000-0000-000000000403", @@ -1445,16 +1445,16 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object "id": "00000000-0000-0000-0000-000000000400", }, "messageChannelMessageAssociations": { - "id": "00000000-0000-0000-0000-000000000405", + "id": "00000000-0000-0000-0000-000000000409", }, "messages": { - "id": "00000000-0000-0000-0000-000000000404", - }, - "position": { "id": "00000000-0000-0000-0000-000000000408", }, + "position": { + "id": "00000000-0000-0000-0000-000000000406", + }, "searchVector": { - "id": "00000000-0000-0000-0000-000000000409", + "id": "00000000-0000-0000-0000-000000000407", }, "subject": { "id": "00000000-0000-0000-0000-000000000410", @@ -1463,7 +1463,7 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object "id": "00000000-0000-0000-0000-000000000402", }, "updatedBy": { - "id": "00000000-0000-0000-0000-000000000407", + "id": "00000000-0000-0000-0000-000000000405", }, }, "id": "00000000-0000-0000-0000-000000000416", @@ -1492,16 +1492,16 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object "note": { "fields": { "attachments": { - "id": "00000000-0000-0000-0000-000000000454", + "id": "00000000-0000-0000-0000-000000000455", }, "bodyV2": { - "id": "00000000-0000-0000-0000-000000000450", + "id": "00000000-0000-0000-0000-000000000453", }, "createdAt": { "id": "00000000-0000-0000-0000-000000000445", }, "createdBy": { - "id": "00000000-0000-0000-0000-000000000451", + "id": "00000000-0000-0000-0000-000000000448", }, "deletedAt": { "id": "00000000-0000-0000-0000-000000000447", @@ -1510,25 +1510,25 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object "id": "00000000-0000-0000-0000-000000000444", }, "noteTargets": { - "id": "00000000-0000-0000-0000-000000000453", + "id": "00000000-0000-0000-0000-000000000454", }, "position": { - "id": "00000000-0000-0000-0000-000000000448", + "id": "00000000-0000-0000-0000-000000000450", }, "searchVector": { - "id": "00000000-0000-0000-0000-000000000456", + "id": "00000000-0000-0000-0000-000000000451", }, "timelineActivities": { - "id": "00000000-0000-0000-0000-000000000455", + "id": "00000000-0000-0000-0000-000000000456", }, "title": { - "id": "00000000-0000-0000-0000-000000000449", + "id": "00000000-0000-0000-0000-000000000452", }, "updatedAt": { "id": "00000000-0000-0000-0000-000000000446", }, "updatedBy": { - "id": "00000000-0000-0000-0000-000000000452", + "id": "00000000-0000-0000-0000-000000000449", }, }, "id": "00000000-0000-0000-0000-000000000474", @@ -1601,7 +1601,7 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object "id": "00000000-0000-0000-0000-000000000476", }, "createdBy": { - "id": "00000000-0000-0000-0000-000000000483", + "id": "00000000-0000-0000-0000-000000000479", }, "deletedAt": { "id": "00000000-0000-0000-0000-000000000478", @@ -1610,28 +1610,28 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object "id": "00000000-0000-0000-0000-000000000475", }, "note": { - "id": "00000000-0000-0000-0000-000000000479", + "id": "00000000-0000-0000-0000-000000000483", }, "position": { - "id": "00000000-0000-0000-0000-000000000485", - }, - "searchVector": { - "id": "00000000-0000-0000-0000-000000000486", - }, - "targetCompany": { "id": "00000000-0000-0000-0000-000000000481", }, - "targetOpportunity": { + "searchVector": { "id": "00000000-0000-0000-0000-000000000482", }, + "targetCompany": { + "id": "00000000-0000-0000-0000-000000000485", + }, + "targetOpportunity": { + "id": "00000000-0000-0000-0000-000000000486", + }, "targetPerson": { - "id": "00000000-0000-0000-0000-000000000480", + "id": "00000000-0000-0000-0000-000000000484", }, "updatedAt": { "id": "00000000-0000-0000-0000-000000000477", }, "updatedBy": { - "id": "00000000-0000-0000-0000-000000000484", + "id": "00000000-0000-0000-0000-000000000480", }, }, "id": "00000000-0000-0000-0000-000000000493", @@ -1663,22 +1663,22 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object "opportunity": { "fields": { "amount": { - "id": "00000000-0000-0000-0000-000000000499", + "id": "00000000-0000-0000-0000-000000000503", }, "attachments": { - "id": "00000000-0000-0000-0000-000000000510", + "id": "00000000-0000-0000-0000-000000000511", }, "closeDate": { - "id": "00000000-0000-0000-0000-000000000500", + "id": "00000000-0000-0000-0000-000000000504", }, "company": { - "id": "00000000-0000-0000-0000-000000000506", + "id": "00000000-0000-0000-0000-000000000507", }, "createdAt": { "id": "00000000-0000-0000-0000-000000000495", }, "createdBy": { - "id": "00000000-0000-0000-0000-000000000503", + "id": "00000000-0000-0000-0000-000000000498", }, "deletedAt": { "id": "00000000-0000-0000-0000-000000000497", @@ -1687,37 +1687,37 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object "id": "00000000-0000-0000-0000-000000000494", }, "name": { - "id": "00000000-0000-0000-0000-000000000498", - }, - "noteTargets": { - "id": "00000000-0000-0000-0000-000000000509", - }, - "owner": { - "id": "00000000-0000-0000-0000-000000000507", - }, - "pointOfContact": { - "id": "00000000-0000-0000-0000-000000000505", - }, - "position": { "id": "00000000-0000-0000-0000-000000000502", }, - "searchVector": { - "id": "00000000-0000-0000-0000-000000000512", + "noteTargets": { + "id": "00000000-0000-0000-0000-000000000510", }, - "stage": { - "id": "00000000-0000-0000-0000-000000000501", - }, - "taskTargets": { + "owner": { "id": "00000000-0000-0000-0000-000000000508", }, + "pointOfContact": { + "id": "00000000-0000-0000-0000-000000000506", + }, + "position": { + "id": "00000000-0000-0000-0000-000000000500", + }, + "searchVector": { + "id": "00000000-0000-0000-0000-000000000501", + }, + "stage": { + "id": "00000000-0000-0000-0000-000000000505", + }, + "taskTargets": { + "id": "00000000-0000-0000-0000-000000000509", + }, "timelineActivities": { - "id": "00000000-0000-0000-0000-000000000511", + "id": "00000000-0000-0000-0000-000000000512", }, "updatedAt": { "id": "00000000-0000-0000-0000-000000000496", }, "updatedBy": { - "id": "00000000-0000-0000-0000-000000000504", + "id": "00000000-0000-0000-0000-000000000499", }, }, "id": "00000000-0000-0000-0000-000000000550", @@ -1852,76 +1852,76 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object "person": { "fields": { "attachments": { - "id": "00000000-0000-0000-0000-000000000569", + "id": "00000000-0000-0000-0000-000000000570", }, "avatarFile": { - "id": "00000000-0000-0000-0000-000000000561", + "id": "00000000-0000-0000-0000-000000000565", }, "avatarUrl": { - "id": "00000000-0000-0000-0000-000000000560", + "id": "00000000-0000-0000-0000-000000000564", }, "calendarEventParticipants": { - "id": "00000000-0000-0000-0000-000000000571", + "id": "00000000-0000-0000-0000-000000000572", }, "company": { - "id": "00000000-0000-0000-0000-000000000565", + "id": "00000000-0000-0000-0000-000000000566", }, "createdAt": { "id": "00000000-0000-0000-0000-000000000552", }, "createdBy": { - "id": "00000000-0000-0000-0000-000000000563", + "id": "00000000-0000-0000-0000-000000000555", }, "deletedAt": { "id": "00000000-0000-0000-0000-000000000554", }, "emails": { - "id": "00000000-0000-0000-0000-000000000556", + "id": "00000000-0000-0000-0000-000000000560", }, "id": { "id": "00000000-0000-0000-0000-000000000551", }, "jobTitle": { - "id": "00000000-0000-0000-0000-000000000558", - }, - "linkedinLink": { - "id": "00000000-0000-0000-0000-000000000557", - }, - "listMemberships": { - "id": "00000000-0000-0000-0000-000000000573", - }, - "messageParticipants": { - "id": "00000000-0000-0000-0000-000000000570", - }, - "name": { - "id": "00000000-0000-0000-0000-000000000555", - }, - "noteTargets": { - "id": "00000000-0000-0000-0000-000000000568", - }, - "phones": { - "id": "00000000-0000-0000-0000-000000000559", - }, - "pointOfContactForOpportunities": { - "id": "00000000-0000-0000-0000-000000000566", - }, - "position": { "id": "00000000-0000-0000-0000-000000000562", }, - "searchVector": { + "linkedinLink": { + "id": "00000000-0000-0000-0000-000000000561", + }, + "listMemberships": { "id": "00000000-0000-0000-0000-000000000574", }, - "taskTargets": { + "messageParticipants": { + "id": "00000000-0000-0000-0000-000000000571", + }, + "name": { + "id": "00000000-0000-0000-0000-000000000559", + }, + "noteTargets": { + "id": "00000000-0000-0000-0000-000000000569", + }, + "phones": { + "id": "00000000-0000-0000-0000-000000000563", + }, + "pointOfContactForOpportunities": { "id": "00000000-0000-0000-0000-000000000567", }, + "position": { + "id": "00000000-0000-0000-0000-000000000557", + }, + "searchVector": { + "id": "00000000-0000-0000-0000-000000000558", + }, + "taskTargets": { + "id": "00000000-0000-0000-0000-000000000568", + }, "timelineActivities": { - "id": "00000000-0000-0000-0000-000000000572", + "id": "00000000-0000-0000-0000-000000000573", }, "updatedAt": { "id": "00000000-0000-0000-0000-000000000553", }, "updatedBy": { - "id": "00000000-0000-0000-0000-000000000564", + "id": "00000000-0000-0000-0000-000000000556", }, }, "id": "00000000-0000-0000-0000-000000000607", @@ -2036,52 +2036,52 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object "task": { "fields": { "assignee": { - "id": "00000000-0000-0000-0000-000000000621", + "id": "00000000-0000-0000-0000-000000000622", }, "attachments": { - "id": "00000000-0000-0000-0000-000000000620", + "id": "00000000-0000-0000-0000-000000000621", }, "bodyV2": { - "id": "00000000-0000-0000-0000-000000000614", + "id": "00000000-0000-0000-0000-000000000617", }, "createdAt": { "id": "00000000-0000-0000-0000-000000000609", }, "createdBy": { - "id": "00000000-0000-0000-0000-000000000617", + "id": "00000000-0000-0000-0000-000000000612", }, "deletedAt": { "id": "00000000-0000-0000-0000-000000000611", }, "dueAt": { - "id": "00000000-0000-0000-0000-000000000615", + "id": "00000000-0000-0000-0000-000000000618", }, "id": { "id": "00000000-0000-0000-0000-000000000608", }, "position": { - "id": "00000000-0000-0000-0000-000000000612", + "id": "00000000-0000-0000-0000-000000000614", }, "searchVector": { - "id": "00000000-0000-0000-0000-000000000623", + "id": "00000000-0000-0000-0000-000000000615", }, "status": { - "id": "00000000-0000-0000-0000-000000000616", - }, - "taskTargets": { "id": "00000000-0000-0000-0000-000000000619", }, + "taskTargets": { + "id": "00000000-0000-0000-0000-000000000620", + }, "timelineActivities": { - "id": "00000000-0000-0000-0000-000000000622", + "id": "00000000-0000-0000-0000-000000000623", }, "title": { - "id": "00000000-0000-0000-0000-000000000613", + "id": "00000000-0000-0000-0000-000000000616", }, "updatedAt": { "id": "00000000-0000-0000-0000-000000000610", }, "updatedBy": { - "id": "00000000-0000-0000-0000-000000000618", + "id": "00000000-0000-0000-0000-000000000613", }, }, "id": "00000000-0000-0000-0000-000000000668", @@ -2245,7 +2245,7 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object "id": "00000000-0000-0000-0000-000000000670", }, "createdBy": { - "id": "00000000-0000-0000-0000-000000000677", + "id": "00000000-0000-0000-0000-000000000673", }, "deletedAt": { "id": "00000000-0000-0000-0000-000000000672", @@ -2254,28 +2254,28 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object "id": "00000000-0000-0000-0000-000000000669", }, "position": { - "id": "00000000-0000-0000-0000-000000000679", - }, - "searchVector": { - "id": "00000000-0000-0000-0000-000000000680", - }, - "targetCompany": { "id": "00000000-0000-0000-0000-000000000675", }, - "targetOpportunity": { + "searchVector": { "id": "00000000-0000-0000-0000-000000000676", }, + "targetCompany": { + "id": "00000000-0000-0000-0000-000000000679", + }, + "targetOpportunity": { + "id": "00000000-0000-0000-0000-000000000680", + }, "targetPerson": { - "id": "00000000-0000-0000-0000-000000000674", + "id": "00000000-0000-0000-0000-000000000678", }, "task": { - "id": "00000000-0000-0000-0000-000000000673", + "id": "00000000-0000-0000-0000-000000000677", }, "updatedAt": { "id": "00000000-0000-0000-0000-000000000671", }, "updatedBy": { - "id": "00000000-0000-0000-0000-000000000678", + "id": "00000000-0000-0000-0000-000000000674", }, }, "id": "00000000-0000-0000-0000-000000000687", @@ -2310,79 +2310,79 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object "id": "00000000-0000-0000-0000-000000000689", }, "createdBy": { - "id": "00000000-0000-0000-0000-000000000710", + "id": "00000000-0000-0000-0000-000000000692", }, "deletedAt": { "id": "00000000-0000-0000-0000-000000000691", }, "happensAt": { - "id": "00000000-0000-0000-0000-000000000692", + "id": "00000000-0000-0000-0000-000000000697", }, "id": { "id": "00000000-0000-0000-0000-000000000688", }, "linkedObjectMetadataId": { - "id": "00000000-0000-0000-0000-000000000709", - }, - "linkedRecordCachedName": { - "id": "00000000-0000-0000-0000-000000000707", - }, - "linkedRecordId": { - "id": "00000000-0000-0000-0000-000000000708", - }, - "name": { - "id": "00000000-0000-0000-0000-000000000693", - }, - "position": { - "id": "00000000-0000-0000-0000-000000000712", - }, - "properties": { - "id": "00000000-0000-0000-0000-000000000694", - }, - "searchVector": { "id": "00000000-0000-0000-0000-000000000713", }, - "targetCompany": { - "id": "00000000-0000-0000-0000-000000000697", + "linkedRecordCachedName": { + "id": "00000000-0000-0000-0000-000000000711", }, - "targetDashboard": { - "id": "00000000-0000-0000-0000-000000000704", + "linkedRecordId": { + "id": "00000000-0000-0000-0000-000000000712", }, - "targetMessageCampaign": { - "id": "00000000-0000-0000-0000-000000000706", - }, - "targetMessageList": { - "id": "00000000-0000-0000-0000-000000000705", - }, - "targetNote": { - "id": "00000000-0000-0000-0000-000000000700", - }, - "targetOpportunity": { - "id": "00000000-0000-0000-0000-000000000698", - }, - "targetPerson": { + "name": { "id": "00000000-0000-0000-0000-000000000696", }, - "targetTask": { - "id": "00000000-0000-0000-0000-000000000699", + "position": { + "id": "00000000-0000-0000-0000-000000000694", }, - "targetWorkflow": { + "properties": { + "id": "00000000-0000-0000-0000-000000000698", + }, + "searchVector": { + "id": "00000000-0000-0000-0000-000000000695", + }, + "targetCompany": { "id": "00000000-0000-0000-0000-000000000701", }, - "targetWorkflowRun": { + "targetDashboard": { + "id": "00000000-0000-0000-0000-000000000708", + }, + "targetMessageCampaign": { + "id": "00000000-0000-0000-0000-000000000710", + }, + "targetMessageList": { + "id": "00000000-0000-0000-0000-000000000709", + }, + "targetNote": { + "id": "00000000-0000-0000-0000-000000000704", + }, + "targetOpportunity": { + "id": "00000000-0000-0000-0000-000000000702", + }, + "targetPerson": { + "id": "00000000-0000-0000-0000-000000000700", + }, + "targetTask": { "id": "00000000-0000-0000-0000-000000000703", }, + "targetWorkflow": { + "id": "00000000-0000-0000-0000-000000000705", + }, + "targetWorkflowRun": { + "id": "00000000-0000-0000-0000-000000000707", + }, "targetWorkflowVersion": { - "id": "00000000-0000-0000-0000-000000000702", + "id": "00000000-0000-0000-0000-000000000706", }, "updatedAt": { "id": "00000000-0000-0000-0000-000000000690", }, "updatedBy": { - "id": "00000000-0000-0000-0000-000000000711", + "id": "00000000-0000-0000-0000-000000000693", }, "workspaceMember": { - "id": "00000000-0000-0000-0000-000000000695", + "id": "00000000-0000-0000-0000-000000000699", }, }, "id": "00000000-0000-0000-0000-000000000729", @@ -2441,16 +2441,16 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object "workflow": { "fields": { "attachments": { - "id": "00000000-0000-0000-0000-000000000742", + "id": "00000000-0000-0000-0000-000000000745", }, "automatedTriggers": { - "id": "00000000-0000-0000-0000-000000000740", + "id": "00000000-0000-0000-0000-000000000743", }, "createdAt": { "id": "00000000-0000-0000-0000-000000000731", }, "createdBy": { - "id": "00000000-0000-0000-0000-000000000743", + "id": "00000000-0000-0000-0000-000000000734", }, "deletedAt": { "id": "00000000-0000-0000-0000-000000000733", @@ -2459,34 +2459,34 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object "id": "00000000-0000-0000-0000-000000000730", }, "lastPublishedVersionId": { - "id": "00000000-0000-0000-0000-000000000735", - }, - "name": { - "id": "00000000-0000-0000-0000-000000000734", - }, - "position": { - "id": "00000000-0000-0000-0000-000000000737", - }, - "runs": { "id": "00000000-0000-0000-0000-000000000739", }, - "searchVector": { - "id": "00000000-0000-0000-0000-000000000745", + "name": { + "id": "00000000-0000-0000-0000-000000000738", }, - "statuses": { + "position": { "id": "00000000-0000-0000-0000-000000000736", }, + "runs": { + "id": "00000000-0000-0000-0000-000000000742", + }, + "searchVector": { + "id": "00000000-0000-0000-0000-000000000737", + }, + "statuses": { + "id": "00000000-0000-0000-0000-000000000740", + }, "timelineActivities": { - "id": "00000000-0000-0000-0000-000000000741", + "id": "00000000-0000-0000-0000-000000000744", }, "updatedAt": { "id": "00000000-0000-0000-0000-000000000732", }, "updatedBy": { - "id": "00000000-0000-0000-0000-000000000744", + "id": "00000000-0000-0000-0000-000000000735", }, "versions": { - "id": "00000000-0000-0000-0000-000000000738", + "id": "00000000-0000-0000-0000-000000000741", }, }, "id": "00000000-0000-0000-0000-000000000753", @@ -2524,7 +2524,7 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object "id": "00000000-0000-0000-0000-000000000755", }, "createdBy": { - "id": "00000000-0000-0000-0000-000000000761", + "id": "00000000-0000-0000-0000-000000000758", }, "deletedAt": { "id": "00000000-0000-0000-0000-000000000757", @@ -2533,25 +2533,25 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object "id": "00000000-0000-0000-0000-000000000754", }, "position": { - "id": "00000000-0000-0000-0000-000000000763", + "id": "00000000-0000-0000-0000-000000000760", }, "searchVector": { - "id": "00000000-0000-0000-0000-000000000764", + "id": "00000000-0000-0000-0000-000000000761", }, "settings": { - "id": "00000000-0000-0000-0000-000000000759", + "id": "00000000-0000-0000-0000-000000000763", }, "type": { - "id": "00000000-0000-0000-0000-000000000758", + "id": "00000000-0000-0000-0000-000000000762", }, "updatedAt": { "id": "00000000-0000-0000-0000-000000000756", }, "updatedBy": { - "id": "00000000-0000-0000-0000-000000000762", + "id": "00000000-0000-0000-0000-000000000759", }, "workflow": { - "id": "00000000-0000-0000-0000-000000000760", + "id": "00000000-0000-0000-0000-000000000764", }, }, "id": "00000000-0000-0000-0000-000000000776", @@ -2606,55 +2606,55 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object "id": "00000000-0000-0000-0000-000000000778", }, "createdBy": { - "id": "00000000-0000-0000-0000-000000000789", + "id": "00000000-0000-0000-0000-000000000781", }, "deletedAt": { "id": "00000000-0000-0000-0000-000000000780", }, "endedAt": { - "id": "00000000-0000-0000-0000-000000000786", + "id": "00000000-0000-0000-0000-000000000790", }, "enqueuedAt": { - "id": "00000000-0000-0000-0000-000000000784", + "id": "00000000-0000-0000-0000-000000000788", }, "id": { "id": "00000000-0000-0000-0000-000000000777", }, "name": { - "id": "00000000-0000-0000-0000-000000000781", - }, - "position": { - "id": "00000000-0000-0000-0000-000000000788", - }, - "searchVector": { - "id": "00000000-0000-0000-0000-000000000794", - }, - "startedAt": { "id": "00000000-0000-0000-0000-000000000785", }, + "position": { + "id": "00000000-0000-0000-0000-000000000783", + }, + "searchVector": { + "id": "00000000-0000-0000-0000-000000000784", + }, + "startedAt": { + "id": "00000000-0000-0000-0000-000000000789", + }, "state": { - "id": "00000000-0000-0000-0000-000000000791", - }, - "status": { - "id": "00000000-0000-0000-0000-000000000787", - }, - "stepLogs": { "id": "00000000-0000-0000-0000-000000000792", }, - "timelineActivities": { + "status": { + "id": "00000000-0000-0000-0000-000000000791", + }, + "stepLogs": { "id": "00000000-0000-0000-0000-000000000793", }, + "timelineActivities": { + "id": "00000000-0000-0000-0000-000000000794", + }, "updatedAt": { "id": "00000000-0000-0000-0000-000000000779", }, "updatedBy": { - "id": "00000000-0000-0000-0000-000000000790", + "id": "00000000-0000-0000-0000-000000000782", }, "workflow": { - "id": "00000000-0000-0000-0000-000000000783", + "id": "00000000-0000-0000-0000-000000000787", }, "workflowVersion": { - "id": "00000000-0000-0000-0000-000000000782", + "id": "00000000-0000-0000-0000-000000000786", }, }, "id": "00000000-0000-0000-0000-000000000817", @@ -2742,7 +2742,7 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object "id": "00000000-0000-0000-0000-000000000819", }, "createdBy": { - "id": "00000000-0000-0000-0000-000000000831", + "id": "00000000-0000-0000-0000-000000000822", }, "deletedAt": { "id": "00000000-0000-0000-0000-000000000821", @@ -2751,37 +2751,37 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object "id": "00000000-0000-0000-0000-000000000818", }, "name": { - "id": "00000000-0000-0000-0000-000000000822", - }, - "position": { "id": "00000000-0000-0000-0000-000000000826", }, - "runs": { - "id": "00000000-0000-0000-0000-000000000827", + "position": { + "id": "00000000-0000-0000-0000-000000000824", }, - "searchVector": { + "runs": { "id": "00000000-0000-0000-0000-000000000830", }, - "status": { + "searchVector": { "id": "00000000-0000-0000-0000-000000000825", }, - "steps": { - "id": "00000000-0000-0000-0000-000000000828", - }, - "timelineActivities": { + "status": { "id": "00000000-0000-0000-0000-000000000829", }, + "steps": { + "id": "00000000-0000-0000-0000-000000000831", + }, + "timelineActivities": { + "id": "00000000-0000-0000-0000-000000000832", + }, "trigger": { - "id": "00000000-0000-0000-0000-000000000824", + "id": "00000000-0000-0000-0000-000000000828", }, "updatedAt": { "id": "00000000-0000-0000-0000-000000000820", }, "updatedBy": { - "id": "00000000-0000-0000-0000-000000000832", + "id": "00000000-0000-0000-0000-000000000823", }, "workflow": { - "id": "00000000-0000-0000-0000-000000000823", + "id": "00000000-0000-0000-0000-000000000827", }, }, "id": "00000000-0000-0000-0000-000000000852", @@ -2857,34 +2857,34 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object "workspaceMember": { "fields": { "accountOwnerForCompanies": { - "id": "00000000-0000-0000-0000-000000000867", - }, - "assignedTasks": { - "id": "00000000-0000-0000-0000-000000000865", - }, - "avatarUrl": { - "id": "00000000-0000-0000-0000-000000000861", - }, - "blocklist": { - "id": "00000000-0000-0000-0000-000000000869", - }, - "calendarEventParticipants": { "id": "00000000-0000-0000-0000-000000000870", }, + "assignedTasks": { + "id": "00000000-0000-0000-0000-000000000868", + }, + "avatarUrl": { + "id": "00000000-0000-0000-0000-000000000864", + }, + "blocklist": { + "id": "00000000-0000-0000-0000-000000000872", + }, + "calendarEventParticipants": { + "id": "00000000-0000-0000-0000-000000000873", + }, "calendarStartDay": { - "id": "00000000-0000-0000-0000-000000000876", + "id": "00000000-0000-0000-0000-000000000878", }, "colorScheme": { - "id": "00000000-0000-0000-0000-000000000859", + "id": "00000000-0000-0000-0000-000000000862", }, "createdAt": { "id": "00000000-0000-0000-0000-000000000854", }, "createdBy": { - "id": "00000000-0000-0000-0000-000000000878", + "id": "00000000-0000-0000-0000-000000000857", }, "dateFormat": { - "id": "00000000-0000-0000-0000-000000000873", + "id": "00000000-0000-0000-0000-000000000876", }, "deletedAt": { "id": "00000000-0000-0000-0000-000000000856", @@ -2893,49 +2893,49 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object "id": "00000000-0000-0000-0000-000000000853", }, "jobTitle": { - "id": "00000000-0000-0000-0000-000000000863", - }, - "locale": { - "id": "00000000-0000-0000-0000-000000000860", - }, - "messageParticipants": { - "id": "00000000-0000-0000-0000-000000000868", - }, - "name": { - "id": "00000000-0000-0000-0000-000000000858", - }, - "numberFormat": { - "id": "00000000-0000-0000-0000-000000000877", - }, - "ownedOpportunities": { "id": "00000000-0000-0000-0000-000000000866", }, + "locale": { + "id": "00000000-0000-0000-0000-000000000863", + }, + "messageParticipants": { + "id": "00000000-0000-0000-0000-000000000871", + }, + "name": { + "id": "00000000-0000-0000-0000-000000000861", + }, + "numberFormat": { + "id": "00000000-0000-0000-0000-000000000879", + }, + "ownedOpportunities": { + "id": "00000000-0000-0000-0000-000000000869", + }, "position": { - "id": "00000000-0000-0000-0000-000000000857", + "id": "00000000-0000-0000-0000-000000000859", }, "searchVector": { - "id": "00000000-0000-0000-0000-000000000875", + "id": "00000000-0000-0000-0000-000000000860", }, "timeFormat": { - "id": "00000000-0000-0000-0000-000000000874", + "id": "00000000-0000-0000-0000-000000000877", }, "timeZone": { - "id": "00000000-0000-0000-0000-000000000872", + "id": "00000000-0000-0000-0000-000000000875", }, "timelineActivities": { - "id": "00000000-0000-0000-0000-000000000871", + "id": "00000000-0000-0000-0000-000000000874", }, "updatedAt": { "id": "00000000-0000-0000-0000-000000000855", }, "updatedBy": { - "id": "00000000-0000-0000-0000-000000000879", + "id": "00000000-0000-0000-0000-000000000858", }, "userEmail": { - "id": "00000000-0000-0000-0000-000000000862", + "id": "00000000-0000-0000-0000-000000000865", }, "userId": { - "id": "00000000-0000-0000-0000-000000000864", + "id": "00000000-0000-0000-0000-000000000867", }, }, "id": "00000000-0000-0000-0000-000000000892", diff --git a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/__tests__/get-standard-object-metadata-related-entity-ids.util.spec.ts b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/__tests__/get-standard-object-metadata-related-entity-ids.util.spec.ts index 867620bf40..63eaa130d8 100644 --- a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/__tests__/get-standard-object-metadata-related-entity-ids.util.spec.ts +++ b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/__tests__/get-standard-object-metadata-related-entity-ids.util.spec.ts @@ -3,6 +3,7 @@ import { getStandardObjectMetadataRelatedEntityIds } from 'src/engine/workspace- let uuidCounter = 0; jest.mock('uuid', () => ({ + ...jest.requireActual('uuid'), v4: jest.fn( () => `00000000-0000-0000-0000-${String(++uuidCounter).padStart(12, '0')}`, ), diff --git a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/__tests__/get-standard-page-layout-metadata-related-entity-ids.util.spec.ts b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/__tests__/get-standard-page-layout-metadata-related-entity-ids.util.spec.ts index 5325317ea4..4d39adec11 100644 --- a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/__tests__/get-standard-page-layout-metadata-related-entity-ids.util.spec.ts +++ b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/__tests__/get-standard-page-layout-metadata-related-entity-ids.util.spec.ts @@ -3,6 +3,7 @@ import { v4 } from 'uuid'; import { getStandardPageLayoutMetadataRelatedEntityIds } from 'src/engine/workspace-manager/twenty-standard-application/utils/get-standard-page-layout-metadata-related-entity-ids.util'; jest.mock('uuid', () => ({ + ...jest.requireActual('uuid'), v4: jest.fn(), })); diff --git a/packages/twenty-server/src/modules/connected-account/services/imap-smtp-caldav-apis.service.spec.ts b/packages/twenty-server/src/modules/connected-account/services/imap-smtp-caldav-apis.service.spec.ts index b9eb2b58f2..c5b17982a8 100644 --- a/packages/twenty-server/src/modules/connected-account/services/imap-smtp-caldav-apis.service.spec.ts +++ b/packages/twenty-server/src/modules/connected-account/services/imap-smtp-caldav-apis.service.spec.ts @@ -32,6 +32,7 @@ import { MessagingMessageListFetchJob } from 'src/modules/messaging/message-impo import { SyncMessageFoldersService } from 'src/modules/messaging/message-folder-manager/services/sync-message-folders.service'; jest.mock('uuid', () => ({ + ...jest.requireActual('uuid'), v4: jest.fn(() => 'mocked-uuid'), })); diff --git a/packages/twenty-server/test/integration/metadata/suites/application/__snapshots__/failing-sync-application-object-system-fields.integration-spec.ts.snap b/packages/twenty-server/test/integration/metadata/suites/application/__snapshots__/failing-sync-application-object-system-fields.integration-spec.ts.snap index 04c7117dbc..aaf1a62079 100644 --- a/packages/twenty-server/test/integration/metadata/suites/application/__snapshots__/failing-sync-application-object-system-fields.integration-spec.ts.snap +++ b/packages/twenty-server/test/integration/metadata/suites/application/__snapshots__/failing-sync-application-object-system-fields.integration-spec.ts.snap @@ -174,6 +174,43 @@ exports[`Sync application should fail due to object system fields integrity when } `; +exports[`Sync application should fail due to object system fields integrity when object has a system field with a custom (non-derived) universal identifier 1`] = ` +{ + "extensions": { + "code": "METADATA_VALIDATION_FAILED", + "errors": { + "objectMetadata": [ + { + "errors": [ + { + "code": "INVALID_SYSTEM_FIELD", + "message": "System field createdAt has invalid universalIdentifier: expected 62e9d388-38c0-5cd8-b18d-db186455a563, got 899ac540-3a1f-42cf-9f99-8a55e79d0d9e", + "userFriendlyMessage": "System field createdAt universal identifier is not deterministic; it is derived by the server and cannot be customized", + "value": "899ac540-3a1f-42cf-9f99-8a55e79d0d9e", + }, + ], + "flatEntityMinimalInformation": { + "namePlural": "customSystemFieldUidObjects", + "nameSingular": "customSystemFieldUidObject", + "universalIdentifier": Any, + }, + "metadataName": "objectMetadata", + "type": "create", + }, + ], + }, + "message": "Validation failed for 1 objectMetadata", + "summary": { + "objectMetadata": 1, + "totalErrors": 1, + }, + "userFriendlyMessage": "System field createdAt universal identifier is not deterministic; it is derived by the server and cannot be customized", + }, + "message": "Validation errors occurred while syncing application manifest metadata", + "name": "GraphQLError", +} +`; + exports[`Sync application should fail due to object system fields integrity when object has id field with wrong type (TEXT instead of UUID) 1`] = ` { "extensions": { @@ -188,6 +225,12 @@ exports[`Sync application should fail due to object system fields integrity when "userFriendlyMessage": "System field id has invalid type", "value": "TEXT", }, + { + "code": "INVALID_SYSTEM_FIELD", + "message": "System field id has invalid universalIdentifier: expected 64e60b60-2bc9-5eac-a98b-83c1d628e326, got 4254b620-34f1-57d1-a155-527015f523db", + "userFriendlyMessage": "System field id universal identifier is not deterministic; it is derived by the server and cannot be customized", + "value": "4254b620-34f1-57d1-a155-527015f523db", + }, { "code": "MISSING_SYSTEM_FIELD", "message": "System field createdAt is missing", @@ -303,6 +346,12 @@ exports[`Sync application should fail due to object system fields integrity when "userFriendlyMessage": "System field position has invalid type", "value": "TEXT", }, + { + "code": "INVALID_SYSTEM_FIELD", + "message": "System field position has invalid universalIdentifier: expected dbd9f170-1d32-5267-b76e-e1f172ab617a, got 65eb86b6-1b74-58bd-8c02-7f79b018359d", + "userFriendlyMessage": "System field position universal identifier is not deterministic; it is derived by the server and cannot be customized", + "value": "65eb86b6-1b74-58bd-8c02-7f79b018359d", + }, { "code": "MISSING_SYSTEM_FIELD", "message": "System field searchVector is missing", diff --git a/packages/twenty-server/test/integration/metadata/suites/application/dry-run-manifest-sync.integration-spec.ts b/packages/twenty-server/test/integration/metadata/suites/application/dry-run-manifest-sync.integration-spec.ts index 7ff0ec4b66..c63965b8a3 100644 --- a/packages/twenty-server/test/integration/metadata/suites/application/dry-run-manifest-sync.integration-spec.ts +++ b/packages/twenty-server/test/integration/metadata/suites/application/dry-run-manifest-sync.integration-spec.ts @@ -42,6 +42,7 @@ describe('Manifest sync - dry run', () => { it('returns the planned actions without applying them', async () => { const ticketObject = buildDefaultObjectManifest({ + applicationUniversalIdentifier: TEST_APP_ID, nameSingular: 'dryRunTicket', namePlural: 'dryRunTickets', labelSingular: 'Dry Run Ticket', @@ -55,6 +56,7 @@ describe('Manifest sync - dry run', () => { }); const invoiceObject = buildDefaultObjectManifest({ + applicationUniversalIdentifier: TEST_APP_ID, nameSingular: 'dryRunInvoice', namePlural: 'dryRunInvoices', labelSingular: 'Dry Run Invoice', diff --git a/packages/twenty-server/test/integration/metadata/suites/application/failing-sync-application-cross-app-permission-create-on-standard-role.integration-spec.ts b/packages/twenty-server/test/integration/metadata/suites/application/failing-sync-application-cross-app-permission-create-on-standard-role.integration-spec.ts index de0ff3082c..33840ffddc 100644 --- a/packages/twenty-server/test/integration/metadata/suites/application/failing-sync-application-cross-app-permission-create-on-standard-role.integration-spec.ts +++ b/packages/twenty-server/test/integration/metadata/suites/application/failing-sync-application-cross-app-permission-create-on-standard-role.integration-spec.ts @@ -47,7 +47,9 @@ describe('Sync application should fail when creating permissions on a standard r label: 'Stolen Admin Role', description: 'Attempts to add permissions to the standard admin role', - permissionFlagUniversalIdentifiers: [SystemPermissionFlag.WORKSPACE], + permissionFlagUniversalIdentifiers: [ + SystemPermissionFlag.WORKSPACE, + ], }, ], }, diff --git a/packages/twenty-server/test/integration/metadata/suites/application/failing-sync-application-cross-app-permission-retarget-on-update.integration-spec.ts b/packages/twenty-server/test/integration/metadata/suites/application/failing-sync-application-cross-app-permission-retarget-on-update.integration-spec.ts index fe344c5e55..acf5339c4c 100644 --- a/packages/twenty-server/test/integration/metadata/suites/application/failing-sync-application-cross-app-permission-retarget-on-update.integration-spec.ts +++ b/packages/twenty-server/test/integration/metadata/suites/application/failing-sync-application-cross-app-permission-retarget-on-update.integration-spec.ts @@ -44,7 +44,9 @@ describe('Sync application should fail when retargeting existing permissions to universalIdentifier: TEST_ROLE_ID, label: 'App Default Role', description: 'Default role for the test app', - permissionFlagUniversalIdentifiers: [SystemPermissionFlag.WORKSPACE], + permissionFlagUniversalIdentifiers: [ + SystemPermissionFlag.WORKSPACE, + ], }, ], }, @@ -69,7 +71,9 @@ describe('Sync application should fail when retargeting existing permissions to universalIdentifier: STANDARD_ROLE.admin.universalIdentifier, label: 'Admin', description: 'Attempts to retarget permission flag to admin role', - permissionFlagUniversalIdentifiers: [SystemPermissionFlag.WORKSPACE], + permissionFlagUniversalIdentifiers: [ + SystemPermissionFlag.WORKSPACE, + ], }, ], }, diff --git a/packages/twenty-server/test/integration/metadata/suites/application/failing-sync-application-flat-entity-map-conflict.integration-spec.ts b/packages/twenty-server/test/integration/metadata/suites/application/failing-sync-application-flat-entity-map-conflict.integration-spec.ts index 7d1b4e108e..6b0bdc0817 100644 --- a/packages/twenty-server/test/integration/metadata/suites/application/failing-sync-application-flat-entity-map-conflict.integration-spec.ts +++ b/packages/twenty-server/test/integration/metadata/suites/application/failing-sync-application-flat-entity-map-conflict.integration-spec.ts @@ -32,6 +32,7 @@ describe('Sync application should surface a human error on flat-entity map confl it('should fail with an installation error naming the object when two objects share a universalIdentifier', async () => { const firstObject = buildDefaultObjectManifest({ + applicationUniversalIdentifier: TEST_APP_ID, nameSingular: 'invoice', namePlural: 'invoices', labelSingular: 'Invoice', @@ -40,6 +41,7 @@ describe('Sync application should surface a human error on flat-entity map confl }); const conflictingObject = buildDefaultObjectManifest({ + applicationUniversalIdentifier: TEST_APP_ID, nameSingular: 'invoiceDuplicate', namePlural: 'invoiceDuplicates', labelSingular: 'Invoice Duplicate', @@ -65,6 +67,7 @@ describe('Sync application should surface a human error on flat-entity map confl it('should fail with an installation error naming the field when two fields of an object share a universalIdentifier', async () => { const objectWithConflictingFields = buildDefaultObjectManifest({ + applicationUniversalIdentifier: TEST_APP_ID, nameSingular: 'invoice', namePlural: 'invoices', labelSingular: 'Invoice', diff --git a/packages/twenty-server/test/integration/metadata/suites/application/failing-sync-application-object-system-fields.integration-spec.ts b/packages/twenty-server/test/integration/metadata/suites/application/failing-sync-application-object-system-fields.integration-spec.ts index aed8d60e04..992cf926ea 100644 --- a/packages/twenty-server/test/integration/metadata/suites/application/failing-sync-application-object-system-fields.integration-spec.ts +++ b/packages/twenty-server/test/integration/metadata/suites/application/failing-sync-application-object-system-fields.integration-spec.ts @@ -10,10 +10,16 @@ import { eachTestingContextFilter, } from 'twenty-shared/testing'; import { FieldMetadataType } from 'twenty-shared/types'; -import { v4 as uuidv4 } from 'uuid'; +import { v4 as uuidv4, v5 as uuidv5 } from 'uuid'; -const TEST_APP_ID = uuidv4(); -const TEST_ROLE_ID = uuidv4(); +// Identifiers are pinned so validation error messages embedding expected and +// actual universal identifiers stay stable across snapshot runs. +const TEST_APP_ID = '4e0e42a8-8f9c-4a48-9d43-5e0c5c2f4a10'; +const TEST_ROLE_ID = 'd0a24fbc-4b26-42a5-a4ff-2e142f8e2f6d'; +const TEST_UUID_NAMESPACE = '6a9c8f74-4b7a-4a86-90f4-2f4dbb1c2a30'; + +const computeDeterministicTestUuid = (seed: string) => + uuidv5(seed, TEST_UUID_NAMESPACE); type TestContext = { manifest: Manifest; @@ -43,8 +49,8 @@ const buildObjectWithLabelField = ({ description: string; additionalFields?: ObjectManifest['fields']; }): Pick => { - const objectId = uuidv4(); - const labelFieldId = uuidv4(); + const objectId = computeDeterministicTestUuid(nameSingular); + const labelFieldId = computeDeterministicTestUuid(`${nameSingular}-title`); return { objects: [ @@ -90,6 +96,8 @@ const buildDefaultObjectWithModifiedSearchVector = ({ searchVectorOverrides: Partial; }): Pick => { const defaultObject = buildDefaultObjectManifest({ + applicationUniversalIdentifier: TEST_APP_ID, + universalIdentifier: computeDeterministicTestUuid(nameSingular), nameSingular, namePlural, labelSingular, @@ -144,7 +152,8 @@ const failingSyncApplicationSystemFieldsTestCases: SyncApplicationTestingContext description: 'Object with wrong id field type', additionalFields: [ { - universalIdentifier: uuidv4(), + universalIdentifier: + computeDeterministicTestUuid('wrongIdTypeObject-id'), type: FieldMetadataType.TEXT, name: 'id', label: 'Id', @@ -183,7 +192,9 @@ const failingSyncApplicationSystemFieldsTestCases: SyncApplicationTestingContext description: 'Object with wrong position field type', additionalFields: [ { - universalIdentifier: uuidv4(), + universalIdentifier: computeDeterministicTestUuid( + 'wrongPositionObject-position', + ), type: FieldMetadataType.TEXT, name: 'position', label: 'Position', @@ -231,16 +242,60 @@ const failingSyncApplicationSystemFieldsTestCases: SyncApplicationTestingContext ), }, }, + { + title: + 'when object has a system field with a custom (non-derived) universal identifier', + context: (() => { + const defaultObject = buildDefaultObjectManifest({ + applicationUniversalIdentifier: TEST_APP_ID, + universalIdentifier: computeDeterministicTestUuid( + 'customSystemFieldUidObject', + ), + nameSingular: 'customSystemFieldUidObject', + namePlural: 'customSystemFieldUidObjects', + labelSingular: 'Custom System Field Uid Object', + labelPlural: 'Custom System Field Uid Objects', + description: + 'Object with a createdAt system field carrying a custom universal identifier', + }); + + return { + manifest: buildManifest({ + objects: [ + { + ...defaultObject, + fields: defaultObject.fields.map((field) => + field.name === 'createdAt' + ? { + ...field, + universalIdentifier: + '899ac540-3a1f-42cf-9f99-8a55e79d0d9e', + } + : field, + ), + }, + ], + fields: [], + }), + }; + })(), + }, { title: 'when label identifier is non-searchable type (searchVector has no expression)', context: (() => { - const nonSearchableFieldId = uuidv4(); + const nonSearchableFieldId = computeDeterministicTestUuid( + 'noSearchVectorExpression-quantity', + ); return { manifest: buildManifest({ objects: [ buildDefaultObjectManifest({ + applicationUniversalIdentifier: TEST_APP_ID, + universalIdentifier: computeDeterministicTestUuid( + 'noSearchVectorExpression', + ), nameSingular: 'noSearchVectorExpression', namePlural: 'noSearchVectorExpressions', labelSingular: 'No SearchVector Expression', @@ -300,6 +355,7 @@ describe('Sync application should fail due to object system fields integrity', ( it('should fail when trying to delete a system field after a successful sync', async () => { const labelIdentifierFieldUniversalIdentifier = uuidv4(); const testObject = buildDefaultObjectManifest({ + applicationUniversalIdentifier: TEST_APP_ID, nameSingular: 'deleteSystemFieldObject', namePlural: 'deleteSystemFieldObjects', labelSingular: 'Delete System Field Object', @@ -350,6 +406,7 @@ describe('Sync application should fail due to object system fields integrity', ( it('should fail when trying to update a system field after a successful sync', async () => { const labelIdentifierFieldUniversalIdentifier = uuidv4(); const testObject = buildDefaultObjectManifest({ + applicationUniversalIdentifier: TEST_APP_ID, nameSingular: 'updateSystemFieldObject', namePlural: 'updateSystemFieldObjects', labelSingular: 'Update System Field Object', diff --git a/packages/twenty-server/test/integration/metadata/suites/application/failing-sync-application-unique-index-side-effect-collision.integration-spec.ts b/packages/twenty-server/test/integration/metadata/suites/application/failing-sync-application-unique-index-side-effect-collision.integration-spec.ts index 5f310dd6e1..6621e549ea 100644 --- a/packages/twenty-server/test/integration/metadata/suites/application/failing-sync-application-unique-index-side-effect-collision.integration-spec.ts +++ b/packages/twenty-server/test/integration/metadata/suites/application/failing-sync-application-unique-index-side-effect-collision.integration-spec.ts @@ -47,6 +47,7 @@ const buildCollidingManifest = (): Manifest => { const uniqueFieldUniversalIdentifier = uuidv4(); const object = buildDefaultObjectManifest({ + applicationUniversalIdentifier: TEST_APP_ID, nameSingular: OBJECT_NAME_SINGULAR, namePlural: 'collidingIndexObjects', labelSingular: 'Colliding Index Object', diff --git a/packages/twenty-server/test/integration/metadata/suites/application/failing-upload-application-file-path-traversal.integration-spec.ts b/packages/twenty-server/test/integration/metadata/suites/application/failing-upload-application-file-path-traversal.integration-spec.ts index 3accc36662..eac4b550b4 100644 --- a/packages/twenty-server/test/integration/metadata/suites/application/failing-upload-application-file-path-traversal.integration-spec.ts +++ b/packages/twenty-server/test/integration/metadata/suites/application/failing-upload-application-file-path-traversal.integration-spec.ts @@ -85,8 +85,7 @@ const FAILING_TEST_CASES: EachTestingContext[] = [ }, }, { - title: - 'when filePath is a folder path without extension (bare UUID)', + title: 'when filePath is a folder path without extension (bare UUID)', context: { applicationUniversalIdentifier: TEST_APP_ID, fileFolder: 'BuiltFrontComponent', @@ -94,8 +93,7 @@ const FAILING_TEST_CASES: EachTestingContext[] = [ }, }, { - title: - 'when filePath is a nested folder path without extension', + title: 'when filePath is a nested folder path without extension', context: { applicationUniversalIdentifier: TEST_APP_ID, fileFolder: 'Source', @@ -121,7 +119,8 @@ const FAILING_TEST_CASES: EachTestingContext[] = [ }, }, { - title: 'when filePath has an invalid extension for Source (.js instead of .ts)', + title: + 'when filePath has an invalid extension for Source (.js instead of .ts)', context: { applicationUniversalIdentifier: TEST_APP_ID, fileFolder: 'Source', diff --git a/packages/twenty-server/test/integration/metadata/suites/application/logic-function-install-performance.integration-spec.ts b/packages/twenty-server/test/integration/metadata/suites/application/logic-function-install-performance.integration-spec.ts index b9545624ae..64c6ab2176 100644 --- a/packages/twenty-server/test/integration/metadata/suites/application/logic-function-install-performance.integration-spec.ts +++ b/packages/twenty-server/test/integration/metadata/suites/application/logic-function-install-performance.integration-spec.ts @@ -64,10 +64,7 @@ const buildManifest = ({ }); }; -const timeSync = async ( - label: string, - manifest: Manifest, -): Promise => { +const timeSync = async (label: string, manifest: Manifest): Promise => { const start = performance.now(); await syncApplication({ manifest, expectToFail: false }); diff --git a/packages/twenty-server/test/integration/metadata/suites/application/marketplace-catalog-sync.integration-spec.ts b/packages/twenty-server/test/integration/metadata/suites/application/marketplace-catalog-sync.integration-spec.ts index d4401b6f0c..5275a8f1e5 100644 --- a/packages/twenty-server/test/integration/metadata/suites/application/marketplace-catalog-sync.integration-spec.ts +++ b/packages/twenty-server/test/integration/metadata/suites/application/marketplace-catalog-sync.integration-spec.ts @@ -249,10 +249,10 @@ describe('Marketplace Catalog Sync (integration)', () => { await fs.writeFile(join(sourceDir, 'manifest.json'), manifest); await fs.writeFile(join(sourceDir, 'package.json'), packageJson); - await tar.create( - { file: tarballPath, gzip: true, cwd: sourceDir }, - ['manifest.json', 'package.json'], - ); + await tar.create({ file: tarballPath, gzip: true, cwd: sourceDir }, [ + 'manifest.json', + 'package.json', + ]); const tarballBuffer = await fs.readFile(tarballPath); diff --git a/packages/twenty-server/test/integration/metadata/suites/application/successful-manifest-update-field.integration-spec.ts b/packages/twenty-server/test/integration/metadata/suites/application/successful-manifest-update-field.integration-spec.ts index 038a4a3feb..43f1ea1038 100644 --- a/packages/twenty-server/test/integration/metadata/suites/application/successful-manifest-update-field.integration-spec.ts +++ b/packages/twenty-server/test/integration/metadata/suites/application/successful-manifest-update-field.integration-spec.ts @@ -20,6 +20,7 @@ const TEST_SECOND_FIELD_ID = uuidv4(); const TEST_NUMBER_FIELD_ID = uuidv4(); const TEST_OBJECT = buildDefaultObjectManifest({ + applicationUniversalIdentifier: TEST_APP_ID, nameSingular: 'ticket', namePlural: 'tickets', labelSingular: 'Ticket', diff --git a/packages/twenty-server/test/integration/metadata/suites/application/successful-manifest-update-object.integration-spec.ts b/packages/twenty-server/test/integration/metadata/suites/application/successful-manifest-update-object.integration-spec.ts index bc29579a34..16838065d1 100644 --- a/packages/twenty-server/test/integration/metadata/suites/application/successful-manifest-update-object.integration-spec.ts +++ b/packages/twenty-server/test/integration/metadata/suites/application/successful-manifest-update-object.integration-spec.ts @@ -48,6 +48,7 @@ describe('Manifest update - objects', () => { it('should create a new object when added to manifest on second sync', async () => { const ticketObject = buildDefaultObjectManifest({ + applicationUniversalIdentifier: TEST_APP_ID, nameSingular: 'ticket', namePlural: 'tickets', labelSingular: 'Ticket', @@ -75,6 +76,7 @@ describe('Manifest update - objects', () => { }); const invoiceObject = buildDefaultObjectManifest({ + applicationUniversalIdentifier: TEST_APP_ID, nameSingular: 'invoice', namePlural: 'invoices', labelSingular: 'Invoice', @@ -113,6 +115,7 @@ describe('Manifest update - objects', () => { it('should update object properties when changed in manifest on second sync', async () => { const universalIdentifier = uuidv4(); const ticketObject = buildDefaultObjectManifest({ + applicationUniversalIdentifier: TEST_APP_ID, nameSingular: 'ticket', namePlural: 'tickets', labelSingular: 'Ticket', @@ -173,6 +176,7 @@ describe('Manifest update - objects', () => { it('should delete an object when removed from manifest on second sync', async () => { const ticketObject = buildDefaultObjectManifest({ + applicationUniversalIdentifier: TEST_APP_ID, nameSingular: 'ticket', namePlural: 'tickets', labelSingular: 'Ticket', @@ -182,6 +186,7 @@ describe('Manifest update - objects', () => { }); const invoiceObject = buildDefaultObjectManifest({ + applicationUniversalIdentifier: TEST_APP_ID, nameSingular: 'invoice', namePlural: 'invoices', labelSingular: 'Invoice', diff --git a/packages/twenty-server/test/integration/metadata/suites/application/successful-resync-application-with-cross-app-owned-view-field.integration-spec.ts b/packages/twenty-server/test/integration/metadata/suites/application/successful-resync-application-with-cross-app-owned-view-field.integration-spec.ts index 3599d287fe..f35c5011aa 100644 --- a/packages/twenty-server/test/integration/metadata/suites/application/successful-resync-application-with-cross-app-owned-view-field.integration-spec.ts +++ b/packages/twenty-server/test/integration/metadata/suites/application/successful-resync-application-with-cross-app-owned-view-field.integration-spec.ts @@ -29,6 +29,7 @@ const INITIAL_ANY_FIELD_FILTER_VALUE = 'arm'; const UPDATED_ANY_FIELD_FILTER_VALUE = 'tail'; const HUMAN_OBJECT = buildDefaultObjectManifest({ + applicationUniversalIdentifier: TEST_APP_ID, nameSingular: 'human', namePlural: 'humans', labelSingular: 'Human', diff --git a/packages/twenty-server/test/integration/metadata/suites/application/successful-sync-application-unique-field-rename.integration-spec.ts b/packages/twenty-server/test/integration/metadata/suites/application/successful-sync-application-unique-field-rename.integration-spec.ts index c58ea0ae19..00d107a2bb 100644 --- a/packages/twenty-server/test/integration/metadata/suites/application/successful-sync-application-unique-field-rename.integration-spec.ts +++ b/packages/twenty-server/test/integration/metadata/suites/application/successful-sync-application-unique-field-rename.integration-spec.ts @@ -18,6 +18,7 @@ const TEST_APP_ID = uuidv4(); const TEST_ROLE_ID = uuidv4(); const TEST_OBJECT = buildDefaultObjectManifest({ + applicationUniversalIdentifier: TEST_APP_ID, nameSingular: 'uniqueRenameObject', namePlural: 'uniqueRenameObjects', labelSingular: 'Unique Rename Object', diff --git a/packages/twenty-server/test/integration/metadata/suites/application/successful-sync-application-universal-identifier-reuse-cross-entity.integration-spec.ts b/packages/twenty-server/test/integration/metadata/suites/application/successful-sync-application-universal-identifier-reuse-cross-entity.integration-spec.ts index 4dd45b9e40..e3d0abc4d5 100644 --- a/packages/twenty-server/test/integration/metadata/suites/application/successful-sync-application-universal-identifier-reuse-cross-entity.integration-spec.ts +++ b/packages/twenty-server/test/integration/metadata/suites/application/successful-sync-application-universal-identifier-reuse-cross-entity.integration-spec.ts @@ -13,6 +13,7 @@ const TEST_ROLE_ID = uuidv4(); const REUSABLE_UID = uuidv4(); const TEST_OBJECT = buildDefaultObjectManifest({ + applicationUniversalIdentifier: TEST_APP_ID, universalIdentifier: REUSABLE_UID, nameSingular: 'ephemeral', namePlural: 'ephemerals', diff --git a/packages/twenty-server/test/integration/metadata/suites/application/successful-sync-application-workspace-migration.integration-spec.ts b/packages/twenty-server/test/integration/metadata/suites/application/successful-sync-application-workspace-migration.integration-spec.ts index a072637815..e35ec1340b 100644 --- a/packages/twenty-server/test/integration/metadata/suites/application/successful-sync-application-workspace-migration.integration-spec.ts +++ b/packages/twenty-server/test/integration/metadata/suites/application/successful-sync-application-workspace-migration.integration-spec.ts @@ -19,6 +19,7 @@ const TEST_FIELD_ID = uuidv4(); const TEST_SKILL_ID = uuidv4(); const TEST_OBJECT = buildDefaultObjectManifest({ + applicationUniversalIdentifier: TEST_APP_ID, nameSingular: 'ticket', namePlural: 'tickets', labelSingular: 'Ticket', @@ -172,6 +173,7 @@ describe('syncApplication', () => { const updatedFieldId = uuidv4(); const testObject = buildDefaultObjectManifest({ + applicationUniversalIdentifier: TEST_APP_ID, nameSingular: 'ticket', namePlural: 'tickets', labelSingular: 'Ticket', diff --git a/packages/twenty-server/test/integration/metadata/suites/application/utils/build-default-object-manifest.util.ts b/packages/twenty-server/test/integration/metadata/suites/application/utils/build-default-object-manifest.util.ts index 6cb71d299b..9860c56156 100644 --- a/packages/twenty-server/test/integration/metadata/suites/application/utils/build-default-object-manifest.util.ts +++ b/packages/twenty-server/test/integration/metadata/suites/application/utils/build-default-object-manifest.util.ts @@ -1,7 +1,12 @@ -import { type ObjectManifest } from 'twenty-shared/application'; +import { + getFieldUniversalIdentifier, + type ObjectManifest, +} from 'twenty-shared/application'; import { FieldMetadataType } from 'twenty-shared/types'; import { v4 as uuidv4 } from 'uuid'; +// System field universal identifiers are server-owned and validated against +// the deterministic derivation, so the manifest must carry the derived values. export const buildDefaultObjectManifest = ({ nameSingular, namePlural, @@ -12,6 +17,7 @@ export const buildDefaultObjectManifest = ({ additionalFields = [], universalIdentifier, labelIdentifierFieldMetadataUniversalIdentifier, + applicationUniversalIdentifier, }: { nameSingular: string; namePlural: string; @@ -22,11 +28,22 @@ export const buildDefaultObjectManifest = ({ additionalFields?: ObjectManifest['fields']; universalIdentifier?: string; labelIdentifierFieldMetadataUniversalIdentifier?: string; + applicationUniversalIdentifier: string; }): ObjectManifest => { - const idFieldUniversalIdentifier = uuidv4(); + const objectUniversalIdentifier = universalIdentifier ?? uuidv4(); + + const computeSystemFieldUniversalIdentifier = (fieldName: string) => + getFieldUniversalIdentifier({ + applicationUniversalIdentifier, + objectUniversalIdentifier, + name: fieldName, + }); + + const idFieldUniversalIdentifier = + computeSystemFieldUniversalIdentifier('id'); return { - universalIdentifier: universalIdentifier ?? uuidv4(), + universalIdentifier: objectUniversalIdentifier, labelIdentifierFieldMetadataUniversalIdentifier: labelIdentifierFieldMetadataUniversalIdentifier ?? idFieldUniversalIdentifier, @@ -44,43 +61,44 @@ export const buildDefaultObjectManifest = ({ label: 'Id', }, { - universalIdentifier: uuidv4(), + universalIdentifier: computeSystemFieldUniversalIdentifier('createdAt'), type: FieldMetadataType.DATE_TIME, name: 'createdAt', label: 'Creation date', }, { - universalIdentifier: uuidv4(), + universalIdentifier: computeSystemFieldUniversalIdentifier('updatedAt'), type: FieldMetadataType.DATE_TIME, name: 'updatedAt', label: 'Last update', }, { - universalIdentifier: uuidv4(), + universalIdentifier: computeSystemFieldUniversalIdentifier('deletedAt'), type: FieldMetadataType.DATE_TIME, name: 'deletedAt', label: 'Deleted at', }, { - universalIdentifier: uuidv4(), + universalIdentifier: computeSystemFieldUniversalIdentifier('createdBy'), type: FieldMetadataType.ACTOR, name: 'createdBy', label: 'Created by', }, { - universalIdentifier: uuidv4(), + universalIdentifier: computeSystemFieldUniversalIdentifier('updatedBy'), type: FieldMetadataType.ACTOR, name: 'updatedBy', label: 'Updated by', }, { - universalIdentifier: uuidv4(), + universalIdentifier: computeSystemFieldUniversalIdentifier('position'), type: FieldMetadataType.POSITION, name: 'position', label: 'Position', }, { - universalIdentifier: uuidv4(), + universalIdentifier: + computeSystemFieldUniversalIdentifier('searchVector'), type: FieldMetadataType.TS_VECTOR, name: 'searchVector', label: 'Search vector', diff --git a/packages/twenty-server/test/integration/metadata/suites/object-metadata/create-one-object-metadata-deterministic-field-universal-identifiers.integration-spec.ts b/packages/twenty-server/test/integration/metadata/suites/object-metadata/create-one-object-metadata-deterministic-field-universal-identifiers.integration-spec.ts new file mode 100644 index 0000000000..6a2145c7f8 --- /dev/null +++ b/packages/twenty-server/test/integration/metadata/suites/object-metadata/create-one-object-metadata-deterministic-field-universal-identifiers.integration-spec.ts @@ -0,0 +1,186 @@ +import { findManyApplications } from 'test/integration/graphql/utils/find-many-applications.util'; +import { findManyFieldsMetadata } from 'test/integration/metadata/suites/field-metadata/utils/find-many-fields-metadata.util'; +import { createOneObjectMetadata } from 'test/integration/metadata/suites/object-metadata/utils/create-one-object-metadata.util'; +import { deleteOneObjectMetadata } from 'test/integration/metadata/suites/object-metadata/utils/delete-one-object-metadata.util'; + +import { getFieldUniversalIdentifier } from 'twenty-shared/application'; +import { capitalize, isDefined } from 'twenty-shared/utils'; + +const SYSTEM_FIELD_NAMES = [ + 'id', + 'name', + 'createdAt', + 'updatedAt', + 'deletedAt', + 'createdBy', + 'updatedBy', + 'position', + 'searchVector', +]; + +const DEFAULT_RELATION_FORWARD_FIELD_NAMES = [ + 'timelineActivities', + 'attachments', + 'noteTargets', + 'taskTargets', +]; + +const OBJECT_NAME_SINGULAR = 'rocketForUniversalIdentifier'; + +type FetchedField = { + id: string; + name: string; + universalIdentifier: string; + relation: { + targetFieldMetadata: { + id: string; + name: string; + universalIdentifier: string; + }; + targetObjectMetadata: { + id: string; + nameSingular: string; + universalIdentifier: string; + }; + } | null; +}; + +describe('Custom object creation deterministic field universal identifiers', () => { + let createdObjectMetadataId: string; + let objectUniversalIdentifier: string; + let applicationUniversalIdentifier: string; + let fetchedFields: FetchedField[]; + + beforeAll(async () => { + const { data: createObjectData } = await createOneObjectMetadata({ + expectToFail: false, + input: { + nameSingular: OBJECT_NAME_SINGULAR, + namePlural: `${OBJECT_NAME_SINGULAR}s`, + labelSingular: 'Rocket For Universal Identifier', + labelPlural: 'Rockets For Universal Identifier', + icon: 'IconRocket', + }, + gqlFields: 'id universalIdentifier applicationId', + }); + + createdObjectMetadataId = createObjectData.createOneObject.id; + objectUniversalIdentifier = + createObjectData.createOneObject.universalIdentifier; + + const { data: findManyApplicationsData } = await findManyApplications({ + expectToFail: false, + }); + + const workspaceCustomApplication = + findManyApplicationsData.findManyApplications.find( + (application) => + application.id === createObjectData.createOneObject.applicationId, + ); + + if (!isDefined(workspaceCustomApplication)) { + throw new Error( + 'Could not resolve the application of the created custom object', + ); + } + + applicationUniversalIdentifier = + workspaceCustomApplication.universalIdentifier; + + const { fields } = await findManyFieldsMetadata({ + expectToFail: false, + input: { + filter: { objectMetadataId: { eq: createdObjectMetadataId } }, + paging: { first: 100 }, + }, + gqlFields: ` + id + name + universalIdentifier + relation { + targetFieldMetadata { id name universalIdentifier } + targetObjectMetadata { id nameSingular universalIdentifier } + } + `, + }); + + fetchedFields = fields.map((edge: { node: FetchedField }) => edge.node); + }); + + afterAll(async () => { + await deleteOneObjectMetadata({ + expectToFail: false, + input: { idToDelete: createdObjectMetadataId }, + }); + }); + + it.each(SYSTEM_FIELD_NAMES)( + 'should derive the %s system field universal identifier deterministically', + (systemFieldName) => { + const systemField = fetchedFields.find( + (field) => field.name === systemFieldName, + ); + + expect(systemField).toBeDefined(); + expect(systemField?.universalIdentifier).toBe( + getFieldUniversalIdentifier({ + applicationUniversalIdentifier, + objectUniversalIdentifier, + name: systemFieldName, + }), + ); + }, + ); + + it.each(DEFAULT_RELATION_FORWARD_FIELD_NAMES)( + 'should derive the %s default relation field universal identifiers deterministically', + async (forwardFieldName) => { + const forwardField = fetchedFields.find( + (field) => field.name === forwardFieldName, + ); + + expect(forwardField).toBeDefined(); + expect(forwardField?.universalIdentifier).toBe( + getFieldUniversalIdentifier({ + applicationUniversalIdentifier, + objectUniversalIdentifier, + name: forwardFieldName, + }), + ); + + const standardRelationObject = + forwardField?.relation?.targetObjectMetadata; + + expect(standardRelationObject).toBeDefined(); + + if (!isDefined(standardRelationObject)) { + return; + } + + const { fields: standardObjectFieldEdges } = await findManyFieldsMetadata( + { + expectToFail: false, + input: { + filter: { objectMetadataId: { eq: standardRelationObject.id } }, + paging: { first: 1000 }, + }, + gqlFields: 'id name universalIdentifier', + }, + ); + + const storedReverseFieldName = `target${capitalize(OBJECT_NAME_SINGULAR)}`; + const reverseField = standardObjectFieldEdges + .map((edge: { node: FetchedField }) => edge.node) + .find((field: FetchedField) => field.name === storedReverseFieldName); + + expect(reverseField).toBeDefined(); + expect(reverseField?.universalIdentifier).toBe( + getFieldUniversalIdentifier({ + applicationUniversalIdentifier, + objectUniversalIdentifier: standardRelationObject.universalIdentifier, + name: storedReverseFieldName, + }), + ); + }, + ); +}); diff --git a/packages/twenty-shared/src/metadata/__tests__/__snapshots__/standardObjectUniversalIdentifiers.test.ts.snap b/packages/twenty-shared/src/metadata/__tests__/__snapshots__/standardObjectUniversalIdentifiers.test.ts.snap new file mode 100644 index 0000000000..6bb009378d --- /dev/null +++ b/packages/twenty-shared/src/metadata/__tests__/__snapshots__/standardObjectUniversalIdentifiers.test.ts.snap @@ -0,0 +1,3212 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`STANDARD_OBJECTS universal identifiers should never change without an explicit snapshot update 1`] = ` +{ + "attachment": { + "fields": { + "createdAt": { + "universalIdentifier": "14f3d540-3a5f-587f-aff1-566282884255", + }, + "createdBy": { + "universalIdentifier": "1bc72f46-815a-59ac-82ec-2d32d18ba621", + }, + "deletedAt": { + "universalIdentifier": "a8df8238-df7e-5a41-9bf7-ff2d0517f3f8", + }, + "file": { + "universalIdentifier": "20202020-15db-460e-8166-c7b5d87ad4be", + }, + "fileCategory": { + "universalIdentifier": "20202020-8c3f-4d9e-9a1b-2e5f7a8c9d0e", + }, + "fullPath": { + "universalIdentifier": "20202020-0d19-453d-8e8d-fbcda8ca3747", + }, + "id": { + "universalIdentifier": "4b99ff33-3b68-523c-bc93-22c01ad5fb82", + }, + "name": { + "universalIdentifier": "20202020-87a5-48f8-bbf7-ade388825a57", + }, + "position": { + "universalIdentifier": "ae9bd922-70c6-5ce0-9073-d5002c2f9ccd", + }, + "searchVector": { + "universalIdentifier": "e3222f8c-aad5-5873-9a10-648908f48f81", + }, + "targetCompany": { + "universalIdentifier": "20202020-ceab-4a28-b546-73b06b4c08d5", + }, + "targetDashboard": { + "universalIdentifier": "20202020-5324-43f3-9dbf-1a33e7de0ce6", + }, + "targetNote": { + "universalIdentifier": "20202020-4f4b-4503-a6fc-6b982f3dffb5", + }, + "targetOpportunity": { + "universalIdentifier": "20202020-7374-499d-bea3-9354890755b5", + }, + "targetPerson": { + "universalIdentifier": "20202020-0158-4aa2-965c-5cdafe21ffa2", + }, + "targetTask": { + "universalIdentifier": "20202020-51e5-4621-9cf8-215487951c4b", + }, + "targetWorkflow": { + "universalIdentifier": "20202020-f1e8-4c9d-8a7b-3f5e1d2c9a8b", + }, + "updatedAt": { + "universalIdentifier": "8ac2b742-975b-5633-9f7f-fcf9920a72e8", + }, + "updatedBy": { + "universalIdentifier": "1a410dcf-6132-5e8e-97ed-7850d2ff68e7", + }, + }, + "indexes": { + "companyIdIndex": { + "universalIdentifier": "4137ba06-184d-438f-b484-080f02a97659", + }, + "dashboardIdIndex": { + "universalIdentifier": "c10eba2d-ff1a-4eab-9285-50481c12a003", + }, + "noteIdIndex": { + "universalIdentifier": "9d31ea73-13b6-4e06-84ee-c66c72bf7787", + }, + "opportunityIdIndex": { + "universalIdentifier": "8cc162d1-c127-4981-878d-f78622f8f12d", + }, + "personIdIndex": { + "universalIdentifier": "55637a5a-1edc-4351-8d76-d40020bf8944", + }, + "taskIdIndex": { + "universalIdentifier": "b8d4f9a3-0c25-4e7b-9f6a-2d3e4c5b6f70", + }, + "workflowIdIndex": { + "universalIdentifier": "fadeab4b-79ee-4173-af79-72c51fbad888", + }, + }, + "morphIds": { + "targetMorphId": { + "morphId": "20202020-f634-435d-ab8d-e1168b375c69", + }, + }, + "universalIdentifier": "20202020-bd3d-4c60-8dca-571c71d4447a", + "views": { + "allAttachments": { + "universalIdentifier": "3f7f3363-7087-44cc-902d-5e8904262316", + "viewFields": { + "createdAt": { + "universalIdentifier": "6c092c26-b1cb-488f-ae2e-5af4bec1162b", + }, + "createdBy": { + "universalIdentifier": "fa363372-0fdf-4bb3-bdf1-0ead354b9225", + }, + "file": { + "universalIdentifier": "873cf114-5477-4b62-9023-7ea6ad69fbe5", + }, + "name": { + "universalIdentifier": "be56712f-d7a6-4fbe-b92b-d750f0708a0a", + }, + "targetCompany": { + "universalIdentifier": "b335ad04-059e-4c36-8666-f40431849044", + }, + "targetDashboard": { + "universalIdentifier": "bcc6d6e1-7c0b-4291-9270-66e42024d8dd", + }, + "targetNote": { + "universalIdentifier": "fc8dba49-bcf2-41b8-a435-0c4a3bbf2af6", + }, + "targetOpportunity": { + "universalIdentifier": "15f2d457-dc09-4c52-bf2a-47083d6bf017", + }, + "targetPerson": { + "universalIdentifier": "73a4c3a7-c7f9-4ed6-a2b6-117d7efad0f3", + }, + "targetTask": { + "universalIdentifier": "c2913c5e-6cc6-438d-9c2f-3212a9b2a82b", + }, + "targetWorkflow": { + "universalIdentifier": "11fcf58b-dbab-42dd-be67-689462111070", + }, + }, + }, + }, + }, + "blocklist": { + "fields": { + "createdAt": { + "universalIdentifier": "fb059503-2c2d-538a-8f38-a7e6114978a5", + }, + "createdBy": { + "universalIdentifier": "56ed7ada-4d82-51e3-9f21-590d2fd6da6a", + }, + "deletedAt": { + "universalIdentifier": "16b26d03-91f4-5527-b6f8-4930d988ba13", + }, + "handle": { + "universalIdentifier": "20202020-eef3-44ed-aa32-4641d7fd4a3e", + }, + "id": { + "universalIdentifier": "eeee2008-081d-5437-9c4d-f67d5195d93e", + }, + "position": { + "universalIdentifier": "f127537d-097c-5d45-ae9c-0ad7c5de8c2b", + }, + "searchVector": { + "universalIdentifier": "94cc4e59-9c2a-5710-8ce1-41a38d9561ce", + }, + "updatedAt": { + "universalIdentifier": "41160e9d-8715-5e9b-bbbb-05d5d2817fcd", + }, + "updatedBy": { + "universalIdentifier": "952678b0-4393-578c-83aa-92890b1b6d77", + }, + "workspaceMember": { + "universalIdentifier": "20202020-548d-4084-a947-fa20a39f7c06", + }, + }, + "indexes": { + "workspaceMemberIdIndex": { + "universalIdentifier": "4daf320e-74d0-4f24-a45a-af3a09d741cb", + }, + }, + "universalIdentifier": "20202020-0408-4f38-b8a8-4d5e3e26e24d", + "views": { + "allBlocklists": { + "universalIdentifier": "5a98e88c-67c2-4f61-a5ab-a0d3d6a836bb", + "viewFields": { + "createdAt": { + "universalIdentifier": "e7cfcf05-2676-4d43-9eee-4da1016b12ff", + }, + "handle": { + "universalIdentifier": "155ae00d-0def-4f62-9473-8a8efa209eee", + }, + "workspaceMember": { + "universalIdentifier": "05a2f0b9-f2ef-4729-bc42-9e2ad2a34fb2", + }, + }, + }, + "blocklistRecordPageFields": { + "universalIdentifier": "5c679d04-7a1c-41be-9429-c9317ac7a0ea", + "viewFieldGroups": { + "general": { + "universalIdentifier": "94009e34-52fb-4534-89ce-6c6d0a774056", + }, + "system": { + "universalIdentifier": "35dace44-6e63-4cdb-b761-a92bcf126a7e", + }, + }, + "viewFields": { + "createdAt": { + "universalIdentifier": "b2594a03-e00f-4de9-89da-b34bb95c2221", + }, + "createdBy": { + "universalIdentifier": "80a60507-6c7a-4713-b5de-b94ac293bf23", + }, + "workspaceMember": { + "universalIdentifier": "f2f5732f-7435-44be-986b-4c4d834fdfeb", + }, + }, + }, + }, + }, + "calendarChannelEventAssociation": { + "fields": { + "calendarChannelId": { + "universalIdentifier": "20202020-93ee-4da4-8d58-0282c4a9cb7d", + }, + "calendarEvent": { + "universalIdentifier": "20202020-5aa5-437e-bb86-f42d457783e3", + }, + "createdAt": { + "universalIdentifier": "302d241b-c840-5cf2-a9fd-ef0dbc3abc05", + }, + "createdBy": { + "universalIdentifier": "51f8d0cb-df21-5154-ba09-da27ffe66e82", + }, + "deletedAt": { + "universalIdentifier": "e4b60faf-2e12-5b14-8d71-6d483d8fcc42", + }, + "eventExternalId": { + "universalIdentifier": "20202020-9ec8-48bb-b279-21d0734a75a1", + }, + "id": { + "universalIdentifier": "091cefe6-349d-57a5-8a88-1e1d8bf99937", + }, + "position": { + "universalIdentifier": "47fe9429-da1c-50a3-94b3-a0acf4be1588", + }, + "recurringEventExternalId": { + "universalIdentifier": "20202020-c58f-4c69-9bf8-9518fa31aa50", + }, + "searchVector": { + "universalIdentifier": "5aa9b505-10ea-5a8e-acd5-ef81752f8c73", + }, + "updatedAt": { + "universalIdentifier": "623aea4d-6a0d-50e0-b764-0ec9916abdab", + }, + "updatedBy": { + "universalIdentifier": "5dba94e8-6be5-56b9-bad4-12f12c0fdbdf", + }, + }, + "indexes": { + "calendarChannelIdIndex": { + "universalIdentifier": "ff6b86c1-3112-4dfa-b734-c4789111a716", + }, + "calendarEventIdIndex": { + "universalIdentifier": "47a3c8d2-9f14-4b6e-8c5d-1a2b3f4e5c69", + }, + }, + "universalIdentifier": "20202020-491b-4aaa-9825-afd1bae6ae00", + "views": { + "allCalendarChannelEventAssociations": { + "universalIdentifier": "001893be-c06c-4ba1-9f18-53bd26f0179f", + "viewFields": { + "calendarChannelId": { + "universalIdentifier": "e3adffd2-d820-4c89-912c-34908d90057e", + }, + "calendarEvent": { + "universalIdentifier": "35656a84-ecb8-4075-a610-8b538d6f8120", + }, + "createdAt": { + "universalIdentifier": "8ca74f2f-210b-4afc-81f0-506047400e82", + }, + "eventExternalId": { + "universalIdentifier": "f779d7e8-f1d8-44a7-b0ef-4409c9b6b466", + }, + }, + }, + "calendarChannelEventAssociationRecordPageFields": { + "universalIdentifier": "766f254a-a0eb-45c8-b4d2-12311201e08f", + "viewFieldGroups": { + "general": { + "universalIdentifier": "9c27f771-9f85-492f-b1f1-9bc7a175f6f3", + }, + "system": { + "universalIdentifier": "c7b18e05-dd60-4ee4-911a-290790e8c425", + }, + }, + "viewFields": { + "calendarChannelId": { + "universalIdentifier": "cd6c6714-fc1d-4511-a664-ec5e8dfd8692", + }, + "calendarEvent": { + "universalIdentifier": "4790ca84-255e-4cb7-9b20-c17f4d94df8e", + }, + "createdAt": { + "universalIdentifier": "2702ae80-9108-4757-8a25-317a4357484e", + }, + "createdBy": { + "universalIdentifier": "201e0c45-fddc-4217-bfd4-40c13d7f7916", + }, + "eventExternalId": { + "universalIdentifier": "dbe16c1b-ece2-4d2f-b634-094742ac3e16", + }, + }, + }, + }, + }, + "calendarEvent": { + "fields": { + "calendarChannelEventAssociations": { + "universalIdentifier": "20202020-bdf8-4572-a2cc-ecbb6bcc3a02", + }, + "calendarEventParticipants": { + "universalIdentifier": "20202020-e07e-4ccb-88f5-6f3d00458eec", + }, + "callRecordings": { + "universalIdentifier": "48d6d151-18e2-4111-b405-d85fb9d860d8", + }, + "conferenceLink": { + "universalIdentifier": "20202020-35da-43ef-9ca0-e936e9dc237b", + }, + "conferenceSolution": { + "universalIdentifier": "20202020-1c3f-4b5a-b526-5411a82179eb", + }, + "createdAt": { + "universalIdentifier": "dd7e2f41-7314-50ea-a4e3-5a5fd383d9a5", + }, + "createdBy": { + "universalIdentifier": "17530dae-31f5-565c-a296-e56ff910453c", + }, + "deletedAt": { + "universalIdentifier": "6c319a34-2640-53b4-8f9c-b1c34da9d981", + }, + "description": { + "universalIdentifier": "20202020-52c4-4266-a98f-e90af0b4d271", + }, + "endsAt": { + "universalIdentifier": "20202020-2554-4ee1-a617-17907f6bab21", + }, + "externalCreatedAt": { + "universalIdentifier": "20202020-9f03-4058-a898-346c62181599", + }, + "externalUpdatedAt": { + "universalIdentifier": "20202020-b355-4c18-8825-ef42c8a5a755", + }, + "iCalUid": { + "universalIdentifier": "20202020-f24b-45f4-b6a3-d2f9fcb98714", + }, + "id": { + "universalIdentifier": "8d4a8105-182f-5c07-824c-7bdf5ec552a9", + }, + "isCanceled": { + "universalIdentifier": "20202020-335b-4e04-b470-43b84b64863c", + }, + "isFullDay": { + "universalIdentifier": "20202020-551c-402c-bb6d-dfe9efe86bcb", + }, + "location": { + "universalIdentifier": "20202020-641a-4ffe-960d-c3c186d95b17", + }, + "position": { + "universalIdentifier": "3587323a-e19f-53f6-b6a5-9d2f105302ce", + }, + "searchVector": { + "universalIdentifier": "2cbd5b09-fe96-5454-b3fc-92de22702cda", + }, + "startsAt": { + "universalIdentifier": "20202020-2c57-4c75-93c5-2ac950a6ed67", + }, + "title": { + "universalIdentifier": "20202020-080e-49d1-b21d-9702a7e2525c", + }, + "updatedAt": { + "universalIdentifier": "573cbfd1-2c2d-5866-b4c0-4f09ba14d5cf", + }, + "updatedBy": { + "universalIdentifier": "ace17dae-1488-50eb-849e-02f409627627", + }, + }, + "indexes": {}, + "universalIdentifier": "20202020-8f1d-4eef-9f85-0d1965e27221", + "views": { + "allCalendarEvents": { + "universalIdentifier": "20202020-c001-4c01-8c01-ca1ebe0ca001", + "viewFields": { + "conferenceLink": { + "universalIdentifier": "20202020-cf01-4c01-8c01-ca1ebe0caf06", + }, + "createdAt": { + "universalIdentifier": "20202020-cf01-4c01-8c01-ca1ebe0caf08", + }, + "endsAt": { + "universalIdentifier": "20202020-cf01-4c01-8c01-ca1ebe0caf03", + }, + "isCanceled": { + "universalIdentifier": "20202020-cf01-4c01-8c01-ca1ebe0caf07", + }, + "isFullDay": { + "universalIdentifier": "20202020-cf01-4c01-8c01-ca1ebe0caf04", + }, + "location": { + "universalIdentifier": "20202020-cf01-4c01-8c01-ca1ebe0caf05", + }, + "startsAt": { + "universalIdentifier": "20202020-cf01-4c01-8c01-ca1ebe0caf02", + }, + "title": { + "universalIdentifier": "20202020-cf01-4c01-8c01-ca1ebe0caf01", + }, + }, + }, + "calendarEventRecordPageFields": { + "universalIdentifier": "c73668d1-022d-4eaf-b825-4e2548180db6", + "viewFieldGroups": { + "general": { + "universalIdentifier": "aeadeb9e-3673-4c0c-8845-f59cb1e6ca42", + }, + "system": { + "universalIdentifier": "eb1aadeb-7feb-44d1-9f9a-e9929e8690fc", + }, + }, + "viewFields": { + "conferenceLink": { + "universalIdentifier": "5ad748ae-e1bb-47bb-ac34-d82663c31b6e", + }, + "conferenceSolution": { + "universalIdentifier": "795905b6-c6f8-42cf-b8ea-3e5b6d32145f", + }, + "description": { + "universalIdentifier": "a09449be-b23f-48d4-b0dc-0bd36813220a", + }, + "endsAt": { + "universalIdentifier": "ed7ca7e9-c8b3-4516-be4c-6491a27af847", + }, + "externalCreatedAt": { + "universalIdentifier": "689c3eba-bedf-4a52-b9f1-3e34ce718251", + }, + "externalUpdatedAt": { + "universalIdentifier": "7823fa45-8cba-47ba-8dfb-5841bef44fc6", + }, + "iCalUid": { + "universalIdentifier": "8be763dd-6217-47fb-a7d2-ac223af881d2", + }, + "isCanceled": { + "universalIdentifier": "a01f490d-cf67-4458-801e-13d81e74b45a", + }, + "isFullDay": { + "universalIdentifier": "5d8f89b7-ec9e-41d6-9efe-96f9c32e6c20", + }, + "location": { + "universalIdentifier": "66c73e74-56e6-40c3-b776-0081ee757b8a", + }, + "startsAt": { + "universalIdentifier": "7bbd3744-d870-4704-882c-071732ed23d9", + }, + "title": { + "universalIdentifier": "d17fc76f-2c3a-4c84-8249-27227bf71638", + }, + }, + }, + }, + }, + "calendarEventParticipant": { + "fields": { + "calendarEvent": { + "universalIdentifier": "20202020-fe3a-401c-b889-af4f4657a861", + }, + "createdAt": { + "universalIdentifier": "0a0fb727-48f1-5eee-9a71-200dc7edb9c6", + }, + "createdBy": { + "universalIdentifier": "7868fea8-4696-551a-bd36-314bb5e5e071", + }, + "deletedAt": { + "universalIdentifier": "96f4bd5f-3f57-5f0f-b307-677d7cb01b83", + }, + "displayName": { + "universalIdentifier": "20202020-ee1e-4f9f-8ac1-5c0b2f69691e", + }, + "handle": { + "universalIdentifier": "20202020-8692-4580-8210-9e09cbd031a7", + }, + "id": { + "universalIdentifier": "ddbc46f8-f8d1-53ec-a716-da7758fd3e41", + }, + "isOrganizer": { + "universalIdentifier": "20202020-66e7-4e00-9e06-d06c92650580", + }, + "person": { + "universalIdentifier": "20202020-5761-4842-8186-e1898ef93966", + }, + "position": { + "universalIdentifier": "1beff28c-0efe-5b39-8202-e5dd15f2fc4f", + }, + "responseStatus": { + "universalIdentifier": "20202020-cec0-4be8-8fba-c366abc23147", + }, + "searchVector": { + "universalIdentifier": "1e3ba766-5515-5de3-8397-de3fe2148b6a", + }, + "updatedAt": { + "universalIdentifier": "dfb39640-346a-5ef9-93c9-5fff42532e7b", + }, + "updatedBy": { + "universalIdentifier": "652284fb-8f40-5242-8f54-bff8d5dc2827", + }, + "workspaceMember": { + "universalIdentifier": "20202020-20e4-4591-93ed-aeb17a4dcbd2", + }, + }, + "indexes": { + "calendarEventIdIndex": { + "universalIdentifier": "c458ad97-8b95-43de-9003-88eb68576049", + }, + "personIdIndex": { + "universalIdentifier": "30e9b75a-881f-4a85-aaf1-f2d2464be1cf", + }, + "workspaceMemberIdIndex": { + "universalIdentifier": "898aa202-428f-4a7a-a3b3-8f0a17a6658e", + }, + }, + "universalIdentifier": "20202020-a1c3-47a6-9732-27e5b1e8436d", + "views": { + "allCalendarEventParticipants": { + "universalIdentifier": "5228d634-6b69-4a43-be5c-e778fa6fe779", + "viewFields": { + "calendarEvent": { + "universalIdentifier": "d9c2f346-b83b-48ae-98d0-e344f97248cd", + }, + "createdAt": { + "universalIdentifier": "63d9d40d-e40c-410c-a14c-2f36c64c3e69", + }, + "displayName": { + "universalIdentifier": "3cadc470-9231-4027-9bbe-60e934edb483", + }, + "handle": { + "universalIdentifier": "4140bd68-55e8-475c-8724-7f9f97634a9f", + }, + "isOrganizer": { + "universalIdentifier": "684972f9-c5fe-4fff-bdec-2fc5511c938c", + }, + "person": { + "universalIdentifier": "86546244-9e3d-40e4-87cd-cbc82a353d2e", + }, + "responseStatus": { + "universalIdentifier": "dd0ab0bd-7f33-48fa-9461-fb5d085a2f9f", + }, + "workspaceMember": { + "universalIdentifier": "542141b0-ac85-4c43-867b-8d7f559b07ae", + }, + }, + }, + "calendarEventParticipantRecordPageFields": { + "universalIdentifier": "e01ebdb3-8fb8-46d2-8230-82242d593f7a", + "viewFieldGroups": { + "general": { + "universalIdentifier": "3d842777-436e-467d-90ae-9e1fa0aa7e9c", + }, + "system": { + "universalIdentifier": "098836d8-15c1-44c1-a58e-2ff7fd6a05f9", + }, + }, + "viewFields": { + "calendarEvent": { + "universalIdentifier": "865a1278-c356-4b99-a5e9-1ca3d33c7665", + }, + "createdAt": { + "universalIdentifier": "1447c7fa-fe2b-4ff7-8036-8de682537e23", + }, + "createdBy": { + "universalIdentifier": "6d7dff75-0230-45bd-8db9-dc25ef007e6e", + }, + "displayName": { + "universalIdentifier": "23b97527-6ad3-4f07-bf68-559b97321673", + }, + "handle": { + "universalIdentifier": "eb09af9c-b3f4-403c-8cb2-172243f83958", + }, + "isOrganizer": { + "universalIdentifier": "3c126f3c-bd01-4029-b58a-724513fa5fff", + }, + "person": { + "universalIdentifier": "46be729d-091c-4012-aeca-16a743008513", + }, + "responseStatus": { + "universalIdentifier": "cd02fc91-8fa4-4fa3-b0e3-1a1fc891e6ee", + }, + "workspaceMember": { + "universalIdentifier": "c38c1111-f6e0-4698-9b36-db59f8d97de3", + }, + }, + }, + }, + }, + "callRecording": { + "fields": { + "applicationId": { + "universalIdentifier": "24ec1239-1240-42cb-8a2d-302632378e09", + }, + "audio": { + "universalIdentifier": "2eafc2d0-8fec-430c-a939-65ca5fbc0f08", + }, + "calendarEvent": { + "universalIdentifier": "49e64b28-bd98-4775-80ea-4781bdd45e35", + }, + "createdAt": { + "universalIdentifier": "f994671e-f4b1-519f-838e-ef78df342009", + }, + "createdBy": { + "universalIdentifier": "936b1ce0-062a-523b-a7d4-416471ed32cd", + }, + "deletedAt": { + "universalIdentifier": "0b0363a3-a301-5fbf-8106-678c862edbeb", + }, + "endedAt": { + "universalIdentifier": "7a38a9cf-8424-4d6e-b80a-6883d3c662ef", + }, + "externalBotId": { + "universalIdentifier": "0a2da128-9bcc-488b-bc31-65318c41bdf9", + }, + "externalRecordingId": { + "universalIdentifier": "6d17fb71-324b-4625-a5be-b3580607e2c7", + }, + "id": { + "universalIdentifier": "afa74e95-04ec-5e4c-ac7a-ad1f5f72dbee", + }, + "position": { + "universalIdentifier": "a728a6eb-109d-590d-a69d-fcd0a7f7c35f", + }, + "recordingRequestStatus": { + "universalIdentifier": "7fd681c9-244c-4e98-8939-7b175d472638", + }, + "searchVector": { + "universalIdentifier": "5473385d-7a5e-5b67-a213-0453894d37af", + }, + "startedAt": { + "universalIdentifier": "6c56c23f-1987-410a-860a-df3b2b3f9a33", + }, + "status": { + "universalIdentifier": "3e617680-d93e-4309-a54f-90f69528bfd7", + }, + "summary": { + "universalIdentifier": "adb0f472-756b-4d3f-b21e-ea32bf73a5e4", + }, + "title": { + "universalIdentifier": "4cff8863-a1d1-45fd-a370-4eb6aa1f2a5b", + }, + "transcript": { + "universalIdentifier": "27b86d68-57d1-4607-aca0-191896b1ad43", + }, + "updatedAt": { + "universalIdentifier": "42331676-c29d-51b4-a037-2f9ee55d3313", + }, + "updatedBy": { + "universalIdentifier": "75c9c4e5-423e-5398-a48e-572668392e06", + }, + "video": { + "universalIdentifier": "bb9523d3-457e-4f4b-8c79-27a77afb87da", + }, + }, + "indexes": { + "calendarEventIdIndex": { + "universalIdentifier": "8be3cc47-9352-4a1b-ad19-bb186bc0865d", + }, + }, + "universalIdentifier": "ce19efb9-710f-45b2-b141-473abbeea60b", + "views": { + "allCallRecordings": { + "universalIdentifier": "c395b55e-88f0-4d5b-a1fb-0d38b50e0b19", + "viewFields": { + "recordingRequestStatus": { + "universalIdentifier": "3bdedacd-0fd5-4175-8d28-2fe41bb5aa77", + }, + "startedAt": { + "universalIdentifier": "3b96351f-66ed-4fa6-acb6-698647573af7", + }, + "status": { + "universalIdentifier": "6c4a81a2-d9c1-4f82-984c-f97e083ca710", + }, + "title": { + "universalIdentifier": "b1d5051b-071d-4514-93cf-704724cdc8f6", + }, + }, + }, + "callRecordingRecordPageFields": { + "universalIdentifier": "99fa8b47-3b11-4f9b-8fbc-e67a9e1da682", + "viewFieldGroups": { + "general": { + "universalIdentifier": "068426eb-dd20-49b0-ae9c-68727f3be2fb", + }, + }, + "viewFields": { + "audio": { + "universalIdentifier": "9445a547-1d1e-4da3-916b-2c2269c951c9", + }, + "endedAt": { + "universalIdentifier": "ba8c8d41-c112-4173-b927-5b5c5a5c047b", + }, + "recordingRequestStatus": { + "universalIdentifier": "364a90b1-e9aa-4606-996b-46e579ebeb28", + }, + "startedAt": { + "universalIdentifier": "3fd00fbb-c153-45e3-b6e6-43d18d34052a", + }, + "status": { + "universalIdentifier": "93483569-fcd2-46cf-b576-9f0318ad2b3b", + }, + "summary": { + "universalIdentifier": "a0ace064-cc72-4631-ade3-07cdded86b0e", + }, + "title": { + "universalIdentifier": "6308d574-8579-4cf2-a020-c208df97cf3e", + }, + "transcript": { + "universalIdentifier": "782c97f6-e6b1-472b-8992-bbb60d25791b", + }, + "video": { + "universalIdentifier": "acc54ade-cd26-4be2-9391-a42715ad1523", + }, + }, + }, + }, + }, + "company": { + "fields": { + "accountOwner": { + "universalIdentifier": "20202020-95b8-4e10-9881-edb5d4765f9d", + }, + "address": { + "universalIdentifier": "20202020-c5ce-4adc-b7b6-9c0979fc55e7", + }, + "annualRevenue": { + "universalIdentifier": "60f533b7-2166-4071-a767-ceb0286822fd", + }, + "attachments": { + "universalIdentifier": "20202020-c1b5-4120-b0f0-987ca401ed53", + }, + "createdAt": { + "universalIdentifier": "d206d586-fd61-56e1-80a8-9993beb7be0b", + }, + "createdBy": { + "universalIdentifier": "6046f5a2-f52b-5c41-95b3-134d95b2cc99", + }, + "deletedAt": { + "universalIdentifier": "790e467a-a3fa-545f-bfd2-8b91c3d84480", + }, + "domainName": { + "universalIdentifier": "20202020-0c28-43d8-8ba5-3659924d3489", + }, + "id": { + "universalIdentifier": "ca0547a7-a55a-51f7-b5d7-f3a03e266c39", + }, + "linkedinLink": { + "universalIdentifier": "20202020-ebeb-4beb-b9ad-6848036fb451", + }, + "name": { + "universalIdentifier": "20202020-4d99-4e2e-a84c-4a27837b1ece", + }, + "noteTargets": { + "universalIdentifier": "20202020-bae0-4556-a74a-a9c686f77a88", + }, + "opportunities": { + "universalIdentifier": "20202020-add3-4658-8e23-d70dccb6d0ec", + }, + "people": { + "universalIdentifier": "20202020-3213-4ddf-9494-6422bcff8d7c", + }, + "position": { + "universalIdentifier": "a6c6ffb5-1a46-5f3d-b0e3-14c071e3a972", + }, + "searchVector": { + "universalIdentifier": "d043190d-3335-5463-b98d-eecbf7b41c65", + }, + "taskTargets": { + "universalIdentifier": "20202020-cb17-4a61-8f8f-3be6730480de", + }, + "timelineActivities": { + "universalIdentifier": "20202020-0414-4daf-9c0d-64fe7b27f89f", + }, + "updatedAt": { + "universalIdentifier": "a1add354-649b-5ab6-9fc4-a5ab112110ac", + }, + "updatedBy": { + "universalIdentifier": "17127ec7-3667-5615-85fa-428dc34768c6", + }, + }, + "indexes": { + "accountOwnerIdIndex": { + "universalIdentifier": "ec2ebfc9-0c9b-4597-a87d-aa295e2d8bfe", + }, + "domainNameUniqueIndex": { + "universalIdentifier": "dd300c61-f422-467a-91f4-de4f83c4175b", + }, + "searchVectorGinIndex": { + "universalIdentifier": "c3eb62df-2cc1-4cc3-b7aa-e96a4d65c633", + }, + }, + "universalIdentifier": "20202020-b374-4779-a561-80086cb2e17f", + "views": { + "allCompanies": { + "universalIdentifier": "20202020-a001-4a01-8a01-c0aba11c0001", + "viewFields": { + "accountOwner": { + "universalIdentifier": "20202020-af01-4a01-8a01-c0aba11cf004", + }, + "address": { + "universalIdentifier": "20202020-af01-4a01-8a01-c0aba11cf008", + }, + "createdAt": { + "universalIdentifier": "20202020-af01-4a01-8a01-c0aba11cf005", + }, + "createdBy": { + "universalIdentifier": "20202020-af01-4a01-8a01-c0aba11cf003", + }, + "domainName": { + "universalIdentifier": "20202020-af01-4a01-8a01-c0aba11cf002", + }, + "linkedinLink": { + "universalIdentifier": "20202020-af01-4a01-8a01-c0aba11cf007", + }, + "name": { + "universalIdentifier": "20202020-af01-4a01-8a01-c0aba11cf001", + }, + }, + }, + "companyRecordPageFields": { + "universalIdentifier": "20202020-a001-4a01-8a01-c0aba11c1001", + "viewFieldGroups": { + "business": { + "universalIdentifier": "20202020-a001-4a01-8a01-c0aba11c1102", + }, + "contact": { + "universalIdentifier": "20202020-a001-4a01-8a01-c0aba11c1103", + }, + "general": { + "universalIdentifier": "20202020-a001-4a01-8a01-c0aba11c1101", + }, + "system": { + "universalIdentifier": "20202020-a001-4a01-8a01-c0aba11c1104", + }, + }, + "viewFields": { + "accountOwner": { + "universalIdentifier": "20202020-af01-4a01-8a01-c0aba11c1202", + }, + "address": { + "universalIdentifier": "20202020-af01-4a01-8a01-c0aba11c1208", + }, + "annualRevenue": { + "universalIdentifier": "2a35f734-dea2-4de9-8395-acbce8df0f97", + }, + "attachments": { + "universalIdentifier": "20202020-af01-4a01-8a01-c0aba11c1219", + }, + "createdAt": { + "universalIdentifier": "20202020-af01-4a01-8a01-c0aba11c1209", + }, + "createdBy": { + "universalIdentifier": "20202020-af01-4a01-8a01-c0aba11c1210", + }, + "domainName": { + "universalIdentifier": "20202020-af01-4a01-8a01-c0aba11c1201", + }, + "linkedinLink": { + "universalIdentifier": "20202020-af01-4a01-8a01-c0aba11c1206", + }, + "noteTargets": { + "universalIdentifier": "20202020-af01-4a01-8a01-c0aba11c1216", + }, + "opportunities": { + "universalIdentifier": "20202020-af01-4a01-8a01-c0aba11c1217", + }, + "people": { + "universalIdentifier": "20202020-af01-4a01-8a01-c0aba11c1214", + }, + "taskTargets": { + "universalIdentifier": "20202020-af01-4a01-8a01-c0aba11c1215", + }, + "timelineActivities": { + "universalIdentifier": "20202020-af01-4a01-8a01-c0aba11c121a", + }, + "updatedAt": { + "universalIdentifier": "20202020-af01-4a01-8a01-c0aba11c1212", + }, + "updatedBy": { + "universalIdentifier": "20202020-af01-4a01-8a01-c0aba11c1213", + }, + }, + }, + }, + }, + "dashboard": { + "fields": { + "attachments": { + "universalIdentifier": "20202020-bf6f-4220-8c55-2764f1175870", + }, + "createdAt": { + "universalIdentifier": "78bc7f2f-9060-571d-a690-de20ac22622b", + }, + "createdBy": { + "universalIdentifier": "4eff9439-378b-5d76-8125-02f3b853de39", + }, + "deletedAt": { + "universalIdentifier": "b5ae8011-d8ed-540c-8781-71958874edd0", + }, + "id": { + "universalIdentifier": "b7d8932b-d7a6-51e3-a120-416446c5dad7", + }, + "pageLayoutId": { + "universalIdentifier": "20202020-bb53-4648-aa36-1d9d54e6f7f2", + }, + "position": { + "universalIdentifier": "faec16fb-aef8-56e9-8740-0fc58a9ed73c", + }, + "searchVector": { + "universalIdentifier": "32804a7c-2b8c-57cd-8a41-963d5f4b1503", + }, + "timelineActivities": { + "universalIdentifier": "99c330c0-5b7d-4276-a764-aed84499dfb5", + }, + "title": { + "universalIdentifier": "20202020-20ee-4091-95dc-44b57eda3a89", + }, + "updatedAt": { + "universalIdentifier": "b99e4d99-8da2-5695-ad10-1d694b81459d", + }, + "updatedBy": { + "universalIdentifier": "b491025e-2462-507b-befe-07e2318187b9", + }, + }, + "indexes": { + "searchVectorGinIndex": { + "universalIdentifier": "e69f71aa-de0f-4b70-845f-7a8369c47928", + }, + }, + "universalIdentifier": "20202020-3840-4b6d-9425-0c5188b05ca8", + "views": { + "allDashboards": { + "universalIdentifier": "20202020-a012-4a12-8a12-da5ab0b0a001", + "viewFields": { + "createdAt": { + "universalIdentifier": "20202020-af12-4a12-8a12-da5ab0b0af03", + }, + "createdBy": { + "universalIdentifier": "20202020-af12-4a12-8a12-da5ab0b0af02", + }, + "title": { + "universalIdentifier": "20202020-af12-4a12-8a12-da5ab0b0af01", + }, + "updatedAt": { + "universalIdentifier": "20202020-af12-4a12-8a12-da5ab0b0af04", + }, + }, + }, + }, + }, + "message": { + "fields": { + "createdAt": { + "universalIdentifier": "74d0ddc0-4dbe-5c29-8d4a-2e512c1e66ab", + }, + "createdBy": { + "universalIdentifier": "5f2febe9-face-51bb-84df-110447e939c4", + }, + "deletedAt": { + "universalIdentifier": "918cb351-2490-540b-b02d-e6052042dddc", + }, + "deliveryStatus": { + "universalIdentifier": "209254fa-2b89-429d-a72a-c401c4bd5a78", + }, + "headerMessageId": { + "universalIdentifier": "20202020-72b5-416d-aed8-b55609067d01", + }, + "id": { + "universalIdentifier": "e213bdd7-d49d-5e90-a5f9-edee9c261df9", + }, + "isDraft": { + "universalIdentifier": "20202020-4d3a-4b6e-9c1f-2a5e7b9d0c34", + }, + "messageCampaign": { + "universalIdentifier": "77cff00b-a0ba-48d6-80de-0d5ccf14e45b", + }, + "messageChannelMessageAssociations": { + "universalIdentifier": "20202020-3cef-43a3-82c6-50e7cfbc9ae4", + }, + "messageParticipants": { + "universalIdentifier": "20202020-7cff-4a74-b63c-73228448cbd9", + }, + "messageThread": { + "universalIdentifier": "20202020-30f2-4ccd-9f5c-e41bb9d26214", + }, + "position": { + "universalIdentifier": "44735eaf-ce39-5023-8d32-3ba27ef7d11d", + }, + "receivedAt": { + "universalIdentifier": "20202020-140a-4a2a-9f86-f13b6a979afc", + }, + "searchVector": { + "universalIdentifier": "22b10c43-5f5c-53c2-bd68-c77811314633", + }, + "subject": { + "universalIdentifier": "20202020-52d1-4036-b9ae-84bd722bb37a", + }, + "text": { + "universalIdentifier": "20202020-d2ee-4e7e-89de-9a0a9044a143", + }, + "updatedAt": { + "universalIdentifier": "8cf01bfa-c64b-5e21-b4c8-5641262df93b", + }, + "updatedBy": { + "universalIdentifier": "c6722045-ee1f-5763-a5e8-0bcc74a3bfdd", + }, + }, + "indexes": { + "messageCampaignIdIndex": { + "universalIdentifier": "79e777ca-7008-46c5-b3a6-3108b7c7dfb6", + }, + "messageThreadIdIndex": { + "universalIdentifier": "7a05b45e-7aa6-4a7e-9bbc-299cbed53c96", + }, + }, + "universalIdentifier": "20202020-3f6b-4425-80ab-e468899ab4b2", + "views": { + "allMessages": { + "universalIdentifier": "20202020-d001-4d01-8d01-ae55a9e5a001", + "viewFields": { + "createdAt": { + "universalIdentifier": "20202020-df01-4d01-8d01-ae55a9e5af07", + }, + "headerMessageId": { + "universalIdentifier": "20202020-df01-4d01-8d01-ae55a9e5af05", + }, + "messageParticipants": { + "universalIdentifier": "20202020-df01-4d01-8d01-ae55a9e5af03", + }, + "messageThread": { + "universalIdentifier": "20202020-df01-4d01-8d01-ae55a9e5af02", + }, + "receivedAt": { + "universalIdentifier": "20202020-df01-4d01-8d01-ae55a9e5af04", + }, + "subject": { + "universalIdentifier": "20202020-df01-4d01-8d01-ae55a9e5af01", + }, + "text": { + "universalIdentifier": "20202020-df01-4d01-8d01-ae55a9e5af06", + }, + }, + }, + }, + }, + "messageCampaign": { + "fields": { + "bodyTemplate": { + "universalIdentifier": "b3a69d08-31ca-4a8d-8359-5ca462899342", + }, + "createdAt": { + "universalIdentifier": "4260eb89-0d55-5078-a6e5-5768781111ba", + }, + "createdBy": { + "universalIdentifier": "a8825cd1-f516-533a-b526-09e90ec20a3e", + }, + "deletedAt": { + "universalIdentifier": "da77cebd-4e72-5568-b808-027e21f748e8", + }, + "fromAddress": { + "universalIdentifier": "91e1a33c-c1ff-411a-b720-9085e13c05db", + }, + "id": { + "universalIdentifier": "255754f9-e5ff-587b-9ee7-58fd8b7f7212", + }, + "list": { + "universalIdentifier": "cb24dcdf-f0e8-4c71-8cff-70b714e86530", + }, + "messages": { + "universalIdentifier": "e5a177a7-512b-4778-928e-69777a528f7c", + }, + "position": { + "universalIdentifier": "e43f6c94-602c-54af-a398-559510beb43b", + }, + "recipients": { + "universalIdentifier": "05a3271c-5b91-493c-8f30-2d27b31d019e", + }, + "searchVector": { + "universalIdentifier": "f4cf203c-6ef6-561f-864c-5532e07f94ad", + }, + "sentAt": { + "universalIdentifier": "e2315b4f-9edf-4df2-96b9-961e76368671", + }, + "status": { + "universalIdentifier": "c7117256-3de6-48e1-87df-c99c32bad610", + }, + "subject": { + "universalIdentifier": "7251544c-b07a-4f0d-9d0a-48514367f230", + }, + "timelineActivities": { + "universalIdentifier": "d4e5f607-1829-4da3-8eb4-25f607182930", + }, + "unsubscribeTopicId": { + "universalIdentifier": "0648e7ad-1769-4ff6-a4d5-72da79ef169c", + }, + "updatedAt": { + "universalIdentifier": "d0a5b5d2-2ad1-5dd2-b2f0-aa823d30a2c6", + }, + "updatedBy": { + "universalIdentifier": "a1ba99fd-03d7-5c13-8ef3-a094144172de", + }, + }, + "indexes": { + "listIdIndex": { + "universalIdentifier": "17bffd6a-714a-458d-a547-f9e2183d9520", + }, + "searchVectorGinIndex": { + "universalIdentifier": "975823ad-9b97-4f39-b2c7-fbd7d77f4bd1", + }, + "unsubscribeTopicIdIndex": { + "universalIdentifier": "efe8c20e-d12b-4475-969e-e86e0bbfe444", + }, + }, + "universalIdentifier": "238acb94-dd4c-4036-bc55-19b99d821efd", + }, + "messageChannelMessageAssociation": { + "fields": { + "createdAt": { + "universalIdentifier": "044a7327-5d2a-5d40-b23b-79342304ff26", + }, + "createdBy": { + "universalIdentifier": "81077535-1363-586c-a393-2dcb3903782c", + }, + "deletedAt": { + "universalIdentifier": "2cfd882f-852b-56cb-a1ea-ced999abc930", + }, + "direction": { + "universalIdentifier": "75c9b0f7-9e76-44d4-a2f9-47051e61eec7", + }, + "id": { + "universalIdentifier": "a433efbf-d423-5a5a-9615-143b0abd53ed", + }, + "message": { + "universalIdentifier": "20202020-da5d-4ac5-8743-342ab0a0336b", + }, + "messageChannelId": { + "universalIdentifier": "20202020-b658-408f-bd46-3bd2d15d7e52", + }, + "messageExternalId": { + "universalIdentifier": "20202020-37d6-438f-b6fd-6503596c8f34", + }, + "messageFolders": { + "universalIdentifier": "9bfc9da7-ae2d-44fd-9563-ede90c5d6222", + }, + "messageThread": { + "universalIdentifier": "20202020-fac8-42a8-94dd-44dbc920ae16", + }, + "messageThreadExternalId": { + "universalIdentifier": "20202020-35fb-421e-afa0-0b8e8f7f9018", + }, + "position": { + "universalIdentifier": "997235ac-1d76-5c8c-a77c-446c91d9bd06", + }, + "searchVector": { + "universalIdentifier": "5f6d2f0e-d751-507f-897b-75b9649402e9", + }, + "updatedAt": { + "universalIdentifier": "467351dd-7cf5-5729-a798-a038ccf431c1", + }, + "updatedBy": { + "universalIdentifier": "6f4d1e38-92b7-5446-9ebb-b37704137aa6", + }, + }, + "indexes": { + "messageChannelIdIndex": { + "universalIdentifier": "9894f9a3-0225-4e7b-9f6a-23d4e2576784", + }, + "messageChannelIdMessageIdUniqueIndex": { + "universalIdentifier": "1b86ece8-7ce3-4df3-8771-fd4b5d45b2f2", + }, + "messageIdIndex": { + "universalIdentifier": "9bb24d40-60dd-4beb-8c64-a74e8c67f9ee", + }, + }, + "universalIdentifier": "20202020-ad1e-4127-bccb-d83ae04d2ccb", + "views": { + "allMessageChannelMessageAssociations": { + "universalIdentifier": "a4f465ac-d5cb-4f24-93ac-7a24bafd398e", + "viewFields": { + "createdAt": { + "universalIdentifier": "af239abd-2c55-4108-a9d8-b5a67f6ca2e2", + }, + "direction": { + "universalIdentifier": "ca38195e-985c-4880-85e0-26fa143c1ec7", + }, + "message": { + "universalIdentifier": "f9f2de0d-3db5-402b-a733-53be6a4667c8", + }, + "messageChannelId": { + "universalIdentifier": "b86e652b-04ce-4089-9f71-e190eaf5b798", + }, + "messageExternalId": { + "universalIdentifier": "7fb9801d-ca3d-4b2d-8d55-c922fcf7fefd", + }, + }, + }, + "messageChannelMessageAssociationRecordPageFields": { + "universalIdentifier": "680b43e2-5d50-49d8-bbdd-2d208e7b7071", + "viewFieldGroups": { + "general": { + "universalIdentifier": "86d7066c-ba38-4f6a-996f-77345bedd549", + }, + "system": { + "universalIdentifier": "6044c58c-a63c-4f3f-a283-b8803553628f", + }, + }, + "viewFields": { + "createdAt": { + "universalIdentifier": "8651c5c4-db87-427c-8a57-6a9f75c74976", + }, + "createdBy": { + "universalIdentifier": "af4adf31-f698-4aad-9f29-71908924fc9a", + }, + "direction": { + "universalIdentifier": "9edfbd44-4624-4cf8-b81c-8e169b4e8281", + }, + "message": { + "universalIdentifier": "166aa5a0-d825-40dc-be6d-e94b87edd56d", + }, + "messageChannelId": { + "universalIdentifier": "376c7685-9ebe-4c95-b820-424b1c2f264f", + }, + "messageExternalId": { + "universalIdentifier": "1910bd21-2472-4a83-b8cd-7de51bdd2675", + }, + }, + }, + }, + }, + "messageChannelMessageAssociationMessageFolder": { + "fields": { + "createdAt": { + "universalIdentifier": "968afc39-88d7-577b-95f4-2e10cf6fc749", + }, + "createdBy": { + "universalIdentifier": "4ccdffa0-f929-5373-886b-27238ed1c6bc", + }, + "deletedAt": { + "universalIdentifier": "3435c6dc-cf37-5267-a983-08e69ee0b70c", + }, + "id": { + "universalIdentifier": "10a4ce67-0b20-5303-a55d-37550e172ac6", + }, + "messageChannelMessageAssociation": { + "universalIdentifier": "7411cfa3-4fd9-4b90-a636-940015fd7243", + }, + "messageFolderId": { + "universalIdentifier": "b3369d31-3856-4a7a-b007-ee353918127c", + }, + "position": { + "universalIdentifier": "e814af12-31f4-52dd-adf8-b186a55a06a4", + }, + "searchVector": { + "universalIdentifier": "47d3a823-f8cf-5560-96f1-5d32217dc130", + }, + "updatedAt": { + "universalIdentifier": "f4414d0a-e6eb-5903-a472-3d5e8920fb4f", + }, + "updatedBy": { + "universalIdentifier": "7672ce86-036b-5e6e-a43f-dbc1fb1454ba", + }, + }, + "indexes": { + "messageChannelMessageAssociationIdIndex": { + "universalIdentifier": "8e6038aa-1f79-4a84-87b5-f33caa172e98", + }, + "messageChannelMessageAssociationIdMessageFolderIdUniqueIndex": { + "universalIdentifier": "a3de1788-5dff-4849-ac5a-0dabe5fab216", + }, + "messageFolderIdIndex": { + "universalIdentifier": "905299c3-ca81-435d-901c-f68b87562516", + }, + }, + "universalIdentifier": "20202020-a1b0-40b0-8ab0-5b6c7d8e9f0a", + "views": { + "allMessageChannelMessageAssociationMessageFolders": { + "universalIdentifier": "775610fe-f1d1-4959-bdc3-0b437059cfeb", + "viewFields": { + "createdAt": { + "universalIdentifier": "9da7637e-25c7-4101-8169-b5f6ff159690", + }, + "messageChannelMessageAssociation": { + "universalIdentifier": "1251e67a-e795-4bc2-a468-6cfc838b6a0a", + }, + "messageFolderId": { + "universalIdentifier": "aff2203d-6439-43b8-9cb4-55e8d78bba43", + }, + }, + }, + "messageChannelMessageAssociationMessageFolderRecordPageFields": { + "universalIdentifier": "331ec548-07d2-4f9d-a0a2-ef91a9f96184", + "viewFieldGroups": { + "general": { + "universalIdentifier": "4928521b-ae24-4013-a69a-1392017d57af", + }, + "system": { + "universalIdentifier": "b76cebb3-39b2-477a-9212-8bf1190227a4", + }, + }, + "viewFields": { + "createdAt": { + "universalIdentifier": "39297559-a747-481e-a4c5-b80b8faf1aac", + }, + "createdBy": { + "universalIdentifier": "4692eb91-7fc6-4436-9175-87caa5f6b668", + }, + "messageChannelMessageAssociation": { + "universalIdentifier": "d34ed53e-5156-4a18-a8df-572269496aac", + }, + "messageFolderId": { + "universalIdentifier": "04f14582-caf9-49ee-81ea-e5d4f977bfe1", + }, + }, + }, + }, + }, + "messageList": { + "fields": { + "campaigns": { + "universalIdentifier": "e098d838-31ab-4812-91a8-f055f45a6832", + }, + "createdAt": { + "universalIdentifier": "3bae90c7-2e2d-5191-835e-7868e89adcb0", + }, + "createdBy": { + "universalIdentifier": "e37895fc-28ae-5b7c-b0e8-3a5d8354e82c", + }, + "deletedAt": { + "universalIdentifier": "717071cc-9630-5fe6-8d6a-22d4f0ae0d43", + }, + "id": { + "universalIdentifier": "1bb14df7-602a-542c-b26e-c63f7454a7ee", + }, + "members": { + "universalIdentifier": "92df3493-91cf-4665-8587-1b08917d299b", + }, + "name": { + "universalIdentifier": "69b9ed8b-7b26-4108-894f-05700ef7e8ee", + }, + "position": { + "universalIdentifier": "fdec9697-14f8-56a3-85c4-ed63245600e0", + }, + "searchVector": { + "universalIdentifier": "a163f11e-cf13-5a7e-8ac2-ff522d9a7a79", + }, + "timelineActivities": { + "universalIdentifier": "e0a5b2c3-4d6f-4e81-9a02-1b3c4d5e6f70", + }, + "updatedAt": { + "universalIdentifier": "fbdc216f-2f82-59c7-af5c-daa6e6009e46", + }, + "updatedBy": { + "universalIdentifier": "1fa18a70-9863-5f1d-ae9e-b983fe1f0984", + }, + }, + "indexes": { + "searchVectorGinIndex": { + "universalIdentifier": "8e205171-ed74-4620-b7d2-674aab85033a", + }, + }, + "universalIdentifier": "826561ea-4816-411c-baa0-eec5e6ca8866", + }, + "messageListMember": { + "fields": { + "createdAt": { + "universalIdentifier": "7b66141b-bac5-57ff-a174-4aa0c013b511", + }, + "createdBy": { + "universalIdentifier": "55bdfb8e-742e-58f6-9704-3c6d170e76c7", + }, + "deletedAt": { + "universalIdentifier": "e78628bf-2bba-539a-8bbb-c59f84d22f14", + }, + "id": { + "universalIdentifier": "3cbf8893-6445-52bc-94ac-b90ac21920d4", + }, + "list": { + "universalIdentifier": "d5402005-e8f9-4fbe-8696-b6723cd85018", + }, + "person": { + "universalIdentifier": "34288425-8805-42fb-8b98-ee13d09be3d3", + }, + "position": { + "universalIdentifier": "cb0d1e81-9c74-5b47-87f1-0aa31561d326", + }, + "searchVector": { + "universalIdentifier": "3f37f76b-9f76-5e43-bae7-2c0fda383c60", + }, + "updatedAt": { + "universalIdentifier": "f32bdb54-982f-5a57-8c3a-8d76885eff51", + }, + "updatedBy": { + "universalIdentifier": "9587337a-1b0f-5cdb-b534-2eccd6cd5f5e", + }, + }, + "indexes": { + "listIdIndex": { + "universalIdentifier": "61188470-6dcb-4b2a-b1a9-baeb688bccae", + }, + "personListUniqueIndex": { + "universalIdentifier": "e5497dc2-1d72-418c-a389-a0645ca0195a", + }, + }, + "universalIdentifier": "27773d24-8ce3-40f8-aa6c-1f590f2c08d2", + }, + "messageParticipant": { + "fields": { + "createdAt": { + "universalIdentifier": "efc13c39-1e5f-59fb-946b-4f565da5134d", + }, + "createdBy": { + "universalIdentifier": "66f35927-24e4-5772-a85e-b2671d242e7b", + }, + "deletedAt": { + "universalIdentifier": "e8d4cbc1-59dd-5433-875d-0e9927493673", + }, + "displayName": { + "universalIdentifier": "20202020-36dd-4a4f-ac02-228425be9fac", + }, + "handle": { + "universalIdentifier": "20202020-2456-464e-b422-b965a4db4a0b", + }, + "id": { + "universalIdentifier": "f1a22964-745b-5e1e-af62-f21cc78f9572", + }, + "message": { + "universalIdentifier": "20202020-985b-429a-9db9-9e55f4898a2a", + }, + "messageCampaign": { + "universalIdentifier": "5bc768db-919f-41da-8c43-df08084d526f", + }, + "person": { + "universalIdentifier": "20202020-249d-4e0f-82cd-1b9df5cd3da2", + }, + "position": { + "universalIdentifier": "fef8dc68-9729-57c2-9683-fbc9c753ee36", + }, + "role": { + "universalIdentifier": "20202020-65d1-42f4-8729-c9ec1f52aecd", + }, + "searchVector": { + "universalIdentifier": "f88ddce0-1607-5990-b64f-1130b0bd6095", + }, + "updatedAt": { + "universalIdentifier": "846cbdc9-263c-5311-a497-2081b4815bb2", + }, + "updatedBy": { + "universalIdentifier": "fe9b9314-3b8c-5e29-b049-c66a60a13133", + }, + "workspaceMember": { + "universalIdentifier": "20202020-77a7-4845-99ed-1bcbb478be6f", + }, + }, + "indexes": { + "messageCampaignIdIndex": { + "universalIdentifier": "e9bcdd77-cc8b-4532-833c-124dfdc8e5ff", + }, + "messageIdIndex": { + "universalIdentifier": "ab0863ba-f95e-493c-b86c-56e1bc7e5bc2", + }, + "personIdIndex": { + "universalIdentifier": "df805c2e-3bfe-4d51-8309-75e5eb4052fe", + }, + "workspaceMemberIdIndex": { + "universalIdentifier": "ce1e3a9e-afe9-439d-abb7-6cc98a6fa405", + }, + }, + "universalIdentifier": "20202020-a433-4456-aa2d-fd9cb26b774a", + "views": { + "allMessageParticipants": { + "universalIdentifier": "8b7fbe7d-dae0-4285-8bdc-ec078a4de870", + "viewFields": { + "createdAt": { + "universalIdentifier": "636ff7b6-86b8-49fc-9442-39f4c24ff424", + }, + "displayName": { + "universalIdentifier": "8d0c8202-b57f-4450-a090-a7eb26aa2299", + }, + "handle": { + "universalIdentifier": "abcbb5d9-b8c2-46bb-b3cc-ea035be8f3be", + }, + "message": { + "universalIdentifier": "ca491a31-8659-4202-9476-f0f72efc80b5", + }, + "person": { + "universalIdentifier": "26d0f3f1-43d3-425c-930c-81147451d0f8", + }, + "role": { + "universalIdentifier": "55b74f7e-7c58-4fce-a44b-a8d9671ec541", + }, + "workspaceMember": { + "universalIdentifier": "df62dcbc-c22d-4d34-9fa5-6f70bae02161", + }, + }, + }, + "messageParticipantRecordPageFields": { + "universalIdentifier": "209ab5c5-4a68-4d32-8255-515919a6c5f5", + "viewFieldGroups": { + "general": { + "universalIdentifier": "41c18430-34c3-430f-b86b-fc3963281277", + }, + "system": { + "universalIdentifier": "add21830-a7c6-4cde-9eed-430afbcbf557", + }, + }, + "viewFields": { + "createdAt": { + "universalIdentifier": "8d66ecb8-825d-4c6c-91c0-23a82c87ab46", + }, + "createdBy": { + "universalIdentifier": "17c3acfc-71f1-4b3c-820e-aea23871e850", + }, + "displayName": { + "universalIdentifier": "c50748fe-9f54-4e09-b572-111f076ec7db", + }, + "message": { + "universalIdentifier": "dd8ccf4f-64d7-468c-bc0c-dc4e0efef08d", + }, + "person": { + "universalIdentifier": "bf2e30dd-df03-4fb2-820a-166a93a2ce2c", + }, + "role": { + "universalIdentifier": "5d1f9a65-85cc-41b2-a8bf-8e2c97aab4b3", + }, + "workspaceMember": { + "universalIdentifier": "00336686-0d63-43e2-b247-599f1227bd85", + }, + }, + }, + }, + }, + "messageThread": { + "fields": { + "createdAt": { + "universalIdentifier": "4169d73e-6223-5f86-901b-a7d77f9e2469", + }, + "createdBy": { + "universalIdentifier": "406d18a9-9ede-5b44-955d-8f5f009da774", + }, + "deletedAt": { + "universalIdentifier": "b58346cb-8afd-51b1-a1f1-aab0a16df993", + }, + "id": { + "universalIdentifier": "e7271b4c-376e-59ca-a8e1-fbd8684289dc", + }, + "messageChannelMessageAssociations": { + "universalIdentifier": "20202020-314e-40a4-906d-a5d5d6c285f6", + }, + "messages": { + "universalIdentifier": "20202020-3115-404f-aade-e1154b28e35a", + }, + "position": { + "universalIdentifier": "999c58a4-0be6-55e9-bd94-e3aea59dff93", + }, + "searchVector": { + "universalIdentifier": "b68280ab-d97d-5886-ac42-58c09febc3c3", + }, + "subject": { + "universalIdentifier": "a8ddbf8c-1137-45d1-b89e-5ffbd83f67c8", + }, + "updatedAt": { + "universalIdentifier": "71583a40-84a4-5ee6-85d5-1939c38da9ee", + }, + "updatedBy": { + "universalIdentifier": "0c9b48d9-795f-50f7-aa44-8f286660199c", + }, + }, + "indexes": {}, + "universalIdentifier": "20202020-849a-4c3e-84f5-a25a7d802271", + "views": { + "allMessageThreads": { + "universalIdentifier": "20202020-d002-4d02-8d02-ae55a9ba2002", + "viewFields": { + "createdAt": { + "universalIdentifier": "20202020-df02-4d02-8d02-ae55a9ba2f02", + }, + "messages": { + "universalIdentifier": "20202020-df02-4d02-8d02-ae55a9ba2f01", + }, + "subject": { + "universalIdentifier": "e5f0d32b-2b6a-47bc-b3bd-f32c96594ec1", + }, + "updatedAt": { + "universalIdentifier": "af2c6ac9-7083-4609-8172-d518441f5e9e", + }, + }, + }, + }, + }, + "note": { + "fields": { + "attachments": { + "universalIdentifier": "20202020-4986-4c92-bf19-39934b149b16", + }, + "bodyV2": { + "universalIdentifier": "20202020-a7bb-4d94-be51-8f25181502c8", + }, + "createdAt": { + "universalIdentifier": "3cd4e20a-867a-5006-8e83-d889fa0044d2", + }, + "createdBy": { + "universalIdentifier": "bd6e9fe4-133e-591c-bc96-ffee85cf44b9", + }, + "deletedAt": { + "universalIdentifier": "a81c5f7f-e639-5749-b50f-36177ef24d65", + }, + "id": { + "universalIdentifier": "2959c27e-c98a-5dba-8670-832a61f81435", + }, + "noteTargets": { + "universalIdentifier": "20202020-1f25-43fe-8b00-af212fdde823", + }, + "position": { + "universalIdentifier": "3932fe04-1776-5f9c-b1fe-8c9b0cd1a394", + }, + "searchVector": { + "universalIdentifier": "0ad23e30-4fe2-5200-88e5-dd14a9e5438a", + }, + "timelineActivities": { + "universalIdentifier": "20202020-7030-42f8-929c-1a57b25d6bce", + }, + "title": { + "universalIdentifier": "20202020-faeb-4c76-8ba6-ccbb0b4a965f", + }, + "updatedAt": { + "universalIdentifier": "8684ec34-5317-57a3-88a7-410103738edc", + }, + "updatedBy": { + "universalIdentifier": "e0ce2e1c-c758-56e6-9df5-59a248bcf722", + }, + }, + "indexes": { + "searchVectorGinIndex": { + "universalIdentifier": "8183c8d2-9114-4b6e-8c5d-12a3b14a5a13", + }, + }, + "universalIdentifier": "20202020-0b00-45cd-b6f6-6cd806fc6804", + "views": { + "allNotes": { + "universalIdentifier": "20202020-a005-4a05-8a05-a0be5a11a000", + "viewFields": { + "bodyV2": { + "universalIdentifier": "20202020-af05-4a05-8a05-a0be5a11af02", + }, + "createdAt": { + "universalIdentifier": "20202020-af05-4a05-8a05-a0be5a11af04", + }, + "createdBy": { + "universalIdentifier": "20202020-af05-4a05-8a05-a0be5a11af03", + }, + "noteTargets": { + "universalIdentifier": "20202020-af05-4a05-8a05-a0be5a11af01", + }, + "title": { + "universalIdentifier": "20202020-af05-4a05-8a05-a0be5a11af00", + }, + }, + }, + "noteRecordPageFields": { + "universalIdentifier": "20202020-a005-4a05-8a05-a0be5a115001", + "viewFieldGroups": { + "general": { + "universalIdentifier": "20202020-a005-4a05-8a05-a0be5a115101", + }, + "system": { + "universalIdentifier": "20202020-a005-4a05-8a05-a0be5a115103", + }, + }, + "viewFields": { + "attachments": { + "universalIdentifier": "20202020-af05-4a05-8a05-a0be5a115208", + }, + "bodyV2": { + "universalIdentifier": "20202020-af05-4a05-8a05-a0be5a115205", + }, + "createdAt": { + "universalIdentifier": "20202020-af05-4a05-8a05-a0be5a115202", + }, + "createdBy": { + "universalIdentifier": "20202020-af05-4a05-8a05-a0be5a115203", + }, + "noteTargets": { + "universalIdentifier": "20202020-af05-4a05-8a05-a0be5a115204", + }, + "timelineActivities": { + "universalIdentifier": "20202020-af05-4a05-8a05-a0be5a115209", + }, + "updatedAt": { + "universalIdentifier": "20202020-af05-4a05-8a05-a0be5a115206", + }, + "updatedBy": { + "universalIdentifier": "20202020-af05-4a05-8a05-a0be5a115207", + }, + }, + }, + }, + }, + "noteTarget": { + "fields": { + "createdAt": { + "universalIdentifier": "8ab7d287-37a1-5c01-b534-bb900df51377", + }, + "createdBy": { + "universalIdentifier": "61a3fefa-1c81-5941-becf-cd1490e138db", + }, + "deletedAt": { + "universalIdentifier": "a6d3e080-9928-50a1-ac2d-869f773d1e3b", + }, + "id": { + "universalIdentifier": "a0efa858-c525-5926-9fca-99dd86d951b7", + }, + "note": { + "universalIdentifier": "20202020-57f3-4f50-9599-fc0f671df003", + }, + "position": { + "universalIdentifier": "7833f1fa-fddd-510f-ba1f-16b65665e49f", + }, + "searchVector": { + "universalIdentifier": "d853a31b-f266-57a1-9a9f-ecc187864a01", + }, + "targetCompany": { + "universalIdentifier": "c500fbc0-d6f2-4982-a959-5a755431696c", + }, + "targetOpportunity": { + "universalIdentifier": "20202020-4e42-417a-a705-76581c9ade79", + }, + "targetPerson": { + "universalIdentifier": "20202020-38ca-4aab-92f5-8a605ca2e4c5", + }, + "updatedAt": { + "universalIdentifier": "18a0222a-d8d3-5a5a-89a7-55f0873b0d20", + }, + "updatedBy": { + "universalIdentifier": "c940ee79-ca6a-54cc-a0a9-b4fd68f9f38e", + }, + }, + "indexes": { + "companyIdIndex": { + "universalIdentifier": "2d83909a-a383-4e82-b00a-8b7739f3f906", + }, + "noteIdIndex": { + "universalIdentifier": "9294d9e3-0225-4c7f-9d6e-23b4c25b6b24", + }, + "opportunityIdIndex": { + "universalIdentifier": "0d1a59b4-cc87-4b7d-804a-656e8504f371", + }, + "personIdIndex": { + "universalIdentifier": "7c069dc0-e83b-4cd5-aaa2-cac7f3e00d80", + }, + }, + "morphIds": { + "targetMorphId": { + "morphId": "20202020-f635-435d-ab8d-e1168b375c70", + }, + }, + "universalIdentifier": "20202020-fff0-4b44-be82-bda313884400", + "views": { + "allNoteTargets": { + "universalIdentifier": "d124d587-ef78-402b-9341-7673e6cea033", + "viewFields": { + "id": { + "universalIdentifier": "f2d912fe-7c6f-4a9c-b808-b7b5a18d2818", + }, + "note": { + "universalIdentifier": "9d4ac173-d32b-4a44-9dbd-8a47ab844f98", + }, + "targetCompany": { + "universalIdentifier": "a9c7f370-4b22-4f29-8e3f-678e91a59576", + }, + "targetOpportunity": { + "universalIdentifier": "3efeb162-cd03-458b-9c7b-47032d045204", + }, + "targetPerson": { + "universalIdentifier": "b6f67de5-c5cf-4235-b740-a6a007c8eae3", + }, + }, + }, + }, + }, + "opportunity": { + "fields": { + "amount": { + "universalIdentifier": "20202020-583e-4642-8533-db761d5fa82f", + }, + "attachments": { + "universalIdentifier": "20202020-87c7-4118-83d6-2f4031005209", + }, + "closeDate": { + "universalIdentifier": "20202020-527e-44d6-b1ac-c4158d307b97", + }, + "company": { + "universalIdentifier": "20202020-cbac-457e-b565-adece5fc815f", + }, + "createdAt": { + "universalIdentifier": "457eece4-2a35-5a54-99fe-87d8579fa733", + }, + "createdBy": { + "universalIdentifier": "4a667a98-5fad-5342-aedf-7b2d3906e657", + }, + "deletedAt": { + "universalIdentifier": "d816de8d-aa5f-5388-8392-58f6d60e1343", + }, + "id": { + "universalIdentifier": "2fa92d57-b39d-5ee8-ac9e-b39bc65b9ee9", + }, + "name": { + "universalIdentifier": "20202020-8609-4f65-a2d9-44009eb422b5", + }, + "noteTargets": { + "universalIdentifier": "20202020-dd3f-42d5-a382-db58aabf43d3", + }, + "owner": { + "universalIdentifier": "20202020-be7e-4d1e-8e19-3d5c7c4b9f2a", + }, + "pointOfContact": { + "universalIdentifier": "20202020-8dfb-42fc-92b6-01afb759ed16", + }, + "position": { + "universalIdentifier": "fd8241af-7055-5004-9cfb-edb96f1cfbb4", + }, + "searchVector": { + "universalIdentifier": "05bbfee3-ec29-5d44-a1b0-105955b320af", + }, + "stage": { + "universalIdentifier": "20202020-6f76-477d-8551-28cd65b2b4b9", + }, + "taskTargets": { + "universalIdentifier": "20202020-59c0-4179-a208-4a255f04a5be", + }, + "timelineActivities": { + "universalIdentifier": "20202020-30e2-421f-96c7-19c69d1cf631", + }, + "updatedAt": { + "universalIdentifier": "e0270cd8-986d-5dab-aaa1-1fe813969a6a", + }, + "updatedBy": { + "universalIdentifier": "9118776b-232a-561b-8289-f8f405de8e07", + }, + }, + "indexes": { + "companyIdIndex": { + "universalIdentifier": "e161072d-37b1-477a-b944-ef0d65289574", + }, + "pointOfContactIdIndex": { + "universalIdentifier": "b8c2a673-a981-4357-a43d-313a358e4daa", + }, + "searchVectorGinIndex": { + "universalIdentifier": "f53fdd28-a26b-47ba-81b5-6813ad622720", + }, + "stageIndex": { + "universalIdentifier": "ae60d580-b562-44f2-a24d-7b8040063f83", + }, + }, + "universalIdentifier": "20202020-9549-49dd-b2b2-883999db8938", + "views": { + "allOpportunities": { + "universalIdentifier": "20202020-a003-4a03-8a03-0aa0b1ca1ba0", + "viewFields": { + "amount": { + "universalIdentifier": "20202020-af03-4a03-8a03-0aa0b1ca1bb0", + }, + "closeDate": { + "universalIdentifier": "20202020-af03-4a03-8a03-0aa0b1ca1bb2", + }, + "company": { + "universalIdentifier": "20202020-af03-4a03-8a03-0aa0b1ca1bb3", + }, + "createdBy": { + "universalIdentifier": "20202020-af03-4a03-8a03-0aa0b1ca1bb1", + }, + "name": { + "universalIdentifier": "20202020-af03-4a03-8a03-0aa0b1ca1baf", + }, + "pointOfContact": { + "universalIdentifier": "20202020-af03-4a03-8a03-0aa0b1ca1bb4", + }, + }, + }, + "byStage": { + "universalIdentifier": "20202020-a004-4a04-8a04-0aa0b1ca1ba0", + "viewFields": { + "amount": { + "universalIdentifier": "20202020-af04-4a04-8a04-0aa0b2ca2bb0", + }, + "closeDate": { + "universalIdentifier": "20202020-af04-4a04-8a04-0aa0b2ca2bb2", + }, + "company": { + "universalIdentifier": "20202020-af04-4a04-8a04-0aa0b2ca2bb3", + }, + "createdBy": { + "universalIdentifier": "20202020-af04-4a04-8a04-0aa0b2ca2bb1", + }, + "name": { + "universalIdentifier": "20202020-af04-4a04-8a04-0aa0b2ca2baf", + }, + "pointOfContact": { + "universalIdentifier": "20202020-af04-4a04-8a04-0aa0b2ca2bb4", + }, + }, + "viewGroups": { + "customer": { + "universalIdentifier": "20202020-af14-4a04-8a04-0aa0b2ca2bf5", + }, + "meeting": { + "universalIdentifier": "20202020-af14-4a04-8a04-0aa0b2ca2bf3", + }, + "new": { + "universalIdentifier": "20202020-af14-4a04-8a04-0aa0b2ca2bf1", + }, + "proposal": { + "universalIdentifier": "20202020-af14-4a04-8a04-0aa0b2ca2bf4", + }, + "screening": { + "universalIdentifier": "20202020-af14-4a04-8a04-0aa0b2ca2bf2", + }, + }, + }, + "opportunityRecordPageFields": { + "universalIdentifier": "20202020-a003-4a03-8a03-0aa0b1ca3001", + "viewFieldGroups": { + "deal": { + "universalIdentifier": "20202020-a003-4a03-8a03-0aa0b1ca3101", + }, + "relations": { + "universalIdentifier": "20202020-a003-4a03-8a03-0aa0b1ca3102", + }, + "system": { + "universalIdentifier": "20202020-a003-4a03-8a03-0aa0b1ca3103", + }, + }, + "viewFields": { + "amount": { + "universalIdentifier": "20202020-af03-4a03-8a03-0aa0b1ca3201", + }, + "attachments": { + "universalIdentifier": "20202020-af03-4a03-8a03-0aa0b1ca320f", + }, + "closeDate": { + "universalIdentifier": "20202020-af03-4a03-8a03-0aa0b1ca3202", + }, + "company": { + "universalIdentifier": "20202020-af03-4a03-8a03-0aa0b1ca3204", + }, + "createdAt": { + "universalIdentifier": "20202020-af03-4a03-8a03-0aa0b1ca3207", + }, + "createdBy": { + "universalIdentifier": "20202020-af03-4a03-8a03-0aa0b1ca3208", + }, + "noteTargets": { + "universalIdentifier": "20202020-af03-4a03-8a03-0aa0b1ca320e", + }, + "owner": { + "universalIdentifier": "20202020-af03-4a03-8a03-0aa0b1ca3206", + }, + "pointOfContact": { + "universalIdentifier": "20202020-af03-4a03-8a03-0aa0b1ca3205", + }, + "stage": { + "universalIdentifier": "20202020-af03-4a03-8a03-0aa0b1ca3203", + }, + "taskTargets": { + "universalIdentifier": "20202020-af03-4a03-8a03-0aa0b1ca320d", + }, + "timelineActivities": { + "universalIdentifier": "20202020-af03-4a03-8a03-0aa0b1ca3210", + }, + "updatedAt": { + "universalIdentifier": "20202020-af03-4a03-8a03-0aa0b1ca320a", + }, + "updatedBy": { + "universalIdentifier": "20202020-af03-4a03-8a03-0aa0b1ca320b", + }, + }, + }, + }, + }, + "person": { + "fields": { + "attachments": { + "universalIdentifier": "20202020-cd97-451f-87fa-bcb789bdbf3a", + }, + "avatarFile": { + "universalIdentifier": "20202020-a7c9-4e3d-8f1b-2d5a6b7c8e9f", + }, + "avatarUrl": { + "universalIdentifier": "20202020-b8a6-40df-961c-373dc5d2ec21", + }, + "calendarEventParticipants": { + "universalIdentifier": "20202020-52ee-45e9-a702-b64b3753e3a9", + }, + "company": { + "universalIdentifier": "20202020-e2f3-448e-b34c-2d625f0025fd", + }, + "createdAt": { + "universalIdentifier": "11e31107-be74-53e5-ba99-e536c6b73ee6", + }, + "createdBy": { + "universalIdentifier": "91b4c732-ea34-5593-b217-34d2120da23e", + }, + "deletedAt": { + "universalIdentifier": "c5d6b3bf-094d-5b26-8007-81b4b668c9b2", + }, + "emails": { + "universalIdentifier": "20202020-3c51-43fa-8b6e-af39e29368ab", + }, + "id": { + "universalIdentifier": "1e99e171-d0f9-50a8-b342-7f0bdd9bea66", + }, + "jobTitle": { + "universalIdentifier": "20202020-b0d0-415a-bef9-640a26dacd9b", + }, + "linkedinLink": { + "universalIdentifier": "20202020-f1af-48f7-893b-2007a73dd508", + }, + "listMemberships": { + "universalIdentifier": "8b8d1be0-4c94-4413-a2c9-c7ede205a81d", + }, + "messageParticipants": { + "universalIdentifier": "20202020-498e-4c61-8158-fa04f0638334", + }, + "name": { + "universalIdentifier": "20202020-3875-44d5-8c33-a6239011cab8", + }, + "noteTargets": { + "universalIdentifier": "20202020-c8fc-4258-8250-15905d3fcfec", + }, + "phones": { + "universalIdentifier": "20202020-0638-448e-8825-439134618022", + }, + "pointOfContactForOpportunities": { + "universalIdentifier": "20202020-911b-4a7d-b67b-918aa9a5b33a", + }, + "position": { + "universalIdentifier": "e7dcf2c0-dc89-525e-93a7-720034d8ec0e", + }, + "searchVector": { + "universalIdentifier": "efe6cbc6-1c6e-5a6e-91c9-17142d3bd947", + }, + "taskTargets": { + "universalIdentifier": "20202020-584b-4d3e-88b6-53ab1fa03c3a", + }, + "timelineActivities": { + "universalIdentifier": "20202020-a43e-4873-9c23-e522de906ce5", + }, + "updatedAt": { + "universalIdentifier": "962cedc2-cb8f-5f33-b5e1-256aabe6f14e", + }, + "updatedBy": { + "universalIdentifier": "50d01fec-5628-506c-8a1d-9ac0616aab03", + }, + }, + "indexes": { + "companyIdIndex": { + "universalIdentifier": "8a265a5c-d3ae-47dc-bdf9-b42cfa2ba639", + }, + "emailsUniqueIndex": { + "universalIdentifier": "8183a8b2-9114-4f6c-8a5b-12e3f14e5e13", + }, + "searchVectorGinIndex": { + "universalIdentifier": "9294b9c3-0225-4a7d-9b6c-23f4a25f6f24", + }, + }, + "universalIdentifier": "20202020-e674-48e5-a542-72570eee7213", + "views": { + "allPeople": { + "universalIdentifier": "20202020-a002-4a02-8a02-ae0a1ea11a00", + "viewFields": { + "company": { + "universalIdentifier": "20202020-af02-4a02-8a02-ae0a1ea11af3", + }, + "createdAt": { + "universalIdentifier": "20202020-af02-4a02-8a02-ae0a1ea11af5", + }, + "createdBy": { + "universalIdentifier": "20202020-af02-4a02-8a02-ae0a1ea11af2", + }, + "emails": { + "universalIdentifier": "20202020-af02-4a02-8a02-ae0a1ea11af1", + }, + "jobTitle": { + "universalIdentifier": "20202020-af02-4a02-8a02-ae0a1ea11af7", + }, + "linkedinLink": { + "universalIdentifier": "20202020-af02-4a02-8a02-ae0a1ea11af8", + }, + "name": { + "universalIdentifier": "20202020-af02-4a02-8a02-ae0a1ea11af0", + }, + "phones": { + "universalIdentifier": "20202020-af02-4a02-8a02-ae0a1ea11af4", + }, + }, + }, + "personRecordPageFields": { + "universalIdentifier": "20202020-a002-4a02-8a02-ae0a1ea12001", + "viewFieldGroups": { + "general": { + "universalIdentifier": "20202020-a002-4a02-8a02-ae0a1ea12101", + }, + "social": { + "universalIdentifier": "20202020-a002-4a02-8a02-ae0a1ea12103", + }, + "system": { + "universalIdentifier": "20202020-a002-4a02-8a02-ae0a1ea12104", + }, + "work": { + "universalIdentifier": "20202020-a002-4a02-8a02-ae0a1ea12102", + }, + }, + "viewFields": { + "attachments": { + "universalIdentifier": "20202020-af02-4a02-8a02-ae0a1ea12219", + }, + "avatarFile": { + "universalIdentifier": "20202020-af02-4a02-8a02-ae0a1ea12214", + }, + "avatarUrl": { + "universalIdentifier": "20202020-af02-4a02-8a02-ae0a1ea12208", + }, + "calendarEventParticipants": { + "universalIdentifier": "20202020-af02-4a02-8a02-ae0a1ea1221b", + }, + "company": { + "universalIdentifier": "20202020-af02-4a02-8a02-ae0a1ea12203", + }, + "createdAt": { + "universalIdentifier": "20202020-af02-4a02-8a02-ae0a1ea12209", + }, + "createdBy": { + "universalIdentifier": "20202020-af02-4a02-8a02-ae0a1ea12210", + }, + "emails": { + "universalIdentifier": "20202020-af02-4a02-8a02-ae0a1ea12201", + }, + "jobTitle": { + "universalIdentifier": "20202020-af02-4a02-8a02-ae0a1ea12204", + }, + "linkedinLink": { + "universalIdentifier": "20202020-af02-4a02-8a02-ae0a1ea12205", + }, + "messageParticipants": { + "universalIdentifier": "20202020-af02-4a02-8a02-ae0a1ea1221a", + }, + "noteTargets": { + "universalIdentifier": "20202020-af02-4a02-8a02-ae0a1ea12217", + }, + "phones": { + "universalIdentifier": "20202020-af02-4a02-8a02-ae0a1ea12202", + }, + "pointOfContactForOpportunities": { + "universalIdentifier": "20202020-af02-4a02-8a02-ae0a1ea12215", + }, + "taskTargets": { + "universalIdentifier": "20202020-af02-4a02-8a02-ae0a1ea12216", + }, + "timelineActivities": { + "universalIdentifier": "20202020-af02-4a02-8a02-ae0a1ea1221c", + }, + "updatedAt": { + "universalIdentifier": "20202020-af02-4a02-8a02-ae0a1ea12212", + }, + "updatedBy": { + "universalIdentifier": "20202020-af02-4a02-8a02-ae0a1ea12213", + }, + }, + }, + }, + }, + "task": { + "fields": { + "assignee": { + "universalIdentifier": "20202020-065a-4f42-a906-e20422c1753f", + }, + "attachments": { + "universalIdentifier": "20202020-794d-4783-a8ff-cecdb15be139", + }, + "bodyV2": { + "universalIdentifier": "20202020-4aa0-4ae8-898d-7df0afd47ab1", + }, + "createdAt": { + "universalIdentifier": "7e67613f-da6c-5051-8247-fd98d39348e1", + }, + "createdBy": { + "universalIdentifier": "cc971806-18b5-5f1c-93f8-bedd466adf3e", + }, + "deletedAt": { + "universalIdentifier": "819df25b-3efe-58ef-a619-6f2d4c474cd1", + }, + "dueAt": { + "universalIdentifier": "20202020-fd99-40da-951b-4cb9a352fce3", + }, + "id": { + "universalIdentifier": "d2d4ca07-f034-5c06-b86f-fbab125936b9", + }, + "position": { + "universalIdentifier": "5556cb7b-1909-589e-9eac-8f0e870107bc", + }, + "searchVector": { + "universalIdentifier": "a8ba04f2-c94c-5cc6-a3c9-3f38e195136b", + }, + "status": { + "universalIdentifier": "20202020-70bc-48f9-89c5-6aa730b151e0", + }, + "taskTargets": { + "universalIdentifier": "20202020-de9c-4d0e-a452-713d4a3e5fc7", + }, + "timelineActivities": { + "universalIdentifier": "20202020-c778-4278-99ee-23a2837aee64", + }, + "title": { + "universalIdentifier": "20202020-b386-4cb7-aa5a-08d4a4d92680", + }, + "updatedAt": { + "universalIdentifier": "69420381-b9f6-558b-8168-b96508f3bc7d", + }, + "updatedBy": { + "universalIdentifier": "4c5defc9-bca4-5637-9fcd-8fbb13ac632f", + }, + }, + "indexes": { + "assigneeIdIndex": { + "universalIdentifier": "f48fa3b1-0cec-44da-a9e5-f8a5e766637e", + }, + "searchVectorGinIndex": { + "universalIdentifier": "a86b32b3-01d3-4302-a152-8b7f247db7b4", + }, + }, + "universalIdentifier": "20202020-1ba1-48ba-bc83-ef7e5990ed10", + "views": { + "allTasks": { + "universalIdentifier": "20202020-a006-4a06-8a06-ba5ca11a1ea0", + "viewFields": { + "assignee": { + "universalIdentifier": "20202020-af06-4a06-8a06-ba5ca11a1eb4", + }, + "bodyV2": { + "universalIdentifier": "20202020-af06-4a06-8a06-ba5ca11a1eb5", + }, + "createdAt": { + "universalIdentifier": "20202020-af06-4a06-8a06-ba5ca11a1eb6", + }, + "createdBy": { + "universalIdentifier": "20202020-af06-4a06-8a06-ba5ca11a1eb2", + }, + "dueAt": { + "universalIdentifier": "20202020-af06-4a06-8a06-ba5ca11a1eb3", + }, + "status": { + "universalIdentifier": "20202020-af06-4a06-8a06-ba5ca11a1eb0", + }, + "taskTargets": { + "universalIdentifier": "20202020-af06-4a06-8a06-ba5ca11a1eb1", + }, + "title": { + "universalIdentifier": "20202020-af06-4a06-8a06-ba5ca11a1eaf", + }, + }, + }, + "assignedToMe": { + "universalIdentifier": "20202020-a007-4a07-8a07-ba5ca551aaed", + "viewFields": { + "assignee": { + "universalIdentifier": "20202020-af07-4a07-8a07-ba5ca551aaf1", + }, + "bodyV2": { + "universalIdentifier": "20202020-af07-4a07-8a07-ba5ca551aaf2", + }, + "createdAt": { + "universalIdentifier": "20202020-af07-4a07-8a07-ba5ca551aaf3", + }, + "createdBy": { + "universalIdentifier": "20202020-af07-4a07-8a07-ba5ca551aaef", + }, + "dueAt": { + "universalIdentifier": "20202020-af07-4a07-8a07-ba5ca551aaf0", + }, + "taskTargets": { + "universalIdentifier": "20202020-af07-4a07-8a07-ba5ca551aaee", + }, + "title": { + "universalIdentifier": "20202020-af07-4a07-8a07-ba5ca551aaed", + }, + }, + "viewFilters": { + "assigneeIsMe": { + "universalIdentifier": "20202020-af17-4a07-8a07-ba5ca551abf1", + }, + }, + "viewGroups": { + "done": { + "universalIdentifier": "20202020-af17-4a07-8a07-ba5ca551abf4", + }, + "empty": { + "universalIdentifier": "20202020-af17-4a07-8a07-ba5ca551abf5", + }, + "inProgress": { + "universalIdentifier": "20202020-af17-4a07-8a07-ba5ca551abf3", + }, + "todo": { + "universalIdentifier": "20202020-af17-4a07-8a07-ba5ca551abf2", + }, + }, + }, + "byStatus": { + "universalIdentifier": "20202020-a008-4a08-8a08-ba5cba51aba5", + "viewFields": { + "assignee": { + "universalIdentifier": "20202020-af08-4a08-8a08-ba5cba5babf3", + }, + "createdAt": { + "universalIdentifier": "20202020-af08-4a08-8a08-ba5cba5babf4", + }, + "dueAt": { + "universalIdentifier": "20202020-af08-4a08-8a08-ba5cba5babf2", + }, + "status": { + "universalIdentifier": "20202020-af08-4a08-8a08-ba5cba5babf1", + }, + "title": { + "universalIdentifier": "20202020-af08-4a08-8a08-ba5cba5babf0", + }, + }, + "viewGroups": { + "done": { + "universalIdentifier": "20202020-af18-4a08-8a08-ba5cba5bbf03", + }, + "inProgress": { + "universalIdentifier": "20202020-af18-4a08-8a08-ba5cba5bbf02", + }, + "todo": { + "universalIdentifier": "20202020-af18-4a08-8a08-ba5cba5bbf01", + }, + }, + }, + "taskRecordPageFields": { + "universalIdentifier": "20202020-a006-4a06-8a06-ba5ca11a6001", + "viewFieldGroups": { + "general": { + "universalIdentifier": "20202020-a006-4a06-8a06-ba5ca11a6101", + }, + "system": { + "universalIdentifier": "20202020-a006-4a06-8a06-ba5ca11a6103", + }, + }, + "viewFields": { + "assignee": { + "universalIdentifier": "20202020-af06-4a06-8a06-ba5ca11a6204", + }, + "attachments": { + "universalIdentifier": "20202020-af06-4a06-8a06-ba5ca11a620b", + }, + "bodyV2": { + "universalIdentifier": "20202020-af06-4a06-8a06-ba5ca11a6208", + }, + "createdAt": { + "universalIdentifier": "20202020-af06-4a06-8a06-ba5ca11a6205", + }, + "createdBy": { + "universalIdentifier": "20202020-af06-4a06-8a06-ba5ca11a6206", + }, + "dueAt": { + "universalIdentifier": "20202020-af06-4a06-8a06-ba5ca11a6202", + }, + "status": { + "universalIdentifier": "20202020-af06-4a06-8a06-ba5ca11a6203", + }, + "taskTargets": { + "universalIdentifier": "20202020-af06-4a06-8a06-ba5ca11a6207", + }, + "timelineActivities": { + "universalIdentifier": "20202020-af06-4a06-8a06-ba5ca11a620c", + }, + "updatedAt": { + "universalIdentifier": "20202020-af06-4a06-8a06-ba5ca11a6209", + }, + "updatedBy": { + "universalIdentifier": "20202020-af06-4a06-8a06-ba5ca11a620a", + }, + }, + }, + }, + }, + "taskTarget": { + "fields": { + "createdAt": { + "universalIdentifier": "f053a742-cfd6-5419-8b7c-f1a8cc5113f5", + }, + "createdBy": { + "universalIdentifier": "e61afd7c-388f-5aaa-8833-b0dd2be02fc7", + }, + "deletedAt": { + "universalIdentifier": "0a9d4097-0282-50ce-a5e0-7957b9208681", + }, + "id": { + "universalIdentifier": "0ec1c4c4-304d-5ec7-a980-f69cd8930869", + }, + "position": { + "universalIdentifier": "002221ef-8379-5121-9a63-e4763463ea9d", + }, + "searchVector": { + "universalIdentifier": "821c713e-bf1c-569d-9f0c-8e10e80eee5e", + }, + "targetCompany": { + "universalIdentifier": "20202020-4703-4a4e-948c-487b0c60a92c", + }, + "targetOpportunity": { + "universalIdentifier": "20202020-6cb2-4c01-a9a5-aca3dbc11d41", + }, + "targetPerson": { + "universalIdentifier": "20202020-c8a0-4e85-a016-87e2349cfbec", + }, + "task": { + "universalIdentifier": "20202020-e881-457a-8758-74aaef4ae78a", + }, + "updatedAt": { + "universalIdentifier": "6de21010-a1fc-5351-89be-ec0b2f0bd6d6", + }, + "updatedBy": { + "universalIdentifier": "624fd5b0-aadd-5850-9772-67eceb09d3ef", + }, + }, + "indexes": { + "companyIdIndex": { + "universalIdentifier": "c0af54c7-751b-4bb2-b102-677cc4e47402", + }, + "opportunityIdIndex": { + "universalIdentifier": "6942e0ba-90f6-4c33-bf40-7f00b1ec35ab", + }, + "personIdIndex": { + "universalIdentifier": "b7d305d1-6fae-4ed6-9bdc-354fe9032c0e", + }, + "taskIdIndex": { + "universalIdentifier": "c882f7a4-b025-4d32-aa26-5ef2595bdbf9", + }, + }, + "morphIds": { + "targetMorphId": { + "morphId": "20202020-f636-435d-ab8d-e1168b375c71", + }, + }, + "universalIdentifier": "20202020-5a9a-44e8-95df-771cd06d0fb1", + "views": { + "allTaskTargets": { + "universalIdentifier": "1dbf1d24-6cca-4f55-ae2f-e3d1b425a495", + "viewFields": { + "id": { + "universalIdentifier": "a49287c9-8aa6-4fca-9ec5-08d643f7239f", + }, + "targetCompany": { + "universalIdentifier": "e9fa1305-4ba2-41c5-9198-fdc622b69f90", + }, + "targetOpportunity": { + "universalIdentifier": "526f3354-34d6-4e7e-a870-5f99c28353c2", + }, + "targetPerson": { + "universalIdentifier": "cadc7a33-1527-4ef8-ac00-7ed0b54d1bae", + }, + "task": { + "universalIdentifier": "1f79839e-42f6-4a69-839a-369e21a7497d", + }, + }, + }, + }, + }, + "timelineActivity": { + "fields": { + "createdAt": { + "universalIdentifier": "7eb7eb28-96c1-56bc-9340-681b28d5066b", + }, + "createdBy": { + "universalIdentifier": "2f5d1f7e-e769-50df-bc14-93c99fe764e4", + }, + "deletedAt": { + "universalIdentifier": "c814b7b7-440a-5422-baed-464674ce5b29", + }, + "happensAt": { + "universalIdentifier": "20202020-9526-4993-b339-c4318c4d39f0", + }, + "id": { + "universalIdentifier": "092b187a-fba1-5d19-ba45-da7b1c60c196", + }, + "linkedObjectMetadataId": { + "universalIdentifier": "20202020-c595-449d-9f89-562758c9ee69", + }, + "linkedRecordCachedName": { + "universalIdentifier": "20202020-cfdb-4bef-bbce-a29f41230934", + }, + "linkedRecordId": { + "universalIdentifier": "20202020-2e0e-48c0-b445-ee6c1e61687d", + }, + "name": { + "universalIdentifier": "20202020-7207-46e8-9dab-849505ae8497", + }, + "position": { + "universalIdentifier": "02c2a94c-f393-5de2-9fe9-71ff4f76980d", + }, + "properties": { + "universalIdentifier": "20202020-f142-4b04-b91b-6a2b4af3bf11", + }, + "searchVector": { + "universalIdentifier": "23a0482b-f41b-5e13-9b3e-356c5aaa90a3", + }, + "targetCompany": { + "universalIdentifier": "20202020-04ad-4221-a744-7a8278a5ce21", + }, + "targetDashboard": { + "universalIdentifier": "20202020-7864-48f5-af7c-9e4b60140948", + }, + "targetMessageCampaign": { + "universalIdentifier": "b2c3d4e5-6f70-4b81-8c92-03d4e5f60718", + }, + "targetMessageList": { + "universalIdentifier": "d9f4a1b2-3c5e-4d70-8e91-0a2b3c4d5e6f", + }, + "targetNote": { + "universalIdentifier": "20202020-ec55-4135-8da5-3a20badc0156", + }, + "targetOpportunity": { + "universalIdentifier": "20202020-7664-4a35-a3df-580d389fd527", + }, + "targetPerson": { + "universalIdentifier": "20202020-c414-45b9-a60a-ac27aa96229f", + }, + "targetTask": { + "universalIdentifier": "20202020-b2f5-415c-9135-a31dfe49501b", + }, + "targetWorkflow": { + "universalIdentifier": "20202020-616c-4ad3-a2e9-c477c341e295", + }, + "targetWorkflowRun": { + "universalIdentifier": "20202020-96f0-401b-9186-a3a0759225ac", + }, + "targetWorkflowVersion": { + "universalIdentifier": "20202020-74f1-4711-a129-e14ca0ecd744", + }, + "updatedAt": { + "universalIdentifier": "01b33b31-f011-5b55-942f-5bf3ec56f9b3", + }, + "updatedBy": { + "universalIdentifier": "21f968c9-7ae5-5461-b18e-7f1da192ea16", + }, + "workspaceMember": { + "universalIdentifier": "20202020-af23-4479-9a30-868edc474b36", + }, + }, + "indexes": { + "companyIdIndex": { + "universalIdentifier": "8183e8f2-9114-4d6a-8e5f-12c3d14c5c13", + }, + "dashboardIdIndex": { + "universalIdentifier": "e8821da9-728d-470a-bf5b-5a981fff7880", + }, + "noteIdIndex": { + "universalIdentifier": "995db1d8-0d3e-40f7-b0eb-5e6897bc9966", + }, + "opportunityIdIndex": { + "universalIdentifier": "9294f9a3-0225-4e7b-9f6a-23d4e25d6d24", + }, + "personIdIndex": { + "universalIdentifier": "3e89a914-7bec-47bd-9cf9-743c6b83d001", + }, + "taskIdIndex": { + "universalIdentifier": "609cf622-86ef-48d1-812b-e1cab610a46c", + }, + "workflowIdIndex": { + "universalIdentifier": "d6059ec2-92b0-4cfc-9fd8-78050f03108f", + }, + "workflowRunIdIndex": { + "universalIdentifier": "1a2bd046-7c23-4e0a-9f8a-c3ca3a16d3b9", + }, + "workflowVersionIdIndex": { + "universalIdentifier": "d94329b3-5dc8-4141-ae28-31afe28f7135", + }, + "workspaceMemberIdIndex": { + "universalIdentifier": "5e0b2391-85ca-4a66-aef4-52d74245bec2", + }, + }, + "morphIds": { + "targetMorphId": { + "morphId": "20202020-9a2b-4c3d-a4e5-f6a7b8c9d0e1", + }, + }, + "universalIdentifier": "20202020-6736-4337-b5c4-8b39fae325a5", + "views": { + "allTimelineActivities": { + "universalIdentifier": "20202020-b101-4b01-8b01-ba5cc01aa001", + "viewFields": { + "happensAt": { + "universalIdentifier": "20202020-bf01-4b01-8b01-ba5cc01aa012", + }, + "linkedRecordCachedName": { + "universalIdentifier": "20202020-bf01-4b01-8b01-ba5cc01aa017", + }, + "name": { + "universalIdentifier": "20202020-bf01-4b01-8b01-ba5cc01aa011", + }, + "properties": { + "universalIdentifier": "20202020-bf01-4b01-8b01-ba5cc01aa019", + }, + "targetCompany": { + "universalIdentifier": "2015825f-0786-4b0d-88a7-dfce1b4b1c1a", + }, + "targetDashboard": { + "universalIdentifier": "538847e8-ab09-407c-a433-505f6d7be7a1", + }, + "targetNote": { + "universalIdentifier": "ab74ed52-0195-4b65-987a-8367c07ee222", + }, + "targetOpportunity": { + "universalIdentifier": "f7b5ced9-eba6-4454-8849-7a92d27c11ca", + }, + "targetPerson": { + "universalIdentifier": "37b38a8b-abd7-4f72-92d2-ad82bbef0296", + }, + "targetTask": { + "universalIdentifier": "3899138d-e6fa-414c-9432-214c9b797ebb", + }, + "targetWorkflow": { + "universalIdentifier": "d2c3ddc3-afad-40b9-a2cb-d2765f2f5691", + }, + "targetWorkflowRun": { + "universalIdentifier": "97910946-04f0-4634-804e-880bc0019225", + }, + "targetWorkflowVersion": { + "universalIdentifier": "4a7e3213-afd5-4691-8bba-0a10e8697afb", + }, + "workspaceMember": { + "universalIdentifier": "20202020-bf01-4b01-8b01-ba5cc01aa013", + }, + }, + }, + }, + }, + "workflow": { + "fields": { + "attachments": { + "universalIdentifier": "20202020-4a8c-4e2d-9b1c-7e5f3a2b4c6d", + }, + "automatedTriggers": { + "universalIdentifier": "20202020-3319-4234-a34c-117ecad2b8a9", + }, + "createdAt": { + "universalIdentifier": "0be9023c-cf26-56ef-8512-3c2104b849cc", + }, + "createdBy": { + "universalIdentifier": "428266c9-9b2e-5731-9fbb-3593ef69179b", + }, + "deletedAt": { + "universalIdentifier": "281f5133-77fa-5a1f-ba01-928f21476076", + }, + "id": { + "universalIdentifier": "f9f32131-bd7d-5be4-92a9-8bfd368d595a", + }, + "lastPublishedVersionId": { + "universalIdentifier": "20202020-326a-4fba-8639-3456c0a169e8", + }, + "name": { + "universalIdentifier": "20202020-b3d3-478f-acc0-5d901e725b20", + }, + "position": { + "universalIdentifier": "c3550e45-4525-5690-913e-3803b1e964ae", + }, + "runs": { + "universalIdentifier": "20202020-759b-4340-b58b-e73595c4df4f", + }, + "searchVector": { + "universalIdentifier": "22c22cc7-cdb9-59f8-bf09-82bd8a8c1a5a", + }, + "statuses": { + "universalIdentifier": "20202020-357c-4432-8c50-8c31b4a552d9", + }, + "timelineActivities": { + "universalIdentifier": "20202020-906e-486a-a798-131a5f081faf", + }, + "updatedAt": { + "universalIdentifier": "b277195f-91aa-5e90-9362-3b2a162aaa63", + }, + "updatedBy": { + "universalIdentifier": "c88a7b7f-6bcd-5f56-bfed-90c4c1722a3f", + }, + "versions": { + "universalIdentifier": "20202020-9432-416e-8f3c-27ee3153d099", + }, + }, + "indexes": { + "searchVectorGinIndex": { + "universalIdentifier": "c7e64c55-eb0c-4b93-b076-5cfcf2e2e042", + }, + }, + "universalIdentifier": "20202020-62be-406c-b9ca-8caa50d51392", + "views": { + "allWorkflows": { + "universalIdentifier": "20202020-a009-4a09-8a09-a0bcf10aa11a", + "viewFields": { + "createdBy": { + "universalIdentifier": "20202020-af09-4a09-8a09-a0bcf10aa11d", + }, + "name": { + "universalIdentifier": "20202020-af09-4a09-8a09-a0bcf10aa11a", + }, + "runs": { + "universalIdentifier": "20202020-af09-4a09-8a09-a0bcf10aa11f", + }, + "statuses": { + "universalIdentifier": "20202020-af09-4a09-8a09-a0bcf10aa11b", + }, + "updatedAt": { + "universalIdentifier": "20202020-af09-4a09-8a09-a0bcf10aa11c", + }, + "versions": { + "universalIdentifier": "20202020-af09-4a09-8a09-a0bcf10aa11e", + }, + }, + }, + }, + }, + "workflowAutomatedTrigger": { + "fields": { + "createdAt": { + "universalIdentifier": "7ee2cc68-428a-5444-88a4-5a15d91f1116", + }, + "createdBy": { + "universalIdentifier": "af66a149-1b58-5425-ad99-22fa66562ffe", + }, + "deletedAt": { + "universalIdentifier": "a324fdae-e74f-5ff7-bbb2-1284cf437d42", + }, + "id": { + "universalIdentifier": "6db40451-f242-5339-95e8-f55c05851cb9", + }, + "position": { + "universalIdentifier": "01133ea9-73a2-5716-abb0-cb3df663352c", + }, + "searchVector": { + "universalIdentifier": "ef7eafb7-035a-5cb9-bf9d-139ab2f2972b", + }, + "settings": { + "universalIdentifier": "20202020-3319-4234-a34c-bac8f903de12", + }, + "type": { + "universalIdentifier": "20202020-3319-4234-a34c-3f92c1ab56e7", + }, + "updatedAt": { + "universalIdentifier": "b41eded4-52ad-5862-aa65-9d8e1db33aec", + }, + "updatedBy": { + "universalIdentifier": "75454a63-09aa-5914-834a-c609fc07c858", + }, + "workflow": { + "universalIdentifier": "20202020-3319-4234-a34c-8e1a4d2f7c03", + }, + }, + "indexes": { + "workflowIdIndex": { + "universalIdentifier": "7331ff89-a3f9-4ac0-9fa9-0de5663ae7b2", + }, + }, + "universalIdentifier": "20202020-3319-4234-a34c-7f3b9d2e4d1f", + "views": { + "allWorkflowAutomatedTriggers": { + "universalIdentifier": "a0a9ef79-3d42-417a-8555-3ee54c18ea51", + "viewFields": { + "createdAt": { + "universalIdentifier": "bb35e66a-2a1e-416b-8105-5749d91ab65f", + }, + "type": { + "universalIdentifier": "689b4749-aa40-489a-bf0b-475a197ca2e6", + }, + "workflow": { + "universalIdentifier": "e5a46195-06fe-4f47-8844-128e35151d37", + }, + }, + }, + "workflowAutomatedTriggerRecordPageFields": { + "universalIdentifier": "10aff295-f7ac-475d-8528-661eb9aa9759", + "viewFieldGroups": { + "general": { + "universalIdentifier": "c5261eae-f2fe-416e-8ef9-eda5d377f8ca", + }, + "system": { + "universalIdentifier": "e6da0410-7f63-41b7-b977-421fc37d67f5", + }, + }, + "viewFields": { + "createdAt": { + "universalIdentifier": "98ef45e8-c6bf-42e6-96f6-e94cd17911bc", + }, + "createdBy": { + "universalIdentifier": "d3933427-de7f-4fa1-b80c-47302273d848", + }, + "type": { + "universalIdentifier": "3b3a0cf7-f171-4ad8-9aad-aed84eca0250", + }, + "workflow": { + "universalIdentifier": "ddc5a9f6-f577-4e4b-a258-3d656c32babc", + }, + }, + }, + }, + }, + "workflowRun": { + "fields": { + "createdAt": { + "universalIdentifier": "e9e377ae-2539-5783-aeaa-b7579e211a29", + }, + "createdBy": { + "universalIdentifier": "a742c6a9-7622-5866-b39b-ba37c6fd057b", + }, + "deletedAt": { + "universalIdentifier": "62372fb7-d2aa-5c03-8690-37f9c561a9dd", + }, + "endedAt": { + "universalIdentifier": "20202020-e1c1-4b6b-bbbd-b2beaf2e159e", + }, + "enqueuedAt": { + "universalIdentifier": "20202020-f1e3-4de1-a461-b5c4fdbc861d", + }, + "id": { + "universalIdentifier": "e8f6e894-4003-5cb1-a1c1-7ed5b3e4200c", + }, + "name": { + "universalIdentifier": "20202020-b840-4253-aef9-4e5013694587", + }, + "position": { + "universalIdentifier": "a7ac4402-cfb7-54ef-baf2-ee737c743a1c", + }, + "searchVector": { + "universalIdentifier": "eb28d827-78ec-59df-97f7-9f09fac056ac", + }, + "startedAt": { + "universalIdentifier": "20202020-a234-4e2d-bd15-85bcea6bb183", + }, + "state": { + "universalIdentifier": "20202020-611f-45f3-9cde-d64927e8ec57", + }, + "status": { + "universalIdentifier": "20202020-6b3e-4f9c-8c2b-2e5b8e6d6f3b", + }, + "stepLogs": { + "universalIdentifier": "20202020-7c4e-4e1a-8fc1-1e3a55d6c2a1", + }, + "timelineActivities": { + "universalIdentifier": "20202020-af4d-4eb0-babc-eb960a45b356", + }, + "updatedAt": { + "universalIdentifier": "363b5eb8-c334-5c0f-9568-7e1320d4c76c", + }, + "updatedBy": { + "universalIdentifier": "0411c5af-6d79-5c36-b3a6-895d1e40ce8a", + }, + "workflow": { + "universalIdentifier": "20202020-8c57-4e7f-84f5-f373f68e1b82", + }, + "workflowVersion": { + "universalIdentifier": "20202020-2f52-4ba8-8dc4-d0d6adb9578d", + }, + }, + "indexes": { + "searchVectorGinIndex": { + "universalIdentifier": "e0ac5ad2-d0c8-4f72-b710-8e53b9dc18d9", + }, + "workflowIdIndex": { + "universalIdentifier": "9294d9e3-0225-4c7f-9d6e-23b4c25b6b25", + }, + "workflowVersionIdIndex": { + "universalIdentifier": "8183c8d2-9114-4b6e-8c5d-12a3b14a5a14", + }, + }, + "universalIdentifier": "20202020-4e28-4e95-a9d7-6c00874f843c", + "views": { + "allWorkflowRuns": { + "universalIdentifier": "20202020-a011-4a11-8a11-a0bcf10abca5", + "viewFields": { + "createdBy": { + "universalIdentifier": "20202020-af11-4a11-8a11-a0bcf10abcb3", + }, + "name": { + "universalIdentifier": "20202020-af11-4a11-8a11-a0bcf10abcaf", + }, + "startedAt": { + "universalIdentifier": "20202020-af11-4a11-8a11-a0bcf10abcb2", + }, + "status": { + "universalIdentifier": "20202020-af11-4a11-8a11-a0bcf10abcb1", + }, + "workflow": { + "universalIdentifier": "20202020-af11-4a11-8a11-a0bcf10abcb0", + }, + "workflowVersion": { + "universalIdentifier": "20202020-af11-4a11-8a11-a0bcf10abcb4", + }, + }, + }, + "workflowRunRecordPageFields": { + "universalIdentifier": "20202020-a011-4a11-8a11-a0bcf10abcf1", + "viewFieldGroups": { + "general": { + "universalIdentifier": "20202020-a011-4a11-8a11-a0bcf10abcf2", + }, + "system": { + "universalIdentifier": "20202020-a011-4a11-8a11-a0bcf10abcf4", + }, + }, + "viewFields": { + "createdAt": { + "universalIdentifier": "20202020-af11-4a11-8a11-a0bcf10abcfb", + }, + "createdBy": { + "universalIdentifier": "20202020-af11-4a11-8a11-a0bcf10abcfc", + }, + "endedAt": { + "universalIdentifier": "20202020-af11-4a11-8a11-a0bcf10abcfa", + }, + "enqueuedAt": { + "universalIdentifier": "20202020-af11-4a11-8a11-a0bcf10abcfd", + }, + "startedAt": { + "universalIdentifier": "20202020-af11-4a11-8a11-a0bcf10abcf9", + }, + "state": { + "universalIdentifier": "20202020-af11-4a11-8a11-a0bcf10abd01", + }, + "status": { + "universalIdentifier": "20202020-af11-4a11-8a11-a0bcf10abcf6", + }, + "timelineActivities": { + "universalIdentifier": "20202020-af11-4a11-8a11-a0bcf10abd05", + }, + "updatedAt": { + "universalIdentifier": "20202020-af11-4a11-8a11-a0bcf10abd02", + }, + "updatedBy": { + "universalIdentifier": "20202020-af11-4a11-8a11-a0bcf10abd03", + }, + "workflow": { + "universalIdentifier": "20202020-af11-4a11-8a11-a0bcf10abcf7", + }, + "workflowVersion": { + "universalIdentifier": "20202020-af11-4a11-8a11-a0bcf10abcf8", + }, + }, + }, + }, + }, + "workflowVersion": { + "fields": { + "createdAt": { + "universalIdentifier": "97b8d13e-ea41-5da4-90df-886ff017f584", + }, + "createdBy": { + "universalIdentifier": "d0f60c58-354e-5174-b852-98bac4c24285", + }, + "deletedAt": { + "universalIdentifier": "0a9cb619-d402-5d91-81ab-5a8e51a95274", + }, + "id": { + "universalIdentifier": "81e02441-5817-54f7-9edc-fac66c7c3415", + }, + "name": { + "universalIdentifier": "20202020-a12f-4cca-9937-a2e40cc65509", + }, + "position": { + "universalIdentifier": "bb0c73bd-d371-5e72-b2a0-05d8be1668f1", + }, + "runs": { + "universalIdentifier": "20202020-1d08-46df-901a-85045f18099a", + }, + "searchVector": { + "universalIdentifier": "19e1428c-2e0e-5a3d-a4f2-099856164cd8", + }, + "status": { + "universalIdentifier": "20202020-5a34-440e-8a25-39d8c3d1d4cf", + }, + "steps": { + "universalIdentifier": "20202020-5988-4a64-b94a-1f9b7b989039", + }, + "timelineActivities": { + "universalIdentifier": "20202020-fcb0-4695-b17e-3b43a421c633", + }, + "trigger": { + "universalIdentifier": "20202020-4eae-43e7-86e0-212b41a30b48", + }, + "updatedAt": { + "universalIdentifier": "f1ee5b97-9893-5124-8c7c-1a57888808f1", + }, + "updatedBy": { + "universalIdentifier": "c48bd686-933c-57b7-8767-55dba5090eac", + }, + "workflow": { + "universalIdentifier": "20202020-afa3-46c3-91b0-0631ca6aa1c8", + }, + }, + "indexes": { + "searchVectorGinIndex": { + "universalIdentifier": "6f3a65eb-2aee-4108-b8a0-c62da419d1dc", + }, + "workflowIdIndex": { + "universalIdentifier": "8138c3b3-0b14-4ee1-be0e-debdde6b3219", + }, + }, + "universalIdentifier": "20202020-d65d-4ab9-9344-d77bfb376a3d", + "views": { + "allWorkflowVersions": { + "universalIdentifier": "20202020-a010-4a10-8a10-a0bcf10aae15", + "viewFields": { + "name": { + "universalIdentifier": "20202020-af10-4a10-8a10-a0bcf10aaeaf", + }, + "runs": { + "universalIdentifier": "20202020-af10-4a10-8a10-a0bcf10aaeb3", + }, + "status": { + "universalIdentifier": "20202020-af10-4a10-8a10-a0bcf10aaeb1", + }, + "updatedAt": { + "universalIdentifier": "20202020-af10-4a10-8a10-a0bcf10aaeb2", + }, + "workflow": { + "universalIdentifier": "20202020-af10-4a10-8a10-a0bcf10aaeb0", + }, + }, + }, + "workflowVersionRecordPageFields": { + "universalIdentifier": "20202020-a010-4a10-8a10-a0bcf10aaef1", + "viewFieldGroups": { + "general": { + "universalIdentifier": "20202020-a010-4a10-8a10-a0bcf10aaef2", + }, + "system": { + "universalIdentifier": "20202020-a010-4a10-8a10-a0bcf10aaef4", + }, + }, + "viewFields": { + "createdAt": { + "universalIdentifier": "20202020-af10-4a10-8a10-a0bcf10aaef9", + }, + "createdBy": { + "universalIdentifier": "20202020-af10-4a10-8a10-a0bcf10aaefb", + }, + "runs": { + "universalIdentifier": "20202020-af10-4a10-8a10-a0bcf10aaefe", + }, + "status": { + "universalIdentifier": "20202020-af10-4a10-8a10-a0bcf10aaef6", + }, + "steps": { + "universalIdentifier": "20202020-af10-4a10-8a10-a0bcf10aaefa", + }, + "timelineActivities": { + "universalIdentifier": "20202020-af10-4a10-8a10-a0bcf10aaf01", + }, + "trigger": { + "universalIdentifier": "20202020-af10-4a10-8a10-a0bcf10aaef8", + }, + "updatedAt": { + "universalIdentifier": "20202020-af10-4a10-8a10-a0bcf10aaefc", + }, + "updatedBy": { + "universalIdentifier": "20202020-af10-4a10-8a10-a0bcf10aaefd", + }, + "workflow": { + "universalIdentifier": "20202020-af10-4a10-8a10-a0bcf10aaef7", + }, + }, + }, + }, + }, + "workspaceMember": { + "fields": { + "accountOwnerForCompanies": { + "universalIdentifier": "20202020-dc29-4bd4-a3c1-29eafa324bee", + }, + "assignedTasks": { + "universalIdentifier": "20202020-61dc-4a1c-99e8-38ebf8d2bbeb", + }, + "avatarUrl": { + "universalIdentifier": "20202020-0ced-4c4f-a376-c98a966af3f6", + }, + "blocklist": { + "universalIdentifier": "20202020-6cb2-4161-9f29-a4b7f1283859", + }, + "calendarEventParticipants": { + "universalIdentifier": "20202020-0dbc-4841-9ce1-3e793b5b3512", + }, + "calendarStartDay": { + "universalIdentifier": "20202020-1ecc-4562-84c9-ff3a2f6cce85", + }, + "colorScheme": { + "universalIdentifier": "20202020-66bc-47f2-adac-f2ef7c598b63", + }, + "createdAt": { + "universalIdentifier": "0838742d-9f92-5ec8-8dfe-31ed96e9b98f", + }, + "createdBy": { + "universalIdentifier": "4d0295df-d33e-50a3-a84f-d22e83a57a28", + }, + "dateFormat": { + "universalIdentifier": "20202020-af13-4e11-b1e7-b8cf5ea13dc0", + }, + "deletedAt": { + "universalIdentifier": "0c39c6a8-a1bf-54fb-8c86-ca2981820fd0", + }, + "id": { + "universalIdentifier": "d77dff76-dcfd-52a3-b352-832898b28b9d", + }, + "jobTitle": { + "universalIdentifier": "20202020-4dd4-4619-826e-08f6c06b374d", + }, + "locale": { + "universalIdentifier": "20202020-402e-4695-b169-794fa015afbe", + }, + "messageParticipants": { + "universalIdentifier": "20202020-8f99-48bc-a5eb-edd33dd54188", + }, + "name": { + "universalIdentifier": "20202020-e914-43a6-9c26-3603c59065f4", + }, + "numberFormat": { + "universalIdentifier": "20202020-7f40-4e7f-b126-11c0eda6b141", + }, + "ownedOpportunities": { + "universalIdentifier": "20202020-9e4d-4b3a-8c1f-6d7e8f9a0b1c", + }, + "position": { + "universalIdentifier": "f5f7f097-05c3-5e99-9b51-d57af26d3fd0", + }, + "searchVector": { + "universalIdentifier": "48bb08bc-41e9-521d-8a84-b41e6a421c46", + }, + "timeFormat": { + "universalIdentifier": "20202020-8acb-4cf8-a851-a6ed443c8d81", + }, + "timeZone": { + "universalIdentifier": "20202020-2d33-4c21-a86e-5943b050dd54", + }, + "timelineActivities": { + "universalIdentifier": "20202020-e15b-47b8-94fe-8200e3c66615", + }, + "updatedAt": { + "universalIdentifier": "2cf7a354-2311-5dbc-8b48-ae73a9ba5be0", + }, + "updatedBy": { + "universalIdentifier": "d2bd2b27-07bc-57b3-98bd-639a35f5e62e", + }, + "userEmail": { + "universalIdentifier": "20202020-4c5f-4e09-bebc-9e624e21ecf4", + }, + "userId": { + "universalIdentifier": "20202020-75a9-4dfc-bf25-2e4b43e89820", + }, + }, + "indexes": { + "searchVectorGinIndex": { + "universalIdentifier": "8678dde9-a804-4a9e-80e3-9af35e471ec5", + }, + "userEmailUniqueIndex": { + "universalIdentifier": "76da5f27-523c-44b6-ad06-12954f6b949f", + }, + }, + "universalIdentifier": "20202020-3319-4234-a34c-82d5c0e881a6", + "views": { + "allWorkspaceMembers": { + "universalIdentifier": "20202020-e001-4e01-8e01-a0bcaeabe100", + "viewFields": { + "assignedTasks": { + "universalIdentifier": "af16226e-6375-4676-8bd9-9d1a57076fc4", + }, + "avatarUrl": { + "universalIdentifier": "20202020-ef01-4e01-8e01-a0bcaeabe1f2", + }, + "colorScheme": { + "universalIdentifier": "20202020-ef01-4e01-8e01-a0bcaeabe1f3", + }, + "createdAt": { + "universalIdentifier": "20202020-ef01-4e01-8e01-a0bcaeabe1f8", + }, + "dateFormat": { + "universalIdentifier": "20202020-ef01-4e01-8e01-a0bcaeabe1f6", + }, + "locale": { + "universalIdentifier": "20202020-ef01-4e01-8e01-a0bcaeabe1f4", + }, + "name": { + "universalIdentifier": "20202020-ef01-4e01-8e01-a0bcaeabe1f0", + }, + "ownedOpportunities": { + "universalIdentifier": "8a0503f3-ba61-453e-86dc-6c79f7bc235b", + }, + "timeFormat": { + "universalIdentifier": "20202020-ef01-4e01-8e01-a0bcaeabe1f7", + }, + "timeZone": { + "universalIdentifier": "20202020-ef01-4e01-8e01-a0bcaeabe1f5", + }, + "userEmail": { + "universalIdentifier": "20202020-ef01-4e01-8e01-a0bcaeabe1f1", + }, + }, + }, + }, + }, +} +`; diff --git a/packages/twenty-shared/src/metadata/__tests__/standardObjectUniversalIdentifiers.test.ts b/packages/twenty-shared/src/metadata/__tests__/standardObjectUniversalIdentifiers.test.ts new file mode 100644 index 0000000000..e2ad01b584 --- /dev/null +++ b/packages/twenty-shared/src/metadata/__tests__/standardObjectUniversalIdentifiers.test.ts @@ -0,0 +1,10 @@ +import { STANDARD_OBJECTS } from '@/metadata/constants/standard-object.constant'; + +// If this test fails, a universal identifier changed: make sure the +// change is intentional and ships with a coordinated backfill of existing +// workspaces before updating the snapshot. +describe('STANDARD_OBJECTS universal identifiers', () => { + it('should never change without an explicit snapshot update', () => { + expect(STANDARD_OBJECTS).toMatchSnapshot(); + }); +}); diff --git a/packages/twenty-shared/src/metadata/constants/standard-object.constant.ts b/packages/twenty-shared/src/metadata/constants/standard-object.constant.ts index eb497d4081..67c8bbea64 100644 --- a/packages/twenty-shared/src/metadata/constants/standard-object.constant.ts +++ b/packages/twenty-shared/src/metadata/constants/standard-object.constant.ts @@ -1,23 +1,21 @@ -/** - * Important notice: - * - Never ever mutate an existing universal identifier - * - Deleting an existing unniversal identifier should be very rare - */ +import { buildStandardObjectSystemFields } from '@/metadata/utils/internal/build-standard-object-system-fields.util'; +// Important notice: +// - Never ever mutate an existing universal identifier +// - Deleting an existing universal identifier should be very rare +// - System field universal identifiers (id, createdAt, updatedAt, +// deletedAt, createdBy, updatedBy, position, searchVector) are +// deterministically derived from the standard application universal +// identifier, the object universal identifier and the field name. +// The name field is a default field, not a system field, and keeps its +// hardcoded universal identifier. export const STANDARD_OBJECTS = { attachment: { universalIdentifier: '20202020-bd3d-4c60-8dca-571c71d4447a', fields: { - id: { universalIdentifier: '20202020-a01a-4001-8a01-1d5f8e3c7b2a' }, - createdAt: { - universalIdentifier: '20202020-a01b-4002-9b02-2e6f9f4d8c3b', - }, - updatedAt: { - universalIdentifier: '20202020-a01c-4003-8c03-3f7fa05d9d4c', - }, - deletedAt: { - universalIdentifier: '20202020-a01d-4004-9d04-4f8fb16eae5d', - }, + ...buildStandardObjectSystemFields( + '20202020-bd3d-4c60-8dca-571c71d4447a', + ), name: { universalIdentifier: '20202020-87a5-48f8-bbf7-ade388825a57' }, file: { universalIdentifier: '20202020-15db-460e-8166-c7b5d87ad4be' }, //deprecated @@ -26,12 +24,6 @@ export const STANDARD_OBJECTS = { fileCategory: { universalIdentifier: '20202020-8c3f-4d9e-9a1b-2e5f7a8c9d0e', }, - createdBy: { - universalIdentifier: '395be3bd-a5c9-463d-aafe-9bc3bbec3f15', - }, - updatedBy: { - universalIdentifier: '376239d1-3e65-4cb6-b5d8-e0917d43cc93', - }, targetTask: { universalIdentifier: '20202020-51e5-4621-9cf8-215487951c4b', }, @@ -53,12 +45,6 @@ export const STANDARD_OBJECTS = { targetWorkflow: { universalIdentifier: '20202020-f1e8-4c9d-8a7b-3f5e1d2c9a8b', }, - position: { - universalIdentifier: 'cef8f62c-cd46-4444-8cbb-17d463b7464a', - }, - searchVector: { - universalIdentifier: 'e7b42835-cb2e-4456-8558-9225362aa52d', - }, }, morphIds: { targetMorphId: { morphId: '20202020-f634-435d-ab8d-e1168b375c69' }, @@ -130,32 +116,13 @@ export const STANDARD_OBJECTS = { blocklist: { universalIdentifier: '20202020-0408-4f38-b8a8-4d5e3e26e24d', fields: { - id: { universalIdentifier: '20202020-b01a-4011-8b11-5a9fc27fbf6e' }, - createdAt: { - universalIdentifier: '20202020-b01b-4012-9c12-6bafd38fcf7f', - }, - updatedAt: { - universalIdentifier: '20202020-b01c-4013-8d13-7cbfe49fdf8f', - }, - deletedAt: { - universalIdentifier: '20202020-b01d-4014-9e14-8dcff5affef9', - }, + ...buildStandardObjectSystemFields( + '20202020-0408-4f38-b8a8-4d5e3e26e24d', + ), handle: { universalIdentifier: '20202020-eef3-44ed-aa32-4641d7fd4a3e' }, workspaceMember: { universalIdentifier: '20202020-548d-4084-a947-fa20a39f7c06', }, - createdBy: { - universalIdentifier: 'b80db15d-8dc2-4f47-a072-15030941a9d1', - }, - updatedBy: { - universalIdentifier: '11aaa404-f04b-421d-a451-c453bf77cc78', - }, - position: { - universalIdentifier: '72a27e60-3542-46dc-90db-684d79bd7f11', - }, - searchVector: { - universalIdentifier: '5fa758da-30b4-412e-8a4f-975f2848ce60', - }, }, indexes: { workspaceMemberIdIndex: { @@ -204,18 +171,9 @@ export const STANDARD_OBJECTS = { calendarChannelEventAssociation: { universalIdentifier: '20202020-491b-4aaa-9825-afd1bae6ae00', fields: { - id: { - universalIdentifier: '20202020-c01a-4021-8a21-9edf06bfef0a', - }, - createdAt: { - universalIdentifier: '20202020-c01b-4022-9b22-afefd7cffefb', - }, - updatedAt: { - universalIdentifier: '20202020-c01c-4023-8c23-bffef8dffef0', - }, - deletedAt: { - universalIdentifier: '20202020-c01d-4024-9d24-cffef9effef1', - }, + ...buildStandardObjectSystemFields( + '20202020-491b-4aaa-9825-afd1bae6ae00', + ), calendarChannelId: { universalIdentifier: '20202020-93ee-4da4-8d58-0282c4a9cb7d', }, @@ -228,18 +186,6 @@ export const STANDARD_OBJECTS = { recurringEventExternalId: { universalIdentifier: '20202020-c58f-4c69-9bf8-9518fa31aa50', }, - createdBy: { - universalIdentifier: '8daa2bc8-bce2-4309-8a48-b929f3ee2c34', - }, - updatedBy: { - universalIdentifier: '55d810d2-fe47-44b4-b1de-b9c32113b695', - }, - position: { - universalIdentifier: '4fa18346-bb2b-49b0-ab35-23df86eed1c8', - }, - searchVector: { - universalIdentifier: '1844a9cf-6d35-46d7-99ba-011626a6d71b', - }, }, indexes: { calendarChannelIdIndex: { @@ -300,18 +246,9 @@ export const STANDARD_OBJECTS = { calendarEventParticipant: { universalIdentifier: '20202020-a1c3-47a6-9732-27e5b1e8436d', fields: { - id: { - universalIdentifier: '20202020-c03a-4041-8a41-5e6f7a8b9cad', - }, - createdAt: { - universalIdentifier: '20202020-c03b-4042-9b42-6f7a8b9cadbe', - }, - updatedAt: { - universalIdentifier: '20202020-c03c-4043-8c43-7a8b9cadbecf', - }, - deletedAt: { - universalIdentifier: '20202020-c03d-4044-9d44-8b9cadbecd0f', - }, + ...buildStandardObjectSystemFields( + '20202020-a1c3-47a6-9732-27e5b1e8436d', + ), calendarEvent: { universalIdentifier: '20202020-fe3a-401c-b889-af4f4657a861', }, @@ -333,18 +270,6 @@ export const STANDARD_OBJECTS = { workspaceMember: { universalIdentifier: '20202020-20e4-4591-93ed-aeb17a4dcbd2', }, - createdBy: { - universalIdentifier: '9e9ec14d-b889-448e-afe5-40e407be11d1', - }, - updatedBy: { - universalIdentifier: 'a2c6efda-06bf-418e-808a-dac9fd64ab58', - }, - position: { - universalIdentifier: 'fcfa672c-ce6d-4fc1-b978-db58a4cc14f4', - }, - searchVector: { - universalIdentifier: 'c9dccf32-64ea-433e-a9a7-09993343bae0', - }, }, indexes: { calendarEventIdIndex: { @@ -432,16 +357,9 @@ export const STANDARD_OBJECTS = { calendarEvent: { universalIdentifier: '20202020-8f1d-4eef-9f85-0d1965e27221', fields: { - id: { universalIdentifier: '20202020-c04a-4051-8a51-9cadbe0f1e2d' }, - createdAt: { - universalIdentifier: '20202020-c04b-4052-9b52-adbecf1f2e3e', - }, - updatedAt: { - universalIdentifier: '20202020-c04c-4053-8c53-becf0f2f3e4f', - }, - deletedAt: { - universalIdentifier: '20202020-c04d-4054-9d54-cd0f1f3f4e5f', - }, + ...buildStandardObjectSystemFields( + '20202020-8f1d-4eef-9f85-0d1965e27221', + ), title: { universalIdentifier: '20202020-080e-49d1-b21d-9702a7e2525c' }, isCanceled: { universalIdentifier: '20202020-335b-4e04-b470-43b84b64863c', @@ -483,18 +401,6 @@ export const STANDARD_OBJECTS = { callRecordings: { universalIdentifier: '48d6d151-18e2-4111-b405-d85fb9d860d8', }, - createdBy: { - universalIdentifier: '664a9500-2641-4caa-8d95-069807bb2eb4', - }, - updatedBy: { - universalIdentifier: '1081c196-d675-4801-b9e1-7d8637b48eab', - }, - position: { - universalIdentifier: 'e9488e9a-0abe-4500-8c1d-bfbd6b8cffad', - }, - searchVector: { - universalIdentifier: 'b9e7825c-d491-4414-b904-910c00b5b93b', - }, }, indexes: {}, views: { @@ -581,18 +487,9 @@ export const STANDARD_OBJECTS = { callRecording: { universalIdentifier: 'ce19efb9-710f-45b2-b141-473abbeea60b', fields: { - id: { - universalIdentifier: '9767180b-76c2-47d5-b7b9-5dc60f14391d', - }, - createdAt: { - universalIdentifier: 'd1adb2a9-9da3-4656-93b7-db79780b77eb', - }, - updatedAt: { - universalIdentifier: '5db0a477-5715-4ffd-bdbe-854dfaccfe22', - }, - deletedAt: { - universalIdentifier: 'cf22a652-390a-4f55-b3a0-615c8fd8c7ed', - }, + ...buildStandardObjectSystemFields( + 'ce19efb9-710f-45b2-b141-473abbeea60b', + ), title: { universalIdentifier: '4cff8863-a1d1-45fd-a370-4eb6aa1f2a5b', }, @@ -632,18 +529,6 @@ export const STANDARD_OBJECTS = { calendarEvent: { universalIdentifier: '49e64b28-bd98-4775-80ea-4781bdd45e35', }, - createdBy: { - universalIdentifier: 'cb84ce87-ccd4-4901-9b9e-25e3cbfce3ba', - }, - updatedBy: { - universalIdentifier: '02309262-b6dc-4cbd-936b-d851a7deec79', - }, - position: { - universalIdentifier: 'eeae3145-3696-41ae-b0ed-1370ad35b33c', - }, - searchVector: { - universalIdentifier: 'd6fd4ad0-4aec-4969-bdb5-945fda0fcf45', - }, }, indexes: { calendarEventIdIndex: { @@ -710,16 +595,9 @@ export const STANDARD_OBJECTS = { company: { universalIdentifier: '20202020-b374-4779-a561-80086cb2e17f', fields: { - id: { universalIdentifier: '20202020-c05a-4061-8a61-1e2f3a4b5c6d' }, - createdAt: { - universalIdentifier: '20202020-c05b-4062-9b62-2f3a4b5c6d7e', - }, - updatedAt: { - universalIdentifier: '20202020-c05c-4063-8c63-3a4b5c6d7e8f', - }, - deletedAt: { - universalIdentifier: '20202020-c05d-4064-9d64-4b5c6d7e8f9a', - }, + ...buildStandardObjectSystemFields( + '20202020-b374-4779-a561-80086cb2e17f', + ), name: { universalIdentifier: '20202020-4d99-4e2e-a84c-4a27837b1ece' }, domainName: { universalIdentifier: '20202020-0c28-43d8-8ba5-3659924d3489', @@ -731,13 +609,6 @@ export const STANDARD_OBJECTS = { annualRevenue: { universalIdentifier: '60f533b7-2166-4071-a767-ceb0286822fd', }, - position: { universalIdentifier: '20202020-9b4e-462b-991d-a0ee33326454' }, - createdBy: { - universalIdentifier: '20202020-fabc-451d-ab7d-412170916baa', - }, - updatedBy: { - universalIdentifier: '7444022e-b38f-4d4f-801b-cd664abc4834', - }, people: { universalIdentifier: '20202020-3213-4ddf-9494-6422bcff8d7c' }, accountOwner: { universalIdentifier: '20202020-95b8-4e10-9881-edb5d4765f9d', @@ -757,9 +628,6 @@ export const STANDARD_OBJECTS = { timelineActivities: { universalIdentifier: '20202020-0414-4daf-9c0d-64fe7b27f89f', }, - searchVector: { - universalIdentifier: '85c71601-72f9-4b7b-b343-d46100b2c74d', - }, }, indexes: { accountOwnerIdIndex: { @@ -868,36 +736,19 @@ export const STANDARD_OBJECTS = { dashboard: { universalIdentifier: '20202020-3840-4b6d-9425-0c5188b05ca8', fields: { - id: { universalIdentifier: '20202020-da1a-41d1-8ad1-abcdefabcdef' }, - createdAt: { - universalIdentifier: '20202020-da1b-41d2-9bd2-bcdefabcdefa', - }, - updatedAt: { - universalIdentifier: '20202020-da1c-41d3-8cd3-cdefabcdefab', - }, - deletedAt: { - universalIdentifier: '20202020-da1d-41d4-9dd4-defabcdefabc', - }, + ...buildStandardObjectSystemFields( + '20202020-3840-4b6d-9425-0c5188b05ca8', + ), title: { universalIdentifier: '20202020-20ee-4091-95dc-44b57eda3a89' }, - position: { universalIdentifier: '20202020-38af-409b-95f0-7f08aa5f420f' }, pageLayoutId: { universalIdentifier: '20202020-bb53-4648-aa36-1d9d54e6f7f2', }, - createdBy: { - universalIdentifier: '20202020-ff32-4fa1-b7ad-407cc6aa0734', - }, - updatedBy: { - universalIdentifier: '53ee42e7-f157-42b5-b278-a5fa9b378307', - }, timelineActivities: { universalIdentifier: '99c330c0-5b7d-4276-a764-aed84499dfb5', }, attachments: { universalIdentifier: '20202020-bf6f-4220-8c55-2764f1175870', }, - searchVector: { - universalIdentifier: '20202020-0bcc-47a4-8360-2e35a7133f7a', - }, }, indexes: { searchVectorGinIndex: { @@ -927,28 +778,9 @@ export const STANDARD_OBJECTS = { messageCampaign: { universalIdentifier: '238acb94-dd4c-4036-bc55-19b99d821efd', fields: { - id: { universalIdentifier: '819a9eb4-2738-49df-a302-76d2dc7d7114' }, - createdAt: { - universalIdentifier: '2c7eb5f4-03f8-4101-9486-b2bdf69175d8', - }, - updatedAt: { - universalIdentifier: '73c44e3a-9b67-4d1b-887b-d8820cfe6aa5', - }, - deletedAt: { - universalIdentifier: 'f7ee084e-7a8e-4b60-a68a-0eb16230589d', - }, - createdBy: { - universalIdentifier: 'a75b85d6-12da-4726-9568-3f32f3e3a249', - }, - updatedBy: { - universalIdentifier: 'd85c0ce2-5971-4afb-a5b0-e542c7cfda9e', - }, - position: { - universalIdentifier: 'ba053d00-e5ef-41ff-9cb1-c87fc9c85081', - }, - searchVector: { - universalIdentifier: 'c51f1455-3c56-40b9-80ff-7ffcbdef9609', - }, + ...buildStandardObjectSystemFields( + '238acb94-dd4c-4036-bc55-19b99d821efd', + ), subject: { universalIdentifier: '7251544c-b07a-4f0d-9d0a-48514367f230' }, bodyTemplate: { universalIdentifier: 'b3a69d08-31ca-4a8d-8359-5ca462899342', @@ -985,28 +817,9 @@ export const STANDARD_OBJECTS = { messageList: { universalIdentifier: '826561ea-4816-411c-baa0-eec5e6ca8866', fields: { - id: { universalIdentifier: 'd91c62db-28d1-4e96-83f9-2639dcdcc443' }, - createdAt: { - universalIdentifier: '8cf4126b-135c-4f73-a0c1-a59709274e97', - }, - updatedAt: { - universalIdentifier: '78f06ca3-7a5e-4b42-8a18-c8011ae49933', - }, - deletedAt: { - universalIdentifier: 'a52447c9-69de-4598-80a7-88fdec58d7f2', - }, - createdBy: { - universalIdentifier: '7efc932e-d245-49ef-802a-8f7177278d9a', - }, - updatedBy: { - universalIdentifier: '184589db-8fee-4262-b4ee-2ba771a8cdbe', - }, - position: { - universalIdentifier: 'e2d4e45d-e510-466f-92e6-d7cea80ea256', - }, - searchVector: { - universalIdentifier: '1c6f5064-6e99-4ac9-ac1f-1b8060edf9bc', - }, + ...buildStandardObjectSystemFields( + '826561ea-4816-411c-baa0-eec5e6ca8866', + ), name: { universalIdentifier: '69b9ed8b-7b26-4108-894f-05700ef7e8ee' }, members: { universalIdentifier: '92df3493-91cf-4665-8587-1b08917d299b', @@ -1027,28 +840,9 @@ export const STANDARD_OBJECTS = { messageListMember: { universalIdentifier: '27773d24-8ce3-40f8-aa6c-1f590f2c08d2', fields: { - id: { universalIdentifier: '606769a6-1783-4c2b-9e44-1d8389647f7c' }, - createdAt: { - universalIdentifier: '7ae090b9-a48f-435c-aa89-9882f17950a1', - }, - updatedAt: { - universalIdentifier: '959473a9-37d6-4708-a0a6-d6b7c6b11907', - }, - deletedAt: { - universalIdentifier: '804e56f4-ab42-40dd-bcf5-754d25051daf', - }, - createdBy: { - universalIdentifier: '12772bfa-8f0e-411e-a526-b66ef83b34ca', - }, - updatedBy: { - universalIdentifier: 'd4586b18-7dd1-43b7-8d26-e58fc8f169f7', - }, - position: { - universalIdentifier: '3e169614-c440-4603-bec6-08bbda7c849d', - }, - searchVector: { - universalIdentifier: '37f86c8d-6097-4ccd-9f08-027c1d40e9d6', - }, + ...buildStandardObjectSystemFields( + '27773d24-8ce3-40f8-aa6c-1f590f2c08d2', + ), person: { universalIdentifier: '34288425-8805-42fb-8b98-ee13d09be3d3' }, list: { universalIdentifier: 'd5402005-e8f9-4fbe-8696-b6723cd85018', @@ -1066,18 +860,9 @@ export const STANDARD_OBJECTS = { messageChannelMessageAssociation: { universalIdentifier: '20202020-ad1e-4127-bccb-d83ae04d2ccb', fields: { - id: { - universalIdentifier: '20202020-b01a-40b1-8ab1-5a6b7c8d9eaf', - }, - createdAt: { - universalIdentifier: '20202020-b01b-40b2-9bb2-6b7c8d9eafba', - }, - updatedAt: { - universalIdentifier: '20202020-b01c-40b3-8cb3-7c8d9eafbacb', - }, - deletedAt: { - universalIdentifier: '20202020-b01d-40b4-9db4-8d9eafbacbdc', - }, + ...buildStandardObjectSystemFields( + '20202020-ad1e-4127-bccb-d83ae04d2ccb', + ), messageChannelId: { universalIdentifier: '20202020-b658-408f-bd46-3bd2d15d7e52', }, @@ -1096,18 +881,6 @@ export const STANDARD_OBJECTS = { direction: { universalIdentifier: '75c9b0f7-9e76-44d4-a2f9-47051e61eec7', }, - createdBy: { - universalIdentifier: 'ce7dc96f-dd33-4bce-9505-cbd381440cec', - }, - updatedBy: { - universalIdentifier: '334d2ad6-4bc4-4b51-9c92-8ad57652475e', - }, - position: { - universalIdentifier: '45d1e083-90d6-4507-b68a-454a9dc3a540', - }, - searchVector: { - universalIdentifier: 'edddd409-d9f0-4b93-8e3f-37faef6a3387', - }, messageFolders: { universalIdentifier: '9bfc9da7-ae2d-44fd-9563-ede90c5d6222', }, @@ -1180,30 +953,9 @@ export const STANDARD_OBJECTS = { messageChannelMessageAssociationMessageFolder: { universalIdentifier: '20202020-a1b0-40b0-8ab0-5b6c7d8e9f0a', fields: { - id: { - universalIdentifier: '20202020-a1b2-40b1-8ab1-6b7c8d9e0f1a', - }, - createdAt: { - universalIdentifier: '20202020-a1b3-40b2-9bb2-7c8d9e0f1a2b', - }, - updatedAt: { - universalIdentifier: '20202020-a1b4-40b3-8cb3-8d9e0f1a2b3c', - }, - deletedAt: { - universalIdentifier: '20202020-a1b5-40b4-9db4-9e0f1a2b3c4d', - }, - createdBy: { - universalIdentifier: 'f882a070-3393-4197-8140-b5858c6f7284', - }, - updatedBy: { - universalIdentifier: '107d13dc-a8ff-493c-8d04-72688c68f8c1', - }, - position: { - universalIdentifier: '76fcf020-482a-4d6c-b7b1-ccd6410299fc', - }, - searchVector: { - universalIdentifier: '38633a97-0e88-44de-9903-b8c9e0f59a36', - }, + ...buildStandardObjectSystemFields( + '20202020-a1b0-40b0-8ab0-5b6c7d8e9f0a', + ), messageChannelMessageAssociation: { universalIdentifier: '7411cfa3-4fd9-4b90-a636-940015fd7243', }, @@ -1267,16 +1019,9 @@ export const STANDARD_OBJECTS = { messageParticipant: { universalIdentifier: '20202020-a433-4456-aa2d-fd9cb26b774a', fields: { - id: { universalIdentifier: '20202020-b04a-40e1-8ae1-1a2b3c4d5e6f' }, - createdAt: { - universalIdentifier: '20202020-b04b-40e2-9be2-2b3c4d5e6f7a', - }, - updatedAt: { - universalIdentifier: '20202020-b04c-40e3-8ce3-3c4d5e6f7a8b', - }, - deletedAt: { - universalIdentifier: '20202020-b04d-40e4-9de4-4d5e6f7a8b9c', - }, + ...buildStandardObjectSystemFields( + '20202020-a433-4456-aa2d-fd9cb26b774a', + ), message: { universalIdentifier: '20202020-985b-429a-9db9-9e55f4898a2a', }, @@ -1298,18 +1043,6 @@ export const STANDARD_OBJECTS = { messageCampaign: { universalIdentifier: '5bc768db-919f-41da-8c43-df08084d526f', }, - createdBy: { - universalIdentifier: 'e0e6aa04-6ad5-4d12-8799-6febf00452c1', - }, - updatedBy: { - universalIdentifier: '6c90fd49-22b8-4f91-b4eb-4b9af630e988', - }, - position: { - universalIdentifier: 'f49ca74e-dcdf-445d-a707-3c22869b4e6c', - }, - searchVector: { - universalIdentifier: '80fec74f-cda7-46bd-ae37-8998bd4f992b', - }, }, indexes: { messageIdIndex: { @@ -1391,34 +1124,15 @@ export const STANDARD_OBJECTS = { messageThread: { universalIdentifier: '20202020-849a-4c3e-84f5-a25a7d802271', fields: { - id: { universalIdentifier: '20202020-b05a-40f1-8af1-5e6f7a8b9cad' }, - createdAt: { - universalIdentifier: '20202020-b05b-40f2-9bf2-6f7a8b9cadbe', - }, - updatedAt: { - universalIdentifier: '20202020-b05c-40f3-8cf3-7a8b9cadbecf', - }, - deletedAt: { - universalIdentifier: '20202020-b05d-40f4-9df4-8b9cadbecfda', - }, + ...buildStandardObjectSystemFields( + '20202020-849a-4c3e-84f5-a25a7d802271', + ), messages: { universalIdentifier: '20202020-3115-404f-aade-e1154b28e35a', }, messageChannelMessageAssociations: { universalIdentifier: '20202020-314e-40a4-906d-a5d5d6c285f6', }, - createdBy: { - universalIdentifier: 'b50ce369-9905-46d9-b95b-5e4034d252aa', - }, - updatedBy: { - universalIdentifier: '20fbafd0-0a16-4785-b5a6-f1ef45ef304c', - }, - position: { - universalIdentifier: '7490a440-7a62-466e-ba93-75a2f2edfb1e', - }, - searchVector: { - universalIdentifier: 'c63e091f-6528-4657-ad2a-b0a158f9e483', - }, subject: { universalIdentifier: 'a8ddbf8c-1137-45d1-b89e-5ffbd83f67c8', }, @@ -1447,16 +1161,9 @@ export const STANDARD_OBJECTS = { message: { universalIdentifier: '20202020-3f6b-4425-80ab-e468899ab4b2', fields: { - id: { universalIdentifier: '20202020-b06a-4101-8a01-9cadbedfaeb1' }, - createdAt: { - universalIdentifier: '20202020-b06b-4102-9b02-adbecfeafbc2', - }, - updatedAt: { - universalIdentifier: '20202020-b06c-4103-8c03-becfdfabfcd3', - }, - deletedAt: { - universalIdentifier: '20202020-b06d-4104-9d04-cfdfabecdde4', - }, + ...buildStandardObjectSystemFields( + '20202020-3f6b-4425-80ab-e468899ab4b2', + ), headerMessageId: { universalIdentifier: '20202020-72b5-416d-aed8-b55609067d01', }, @@ -1483,18 +1190,6 @@ export const STANDARD_OBJECTS = { isDraft: { universalIdentifier: '20202020-4d3a-4b6e-9c1f-2a5e7b9d0c34', }, - createdBy: { - universalIdentifier: '6e52bde4-ed41-4462-aa70-121e496270b4', - }, - updatedBy: { - universalIdentifier: '7822dcc0-ee40-4af0-a6fe-f10a14e72b24', - }, - position: { - universalIdentifier: '06c5052d-3369-4d6d-8eaa-f9780eddb1fd', - }, - searchVector: { - universalIdentifier: '529b6008-4a12-4d48-bbc3-26a3f199bafd', - }, }, indexes: { messageThreadIdIndex: { @@ -1536,25 +1231,11 @@ export const STANDARD_OBJECTS = { note: { universalIdentifier: '20202020-0b00-45cd-b6f6-6cd806fc6804', fields: { - id: { universalIdentifier: '20202020-c01a-4111-8a11-dfabcddeef12' }, - createdAt: { - universalIdentifier: '20202020-c01b-4112-9b12-fabcddefe123', - }, - updatedAt: { - universalIdentifier: '20202020-c01c-4113-8c13-abcddeef1234', - }, - deletedAt: { - universalIdentifier: '20202020-c01d-4114-9d14-bcddeef12345', - }, - position: { universalIdentifier: '20202020-368d-4dc2-943f-ed8a49c7fdfb' }, + ...buildStandardObjectSystemFields( + '20202020-0b00-45cd-b6f6-6cd806fc6804', + ), title: { universalIdentifier: '20202020-faeb-4c76-8ba6-ccbb0b4a965f' }, bodyV2: { universalIdentifier: '20202020-a7bb-4d94-be51-8f25181502c8' }, - createdBy: { - universalIdentifier: '20202020-0d79-4e21-ab77-5a394eff97be', - }, - updatedBy: { - universalIdentifier: '9b446e89-2484-4044-a3b5-420f6b578c0c', - }, noteTargets: { universalIdentifier: '20202020-1f25-43fe-8b00-af212fdde823', }, @@ -1564,9 +1245,6 @@ export const STANDARD_OBJECTS = { timelineActivities: { universalIdentifier: '20202020-7030-42f8-929c-1a57b25d6bce', }, - searchVector: { - universalIdentifier: '20202020-7ea8-44d4-9d4c-51dd2a757950', - }, }, indexes: { searchVectorGinIndex: { @@ -1636,16 +1314,9 @@ export const STANDARD_OBJECTS = { noteTarget: { universalIdentifier: '20202020-fff0-4b44-be82-bda313884400', fields: { - id: { universalIdentifier: '20202020-c02a-4121-8a21-cddeef123456' }, - createdAt: { - universalIdentifier: '20202020-c02b-4122-9b22-ddeef1234567', - }, - updatedAt: { - universalIdentifier: '20202020-c02c-4123-8c23-eef12345678a', - }, - deletedAt: { - universalIdentifier: '20202020-c02d-4124-9d24-ef123456789b', - }, + ...buildStandardObjectSystemFields( + '20202020-fff0-4b44-be82-bda313884400', + ), note: { universalIdentifier: '20202020-57f3-4f50-9599-fc0f671df003' }, targetPerson: { universalIdentifier: '20202020-38ca-4aab-92f5-8a605ca2e4c5', @@ -1656,18 +1327,6 @@ export const STANDARD_OBJECTS = { targetOpportunity: { universalIdentifier: '20202020-4e42-417a-a705-76581c9ade79', }, - createdBy: { - universalIdentifier: '820a3163-bb7d-41bc-93d9-81a464559c48', - }, - updatedBy: { - universalIdentifier: 'a48c2bae-fe78-4d9d-bc37-f56d1a462121', - }, - position: { - universalIdentifier: '082f7c9e-5ccd-4056-8748-a428f65fa6f6', - }, - searchVector: { - universalIdentifier: '0cc32d0f-99ab-4fee-bf66-9e84bc8bce00', - }, }, morphIds: { targetMorphId: { morphId: '20202020-f635-435d-ab8d-e1168b375c70' }, @@ -1712,31 +1371,15 @@ export const STANDARD_OBJECTS = { opportunity: { universalIdentifier: '20202020-9549-49dd-b2b2-883999db8938', fields: { - id: { universalIdentifier: '20202020-d01a-4131-8a31-f123456789ab' }, - createdAt: { - universalIdentifier: '20202020-d01b-4132-9b32-123456789abc', - }, - updatedAt: { - universalIdentifier: '20202020-d01c-4133-8c33-23456789abcd', - }, - deletedAt: { - universalIdentifier: '20202020-d01d-4134-9d34-3456789abcde', - }, + ...buildStandardObjectSystemFields( + '20202020-9549-49dd-b2b2-883999db8938', + ), name: { universalIdentifier: '20202020-8609-4f65-a2d9-44009eb422b5' }, amount: { universalIdentifier: '20202020-583e-4642-8533-db761d5fa82f' }, closeDate: { universalIdentifier: '20202020-527e-44d6-b1ac-c4158d307b97', }, stage: { universalIdentifier: '20202020-6f76-477d-8551-28cd65b2b4b9' }, - position: { - universalIdentifier: '20202020-806d-493a-bbc6-6313e62958e2', - }, - createdBy: { - universalIdentifier: '20202020-a63e-4a62-8e63-42a51828f831', - }, - updatedBy: { - universalIdentifier: '3c8a6095-3f64-4e81-a59e-66c2bd181e11', - }, pointOfContact: { universalIdentifier: '20202020-8dfb-42fc-92b6-01afb759ed16', }, @@ -1754,9 +1397,6 @@ export const STANDARD_OBJECTS = { timelineActivities: { universalIdentifier: '20202020-30e2-421f-96c7-19c69d1cf631', }, - searchVector: { - universalIdentifier: '428a0da5-4b2e-4ce3-b695-89a8b384e6e3', - }, }, indexes: { pointOfContactIdIndex: { @@ -1899,16 +1539,9 @@ export const STANDARD_OBJECTS = { person: { universalIdentifier: '20202020-e674-48e5-a542-72570eee7213', fields: { - id: { universalIdentifier: '20202020-e01a-4141-8a41-456789abcdef' }, - createdAt: { - universalIdentifier: '20202020-e01b-4142-9b42-56789abcdefa', - }, - updatedAt: { - universalIdentifier: '20202020-e01c-4143-8c43-6789abcdefab', - }, - deletedAt: { - universalIdentifier: '20202020-e01d-4144-9d44-789abcdefabc', - }, + ...buildStandardObjectSystemFields( + '20202020-e674-48e5-a542-72570eee7213', + ), name: { universalIdentifier: '20202020-3875-44d5-8c33-a6239011cab8' }, emails: { universalIdentifier: '20202020-3c51-43fa-8b6e-af39e29368ab' }, linkedinLink: { @@ -1922,13 +1555,6 @@ export const STANDARD_OBJECTS = { avatarFile: { universalIdentifier: '20202020-a7c9-4e3d-8f1b-2d5a6b7c8e9f', }, - position: { universalIdentifier: '20202020-fcd5-4231-aff5-fff583eaa0b1' }, - createdBy: { - universalIdentifier: '20202020-f6ab-4d98-af24-a3d5b664148a', - }, - updatedBy: { - universalIdentifier: 'e9e0dd35-184c-4742-84da-afadf45ce59a', - }, company: { universalIdentifier: '20202020-e2f3-448e-b34c-2d625f0025fd' }, pointOfContactForOpportunities: { universalIdentifier: '20202020-911b-4a7d-b67b-918aa9a5b33a', @@ -1954,9 +1580,6 @@ export const STANDARD_OBJECTS = { listMemberships: { universalIdentifier: '8b8d1be0-4c94-4413-a2c9-c7ede205a81d', }, - searchVector: { - universalIdentifier: '57d1d7ad-fa10-44fc-82f3-ad0959ec2534', - }, }, indexes: { companyIdIndex: { @@ -2077,27 +1700,13 @@ export const STANDARD_OBJECTS = { task: { universalIdentifier: '20202020-1ba1-48ba-bc83-ef7e5990ed10', fields: { - id: { universalIdentifier: '20202020-a02a-4151-8a51-89abcdefabcd' }, - createdAt: { - universalIdentifier: '20202020-a02b-4152-9b52-9abcdefabcde', - }, - updatedAt: { - universalIdentifier: '20202020-a02c-4153-8c53-abcdefabcdef', - }, - deletedAt: { - universalIdentifier: '20202020-a02d-4154-9d54-bcdefabcdefa', - }, - position: { universalIdentifier: '20202020-7d47-4690-8a98-98b9a0c05dd8' }, + ...buildStandardObjectSystemFields( + '20202020-1ba1-48ba-bc83-ef7e5990ed10', + ), title: { universalIdentifier: '20202020-b386-4cb7-aa5a-08d4a4d92680' }, bodyV2: { universalIdentifier: '20202020-4aa0-4ae8-898d-7df0afd47ab1' }, dueAt: { universalIdentifier: '20202020-fd99-40da-951b-4cb9a352fce3' }, status: { universalIdentifier: '20202020-70bc-48f9-89c5-6aa730b151e0' }, - createdBy: { - universalIdentifier: '20202020-1a04-48ab-a567-576965ae5387', - }, - updatedBy: { - universalIdentifier: '9e8bf518-f4ab-433e-9674-efb75fba2802', - }, taskTargets: { universalIdentifier: '20202020-de9c-4d0e-a452-713d4a3e5fc7', }, @@ -2108,9 +1717,6 @@ export const STANDARD_OBJECTS = { timelineActivities: { universalIdentifier: '20202020-c778-4278-99ee-23a2837aee64', }, - searchVector: { - universalIdentifier: '20202020-4746-4e2f-870c-52b02c67c90d', - }, }, indexes: { assigneeIdIndex: { @@ -2277,16 +1883,9 @@ export const STANDARD_OBJECTS = { taskTarget: { universalIdentifier: '20202020-5a9a-44e8-95df-771cd06d0fb1', fields: { - id: { universalIdentifier: '20202020-a03a-4161-8a61-cdefabcdefab' }, - createdAt: { - universalIdentifier: '20202020-a03b-4162-9b62-defabcdefabc', - }, - updatedAt: { - universalIdentifier: '20202020-a03c-4163-8c63-efabcdefabcd', - }, - deletedAt: { - universalIdentifier: '20202020-a03d-4164-9d64-fabcdefabcde', - }, + ...buildStandardObjectSystemFields( + '20202020-5a9a-44e8-95df-771cd06d0fb1', + ), task: { universalIdentifier: '20202020-e881-457a-8758-74aaef4ae78a' }, targetPerson: { universalIdentifier: '20202020-c8a0-4e85-a016-87e2349cfbec', @@ -2297,18 +1896,6 @@ export const STANDARD_OBJECTS = { targetOpportunity: { universalIdentifier: '20202020-6cb2-4c01-a9a5-aca3dbc11d41', }, - createdBy: { - universalIdentifier: '65fe2a53-45e4-4225-9711-b827f55e51cc', - }, - updatedBy: { - universalIdentifier: 'bea3734f-aff2-49ed-9dc9-d4666a2e2178', - }, - position: { - universalIdentifier: '4216c06a-498b-4111-9577-d9bcbccdda39', - }, - searchVector: { - universalIdentifier: '8768a9c0-37c0-4465-b86d-c4c7f466ec23', - }, }, morphIds: { targetMorphId: { morphId: '20202020-f636-435d-ab8d-e1168b375c71' }, @@ -2353,20 +1940,13 @@ export const STANDARD_OBJECTS = { timelineActivity: { universalIdentifier: '20202020-6736-4337-b5c4-8b39fae325a5', fields: { - id: { universalIdentifier: '20202020-a01a-4081-8a81-9aabbccddeff' }, - createdAt: { - universalIdentifier: '20202020-a01b-4082-9b82-aabbccddeeff', - }, - updatedAt: { - universalIdentifier: '20202020-a01c-4083-8c83-bbccddeeffaa', - }, - deletedAt: { - universalIdentifier: '20202020-a01d-4084-9d84-ccddeeffaabb', - }, + ...buildStandardObjectSystemFields( + '20202020-6736-4337-b5c4-8b39fae325a5', + ), + name: { universalIdentifier: '20202020-7207-46e8-9dab-849505ae8497' }, happensAt: { universalIdentifier: '20202020-9526-4993-b339-c4318c4d39f0', }, - name: { universalIdentifier: '20202020-7207-46e8-9dab-849505ae8497' }, properties: { universalIdentifier: '20202020-f142-4b04-b91b-6a2b4af3bf11', }, @@ -2415,18 +1995,6 @@ export const STANDARD_OBJECTS = { linkedObjectMetadataId: { universalIdentifier: '20202020-c595-449d-9f89-562758c9ee69', }, - createdBy: { - universalIdentifier: '8f66191f-927d-4a6d-a15f-d0ff8cfc5a6d', - }, - updatedBy: { - universalIdentifier: '81dc29fc-c872-4efd-bf31-d07872cd260e', - }, - position: { - universalIdentifier: 'e245d799-3e4b-4c69-ab9a-6b7c91d71195', - }, - searchVector: { - universalIdentifier: 'bc1d1b67-903a-4354-8272-4a6efc4cbe63', - }, }, morphIds: { targetMorphId: { morphId: '20202020-9a2b-4c3d-a4e5-f6a7b8c9d0e1' }, @@ -2516,22 +2084,14 @@ export const STANDARD_OBJECTS = { workflow: { universalIdentifier: '20202020-62be-406c-b9ca-8caa50d51392', fields: { - id: { universalIdentifier: '20202020-f02a-4181-8a81-efabcdefabcd' }, - createdAt: { - universalIdentifier: '20202020-f02b-4182-9b82-fabcdefabcde', - }, - updatedAt: { - universalIdentifier: '20202020-f02c-4183-8c83-abcdefabcdef', - }, - deletedAt: { - universalIdentifier: '20202020-f02d-4184-9d84-bcdefabcdefa', - }, + ...buildStandardObjectSystemFields( + '20202020-62be-406c-b9ca-8caa50d51392', + ), name: { universalIdentifier: '20202020-b3d3-478f-acc0-5d901e725b20' }, lastPublishedVersionId: { universalIdentifier: '20202020-326a-4fba-8639-3456c0a169e8', }, statuses: { universalIdentifier: '20202020-357c-4432-8c50-8c31b4a552d9' }, - position: { universalIdentifier: '20202020-39b0-4d8c-8c5f-33c2326deb5f' }, versions: { universalIdentifier: '20202020-9432-416e-8f3c-27ee3153d099' }, runs: { universalIdentifier: '20202020-759b-4340-b58b-e73595c4df4f' }, automatedTriggers: { @@ -2543,15 +2103,6 @@ export const STANDARD_OBJECTS = { attachments: { universalIdentifier: '20202020-4a8c-4e2d-9b1c-7e5f3a2b4c6d', }, - createdBy: { - universalIdentifier: '20202020-6007-401a-8aa5-e6f48581a6f3', - }, - updatedBy: { - universalIdentifier: '3559831e-caf2-4eb5-9db1-b47bf968c774', - }, - searchVector: { - universalIdentifier: '20202020-535d-4ffa-b7f3-4fa0d5da1b7a', - }, }, indexes: { searchVectorGinIndex: { @@ -2587,18 +2138,9 @@ export const STANDARD_OBJECTS = { workflowAutomatedTrigger: { universalIdentifier: '20202020-3319-4234-a34c-7f3b9d2e4d1f', fields: { - id: { - universalIdentifier: '20202020-f01a-4171-8a71-abcdefabcdef', - }, - createdAt: { - universalIdentifier: '20202020-f01b-4172-9b72-bcdefabcdefa', - }, - updatedAt: { - universalIdentifier: '20202020-f01c-4173-8c73-cdefabcdefab', - }, - deletedAt: { - universalIdentifier: '20202020-f01d-4174-9d74-defabcdefabc', - }, + ...buildStandardObjectSystemFields( + '20202020-3319-4234-a34c-7f3b9d2e4d1f', + ), type: { universalIdentifier: '20202020-3319-4234-a34c-3f92c1ab56e7', }, @@ -2608,18 +2150,6 @@ export const STANDARD_OBJECTS = { workflow: { universalIdentifier: '20202020-3319-4234-a34c-8e1a4d2f7c03', }, - createdBy: { - universalIdentifier: '5cea2f46-3779-4782-9fce-3062652e2dfd', - }, - updatedBy: { - universalIdentifier: '017d3587-98bd-43ad-b5a6-cb8125105641', - }, - position: { - universalIdentifier: 'f4c5eb0a-8a86-49a2-a775-941eaad98fc9', - }, - searchVector: { - universalIdentifier: 'dae934ca-bfca-4101-8211-8eae6e2b5513', - }, }, indexes: { workflowIdIndex: { @@ -2671,16 +2201,9 @@ export const STANDARD_OBJECTS = { workflowRun: { universalIdentifier: '20202020-4e28-4e95-a9d7-6c00874f843c', fields: { - id: { universalIdentifier: '20202020-f03a-4191-8a91-cdefabcdefab' }, - createdAt: { - universalIdentifier: '20202020-f03b-4192-9b92-defabcdefabc', - }, - updatedAt: { - universalIdentifier: '20202020-f03c-4193-8c93-efabcdefabcd', - }, - deletedAt: { - universalIdentifier: '20202020-f03d-4194-9d94-fabcdefabcde', - }, + ...buildStandardObjectSystemFields( + '20202020-4e28-4e95-a9d7-6c00874f843c', + ), name: { universalIdentifier: '20202020-b840-4253-aef9-4e5013694587' }, workflowVersion: { universalIdentifier: '20202020-2f52-4ba8-8dc4-d0d6adb9578d', @@ -2696,15 +2219,6 @@ export const STANDARD_OBJECTS = { }, endedAt: { universalIdentifier: '20202020-e1c1-4b6b-bbbd-b2beaf2e159e' }, status: { universalIdentifier: '20202020-6b3e-4f9c-8c2b-2e5b8e6d6f3b' }, - position: { - universalIdentifier: '20202020-7802-4c40-ae89-1f506fe3365c', - }, - createdBy: { - universalIdentifier: '20202020-6007-401a-8aa5-e6f38581a6f3', - }, - updatedBy: { - universalIdentifier: '730dc1c9-34f5-4c22-84a6-bcb55b7604e2', - }, state: { universalIdentifier: '20202020-611f-45f3-9cde-d64927e8ec57' }, stepLogs: { universalIdentifier: '20202020-7c4e-4e1a-8fc1-1e3a55d6c2a1', @@ -2712,9 +2226,6 @@ export const STANDARD_OBJECTS = { timelineActivities: { universalIdentifier: '20202020-af4d-4eb0-babc-eb960a45b356', }, - searchVector: { - universalIdentifier: '20202020-0b91-4ded-b1ac-cbd5efa58cb9', - }, }, indexes: { workflowVersionIdIndex: { @@ -2805,16 +2316,9 @@ export const STANDARD_OBJECTS = { workflowVersion: { universalIdentifier: '20202020-d65d-4ab9-9344-d77bfb376a3d', fields: { - id: { universalIdentifier: '20202020-f04a-41a1-8aa1-abcdefabcdef' }, - createdAt: { - universalIdentifier: '20202020-f04b-41a2-9ba2-bcdefabcdefa', - }, - updatedAt: { - universalIdentifier: '20202020-f04c-41a3-8ca3-cdefabcdefab', - }, - deletedAt: { - universalIdentifier: '20202020-f04d-41a4-9da4-defabcdefabc', - }, + ...buildStandardObjectSystemFields( + '20202020-d65d-4ab9-9344-d77bfb376a3d', + ), name: { universalIdentifier: '20202020-a12f-4cca-9937-a2e40cc65509' }, workflow: { universalIdentifier: '20202020-afa3-46c3-91b0-0631ca6aa1c8', @@ -2825,23 +2329,11 @@ export const STANDARD_OBJECTS = { status: { universalIdentifier: '20202020-5a34-440e-8a25-39d8c3d1d4cf', }, - position: { - universalIdentifier: '20202020-791d-4950-ab28-0e704767ae1c', - }, runs: { universalIdentifier: '20202020-1d08-46df-901a-85045f18099a' }, steps: { universalIdentifier: '20202020-5988-4a64-b94a-1f9b7b989039' }, timelineActivities: { universalIdentifier: '20202020-fcb0-4695-b17e-3b43a421c633', }, - searchVector: { - universalIdentifier: '20202020-3f17-44ef-b8c1-b282ae8469b2', - }, - createdBy: { - universalIdentifier: '34f592a7-5c13-4c8b-8473-7bef00848b4e', - }, - updatedBy: { - universalIdentifier: '4f8777e6-c5eb-40c6-bb4c-ed9dcf0d81e9', - }, }, indexes: { workflowIdIndex: { @@ -2920,19 +2412,9 @@ export const STANDARD_OBJECTS = { workspaceMember: { universalIdentifier: '20202020-3319-4234-a34c-82d5c0e881a6', fields: { - id: { universalIdentifier: '20202020-fb1a-41b1-8ab1-efabcdefabcd' }, - createdAt: { - universalIdentifier: '20202020-fb1b-41b2-9bb2-fabcdefabcde', - }, - updatedAt: { - universalIdentifier: '20202020-fb1c-41b3-8cb3-abcdefabcdef', - }, - deletedAt: { - universalIdentifier: '20202020-fb1d-41b4-9db4-bcdefabcdefa', - }, - position: { - universalIdentifier: '20202020-1810-4591-a93c-d0df97dca843', - }, + ...buildStandardObjectSystemFields( + '20202020-3319-4234-a34c-82d5c0e881a6', + ), name: { universalIdentifier: '20202020-e914-43a6-9c26-3603c59065f4' }, colorScheme: { universalIdentifier: '20202020-66bc-47f2-adac-f2ef7c598b63', @@ -2982,21 +2464,12 @@ export const STANDARD_OBJECTS = { timeFormat: { universalIdentifier: '20202020-8acb-4cf8-a851-a6ed443c8d81', }, - searchVector: { - universalIdentifier: '20202020-46d0-4e7f-bc26-74c0edaeb619', - }, calendarStartDay: { universalIdentifier: '20202020-1ecc-4562-84c9-ff3a2f6cce85', }, numberFormat: { universalIdentifier: '20202020-7f40-4e7f-b126-11c0eda6b141', }, - createdBy: { - universalIdentifier: '4a3f26d1-033e-4d84-b23a-9adc2fd0c2a8', - }, - updatedBy: { - universalIdentifier: '29f84ad0-509f-4aef-9f9c-2691dd60cd87', - }, }, indexes: { userEmailUniqueIndex: { diff --git a/packages/twenty-shared/src/metadata/utils/internal/build-standard-object-system-fields.util.ts b/packages/twenty-shared/src/metadata/utils/internal/build-standard-object-system-fields.util.ts new file mode 100644 index 0000000000..e41c119616 --- /dev/null +++ b/packages/twenty-shared/src/metadata/utils/internal/build-standard-object-system-fields.util.ts @@ -0,0 +1,38 @@ +import { TWENTY_STANDARD_APPLICATION_UNIVERSAL_IDENTIFIER } from '@/application/constants/TwentyStandardApplicationUniversalIdentifier'; +import { getFieldUniversalIdentifier } from '@/application/deterministic-identifier/get-field-universal-identifier.util'; + +export const STANDARD_OBJECT_SYSTEM_FIELD_NAMES = [ + 'id', + 'createdAt', + 'updatedAt', + 'deletedAt', + 'createdBy', + 'updatedBy', + 'position', + 'searchVector', +] as const; + +type StandardObjectSystemFieldName = + (typeof STANDARD_OBJECT_SYSTEM_FIELD_NAMES)[number]; + +// System field universal identifiers are deterministically derived from the +// standard application universal identifier, the object universal identifier +// and the field name. Renaming a system field therefore changes its +// universal identifier and must never happen without a coordinated backfill +// of existing workspaces. +export const buildStandardObjectSystemFields = ( + objectUniversalIdentifier: string, +): Record => + Object.fromEntries( + STANDARD_OBJECT_SYSTEM_FIELD_NAMES.map((fieldName) => [ + fieldName, + { + universalIdentifier: getFieldUniversalIdentifier({ + applicationUniversalIdentifier: + TWENTY_STANDARD_APPLICATION_UNIVERSAL_IDENTIFIER, + objectUniversalIdentifier, + name: fieldName, + }), + }, + ]), + ) as Record;