From c775d659529feddd24fde097252cf903bd5d8a4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Malfait?= Date: Mon, 16 Feb 2026 13:34:56 +0100 Subject: [PATCH] feat: configure standard views and migrate attachment seeds to FILES field (#17958) ## Summary - Add default visible view fields for `timelineActivity`, `attachment`, `noteTarget`, `taskTarget`, and `workspaceMember` objects so they display useful columns out of the box - Standardize morph relation field labels to "Target" with `IconArrowUpRight` for consistency across all pivot/junction tables - Mark deprecated fields (`fullPath`, `fileCategory`, `linkedRecordCachedName`, `linkedRecordId`, `linkedObjectMetadataId`) as `isSystem` to hide them from the UI column picker - Fix morph field deduplication logic (`pickMorphGroupSurvivor`) to prefer active, non-system fields over auto-generated system fields from custom objects - Migrate attachment seeds from legacy `fullPath`/`fileCategory` to the new `FILES` field type, creating proper `FileEntity` records in `core.file` via `fileStorageService.writeFile()` - Restore `customDomain` in the user query fragment Screenshot 2026-02-15 at 15 44 27 Screenshot 2026-02-15 at 15 44 13 Screenshot 2026-02-15 at 15 44 03 Screenshot 2026-02-15 at 15 43 52 Screenshot 2026-02-15 at 15 43 38 --- > [!NOTE] > **Medium Risk** > Touches migration/upgrade commands that write to core metadata tables and adjust field/view definitions, plus changes dev seeding to create `core.file` records; mistakes could affect UI visibility or seed integrity across workspaces. > > **Overview** > Adds a new `upgrade:1-18:backfill-standard-views-and-field-metadata` command that, per workspace, marks specific fields as `isSystem`, normalizes morph-relation field `label`/`icon` to `Target`/`IconArrowUpRight`, and backfills missing standard `view`/`viewField` rows for `attachment`, `noteTarget`, `taskTarget`, `timelineActivity`, and `workspaceMember`, followed by cache invalidation + metadata version bump. > > Refactors morph-relation deduplication to pick a single survivor per `morphId` using a new `pickMorphGroupSurvivor` rule (prefer active + non-system, then smallest id), with new unit tests. > > Updates standard metadata generators and snapshots to reflect the new system flags and default view fields, and rewrites attachment dev seeding to populate the new `file` (FILES field) JSON and create corresponding `core.file` entries via `FileStorageService.writeFile` with workspace-scoped file IDs. > > Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit b1939bbf6f8cce294f9b4cdec06b19778daa205e. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot). --------- Co-authored-by: Cursor Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> --- ...andard-views-and-field-metadata.command.ts | 753 ++++++ .../1-18-upgrade-version-command.module.ts | 7 + .../upgrade.command.ts | 3 + ...rph-relation-duplicate-fields.util.spec.ts | 103 + .../pick-morph-group-survivor.util.spec.ts | 85 + ...er-morph-relation-duplicate-fields.util.ts | 70 +- .../utils/pick-morph-group-survivor.util.ts | 19 + .../view/tools/view-tools.factory.ts | 13 +- .../attachment-data-seeds.constant.ts | 282 +-- .../data/services/dev-seeder-data.service.ts | 93 +- ...adata-related-entity-ids.util.spec.ts.snap | 2108 +++++++++-------- ...hment-standard-flat-field-metadata.util.ts | 44 +- ...arget-standard-flat-field-metadata.util.ts | 18 +- ...arget-standard-flat-field-metadata.util.ts | 18 +- ...ivity-standard-flat-field-metadata.util.ts | 57 +- ...ember-standard-flat-field-metadata.util.ts | 6 + ...dard-flat-view-field-metadata-maps.util.ts | 10 + ...te-standard-attachment-view-fields.util.ts | 145 ++ ...e-standard-note-target-view-fields.util.ts | 74 + ...e-standard-task-target-view-fields.util.ts | 74 + ...dard-timeline-activity-view-fields.util.ts | 162 ++ ...ndard-workspace-member-view-fields.util.ts | 60 + ...d-standard-flat-view-metadata-maps.util.ts | 10 + .../compute-standard-attachment-views.util.ts | 26 + ...compute-standard-note-target-views.util.ts | 26 + ...compute-standard-task-target-views.util.ts | 26 + ...e-standard-timeline-activity-views.util.ts | 26 + ...te-standard-workspace-member-views.util.ts | 26 + .../src/metadata/standard-object.constant.ts | 117 + 29 files changed, 3153 insertions(+), 1308 deletions(-) create mode 100644 packages/twenty-server/src/database/commands/upgrade-version-command/1-18/1-18-backfill-standard-views-and-field-metadata.command.ts create mode 100644 packages/twenty-server/src/engine/dataloaders/utils/__tests__/filter-morph-relation-duplicate-fields.util.spec.ts create mode 100644 packages/twenty-server/src/engine/dataloaders/utils/__tests__/pick-morph-group-survivor.util.spec.ts create mode 100644 packages/twenty-server/src/engine/dataloaders/utils/pick-morph-group-survivor.util.ts create mode 100644 packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-attachment-view-fields.util.ts create mode 100644 packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-note-target-view-fields.util.ts create mode 100644 packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-task-target-view-fields.util.ts create mode 100644 packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-timeline-activity-view-fields.util.ts create mode 100644 packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-workspace-member-view-fields.util.ts create mode 100644 packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view/compute-standard-attachment-views.util.ts create mode 100644 packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view/compute-standard-note-target-views.util.ts create mode 100644 packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view/compute-standard-task-target-views.util.ts create mode 100644 packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view/compute-standard-timeline-activity-views.util.ts create mode 100644 packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view/compute-standard-workspace-member-views.util.ts diff --git a/packages/twenty-server/src/database/commands/upgrade-version-command/1-18/1-18-backfill-standard-views-and-field-metadata.command.ts b/packages/twenty-server/src/database/commands/upgrade-version-command/1-18/1-18-backfill-standard-views-and-field-metadata.command.ts new file mode 100644 index 00000000000..66f07c267b5 --- /dev/null +++ b/packages/twenty-server/src/database/commands/upgrade-version-command/1-18/1-18-backfill-standard-views-and-field-metadata.command.ts @@ -0,0 +1,753 @@ +import { InjectDataSource, InjectRepository } from '@nestjs/typeorm'; + +import { Command } from 'nest-commander'; +import { STANDARD_OBJECTS } from 'twenty-shared/metadata'; +import { DataSource, Repository } from 'typeorm'; + +import { ActiveOrSuspendedWorkspacesMigrationCommandRunner } from 'src/database/commands/command-runners/active-or-suspended-workspaces-migration.command-runner'; +import { RunOnWorkspaceArgs } from 'src/database/commands/command-runners/workspaces-migration.command-runner'; +import { WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.entity'; +import { DataSourceService } from 'src/engine/metadata-modules/data-source/data-source.service'; +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 { WorkspaceMetadataVersionService } from 'src/engine/metadata-modules/workspace-metadata-version/services/workspace-metadata-version.service'; +import { GlobalWorkspaceOrmManager } from 'src/engine/twenty-orm/global-workspace-datasource/global-workspace-orm.manager'; +import { WorkspaceCacheStorageService } from 'src/engine/workspace-cache-storage/workspace-cache-storage.service'; +import { WorkspaceCacheService } from 'src/engine/workspace-cache/services/workspace-cache.service'; +import { type WorkspaceCacheKeyName } from 'src/engine/workspace-cache/types/workspace-cache-key.type'; +import { TWENTY_STANDARD_APPLICATION } from 'src/engine/workspace-manager/twenty-standard-application/constants/twenty-standard-applications'; + +// Fields that should be marked as isSystem: true +const FIELDS_TO_MARK_AS_SYSTEM = [ + // attachment: deprecated fields + STANDARD_OBJECTS.attachment.fields.fullPath.universalIdentifier, + STANDARD_OBJECTS.attachment.fields.fileCategory.universalIdentifier, + // timelineActivity: linked record fields + STANDARD_OBJECTS.timelineActivity.fields.linkedRecordCachedName + .universalIdentifier, + STANDARD_OBJECTS.timelineActivity.fields.linkedRecordId.universalIdentifier, + STANDARD_OBJECTS.timelineActivity.fields.linkedObjectMetadataId + .universalIdentifier, + // workspaceMember: relational fields + STANDARD_OBJECTS.workspaceMember.fields.favorites.universalIdentifier, + STANDARD_OBJECTS.workspaceMember.fields.accountOwnerForCompanies + .universalIdentifier, + STANDARD_OBJECTS.workspaceMember.fields.connectedAccounts.universalIdentifier, + STANDARD_OBJECTS.workspaceMember.fields.messageParticipants + .universalIdentifier, + STANDARD_OBJECTS.workspaceMember.fields.blocklist.universalIdentifier, + STANDARD_OBJECTS.workspaceMember.fields.calendarEventParticipants + .universalIdentifier, +]; + +// Morph target fields that should have label "Target" and icon "IconArrowUpRight" +const MORPH_FIELDS_TO_RELABEL = [ + // attachment + STANDARD_OBJECTS.attachment.fields.targetTask.universalIdentifier, + STANDARD_OBJECTS.attachment.fields.targetNote.universalIdentifier, + STANDARD_OBJECTS.attachment.fields.targetPerson.universalIdentifier, + STANDARD_OBJECTS.attachment.fields.targetCompany.universalIdentifier, + STANDARD_OBJECTS.attachment.fields.targetOpportunity.universalIdentifier, + STANDARD_OBJECTS.attachment.fields.targetDashboard.universalIdentifier, + STANDARD_OBJECTS.attachment.fields.targetWorkflow.universalIdentifier, + // noteTarget + STANDARD_OBJECTS.noteTarget.fields.targetPerson.universalIdentifier, + STANDARD_OBJECTS.noteTarget.fields.targetCompany.universalIdentifier, + STANDARD_OBJECTS.noteTarget.fields.targetOpportunity.universalIdentifier, + // taskTarget + STANDARD_OBJECTS.taskTarget.fields.targetPerson.universalIdentifier, + STANDARD_OBJECTS.taskTarget.fields.targetCompany.universalIdentifier, + STANDARD_OBJECTS.taskTarget.fields.targetOpportunity.universalIdentifier, + // timelineActivity + STANDARD_OBJECTS.timelineActivity.fields.targetPerson.universalIdentifier, + STANDARD_OBJECTS.timelineActivity.fields.targetCompany.universalIdentifier, + STANDARD_OBJECTS.timelineActivity.fields.targetOpportunity + .universalIdentifier, + STANDARD_OBJECTS.timelineActivity.fields.targetTask.universalIdentifier, + STANDARD_OBJECTS.timelineActivity.fields.targetNote.universalIdentifier, + STANDARD_OBJECTS.timelineActivity.fields.targetWorkflow.universalIdentifier, + STANDARD_OBJECTS.timelineActivity.fields.targetWorkflowVersion + .universalIdentifier, + STANDARD_OBJECTS.timelineActivity.fields.targetWorkflowRun + .universalIdentifier, + STANDARD_OBJECTS.timelineActivity.fields.targetDashboard.universalIdentifier, +]; + +interface ViewFieldDef { + fieldUI: string; + viewFieldUI: string; + position: number; +} + +interface ViewToBackfill { + objectUI: string; + viewName: string; + viewIcon: string; + viewUI: string; + viewFields: ViewFieldDef[]; +} + +const VIEWS_TO_BACKFILL: ViewToBackfill[] = [ + { + objectUI: STANDARD_OBJECTS.attachment.universalIdentifier, + viewName: 'All Attachments', + viewIcon: 'IconList', + viewUI: + STANDARD_OBJECTS.attachment.views.allAttachments.universalIdentifier, + viewFields: [ + { + fieldUI: STANDARD_OBJECTS.attachment.fields.name.universalIdentifier, + viewFieldUI: + STANDARD_OBJECTS.attachment.views.allAttachments.viewFields.name + .universalIdentifier, + position: 0, + }, + { + fieldUI: STANDARD_OBJECTS.attachment.fields.file.universalIdentifier, + viewFieldUI: + STANDARD_OBJECTS.attachment.views.allAttachments.viewFields.file + .universalIdentifier, + position: 1, + }, + { + fieldUI: + STANDARD_OBJECTS.attachment.fields.targetPerson.universalIdentifier, + viewFieldUI: + STANDARD_OBJECTS.attachment.views.allAttachments.viewFields + .targetPerson.universalIdentifier, + position: 2, + }, + { + fieldUI: + STANDARD_OBJECTS.attachment.fields.targetCompany.universalIdentifier, + viewFieldUI: + STANDARD_OBJECTS.attachment.views.allAttachments.viewFields + .targetCompany.universalIdentifier, + position: 3, + }, + { + fieldUI: + STANDARD_OBJECTS.attachment.fields.targetOpportunity + .universalIdentifier, + viewFieldUI: + STANDARD_OBJECTS.attachment.views.allAttachments.viewFields + .targetOpportunity.universalIdentifier, + position: 4, + }, + { + fieldUI: + STANDARD_OBJECTS.attachment.fields.targetTask.universalIdentifier, + viewFieldUI: + STANDARD_OBJECTS.attachment.views.allAttachments.viewFields.targetTask + .universalIdentifier, + position: 5, + }, + { + fieldUI: + STANDARD_OBJECTS.attachment.fields.targetNote.universalIdentifier, + viewFieldUI: + STANDARD_OBJECTS.attachment.views.allAttachments.viewFields.targetNote + .universalIdentifier, + position: 6, + }, + { + fieldUI: + STANDARD_OBJECTS.attachment.fields.targetDashboard + .universalIdentifier, + viewFieldUI: + STANDARD_OBJECTS.attachment.views.allAttachments.viewFields + .targetDashboard.universalIdentifier, + position: 7, + }, + { + fieldUI: + STANDARD_OBJECTS.attachment.fields.targetWorkflow.universalIdentifier, + viewFieldUI: + STANDARD_OBJECTS.attachment.views.allAttachments.viewFields + .targetWorkflow.universalIdentifier, + position: 8, + }, + { + fieldUI: + STANDARD_OBJECTS.attachment.fields.createdBy.universalIdentifier, + viewFieldUI: + STANDARD_OBJECTS.attachment.views.allAttachments.viewFields.createdBy + .universalIdentifier, + position: 9, + }, + { + fieldUI: + STANDARD_OBJECTS.attachment.fields.createdAt.universalIdentifier, + viewFieldUI: + STANDARD_OBJECTS.attachment.views.allAttachments.viewFields.createdAt + .universalIdentifier, + position: 10, + }, + ], + }, + { + objectUI: STANDARD_OBJECTS.noteTarget.universalIdentifier, + viewName: 'All Note Targets', + viewIcon: 'IconList', + viewUI: + STANDARD_OBJECTS.noteTarget.views.allNoteTargets.universalIdentifier, + viewFields: [ + { + fieldUI: STANDARD_OBJECTS.noteTarget.fields.id.universalIdentifier, + viewFieldUI: + STANDARD_OBJECTS.noteTarget.views.allNoteTargets.viewFields.id + .universalIdentifier, + position: 0, + }, + { + fieldUI: STANDARD_OBJECTS.noteTarget.fields.note.universalIdentifier, + viewFieldUI: + STANDARD_OBJECTS.noteTarget.views.allNoteTargets.viewFields.note + .universalIdentifier, + position: 1, + }, + { + fieldUI: + STANDARD_OBJECTS.noteTarget.fields.targetPerson.universalIdentifier, + viewFieldUI: + STANDARD_OBJECTS.noteTarget.views.allNoteTargets.viewFields + .targetPerson.universalIdentifier, + position: 2, + }, + { + fieldUI: + STANDARD_OBJECTS.noteTarget.fields.targetCompany.universalIdentifier, + viewFieldUI: + STANDARD_OBJECTS.noteTarget.views.allNoteTargets.viewFields + .targetCompany.universalIdentifier, + position: 3, + }, + { + fieldUI: + STANDARD_OBJECTS.noteTarget.fields.targetOpportunity + .universalIdentifier, + viewFieldUI: + STANDARD_OBJECTS.noteTarget.views.allNoteTargets.viewFields + .targetOpportunity.universalIdentifier, + position: 4, + }, + ], + }, + { + objectUI: STANDARD_OBJECTS.taskTarget.universalIdentifier, + viewName: 'All Task Targets', + viewIcon: 'IconList', + viewUI: + STANDARD_OBJECTS.taskTarget.views.allTaskTargets.universalIdentifier, + viewFields: [ + { + fieldUI: STANDARD_OBJECTS.taskTarget.fields.id.universalIdentifier, + viewFieldUI: + STANDARD_OBJECTS.taskTarget.views.allTaskTargets.viewFields.id + .universalIdentifier, + position: 0, + }, + { + fieldUI: STANDARD_OBJECTS.taskTarget.fields.task.universalIdentifier, + viewFieldUI: + STANDARD_OBJECTS.taskTarget.views.allTaskTargets.viewFields.task + .universalIdentifier, + position: 1, + }, + { + fieldUI: + STANDARD_OBJECTS.taskTarget.fields.targetPerson.universalIdentifier, + viewFieldUI: + STANDARD_OBJECTS.taskTarget.views.allTaskTargets.viewFields + .targetPerson.universalIdentifier, + position: 2, + }, + { + fieldUI: + STANDARD_OBJECTS.taskTarget.fields.targetCompany.universalIdentifier, + viewFieldUI: + STANDARD_OBJECTS.taskTarget.views.allTaskTargets.viewFields + .targetCompany.universalIdentifier, + position: 3, + }, + { + fieldUI: + STANDARD_OBJECTS.taskTarget.fields.targetOpportunity + .universalIdentifier, + viewFieldUI: + STANDARD_OBJECTS.taskTarget.views.allTaskTargets.viewFields + .targetOpportunity.universalIdentifier, + position: 4, + }, + ], + }, + { + objectUI: STANDARD_OBJECTS.timelineActivity.universalIdentifier, + viewName: 'All Timeline Activities', + viewIcon: 'IconList', + viewUI: + STANDARD_OBJECTS.timelineActivity.views.allTimelineActivities + .universalIdentifier, + viewFields: [ + { + fieldUI: + STANDARD_OBJECTS.timelineActivity.fields.name.universalIdentifier, + viewFieldUI: + STANDARD_OBJECTS.timelineActivity.views.allTimelineActivities + .viewFields.name.universalIdentifier, + position: 0, + }, + { + fieldUI: + STANDARD_OBJECTS.timelineActivity.fields.happensAt + .universalIdentifier, + viewFieldUI: + STANDARD_OBJECTS.timelineActivity.views.allTimelineActivities + .viewFields.happensAt.universalIdentifier, + position: 1, + }, + { + fieldUI: + STANDARD_OBJECTS.timelineActivity.fields.targetPerson + .universalIdentifier, + viewFieldUI: + STANDARD_OBJECTS.timelineActivity.views.allTimelineActivities + .viewFields.targetPerson.universalIdentifier, + position: 2, + }, + { + fieldUI: + STANDARD_OBJECTS.timelineActivity.fields.targetCompany + .universalIdentifier, + viewFieldUI: + STANDARD_OBJECTS.timelineActivity.views.allTimelineActivities + .viewFields.targetCompany.universalIdentifier, + position: 3, + }, + { + fieldUI: + STANDARD_OBJECTS.timelineActivity.fields.targetOpportunity + .universalIdentifier, + viewFieldUI: + STANDARD_OBJECTS.timelineActivity.views.allTimelineActivities + .viewFields.targetOpportunity.universalIdentifier, + position: 4, + }, + { + fieldUI: + STANDARD_OBJECTS.timelineActivity.fields.targetTask + .universalIdentifier, + viewFieldUI: + STANDARD_OBJECTS.timelineActivity.views.allTimelineActivities + .viewFields.targetTask.universalIdentifier, + position: 5, + }, + { + fieldUI: + STANDARD_OBJECTS.timelineActivity.fields.targetNote + .universalIdentifier, + viewFieldUI: + STANDARD_OBJECTS.timelineActivity.views.allTimelineActivities + .viewFields.targetNote.universalIdentifier, + position: 6, + }, + { + fieldUI: + STANDARD_OBJECTS.timelineActivity.fields.targetWorkflow + .universalIdentifier, + viewFieldUI: + STANDARD_OBJECTS.timelineActivity.views.allTimelineActivities + .viewFields.targetWorkflow.universalIdentifier, + position: 7, + }, + { + fieldUI: + STANDARD_OBJECTS.timelineActivity.fields.targetWorkflowVersion + .universalIdentifier, + viewFieldUI: + STANDARD_OBJECTS.timelineActivity.views.allTimelineActivities + .viewFields.targetWorkflowVersion.universalIdentifier, + position: 8, + }, + { + fieldUI: + STANDARD_OBJECTS.timelineActivity.fields.targetWorkflowRun + .universalIdentifier, + viewFieldUI: + STANDARD_OBJECTS.timelineActivity.views.allTimelineActivities + .viewFields.targetWorkflowRun.universalIdentifier, + position: 9, + }, + { + fieldUI: + STANDARD_OBJECTS.timelineActivity.fields.targetDashboard + .universalIdentifier, + viewFieldUI: + STANDARD_OBJECTS.timelineActivity.views.allTimelineActivities + .viewFields.targetDashboard.universalIdentifier, + position: 10, + }, + { + fieldUI: + STANDARD_OBJECTS.timelineActivity.fields.workspaceMember + .universalIdentifier, + viewFieldUI: + STANDARD_OBJECTS.timelineActivity.views.allTimelineActivities + .viewFields.workspaceMember.universalIdentifier, + position: 11, + }, + { + fieldUI: + STANDARD_OBJECTS.timelineActivity.fields.properties + .universalIdentifier, + viewFieldUI: + STANDARD_OBJECTS.timelineActivity.views.allTimelineActivities + .viewFields.properties.universalIdentifier, + position: 12, + }, + { + fieldUI: + STANDARD_OBJECTS.timelineActivity.fields.linkedRecordCachedName + .universalIdentifier, + viewFieldUI: + STANDARD_OBJECTS.timelineActivity.views.allTimelineActivities + .viewFields.linkedRecordCachedName.universalIdentifier, + position: 13, + }, + ], + }, + { + objectUI: STANDARD_OBJECTS.workspaceMember.universalIdentifier, + viewName: 'All Workspace Members', + viewIcon: 'IconList', + viewUI: + STANDARD_OBJECTS.workspaceMember.views.allWorkspaceMembers + .universalIdentifier, + viewFields: [ + { + fieldUI: + STANDARD_OBJECTS.workspaceMember.fields.name.universalIdentifier, + viewFieldUI: + STANDARD_OBJECTS.workspaceMember.views.allWorkspaceMembers.viewFields + .name.universalIdentifier, + position: 0, + }, + { + fieldUI: + STANDARD_OBJECTS.workspaceMember.fields.userEmail.universalIdentifier, + viewFieldUI: + STANDARD_OBJECTS.workspaceMember.views.allWorkspaceMembers.viewFields + .userEmail.universalIdentifier, + position: 1, + }, + { + fieldUI: + STANDARD_OBJECTS.workspaceMember.fields.avatarUrl.universalIdentifier, + viewFieldUI: + STANDARD_OBJECTS.workspaceMember.views.allWorkspaceMembers.viewFields + .avatarUrl.universalIdentifier, + position: 2, + }, + { + fieldUI: + STANDARD_OBJECTS.workspaceMember.fields.colorScheme + .universalIdentifier, + viewFieldUI: + STANDARD_OBJECTS.workspaceMember.views.allWorkspaceMembers.viewFields + .colorScheme.universalIdentifier, + position: 3, + }, + { + fieldUI: + STANDARD_OBJECTS.workspaceMember.fields.locale.universalIdentifier, + viewFieldUI: + STANDARD_OBJECTS.workspaceMember.views.allWorkspaceMembers.viewFields + .locale.universalIdentifier, + position: 4, + }, + { + fieldUI: + STANDARD_OBJECTS.workspaceMember.fields.timeZone.universalIdentifier, + viewFieldUI: + STANDARD_OBJECTS.workspaceMember.views.allWorkspaceMembers.viewFields + .timeZone.universalIdentifier, + position: 5, + }, + { + fieldUI: + STANDARD_OBJECTS.workspaceMember.fields.dateFormat + .universalIdentifier, + viewFieldUI: + STANDARD_OBJECTS.workspaceMember.views.allWorkspaceMembers.viewFields + .dateFormat.universalIdentifier, + position: 6, + }, + { + fieldUI: + STANDARD_OBJECTS.workspaceMember.fields.timeFormat + .universalIdentifier, + viewFieldUI: + STANDARD_OBJECTS.workspaceMember.views.allWorkspaceMembers.viewFields + .timeFormat.universalIdentifier, + position: 7, + }, + { + fieldUI: + STANDARD_OBJECTS.workspaceMember.fields.createdAt.universalIdentifier, + viewFieldUI: + STANDARD_OBJECTS.workspaceMember.views.allWorkspaceMembers.viewFields + .createdAt.universalIdentifier, + position: 8, + }, + { + fieldUI: + STANDARD_OBJECTS.workspaceMember.fields.ownedOpportunities + .universalIdentifier, + viewFieldUI: + STANDARD_OBJECTS.workspaceMember.views.allWorkspaceMembers.viewFields + .ownedOpportunities.universalIdentifier, + position: 9, + }, + { + fieldUI: + STANDARD_OBJECTS.workspaceMember.fields.assignedTasks + .universalIdentifier, + viewFieldUI: + STANDARD_OBJECTS.workspaceMember.views.allWorkspaceMembers.viewFields + .assignedTasks.universalIdentifier, + position: 10, + }, + ], + }, +]; + +@Command({ + name: 'upgrade:1-18:backfill-standard-views-and-field-metadata', + description: + 'Backfill standard views and fix field metadata (isSystem, labels, icons) for attachment, noteTarget, taskTarget, timelineActivity, workspaceMember', +}) +export class BackfillStandardViewsAndFieldMetadataCommand extends ActiveOrSuspendedWorkspacesMigrationCommandRunner { + constructor( + @InjectRepository(WorkspaceEntity) + protected readonly workspaceRepository: Repository, + @InjectDataSource() + private readonly coreDataSource: DataSource, + protected readonly twentyORMGlobalManager: GlobalWorkspaceOrmManager, + protected readonly dataSourceService: DataSourceService, + private readonly workspaceCacheService: WorkspaceCacheService, + private readonly workspaceCacheStorageService: WorkspaceCacheStorageService, + private readonly workspaceMetadataVersionService: WorkspaceMetadataVersionService, + ) { + super(workspaceRepository, twentyORMGlobalManager, dataSourceService); + } + + override async runOnWorkspace({ + workspaceId, + options, + }: RunOnWorkspaceArgs): Promise { + const dryRun = options?.dryRun ?? false; + + this.logger.log( + `${dryRun ? '[DRY RUN] ' : ''}Backfilling views and field metadata for workspace ${workspaceId}`, + ); + + if (dryRun) { + this.logger.log( + `[DRY RUN] Would update isSystem, labels/icons, backfill views and viewFields for workspace ${workspaceId}. Skipping.`, + ); + + return; + } + + const queryRunner = this.coreDataSource.createQueryRunner(); + + await queryRunner.connect(); + await queryRunner.startTransaction(); + + try { + // Part 1: Mark fields as isSystem + const systemResult = await queryRunner.query( + `UPDATE core."fieldMetadata" + SET "isSystem" = true + WHERE "workspaceId" = $1 + AND "universalIdentifier" = ANY($2) + AND "isSystem" = false`, + [workspaceId, FIELDS_TO_MARK_AS_SYSTEM], + ); + + const systemCount = systemResult?.[1] ?? 0; + + if (systemCount > 0) { + this.logger.log( + `Marked ${systemCount} field(s) as isSystem for workspace ${workspaceId}`, + ); + } + + // Part 1b: Update morph field labels and icons to "Target" + const labelResult = await queryRunner.query( + `UPDATE core."fieldMetadata" + SET label = 'Target', icon = 'IconArrowUpRight' + WHERE "workspaceId" = $1 + AND "universalIdentifier" = ANY($2) + AND (label != 'Target' OR icon != 'IconArrowUpRight')`, + [workspaceId, MORPH_FIELDS_TO_RELABEL], + ); + + const labelCount = labelResult?.[1] ?? 0; + + if (labelCount > 0) { + this.logger.log( + `Relabeled ${labelCount} morph field(s) to "Target" for workspace ${workspaceId}`, + ); + } + + // Part 2: Resolve applicationId for twenty-standard app + const applicationRows = await queryRunner.query( + `SELECT id FROM core."application" + WHERE "workspaceId" = $1 + AND "universalIdentifier" = $2`, + [workspaceId, TWENTY_STANDARD_APPLICATION.universalIdentifier], + ); + + if (applicationRows.length === 0) { + this.logger.warn( + `Twenty Standard Application not found for workspace ${workspaceId}. Skipping view backfill.`, + ); + await queryRunner.commitTransaction(); + await this.invalidateCaches(workspaceId); + + return; + } + + const applicationId = applicationRows[0].id; + + // Part 3 & 4: Backfill views and viewFields + for (const view of VIEWS_TO_BACKFILL) { + // Insert view if it doesn't exist + const viewInsertResult = await queryRunner.query( + `INSERT INTO core."view" ( + id, name, "objectMetadataId", type, icon, position, + visibility, "workspaceId", "applicationId", "universalIdentifier" + ) + SELECT + gen_random_uuid(), $2, om.id, 'TABLE', $3, 0, + 'WORKSPACE', $1, $4, $5 + FROM core."objectMetadata" om + WHERE om."workspaceId" = $1 + AND om."universalIdentifier" = $6 + AND NOT EXISTS ( + SELECT 1 FROM core."view" v + WHERE v."workspaceId" = $1 + AND v."universalIdentifier" = $5 + AND v."deletedAt" IS NULL + ) + RETURNING 1`, + [ + workspaceId, + view.viewName, + view.viewIcon, + applicationId, + view.viewUI, + view.objectUI, + ], + ); + + const viewInserted = viewInsertResult?.length ?? 0; + + if (viewInserted > 0) { + this.logger.log( + `Created view "${view.viewName}" for workspace ${workspaceId}`, + ); + } + + // Insert viewFields + for (const viewField of view.viewFields) { + await queryRunner.query( + `INSERT INTO core."viewField" ( + id, "fieldMetadataId", "isVisible", size, position, + "viewId", "workspaceId", "applicationId", "universalIdentifier" + ) + SELECT + gen_random_uuid(), fm.id, true, 150, $4, + v.id, $1, $5, $6 + FROM core."view" v + JOIN core."fieldMetadata" fm + ON fm."workspaceId" = $1 + AND fm."universalIdentifier" = $3 + WHERE v."workspaceId" = $1 + AND v."universalIdentifier" = $2 + AND v."deletedAt" IS NULL + AND NOT EXISTS ( + SELECT 1 FROM core."viewField" vf + WHERE vf."workspaceId" = $1 + AND vf."universalIdentifier" = $6 + AND vf."deletedAt" IS NULL + )`, + [ + workspaceId, + view.viewUI, + viewField.fieldUI, + viewField.position, + applicationId, + viewField.viewFieldUI, + ], + ); + } + } + + await queryRunner.commitTransaction(); + + this.logger.log(`Completed for workspace ${workspaceId}`); + + await this.invalidateCaches(workspaceId); + } catch (error) { + if (queryRunner.isTransactionActive) { + await queryRunner.rollbackTransaction(); + this.logger.error( + `Error backfilling views and field metadata (rolled back) for workspace ${workspaceId}`, + error, + ); + } else { + this.logger.error( + `Error backfilling views and field metadata (after commit) for workspace ${workspaceId}`, + error, + ); + } + throw error; + } finally { + await queryRunner.release(); + } + } + + private async invalidateCaches(workspaceId: string): Promise { + const modifiedMetadataNames = [ + 'fieldMetadata', + 'view', + 'viewField', + ] as const; + + const cacheKeysToInvalidate: WorkspaceCacheKeyName[] = [ + ...new Set( + modifiedMetadataNames + .flatMap((name) => [name, ...getMetadataRelatedMetadataNames(name)]) + .map(getMetadataFlatEntityMapsKey), + ), + 'ORMEntityMetadatas', + ]; + + await this.workspaceCacheService.invalidateAndRecompute( + workspaceId, + cacheKeysToInvalidate, + ); + + await this.workspaceMetadataVersionService.incrementMetadataVersion( + workspaceId, + ); + + await this.workspaceCacheStorageService.flush(workspaceId); + + this.logger.log( + `Cache invalidated and metadata version incremented for workspace ${workspaceId}`, + ); + } +} diff --git a/packages/twenty-server/src/database/commands/upgrade-version-command/1-18/1-18-upgrade-version-command.module.ts b/packages/twenty-server/src/database/commands/upgrade-version-command/1-18/1-18-upgrade-version-command.module.ts index d41d68a7fec..613b03333c2 100644 --- a/packages/twenty-server/src/database/commands/upgrade-version-command/1-18/1-18-upgrade-version-command.module.ts +++ b/packages/twenty-server/src/database/commands/upgrade-version-command/1-18/1-18-upgrade-version-command.module.ts @@ -3,6 +3,7 @@ import { TypeOrmModule } from '@nestjs/typeorm'; import { BackfillFileSizeAndMimeTypeCommand } from 'src/database/commands/upgrade-version-command/1-18/1-18-backfill-file-size-and-mime-type.command'; import { BackfillMessageChannelThrottleRetryAfterCommand } from 'src/database/commands/upgrade-version-command/1-18/1-18-backfill-message-channel-throttle-retry-after.command'; +import { BackfillStandardViewsAndFieldMetadataCommand } from 'src/database/commands/upgrade-version-command/1-18/1-18-backfill-standard-views-and-field-metadata.command'; import { MigrateActivityRichTextAttachmentFileIdsCommand } from 'src/database/commands/upgrade-version-command/1-18/1-18-migrate-activity-rich-text-attachment-file-ids.command'; import { MigrateAttachmentFilesCommand } from 'src/database/commands/upgrade-version-command/1-18/1-18-migrate-attachment-files.command'; import { MigratePersonAvatarFilesCommand } from 'src/database/commands/upgrade-version-command/1-18/1-18-migrate-person-avatar-files.command'; @@ -15,6 +16,8 @@ import { FilesFieldModule } from 'src/engine/core-modules/file/files-field/files import { WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.entity'; import { DataSourceModule } from 'src/engine/metadata-modules/data-source/data-source.module'; import { FieldMetadataModule } from 'src/engine/metadata-modules/field-metadata/field-metadata.module'; +import { WorkspaceMetadataVersionModule } from 'src/engine/metadata-modules/workspace-metadata-version/workspace-metadata-version.module'; +import { WorkspaceCacheStorageModule } from 'src/engine/workspace-cache-storage/workspace-cache-storage.module'; import { WorkspaceCacheModule } from 'src/engine/workspace-cache/workspace-cache.module'; import { AttachmentWorkspaceEntity } from 'src/modules/attachment/standard-objects/attachment.workspace-entity'; import { PersonWorkspaceEntity } from 'src/modules/person/standard-objects/person.workspace-entity'; @@ -32,6 +35,8 @@ import { PersonWorkspaceEntity } from 'src/modules/person/standard-objects/perso FeatureFlagModule, FileStorageModule.forRoot(), WorkspaceCacheModule, + WorkspaceCacheStorageModule, + WorkspaceMetadataVersionModule, FieldMetadataModule, ApplicationModule, FilesFieldModule, @@ -42,6 +47,7 @@ import { PersonWorkspaceEntity } from 'src/modules/person/standard-objects/perso BackfillFileSizeAndMimeTypeCommand, MigrateActivityRichTextAttachmentFileIdsCommand, BackfillMessageChannelThrottleRetryAfterCommand, + BackfillStandardViewsAndFieldMetadataCommand, ], exports: [ MigratePersonAvatarFilesCommand, @@ -49,6 +55,7 @@ import { PersonWorkspaceEntity } from 'src/modules/person/standard-objects/perso BackfillFileSizeAndMimeTypeCommand, MigrateActivityRichTextAttachmentFileIdsCommand, BackfillMessageChannelThrottleRetryAfterCommand, + BackfillStandardViewsAndFieldMetadataCommand, ], }) export class V1_18_UpgradeVersionCommandModule {} diff --git a/packages/twenty-server/src/database/commands/upgrade-version-command/upgrade.command.ts b/packages/twenty-server/src/database/commands/upgrade-version-command/upgrade.command.ts index b3471c2f2d5..8d2b22eda04 100644 --- a/packages/twenty-server/src/database/commands/upgrade-version-command/upgrade.command.ts +++ b/packages/twenty-server/src/database/commands/upgrade-version-command/upgrade.command.ts @@ -21,6 +21,7 @@ import { MigrateTaskTargetToMorphRelationsCommand } from 'src/database/commands/ import { MigrateWorkflowCodeStepsCommand } from 'src/database/commands/upgrade-version-command/1-17/1-17-migrate-workflow-code-steps.command'; import { BackfillFileSizeAndMimeTypeCommand } from 'src/database/commands/upgrade-version-command/1-18/1-18-backfill-file-size-and-mime-type.command'; import { BackfillMessageChannelThrottleRetryAfterCommand } from 'src/database/commands/upgrade-version-command/1-18/1-18-backfill-message-channel-throttle-retry-after.command'; +import { BackfillStandardViewsAndFieldMetadataCommand } from 'src/database/commands/upgrade-version-command/1-18/1-18-backfill-standard-views-and-field-metadata.command'; import { MigrateActivityRichTextAttachmentFileIdsCommand } from 'src/database/commands/upgrade-version-command/1-18/1-18-migrate-activity-rich-text-attachment-file-ids.command'; import { MigrateAttachmentFilesCommand } from 'src/database/commands/upgrade-version-command/1-18/1-18-migrate-attachment-files.command'; import { MigratePersonAvatarFilesCommand } from 'src/database/commands/upgrade-version-command/1-18/1-18-migrate-person-avatar-files.command'; @@ -61,6 +62,7 @@ export class UpgradeCommand extends UpgradeCommandRunner { protected readonly migrateAttachmentFilesCommand: MigrateAttachmentFilesCommand, protected readonly migrateActivityRichTextAttachmentFileIdsCommand: MigrateActivityRichTextAttachmentFileIdsCommand, protected readonly backfillMessageChannelThrottleRetryAfterCommand: BackfillMessageChannelThrottleRetryAfterCommand, + protected readonly backfillStandardViewsAndFieldMetadataCommand: BackfillStandardViewsAndFieldMetadataCommand, ) { super( workspaceRepository, @@ -92,6 +94,7 @@ export class UpgradeCommand extends UpgradeCommandRunner { this.migrateActivityRichTextAttachmentFileIdsCommand, this.backfillFileSizeAndMimeTypeCommand, this.backfillMessageChannelThrottleRetryAfterCommand, + this.backfillStandardViewsAndFieldMetadataCommand, ]; this.allCommands = { diff --git a/packages/twenty-server/src/engine/dataloaders/utils/__tests__/filter-morph-relation-duplicate-fields.util.spec.ts b/packages/twenty-server/src/engine/dataloaders/utils/__tests__/filter-morph-relation-duplicate-fields.util.spec.ts new file mode 100644 index 00000000000..333ea9ddfe2 --- /dev/null +++ b/packages/twenty-server/src/engine/dataloaders/utils/__tests__/filter-morph-relation-duplicate-fields.util.spec.ts @@ -0,0 +1,103 @@ +import { FieldMetadataType } from 'twenty-shared/types'; + +import { filterMorphRelationDuplicateFields } from 'src/engine/dataloaders/utils/filter-morph-relation-duplicate-fields.util'; +import { type FlatFieldMetadata } from 'src/engine/metadata-modules/flat-field-metadata/types/flat-field-metadata.type'; + +const makeMorphField = ( + overrides: Partial> & { + id: string; + morphId: string; + }, +): FlatFieldMetadata => + ({ + type: FieldMetadataType.MORPH_RELATION, + isActive: true, + isSystem: false, + ...overrides, + }) as FlatFieldMetadata; + +const makeTextField = (id: string): FlatFieldMetadata => + ({ + id, + type: FieldMetadataType.TEXT, + }) as FlatFieldMetadata; + +describe('filterMorphRelationDuplicateFields', () => { + it('should return all fields when there are no morph fields', () => { + const fields = [makeTextField('t1'), makeTextField('t2')]; + + expect(filterMorphRelationDuplicateFields(fields)).toEqual(fields); + }); + + it('should return all fields when morph fields have distinct morphIds', () => { + const morph1 = makeMorphField({ id: 'a', morphId: 'morph-1' }); + const morph2 = makeMorphField({ id: 'b', morphId: 'morph-2' }); + const text = makeTextField('t1'); + + const result = filterMorphRelationDuplicateFields([morph1, text, morph2]); + + expect(result).toHaveLength(3); + expect(result).toContain(text); + expect(result).toContain(morph1); + expect(result).toContain(morph2); + }); + + it('should deduplicate morph fields sharing the same morphId', () => { + const standard = makeMorphField({ + id: 'b', + morphId: 'morph-1', + isSystem: false, + }); + const system = makeMorphField({ + id: 'a', + morphId: 'morph-1', + isSystem: true, + }); + const text = makeTextField('t1'); + + const result = filterMorphRelationDuplicateFields([system, text, standard]); + + expect(result).toHaveLength(2); + expect(result).toContain(text); + expect(result).toContain(standard); + expect(result).not.toContain(system); + }); + + it('should handle multiple morph groups independently', () => { + const group1Best = makeMorphField({ + id: 'a', + morphId: 'morph-1', + isSystem: false, + }); + const group1Dup = makeMorphField({ + id: 'b', + morphId: 'morph-1', + isSystem: true, + }); + const group2Best = makeMorphField({ + id: 'c', + morphId: 'morph-2', + isSystem: false, + }); + const group2Dup = makeMorphField({ + id: 'd', + morphId: 'morph-2', + isSystem: true, + }); + + const result = filterMorphRelationDuplicateFields([ + group1Dup, + group2Dup, + group1Best, + group2Best, + ]); + + expect(result).toHaveLength(2); + expect(result).toContain(group1Best); + expect(result).toContain(group2Best); + }); + + it('should return empty array for empty input', () => { + expect(filterMorphRelationDuplicateFields([])).toEqual([]); + }); +}); diff --git a/packages/twenty-server/src/engine/dataloaders/utils/__tests__/pick-morph-group-survivor.util.spec.ts b/packages/twenty-server/src/engine/dataloaders/utils/__tests__/pick-morph-group-survivor.util.spec.ts new file mode 100644 index 00000000000..702f5627559 --- /dev/null +++ b/packages/twenty-server/src/engine/dataloaders/utils/__tests__/pick-morph-group-survivor.util.spec.ts @@ -0,0 +1,85 @@ +import { FieldMetadataType } from 'twenty-shared/types'; + +import { type FlatFieldMetadata } from 'src/engine/metadata-modules/flat-field-metadata/types/flat-field-metadata.type'; +import { pickMorphGroupSurvivor } from 'src/engine/dataloaders/utils/pick-morph-group-survivor.util'; + +const makeMorphField = ( + overrides: Partial> & { + id: string; + }, +): FlatFieldMetadata => + ({ + type: FieldMetadataType.MORPH_RELATION, + isActive: true, + isSystem: false, + morphId: 'morph-1', + ...overrides, + }) as FlatFieldMetadata; + +describe('pickMorphGroupSurvivor', () => { + it('should return the only field when group has one element', () => { + const field = makeMorphField({ id: 'a' }); + + expect(pickMorphGroupSurvivor([field])).toBe(field); + }); + + it('should prefer active non-system over active system', () => { + const standard = makeMorphField({ + id: 'b', + isActive: true, + isSystem: false, + }); + const system = makeMorphField({ + id: 'a', + isActive: true, + isSystem: true, + }); + + expect(pickMorphGroupSurvivor([system, standard])).toBe(standard); + }); + + it('should prefer active over inactive', () => { + const active = makeMorphField({ + id: 'b', + isActive: true, + isSystem: true, + }); + const inactive = makeMorphField({ + id: 'a', + isActive: false, + isSystem: false, + }); + + expect(pickMorphGroupSurvivor([inactive, active])).toBe(active); + }); + + it('should break ties by smallest id', () => { + const fieldA = makeMorphField({ + id: 'aaa', + isActive: true, + isSystem: false, + }); + const fieldB = makeMorphField({ + id: 'bbb', + isActive: true, + isSystem: false, + }); + + expect(pickMorphGroupSurvivor([fieldB, fieldA])).toBe(fieldA); + }); + + it('should prefer active+non-system (score 3) over inactive+non-system (score 1)', () => { + const best = makeMorphField({ + id: 'z', + isActive: true, + isSystem: false, + }); + const worse = makeMorphField({ + id: 'a', + isActive: false, + isSystem: false, + }); + + expect(pickMorphGroupSurvivor([worse, best])).toBe(best); + }); +}); diff --git a/packages/twenty-server/src/engine/dataloaders/utils/filter-morph-relation-duplicate-fields.util.ts b/packages/twenty-server/src/engine/dataloaders/utils/filter-morph-relation-duplicate-fields.util.ts index 8208303ef18..465c0eddb00 100644 --- a/packages/twenty-server/src/engine/dataloaders/utils/filter-morph-relation-duplicate-fields.util.ts +++ b/packages/twenty-server/src/engine/dataloaders/utils/filter-morph-relation-duplicate-fields.util.ts @@ -2,52 +2,42 @@ import { FieldMetadataType } from 'twenty-shared/types'; import { type FlatFieldMetadata } from 'src/engine/metadata-modules/flat-field-metadata/types/flat-field-metadata.type'; import { isFlatFieldMetadataOfType } from 'src/engine/metadata-modules/flat-field-metadata/utils/is-flat-field-metadata-of-type.util'; +import { pickMorphGroupSurvivor } from 'src/engine/dataloaders/utils/pick-morph-group-survivor.util'; export const filterMorphRelationDuplicateFields = ( flatFieldMetadatas: FlatFieldMetadata[], ): FlatFieldMetadata[] => { - const initialAccumulator: { - morphFlatFieldMetadatas: FlatFieldMetadata[]; - otherFlatFieldMetadatas: FlatFieldMetadata[]; - } = { - morphFlatFieldMetadatas: [], - otherFlatFieldMetadatas: [], - }; - const { morphFlatFieldMetadatas, otherFlatFieldMetadatas } = - flatFieldMetadatas.reduce((acc, flatFieldMetadata) => { - if ( - isFlatFieldMetadataOfType( - flatFieldMetadata, - FieldMetadataType.MORPH_RELATION, - ) - ) { - return { - ...acc, - morphFlatFieldMetadatas: [ - ...acc.morphFlatFieldMetadatas, - flatFieldMetadata, - ], - }; - } + const otherFlatFieldMetadatas: FlatFieldMetadata[] = []; + const morphGroupsByMorphId = new Map< + string, + FlatFieldMetadata[] + >(); - return { - ...acc, - otherFlatFieldMetadatas: [ - ...acc.otherFlatFieldMetadatas, - flatFieldMetadata, - ], - }; - }, initialAccumulator); + for (const flatFieldMetadata of flatFieldMetadatas) { + if ( + isFlatFieldMetadataOfType( + flatFieldMetadata, + FieldMetadataType.MORPH_RELATION, + ) + ) { + const existing = + morphGroupsByMorphId.get(flatFieldMetadata.morphId) ?? []; - const filteredMorphFlatFieldMetadatas = morphFlatFieldMetadatas.filter( - (currentField) => - !morphFlatFieldMetadatas.some( - (otherField) => - currentField.id !== otherField.id && - otherField.morphId === currentField.morphId && - otherField.id < currentField.id, - ), - ); + morphGroupsByMorphId.set(flatFieldMetadata.morphId, [ + ...existing, + flatFieldMetadata, + ]); + } else { + otherFlatFieldMetadatas.push(flatFieldMetadata); + } + } + + const filteredMorphFlatFieldMetadatas: FlatFieldMetadata[] = + []; + + for (const group of morphGroupsByMorphId.values()) { + filteredMorphFlatFieldMetadatas.push(pickMorphGroupSurvivor(group)); + } return [...otherFlatFieldMetadatas, ...filteredMorphFlatFieldMetadatas]; }; diff --git a/packages/twenty-server/src/engine/dataloaders/utils/pick-morph-group-survivor.util.ts b/packages/twenty-server/src/engine/dataloaders/utils/pick-morph-group-survivor.util.ts new file mode 100644 index 00000000000..782dd6168a3 --- /dev/null +++ b/packages/twenty-server/src/engine/dataloaders/utils/pick-morph-group-survivor.util.ts @@ -0,0 +1,19 @@ +import { type FieldMetadataType } from 'twenty-shared/types'; + +import { type FlatFieldMetadata } from 'src/engine/metadata-modules/flat-field-metadata/types/flat-field-metadata.type'; + +// Prefers active non-system fields (standard targets) over system ones +// (auto-created for custom objects). Smallest id breaks ties. +const scoreMorphField = ( + field: FlatFieldMetadata, +): number => (field.isActive ? 2 : 0) + (field.isSystem ? 0 : 1); + +export const pickMorphGroupSurvivor = ( + group: FlatFieldMetadata[], +): FlatFieldMetadata => { + return group.reduce((best, current) => { + const diff = scoreMorphField(current) - scoreMorphField(best); + + return diff > 0 || (diff === 0 && current.id < best.id) ? current : best; + }); +}; diff --git a/packages/twenty-server/src/engine/metadata-modules/view/tools/view-tools.factory.ts b/packages/twenty-server/src/engine/metadata-modules/view/tools/view-tools.factory.ts index 05dda8cc338..3134e1b9afa 100644 --- a/packages/twenty-server/src/engine/metadata-modules/view/tools/view-tools.factory.ts +++ b/packages/twenty-server/src/engine/metadata-modules/view/tools/view-tools.factory.ts @@ -6,6 +6,7 @@ import { z } from 'zod'; import { AggregateOperations } from 'src/engine/api/graphql/graphql-query-runner/constants/aggregate-operations.constant'; import { formatValidationErrors } from 'src/engine/core-modules/tool-provider/utils/format-validation-errors.util'; import { WorkspaceManyOrAllFlatEntityMapsCacheService } from 'src/engine/metadata-modules/flat-entity/services/workspace-many-or-all-flat-entity-maps-cache.service'; +import { buildObjectIdByNameMaps } from 'src/engine/metadata-modules/flat-object-metadata/utils/build-object-id-by-name-maps.util'; import { ViewType } from 'src/engine/metadata-modules/view/enums/view-type.enum'; import { ViewVisibility } from 'src/engine/metadata-modules/view/enums/view-visibility.enum'; import { ViewQueryParamsService } from 'src/engine/metadata-modules/view/services/view-query-params.service'; @@ -105,17 +106,19 @@ export class ViewToolsFactory { }, ); - const objectMetadata = Object.values( - flatObjectMetadataMaps.byUniversalIdentifier, - ).find((obj) => obj?.nameSingular === objectNameSingular); + const { idByNameSingular } = buildObjectIdByNameMaps( + flatObjectMetadataMaps, + ); - if (!objectMetadata) { + const objectMetadataId = idByNameSingular[objectNameSingular]; + + if (!objectMetadataId) { throw new Error( `Object "${objectNameSingular}" not found. Use get_object_metadata to list available objects.`, ); } - return objectMetadata.id; + return objectMetadataId; } private async resolveFieldMetadataId( diff --git a/packages/twenty-server/src/engine/workspace-manager/dev-seeder/data/constants/attachment-data-seeds.constant.ts b/packages/twenty-server/src/engine/workspace-manager/dev-seeder/data/constants/attachment-data-seeds.constant.ts index 35095c0541c..8819ed5ecb3 100644 --- a/packages/twenty-server/src/engine/workspace-manager/dev-seeder/data/constants/attachment-data-seeds.constant.ts +++ b/packages/twenty-server/src/engine/workspace-manager/dev-seeder/data/constants/attachment-data-seeds.constant.ts @@ -10,8 +10,7 @@ import { WORKSPACE_MEMBER_DATA_SEED_IDS } from 'src/engine/workspace-manager/dev type AttachmentDataSeed = { id: string; name: string; - fullPath: string; - fileCategory: string; + file: string; createdBySource: string; createdByWorkspaceMemberId: string; createdByName: string; @@ -28,8 +27,7 @@ type AttachmentDataSeed = { export const ATTACHMENT_DATA_SEED_COLUMNS: (keyof AttachmentDataSeed)[] = [ 'id', 'name', - 'fullPath', - 'fileCategory', + 'file', 'createdBySource', 'createdByWorkspaceMemberId', 'createdByName', @@ -58,203 +56,153 @@ const GENERATE_ATTACHMENT_IDS = (): Record => { export const ATTACHMENT_DATA_SEED_IDS = GENERATE_ATTACHMENT_IDS(); -// Pool of 5 reusable file paths for attachments -const FILE_TEMPLATE_PATHS = [ - 'attachment/sample-contract.pdf', - 'attachment/budget-2024.xlsx', - 'attachment/presentation.pptx', - 'attachment/screenshot.png', - 'attachment/archive.zip', +// FileIds must be unique per workspace since core.file is a shared table. +// We use the first 12 hex chars of the workspaceId as a namespace suffix. +const deriveFileId = (attachmentIndex: number, workspaceId: string): string => { + const workspaceHex = workspaceId.replace(/-/g, '').slice(0, 12); + const hexIndex = attachmentIndex.toString(16).padStart(4, '0'); + + return `f11e0000-${hexIndex}-4a7c-8001-${workspaceHex}`; +}; + +export const ATTACHMENT_SAMPLE_FILES = [ + { + filename: 'sample-contract.pdf', + mimeType: 'application/pdf', + extension: 'pdf', + }, + { + filename: 'budget-2024.xlsx', + mimeType: + 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', + extension: 'xlsx', + }, + { + filename: 'presentation.pptx', + mimeType: + 'application/vnd.openxmlformats-officedocument.presentationml.presentation', + extension: 'pptx', + }, + { + filename: 'screenshot.png', + mimeType: 'image/png', + extension: 'png', + }, + { + filename: 'archive.zip', + mimeType: 'application/zip', + extension: 'zip', + }, ]; -// Additional name variations for more realistic variety const FILE_NAME_VARIATIONS = [ // Documents - { - name: 'Service Agreement.pdf', - fileCategory: 'TEXT_DOCUMENT', - pathIndex: 0, - }, - { - name: 'NDA Document.pdf', - fileCategory: 'TEXT_DOCUMENT', - pathIndex: 0, - }, - { - name: 'Project Proposal.pdf', - fileCategory: 'TEXT_DOCUMENT', - pathIndex: 0, - }, - { - name: 'Invoice Q1 2024.pdf', - fileCategory: 'TEXT_DOCUMENT', - pathIndex: 0, - }, - { - name: 'Meeting Notes.pdf', - fileCategory: 'TEXT_DOCUMENT', - pathIndex: 0, - }, - { - name: 'Report Final.pdf', - fileCategory: 'TEXT_DOCUMENT', - pathIndex: 0, - }, - { - name: 'Contract Signed.pdf', - fileCategory: 'TEXT_DOCUMENT', - pathIndex: 0, - }, + { name: 'Service Agreement.pdf', sampleFileIndex: 0 }, + { name: 'NDA Document.pdf', sampleFileIndex: 0 }, + { name: 'Project Proposal.pdf', sampleFileIndex: 0 }, + { name: 'Invoice Q1 2024.pdf', sampleFileIndex: 0 }, + { name: 'Meeting Notes.pdf', sampleFileIndex: 0 }, + { name: 'Report Final.pdf', sampleFileIndex: 0 }, + { name: 'Contract Signed.pdf', sampleFileIndex: 0 }, // Spreadsheets - { - name: 'Financial Forecast.xlsx', - fileCategory: 'SPREADSHEET', - pathIndex: 1, - }, - { - name: 'Sales Report Q4.xlsx', - fileCategory: 'SPREADSHEET', - pathIndex: 1, - }, - { - name: 'Team Roster.xlsx', - fileCategory: 'SPREADSHEET', - pathIndex: 1, - }, - { - name: 'Expense Report.xlsx', - fileCategory: 'SPREADSHEET', - pathIndex: 1, - }, - { - name: 'Inventory List.xlsx', - fileCategory: 'SPREADSHEET', - pathIndex: 1, - }, - { - name: 'Data Export.csv', - fileCategory: 'SPREADSHEET', - pathIndex: 1, - }, + { name: 'Financial Forecast.xlsx', sampleFileIndex: 1 }, + { name: 'Sales Report Q4.xlsx', sampleFileIndex: 1 }, + { name: 'Team Roster.xlsx', sampleFileIndex: 1 }, + { name: 'Expense Report.xlsx', sampleFileIndex: 1 }, + { name: 'Inventory List.xlsx', sampleFileIndex: 1 }, + { name: 'Data Export.csv', sampleFileIndex: 1 }, // Presentations - { - name: 'Pitch Deck.pptx', - fileCategory: 'PRESENTATION', - pathIndex: 2, - }, - { - name: 'Q4 Results.pptx', - fileCategory: 'PRESENTATION', - pathIndex: 2, - }, - { - name: 'Roadmap 2024.pptx', - fileCategory: 'PRESENTATION', - pathIndex: 2, - }, - { - name: 'Company Overview.pptx', - fileCategory: 'PRESENTATION', - pathIndex: 2, - }, - { - name: 'Training Materials.pptx', - fileCategory: 'PRESENTATION', - pathIndex: 2, - }, + { name: 'Pitch Deck.pptx', sampleFileIndex: 2 }, + { name: 'Q4 Results.pptx', sampleFileIndex: 2 }, + { name: 'Roadmap 2024.pptx', sampleFileIndex: 2 }, + { name: 'Company Overview.pptx', sampleFileIndex: 2 }, + { name: 'Training Materials.pptx', sampleFileIndex: 2 }, // Images - { - name: 'Company Logo.png', - fileCategory: 'IMAGE', - pathIndex: 3, - }, - { - name: 'Product Photo.jpg', - fileCategory: 'IMAGE', - pathIndex: 3, - }, - { name: 'Diagram.png', fileCategory: 'IMAGE', pathIndex: 3 }, - { name: 'Wireframe.png', fileCategory: 'IMAGE', pathIndex: 3 }, - { - name: 'Mockup Design.png', - fileCategory: 'IMAGE', - pathIndex: 3, - }, - { name: 'Headshot.jpg', fileCategory: 'IMAGE', pathIndex: 3 }, + { name: 'Company Logo.png', sampleFileIndex: 3 }, + { name: 'Product Photo.jpg', sampleFileIndex: 3 }, + { name: 'Diagram.png', sampleFileIndex: 3 }, + { name: 'Wireframe.png', sampleFileIndex: 3 }, + { name: 'Mockup Design.png', sampleFileIndex: 3 }, + { name: 'Headshot.jpg', sampleFileIndex: 3 }, // Archives - { - name: 'Project Files.zip', - fileCategory: 'ARCHIVE', - pathIndex: 4, - }, - { - name: 'Backup Data.zip', - fileCategory: 'ARCHIVE', - pathIndex: 4, - }, - { - name: 'Source Code.zip', - fileCategory: 'ARCHIVE', - pathIndex: 4, - }, + { name: 'Project Files.zip', sampleFileIndex: 4 }, + { name: 'Backup Data.zip', sampleFileIndex: 4 }, + { name: 'Source Code.zip', sampleFileIndex: 4 }, ]; -const GENERATE_ATTACHMENT_SEEDS = (): AttachmentDataSeed[] => { - const ATTACHMENT_SEEDS: AttachmentDataSeed[] = []; +export type AttachmentFileSeedMetadata = { + fileId: string; + label: string; + sampleFileIndex: number; + mimeType: string; + extension: string; +}; - // Get available entity IDs - const PERSON_IDS = Object.values(PERSON_DATA_SEED_IDS).slice(0, 120); // Use first 120 persons - const COMPANY_IDS = Object.values(COMPANY_DATA_SEED_IDS).slice(0, 120); // Use first 120 companies - const NOTE_IDS = Object.values(NOTE_DATA_SEED_IDS).slice(0, 80); // Use first 80 notes - const TASK_IDS = Object.values(TASK_DATA_SEED_IDS).slice(0, 60); // Use first 60 tasks - const OPPORTUNITY_IDS = Object.values(OPPORTUNITY_DATA_SEED_IDS).slice(0, 20); // Use first 20 opportunities +export const generateAttachmentSeedsForWorkspace = ( + workspaceId: string, +): { + seeds: AttachmentDataSeed[]; + fileSeedMetadata: AttachmentFileSeedMetadata[]; +} => { + const seeds: AttachmentDataSeed[] = []; + const fileSeedMetadata: AttachmentFileSeedMetadata[] = []; + + const PERSON_IDS = Object.values(PERSON_DATA_SEED_IDS).slice(0, 120); + const COMPANY_IDS = Object.values(COMPANY_DATA_SEED_IDS).slice(0, 120); + const NOTE_IDS = Object.values(NOTE_DATA_SEED_IDS).slice(0, 80); + const TASK_IDS = Object.values(TASK_DATA_SEED_IDS).slice(0, 60); + const OPPORTUNITY_IDS = Object.values(OPPORTUNITY_DATA_SEED_IDS).slice(0, 20); let entityIndex = 0; - for (let INDEX = 1; INDEX <= 400; INDEX++) { - // Cycle through file name variations - const NAME_VARIATION_INDEX = INDEX % FILE_NAME_VARIATIONS.length; - const NAME_VARIATION = FILE_NAME_VARIATIONS[NAME_VARIATION_INDEX]; - const FILE_PATH = FILE_TEMPLATE_PATHS[NAME_VARIATION.pathIndex]; + for (let index = 1; index <= 400; index++) { + const nameVariationIndex = index % FILE_NAME_VARIATIONS.length; + const nameVariation = FILE_NAME_VARIATIONS[nameVariationIndex]; + const sampleFile = ATTACHMENT_SAMPLE_FILES[nameVariation.sampleFileIndex]; + + const attachmentId = ATTACHMENT_DATA_SEED_IDS[`ID_${index}`]; + const fileId = deriveFileId(index, workspaceId); - // Determine which entity this attachment belongs to - // Distribution: ~30% person, ~30% company, ~20% note, ~15% task, ~5% opportunity let targetPersonId: string | null = null; let targetCompanyId: string | null = null; let targetNoteId: string | null = null; let targetTaskId: string | null = null; let targetOpportunityId: string | null = null; - const DISTRIBUTION_VALUE = INDEX % 100; + const distributionValue = index % 100; - if (DISTRIBUTION_VALUE < 30) { - // 30% Person attachments + if (distributionValue < 30) { targetPersonId = PERSON_IDS[entityIndex % PERSON_IDS.length]; entityIndex++; - } else if (DISTRIBUTION_VALUE < 60) { - // 30% Company attachments + } else if (distributionValue < 60) { targetCompanyId = COMPANY_IDS[entityIndex % COMPANY_IDS.length]; entityIndex++; - } else if (DISTRIBUTION_VALUE < 80) { - // 20% Note attachments + } else if (distributionValue < 80) { targetNoteId = NOTE_IDS[entityIndex % NOTE_IDS.length]; entityIndex++; - } else if (DISTRIBUTION_VALUE < 95) { - // 15% Task attachments + } else if (distributionValue < 95) { targetTaskId = TASK_IDS[entityIndex % TASK_IDS.length]; entityIndex++; } else { - // 5% Opportunity attachments targetOpportunityId = OPPORTUNITY_IDS[entityIndex % OPPORTUNITY_IDS.length]; entityIndex++; } - ATTACHMENT_SEEDS.push({ - id: ATTACHMENT_DATA_SEED_IDS[`ID_${INDEX}`], - name: NAME_VARIATION.name, - fullPath: FILE_PATH, - fileCategory: NAME_VARIATION.fileCategory, + fileSeedMetadata.push({ + fileId, + label: nameVariation.name, + sampleFileIndex: nameVariation.sampleFileIndex, + mimeType: sampleFile.mimeType, + extension: sampleFile.extension, + }); + + seeds.push({ + id: attachmentId, + name: nameVariation.name, + file: JSON.stringify([ + { fileId, label: nameVariation.name, extension: sampleFile.extension }, + ]), createdBySource: FieldActorSource.MANUAL, createdByWorkspaceMemberId: WORKSPACE_MEMBER_DATA_SEED_IDS.TIM, createdByName: 'Tim A', @@ -269,7 +217,5 @@ const GENERATE_ATTACHMENT_SEEDS = (): AttachmentDataSeed[] => { }); } - return ATTACHMENT_SEEDS; + return { seeds, fileSeedMetadata }; }; - -export const ATTACHMENT_DATA_SEEDS = GENERATE_ATTACHMENT_SEEDS(); diff --git a/packages/twenty-server/src/engine/workspace-manager/dev-seeder/data/services/dev-seeder-data.service.ts b/packages/twenty-server/src/engine/workspace-manager/dev-seeder/data/services/dev-seeder-data.service.ts index d9deadd5810..4b42af22d4c 100644 --- a/packages/twenty-server/src/engine/workspace-manager/dev-seeder/data/services/dev-seeder-data.service.ts +++ b/packages/twenty-server/src/engine/workspace-manager/dev-seeder/data/services/dev-seeder-data.service.ts @@ -4,6 +4,8 @@ import { InjectDataSource } from '@nestjs/typeorm'; import { readFile } from 'fs/promises'; import { join } from 'path'; +import { STANDARD_OBJECTS } from 'twenty-shared/metadata'; +import { FileFolder } from 'twenty-shared/types'; import { DataSource } from 'typeorm'; import { FeatureFlagKey } from 'src/engine/core-modules/feature-flag/enums/feature-flag-key.enum'; @@ -15,7 +17,9 @@ import { type WorkspaceEntityManager } from 'src/engine/twenty-orm/entity-manage import { computeTableName } from 'src/engine/utils/compute-table-name.util'; import { ATTACHMENT_DATA_SEED_COLUMNS, - ATTACHMENT_DATA_SEEDS, + ATTACHMENT_SAMPLE_FILES, + type AttachmentFileSeedMetadata, + generateAttachmentSeedsForWorkspace, } from 'src/engine/workspace-manager/dev-seeder/data/constants/attachment-data-seeds.constant'; import { CALENDAR_CHANNEL_DATA_SEED_COLUMNS, @@ -115,6 +119,7 @@ import { } from 'src/engine/workspace-manager/dev-seeder/data/constants/workspace-member-data-seeds.constant'; import { TimelineActivitySeederService } from 'src/engine/workspace-manager/dev-seeder/data/services/timeline-activity-seeder.service'; import { prefillWorkflows } from 'src/engine/workspace-manager/standard-objects-prefill-data/prefill-workflows'; +import { TWENTY_STANDARD_APPLICATION } from 'src/engine/workspace-manager/twenty-standard-application/constants/twenty-standard-applications'; type RecordSeedConfig = { tableName: string; @@ -125,6 +130,7 @@ type RecordSeedConfig = { // Organize seeds into dependency batches for parallel insertion const getRecordSeedsBatches = ( workspaceId: string, + attachmentSeeds: RecordSeedConfig['recordSeeds'], _featureFlags?: Record, ): RecordSeedConfig[][] => { // Batch 1: No dependencies @@ -273,7 +279,7 @@ const getRecordSeedsBatches = ( { tableName: 'attachment', pgColumns: ATTACHMENT_DATA_SEED_COLUMNS, - recordSeeds: ATTACHMENT_DATA_SEEDS, + recordSeeds: attachmentSeeds, }, ]; @@ -311,12 +317,16 @@ export class DevSeederDataService { }, ); + const { seeds: attachmentSeeds, fileSeedMetadata: attachmentFileMeta } = + generateAttachmentSeedsForWorkspace(workspaceId); + await this.coreDataSource.transaction( async (entityManager: WorkspaceEntityManager) => { await this.seedRecordsInBatches({ entityManager, schemaName, workspaceId, + attachmentSeeds, featureFlags, objectMetadataItems, }); @@ -327,7 +337,11 @@ export class DevSeederDataService { workspaceId, }); - await this.seedAttachmentFiles(workspaceId); + await this.seedAttachmentFiles( + workspaceId, + entityManager, + attachmentFileMeta, + ); await prefillWorkflows( entityManager, @@ -343,16 +357,22 @@ export class DevSeederDataService { entityManager, schemaName, workspaceId, + attachmentSeeds, featureFlags, objectMetadataItems, }: { entityManager: WorkspaceEntityManager; schemaName: string; workspaceId: string; + attachmentSeeds: RecordSeedConfig['recordSeeds']; featureFlags?: Record; objectMetadataItems: FlatObjectMetadata[]; }) { - const batches = getRecordSeedsBatches(workspaceId, featureFlags); + const batches = getRecordSeedsBatches( + workspaceId, + attachmentSeeds, + featureFlags, + ); // Process batches sequentially (respecting dependencies) // but entities within each batch in parallel @@ -406,9 +426,11 @@ export class DevSeederDataService { .execute(); } - private async seedAttachmentFiles(workspaceId: string): Promise { - // Files are copied to dist/assets during build via nest-cli.json - // The pattern **/dev-seeder/data/sample-files/** preserves the full path + private async seedAttachmentFiles( + workspaceId: string, + entityManager: WorkspaceEntityManager, + fileSeedMetadata: AttachmentFileSeedMetadata[], + ): Promise { const IS_BUILT = __dirname.includes('/dist/'); const sampleFilesDir = IS_BUILT ? join( @@ -417,37 +439,38 @@ export class DevSeederDataService { ) : join(__dirname, '../sample-files'); - const filesToCreate = [ - 'sample-contract.pdf', - 'budget-2024.xlsx', - 'presentation.pptx', - 'screenshot.png', - 'archive.zip', - ]; + // Read each sample file once and cache the buffer + const sampleFileBuffers: Buffer[] = []; - for (const filename of filesToCreate) { - const filePath = join(sampleFilesDir, filename); - const fileBuffer = await readFile(filePath); + for (const sampleFile of ATTACHMENT_SAMPLE_FILES) { + const filePath = join(sampleFilesDir, sampleFile.filename); - await this.fileStorageService.writeFileLegacy({ - file: fileBuffer, - name: filename, - folder: `workspace-${workspaceId}/attachment`, - mimeType: this.getMimeType(filename), + sampleFileBuffers.push(await readFile(filePath)); + } + + const fieldUniversalIdentifier = + STANDARD_OBJECTS.attachment.fields.file.universalIdentifier; + const applicationUniversalIdentifier = + TWENTY_STANDARD_APPLICATION.universalIdentifier; + + for (const metadata of fileSeedMetadata) { + const resourcePath = `${metadata.fileId}.${metadata.extension}`; + const sourceFile = sampleFileBuffers[metadata.sampleFileIndex]; + + await this.fileStorageService.writeFile({ + sourceFile, + mimeType: metadata.mimeType, + fileFolder: FileFolder.FilesField, + applicationUniversalIdentifier, + workspaceId, + resourcePath: `${fieldUniversalIdentifier}/${resourcePath}`, + fileId: metadata.fileId, + settings: { + isTemporaryFile: false, + toDelete: false, + }, + queryRunner: entityManager.queryRunner, }); } } - - private getMimeType(filename: string): string { - const ext = filename.split('.').pop()?.toLowerCase(); - const mimeTypes: Record = { - pdf: 'application/pdf', - xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', - pptx: 'application/vnd.openxmlformats-officedocument.presentationml.presentation', - png: 'image/png', - zip: 'application/zip', - }; - - return mimeTypes[ext || ''] || 'application/octet-stream'; - } } 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 3c6271820a7..75759195e7f 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 @@ -56,206 +56,247 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object "id": "00000000-0000-0000-0000-000000000010", }, }, - "id": "00000000-0000-0000-0000-000000000018", - "views": undefined, + "id": "00000000-0000-0000-0000-000000000030", + "views": { + "allAttachments": { + "id": "00000000-0000-0000-0000-000000000029", + "viewFieldGroups": {}, + "viewFields": { + "createdAt": { + "id": "00000000-0000-0000-0000-000000000021", + }, + "createdBy": { + "id": "00000000-0000-0000-0000-000000000020", + }, + "file": { + "id": "00000000-0000-0000-0000-000000000019", + }, + "name": { + "id": "00000000-0000-0000-0000-000000000018", + }, + "targetCompany": { + "id": "00000000-0000-0000-0000-000000000023", + }, + "targetDashboard": { + "id": "00000000-0000-0000-0000-000000000027", + }, + "targetNote": { + "id": "00000000-0000-0000-0000-000000000026", + }, + "targetOpportunity": { + "id": "00000000-0000-0000-0000-000000000024", + }, + "targetPerson": { + "id": "00000000-0000-0000-0000-000000000022", + }, + "targetTask": { + "id": "00000000-0000-0000-0000-000000000025", + }, + "targetWorkflow": { + "id": "00000000-0000-0000-0000-000000000028", + }, + }, + "viewGroups": {}, + }, + }, }, "blocklist": { "fields": { "createdAt": { - "id": "00000000-0000-0000-0000-000000000020", + "id": "00000000-0000-0000-0000-000000000032", }, "deletedAt": { - "id": "00000000-0000-0000-0000-000000000022", + "id": "00000000-0000-0000-0000-000000000034", }, "handle": { - "id": "00000000-0000-0000-0000-000000000023", + "id": "00000000-0000-0000-0000-000000000035", }, "id": { - "id": "00000000-0000-0000-0000-000000000019", + "id": "00000000-0000-0000-0000-000000000031", }, "updatedAt": { - "id": "00000000-0000-0000-0000-000000000021", + "id": "00000000-0000-0000-0000-000000000033", }, "workspaceMember": { - "id": "00000000-0000-0000-0000-000000000024", + "id": "00000000-0000-0000-0000-000000000036", }, }, - "id": "00000000-0000-0000-0000-000000000025", + "id": "00000000-0000-0000-0000-000000000037", "views": undefined, }, "calendarChannel": { "fields": { "calendarChannelEventAssociations": { - "id": "00000000-0000-0000-0000-000000000046", + "id": "00000000-0000-0000-0000-000000000058", }, "connectedAccount": { - "id": "00000000-0000-0000-0000-000000000039", - }, - "contactAutoCreationPolicy": { - "id": "00000000-0000-0000-0000-000000000043", - }, - "createdAt": { - "id": "00000000-0000-0000-0000-000000000036", - }, - "deletedAt": { - "id": "00000000-0000-0000-0000-000000000038", - }, - "handle": { - "id": "00000000-0000-0000-0000-000000000040", - }, - "id": { - "id": "00000000-0000-0000-0000-000000000035", - }, - "isContactAutoCreationEnabled": { - "id": "00000000-0000-0000-0000-000000000042", - }, - "isSyncEnabled": { - "id": "00000000-0000-0000-0000-000000000044", - }, - "syncCursor": { - "id": "00000000-0000-0000-0000-000000000045", - }, - "syncStage": { - "id": "00000000-0000-0000-0000-000000000049", - }, - "syncStageStartedAt": { - "id": "00000000-0000-0000-0000-000000000050", - }, - "syncStatus": { - "id": "00000000-0000-0000-0000-000000000048", - }, - "syncedAt": { "id": "00000000-0000-0000-0000-000000000051", }, - "throttleFailureCount": { + "contactAutoCreationPolicy": { + "id": "00000000-0000-0000-0000-000000000055", + }, + "createdAt": { + "id": "00000000-0000-0000-0000-000000000048", + }, + "deletedAt": { + "id": "00000000-0000-0000-0000-000000000050", + }, + "handle": { + "id": "00000000-0000-0000-0000-000000000052", + }, + "id": { "id": "00000000-0000-0000-0000-000000000047", }, + "isContactAutoCreationEnabled": { + "id": "00000000-0000-0000-0000-000000000054", + }, + "isSyncEnabled": { + "id": "00000000-0000-0000-0000-000000000056", + }, + "syncCursor": { + "id": "00000000-0000-0000-0000-000000000057", + }, + "syncStage": { + "id": "00000000-0000-0000-0000-000000000061", + }, + "syncStageStartedAt": { + "id": "00000000-0000-0000-0000-000000000062", + }, + "syncStatus": { + "id": "00000000-0000-0000-0000-000000000060", + }, + "syncedAt": { + "id": "00000000-0000-0000-0000-000000000063", + }, + "throttleFailureCount": { + "id": "00000000-0000-0000-0000-000000000059", + }, "updatedAt": { - "id": "00000000-0000-0000-0000-000000000037", + "id": "00000000-0000-0000-0000-000000000049", }, "visibility": { - "id": "00000000-0000-0000-0000-000000000041", + "id": "00000000-0000-0000-0000-000000000053", }, }, - "id": "00000000-0000-0000-0000-000000000052", + "id": "00000000-0000-0000-0000-000000000064", "views": undefined, }, "calendarChannelEventAssociation": { "fields": { "calendarChannel": { - "id": "00000000-0000-0000-0000-000000000030", + "id": "00000000-0000-0000-0000-000000000042", }, "calendarEvent": { - "id": "00000000-0000-0000-0000-000000000031", + "id": "00000000-0000-0000-0000-000000000043", }, "createdAt": { - "id": "00000000-0000-0000-0000-000000000027", + "id": "00000000-0000-0000-0000-000000000039", }, "deletedAt": { - "id": "00000000-0000-0000-0000-000000000029", + "id": "00000000-0000-0000-0000-000000000041", }, "eventExternalId": { - "id": "00000000-0000-0000-0000-000000000032", + "id": "00000000-0000-0000-0000-000000000044", }, "id": { - "id": "00000000-0000-0000-0000-000000000026", + "id": "00000000-0000-0000-0000-000000000038", }, "recurringEventExternalId": { - "id": "00000000-0000-0000-0000-000000000033", + "id": "00000000-0000-0000-0000-000000000045", }, "updatedAt": { - "id": "00000000-0000-0000-0000-000000000028", + "id": "00000000-0000-0000-0000-000000000040", }, }, - "id": "00000000-0000-0000-0000-000000000034", + "id": "00000000-0000-0000-0000-000000000046", "views": undefined, }, "calendarEvent": { "fields": { "calendarChannelEventAssociations": { - "id": "00000000-0000-0000-0000-000000000081", + "id": "00000000-0000-0000-0000-000000000093", }, "calendarEventParticipants": { - "id": "00000000-0000-0000-0000-000000000082", + "id": "00000000-0000-0000-0000-000000000094", }, "conferenceLink": { - "id": "00000000-0000-0000-0000-000000000080", + "id": "00000000-0000-0000-0000-000000000092", }, "conferenceSolution": { - "id": "00000000-0000-0000-0000-000000000079", + "id": "00000000-0000-0000-0000-000000000091", }, "createdAt": { - "id": "00000000-0000-0000-0000-000000000066", - }, - "deletedAt": { - "id": "00000000-0000-0000-0000-000000000068", - }, - "description": { - "id": "00000000-0000-0000-0000-000000000076", - }, - "endsAt": { - "id": "00000000-0000-0000-0000-000000000073", - }, - "externalCreatedAt": { - "id": "00000000-0000-0000-0000-000000000074", - }, - "externalUpdatedAt": { - "id": "00000000-0000-0000-0000-000000000075", - }, - "iCalUid": { "id": "00000000-0000-0000-0000-000000000078", }, + "deletedAt": { + "id": "00000000-0000-0000-0000-000000000080", + }, + "description": { + "id": "00000000-0000-0000-0000-000000000088", + }, + "endsAt": { + "id": "00000000-0000-0000-0000-000000000085", + }, + "externalCreatedAt": { + "id": "00000000-0000-0000-0000-000000000086", + }, + "externalUpdatedAt": { + "id": "00000000-0000-0000-0000-000000000087", + }, + "iCalUid": { + "id": "00000000-0000-0000-0000-000000000090", + }, "id": { - "id": "00000000-0000-0000-0000-000000000065", - }, - "isCanceled": { - "id": "00000000-0000-0000-0000-000000000070", - }, - "isFullDay": { - "id": "00000000-0000-0000-0000-000000000071", - }, - "location": { "id": "00000000-0000-0000-0000-000000000077", }, + "isCanceled": { + "id": "00000000-0000-0000-0000-000000000082", + }, + "isFullDay": { + "id": "00000000-0000-0000-0000-000000000083", + }, + "location": { + "id": "00000000-0000-0000-0000-000000000089", + }, "startsAt": { - "id": "00000000-0000-0000-0000-000000000072", + "id": "00000000-0000-0000-0000-000000000084", }, "title": { - "id": "00000000-0000-0000-0000-000000000069", + "id": "00000000-0000-0000-0000-000000000081", }, "updatedAt": { - "id": "00000000-0000-0000-0000-000000000067", + "id": "00000000-0000-0000-0000-000000000079", }, }, - "id": "00000000-0000-0000-0000-000000000092", + "id": "00000000-0000-0000-0000-000000000104", "views": { "allCalendarEvents": { - "id": "00000000-0000-0000-0000-000000000091", + "id": "00000000-0000-0000-0000-000000000103", "viewFieldGroups": {}, "viewFields": { "conferenceLink": { - "id": "00000000-0000-0000-0000-000000000088", + "id": "00000000-0000-0000-0000-000000000100", }, "createdAt": { - "id": "00000000-0000-0000-0000-000000000090", + "id": "00000000-0000-0000-0000-000000000102", }, "endsAt": { - "id": "00000000-0000-0000-0000-000000000085", + "id": "00000000-0000-0000-0000-000000000097", }, "isCanceled": { - "id": "00000000-0000-0000-0000-000000000089", + "id": "00000000-0000-0000-0000-000000000101", }, "isFullDay": { - "id": "00000000-0000-0000-0000-000000000086", + "id": "00000000-0000-0000-0000-000000000098", }, "location": { - "id": "00000000-0000-0000-0000-000000000087", + "id": "00000000-0000-0000-0000-000000000099", }, "startsAt": { - "id": "00000000-0000-0000-0000-000000000084", + "id": "00000000-0000-0000-0000-000000000096", }, "title": { - "id": "00000000-0000-0000-0000-000000000083", + "id": "00000000-0000-0000-0000-000000000095", }, }, "viewGroups": {}, @@ -265,193 +306,193 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object "calendarEventParticipant": { "fields": { "calendarEvent": { - "id": "00000000-0000-0000-0000-000000000057", + "id": "00000000-0000-0000-0000-000000000069", }, "createdAt": { - "id": "00000000-0000-0000-0000-000000000054", + "id": "00000000-0000-0000-0000-000000000066", }, "deletedAt": { - "id": "00000000-0000-0000-0000-000000000056", + "id": "00000000-0000-0000-0000-000000000068", }, "displayName": { - "id": "00000000-0000-0000-0000-000000000059", + "id": "00000000-0000-0000-0000-000000000071", }, "handle": { - "id": "00000000-0000-0000-0000-000000000058", + "id": "00000000-0000-0000-0000-000000000070", }, "id": { - "id": "00000000-0000-0000-0000-000000000053", + "id": "00000000-0000-0000-0000-000000000065", }, "isOrganizer": { - "id": "00000000-0000-0000-0000-000000000060", + "id": "00000000-0000-0000-0000-000000000072", }, "person": { - "id": "00000000-0000-0000-0000-000000000062", + "id": "00000000-0000-0000-0000-000000000074", }, "responseStatus": { - "id": "00000000-0000-0000-0000-000000000061", + "id": "00000000-0000-0000-0000-000000000073", }, "updatedAt": { - "id": "00000000-0000-0000-0000-000000000055", + "id": "00000000-0000-0000-0000-000000000067", }, "workspaceMember": { - "id": "00000000-0000-0000-0000-000000000063", + "id": "00000000-0000-0000-0000-000000000075", }, }, - "id": "00000000-0000-0000-0000-000000000064", + "id": "00000000-0000-0000-0000-000000000076", "views": undefined, }, "company": { "fields": { "accountOwner": { - "id": "00000000-0000-0000-0000-000000000109", + "id": "00000000-0000-0000-0000-000000000121", }, "address": { - "id": "00000000-0000-0000-0000-000000000099", - }, - "annualRecurringRevenue": { - "id": "00000000-0000-0000-0000-000000000103", - }, - "attachments": { - "id": "00000000-0000-0000-0000-000000000114", - }, - "createdAt": { - "id": "00000000-0000-0000-0000-000000000094", - }, - "createdBy": { - "id": "00000000-0000-0000-0000-000000000106", - }, - "deletedAt": { - "id": "00000000-0000-0000-0000-000000000096", - }, - "domainName": { - "id": "00000000-0000-0000-0000-000000000098", - }, - "employees": { - "id": "00000000-0000-0000-0000-000000000100", - }, - "favorites": { - "id": "00000000-0000-0000-0000-000000000113", - }, - "id": { - "id": "00000000-0000-0000-0000-000000000093", - }, - "idealCustomerProfile": { - "id": "00000000-0000-0000-0000-000000000104", - }, - "linkedinLink": { - "id": "00000000-0000-0000-0000-000000000101", - }, - "name": { - "id": "00000000-0000-0000-0000-000000000097", - }, - "noteTargets": { "id": "00000000-0000-0000-0000-000000000111", }, - "opportunities": { - "id": "00000000-0000-0000-0000-000000000112", - }, - "people": { - "id": "00000000-0000-0000-0000-000000000108", - }, - "position": { - "id": "00000000-0000-0000-0000-000000000105", - }, - "searchVector": { - "id": "00000000-0000-0000-0000-000000000116", - }, - "taskTargets": { - "id": "00000000-0000-0000-0000-000000000110", - }, - "timelineActivities": { + "annualRecurringRevenue": { "id": "00000000-0000-0000-0000-000000000115", }, - "updatedAt": { - "id": "00000000-0000-0000-0000-000000000095", + "attachments": { + "id": "00000000-0000-0000-0000-000000000126", }, - "updatedBy": { + "createdAt": { + "id": "00000000-0000-0000-0000-000000000106", + }, + "createdBy": { + "id": "00000000-0000-0000-0000-000000000118", + }, + "deletedAt": { + "id": "00000000-0000-0000-0000-000000000108", + }, + "domainName": { + "id": "00000000-0000-0000-0000-000000000110", + }, + "employees": { + "id": "00000000-0000-0000-0000-000000000112", + }, + "favorites": { + "id": "00000000-0000-0000-0000-000000000125", + }, + "id": { + "id": "00000000-0000-0000-0000-000000000105", + }, + "idealCustomerProfile": { + "id": "00000000-0000-0000-0000-000000000116", + }, + "linkedinLink": { + "id": "00000000-0000-0000-0000-000000000113", + }, + "name": { + "id": "00000000-0000-0000-0000-000000000109", + }, + "noteTargets": { + "id": "00000000-0000-0000-0000-000000000123", + }, + "opportunities": { + "id": "00000000-0000-0000-0000-000000000124", + }, + "people": { + "id": "00000000-0000-0000-0000-000000000120", + }, + "position": { + "id": "00000000-0000-0000-0000-000000000117", + }, + "searchVector": { + "id": "00000000-0000-0000-0000-000000000128", + }, + "taskTargets": { + "id": "00000000-0000-0000-0000-000000000122", + }, + "timelineActivities": { + "id": "00000000-0000-0000-0000-000000000127", + }, + "updatedAt": { "id": "00000000-0000-0000-0000-000000000107", }, + "updatedBy": { + "id": "00000000-0000-0000-0000-000000000119", + }, "xLink": { - "id": "00000000-0000-0000-0000-000000000102", + "id": "00000000-0000-0000-0000-000000000114", }, }, - "id": "00000000-0000-0000-0000-000000000140", + "id": "00000000-0000-0000-0000-000000000152", "views": { "allCompanies": { - "id": "00000000-0000-0000-0000-000000000125", + "id": "00000000-0000-0000-0000-000000000137", "viewFieldGroups": {}, "viewFields": { "accountOwner": { - "id": "00000000-0000-0000-0000-000000000120", + "id": "00000000-0000-0000-0000-000000000132", }, "address": { - "id": "00000000-0000-0000-0000-000000000124", + "id": "00000000-0000-0000-0000-000000000136", }, "createdAt": { - "id": "00000000-0000-0000-0000-000000000121", + "id": "00000000-0000-0000-0000-000000000133", }, "createdBy": { - "id": "00000000-0000-0000-0000-000000000119", + "id": "00000000-0000-0000-0000-000000000131", }, "domainName": { - "id": "00000000-0000-0000-0000-000000000118", + "id": "00000000-0000-0000-0000-000000000130", }, "employees": { - "id": "00000000-0000-0000-0000-000000000122", + "id": "00000000-0000-0000-0000-000000000134", }, "linkedinLink": { - "id": "00000000-0000-0000-0000-000000000123", + "id": "00000000-0000-0000-0000-000000000135", }, "name": { - "id": "00000000-0000-0000-0000-000000000117", + "id": "00000000-0000-0000-0000-000000000129", }, }, "viewGroups": {}, }, "companyRecordPageFields": { - "id": "00000000-0000-0000-0000-000000000139", + "id": "00000000-0000-0000-0000-000000000151", "viewFieldGroups": { "additional": { - "id": "00000000-0000-0000-0000-000000000137", + "id": "00000000-0000-0000-0000-000000000149", }, "general": { - "id": "00000000-0000-0000-0000-000000000136", + "id": "00000000-0000-0000-0000-000000000148", }, "other": { - "id": "00000000-0000-0000-0000-000000000138", + "id": "00000000-0000-0000-0000-000000000150", }, }, "viewFields": { "accountOwner": { - "id": "00000000-0000-0000-0000-000000000127", + "id": "00000000-0000-0000-0000-000000000139", }, "address": { - "id": "00000000-0000-0000-0000-000000000133", + "id": "00000000-0000-0000-0000-000000000145", }, "annualRecurringRevenue": { - "id": "00000000-0000-0000-0000-000000000128", + "id": "00000000-0000-0000-0000-000000000140", }, "createdAt": { - "id": "00000000-0000-0000-0000-000000000134", + "id": "00000000-0000-0000-0000-000000000146", }, "createdBy": { - "id": "00000000-0000-0000-0000-000000000135", + "id": "00000000-0000-0000-0000-000000000147", }, "domainName": { - "id": "00000000-0000-0000-0000-000000000126", + "id": "00000000-0000-0000-0000-000000000138", }, "employees": { - "id": "00000000-0000-0000-0000-000000000130", + "id": "00000000-0000-0000-0000-000000000142", }, "idealCustomerProfile": { - "id": "00000000-0000-0000-0000-000000000129", + "id": "00000000-0000-0000-0000-000000000141", }, "linkedinLink": { - "id": "00000000-0000-0000-0000-000000000131", + "id": "00000000-0000-0000-0000-000000000143", }, "xLink": { - "id": "00000000-0000-0000-0000-000000000132", + "id": "00000000-0000-0000-0000-000000000144", }, }, "viewGroups": {}, @@ -461,119 +502,119 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object "connectedAccount": { "fields": { "accessToken": { - "id": "00000000-0000-0000-0000-000000000147", + "id": "00000000-0000-0000-0000-000000000159", }, "accountOwner": { - "id": "00000000-0000-0000-0000-000000000149", + "id": "00000000-0000-0000-0000-000000000161", }, "authFailedAt": { - "id": "00000000-0000-0000-0000-000000000151", + "id": "00000000-0000-0000-0000-000000000163", }, "calendarChannels": { - "id": "00000000-0000-0000-0000-000000000154", + "id": "00000000-0000-0000-0000-000000000166", }, "connectionParameters": { - "id": "00000000-0000-0000-0000-000000000157", + "id": "00000000-0000-0000-0000-000000000169", }, "createdAt": { - "id": "00000000-0000-0000-0000-000000000142", + "id": "00000000-0000-0000-0000-000000000154", }, "deletedAt": { - "id": "00000000-0000-0000-0000-000000000144", - }, - "handle": { - "id": "00000000-0000-0000-0000-000000000145", - }, - "handleAliases": { - "id": "00000000-0000-0000-0000-000000000155", - }, - "id": { - "id": "00000000-0000-0000-0000-000000000141", - }, - "lastCredentialsRefreshedAt": { - "id": "00000000-0000-0000-0000-000000000152", - }, - "lastSyncHistoryId": { - "id": "00000000-0000-0000-0000-000000000150", - }, - "messageChannels": { - "id": "00000000-0000-0000-0000-000000000153", - }, - "provider": { - "id": "00000000-0000-0000-0000-000000000146", - }, - "refreshToken": { - "id": "00000000-0000-0000-0000-000000000148", - }, - "scopes": { "id": "00000000-0000-0000-0000-000000000156", }, + "handle": { + "id": "00000000-0000-0000-0000-000000000157", + }, + "handleAliases": { + "id": "00000000-0000-0000-0000-000000000167", + }, + "id": { + "id": "00000000-0000-0000-0000-000000000153", + }, + "lastCredentialsRefreshedAt": { + "id": "00000000-0000-0000-0000-000000000164", + }, + "lastSyncHistoryId": { + "id": "00000000-0000-0000-0000-000000000162", + }, + "messageChannels": { + "id": "00000000-0000-0000-0000-000000000165", + }, + "provider": { + "id": "00000000-0000-0000-0000-000000000158", + }, + "refreshToken": { + "id": "00000000-0000-0000-0000-000000000160", + }, + "scopes": { + "id": "00000000-0000-0000-0000-000000000168", + }, "updatedAt": { - "id": "00000000-0000-0000-0000-000000000143", + "id": "00000000-0000-0000-0000-000000000155", }, }, - "id": "00000000-0000-0000-0000-000000000158", + "id": "00000000-0000-0000-0000-000000000170", "views": undefined, }, "dashboard": { "fields": { "attachments": { - "id": "00000000-0000-0000-0000-000000000170", + "id": "00000000-0000-0000-0000-000000000182", }, "createdAt": { - "id": "00000000-0000-0000-0000-000000000160", + "id": "00000000-0000-0000-0000-000000000172", }, "createdBy": { - "id": "00000000-0000-0000-0000-000000000166", + "id": "00000000-0000-0000-0000-000000000178", }, "deletedAt": { - "id": "00000000-0000-0000-0000-000000000162", + "id": "00000000-0000-0000-0000-000000000174", }, "favorites": { - "id": "00000000-0000-0000-0000-000000000169", + "id": "00000000-0000-0000-0000-000000000181", }, "id": { - "id": "00000000-0000-0000-0000-000000000159", - }, - "pageLayoutId": { - "id": "00000000-0000-0000-0000-000000000165", - }, - "position": { - "id": "00000000-0000-0000-0000-000000000164", - }, - "searchVector": { "id": "00000000-0000-0000-0000-000000000171", }, + "pageLayoutId": { + "id": "00000000-0000-0000-0000-000000000177", + }, + "position": { + "id": "00000000-0000-0000-0000-000000000176", + }, + "searchVector": { + "id": "00000000-0000-0000-0000-000000000183", + }, "timelineActivities": { - "id": "00000000-0000-0000-0000-000000000168", + "id": "00000000-0000-0000-0000-000000000180", }, "title": { - "id": "00000000-0000-0000-0000-000000000163", + "id": "00000000-0000-0000-0000-000000000175", }, "updatedAt": { - "id": "00000000-0000-0000-0000-000000000161", + "id": "00000000-0000-0000-0000-000000000173", }, "updatedBy": { - "id": "00000000-0000-0000-0000-000000000167", + "id": "00000000-0000-0000-0000-000000000179", }, }, - "id": "00000000-0000-0000-0000-000000000177", + "id": "00000000-0000-0000-0000-000000000189", "views": { "allDashboards": { - "id": "00000000-0000-0000-0000-000000000176", + "id": "00000000-0000-0000-0000-000000000188", "viewFieldGroups": {}, "viewFields": { "createdAt": { - "id": "00000000-0000-0000-0000-000000000174", + "id": "00000000-0000-0000-0000-000000000186", }, "createdBy": { - "id": "00000000-0000-0000-0000-000000000173", + "id": "00000000-0000-0000-0000-000000000185", }, "title": { - "id": "00000000-0000-0000-0000-000000000172", + "id": "00000000-0000-0000-0000-000000000184", }, "updatedAt": { - "id": "00000000-0000-0000-0000-000000000175", + "id": "00000000-0000-0000-0000-000000000187", }, }, "viewGroups": {}, @@ -583,152 +624,152 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object "favorite": { "fields": { "company": { - "id": "00000000-0000-0000-0000-000000000185", + "id": "00000000-0000-0000-0000-000000000197", }, "createdAt": { - "id": "00000000-0000-0000-0000-000000000179", - }, - "dashboard": { - "id": "00000000-0000-0000-0000-000000000194", - }, - "deletedAt": { - "id": "00000000-0000-0000-0000-000000000181", - }, - "favoriteFolder": { - "id": "00000000-0000-0000-0000-000000000193", - }, - "forWorkspaceMember": { - "id": "00000000-0000-0000-0000-000000000183", - }, - "id": { - "id": "00000000-0000-0000-0000-000000000178", - }, - "note": { "id": "00000000-0000-0000-0000-000000000191", }, - "opportunity": { - "id": "00000000-0000-0000-0000-000000000186", + "dashboard": { + "id": "00000000-0000-0000-0000-000000000206", }, - "person": { - "id": "00000000-0000-0000-0000-000000000184", + "deletedAt": { + "id": "00000000-0000-0000-0000-000000000193", }, - "position": { - "id": "00000000-0000-0000-0000-000000000182", + "favoriteFolder": { + "id": "00000000-0000-0000-0000-000000000205", }, - "task": { + "forWorkspaceMember": { + "id": "00000000-0000-0000-0000-000000000195", + }, + "id": { "id": "00000000-0000-0000-0000-000000000190", }, - "updatedAt": { - "id": "00000000-0000-0000-0000-000000000180", + "note": { + "id": "00000000-0000-0000-0000-000000000203", }, - "viewId": { + "opportunity": { + "id": "00000000-0000-0000-0000-000000000198", + }, + "person": { + "id": "00000000-0000-0000-0000-000000000196", + }, + "position": { + "id": "00000000-0000-0000-0000-000000000194", + }, + "task": { + "id": "00000000-0000-0000-0000-000000000202", + }, + "updatedAt": { "id": "00000000-0000-0000-0000-000000000192", }, + "viewId": { + "id": "00000000-0000-0000-0000-000000000204", + }, "workflow": { - "id": "00000000-0000-0000-0000-000000000187", + "id": "00000000-0000-0000-0000-000000000199", }, "workflowRun": { - "id": "00000000-0000-0000-0000-000000000189", + "id": "00000000-0000-0000-0000-000000000201", }, "workflowVersion": { - "id": "00000000-0000-0000-0000-000000000188", + "id": "00000000-0000-0000-0000-000000000200", }, }, - "id": "00000000-0000-0000-0000-000000000195", + "id": "00000000-0000-0000-0000-000000000207", "views": undefined, }, "favoriteFolder": { "fields": { "createdAt": { - "id": "00000000-0000-0000-0000-000000000197", + "id": "00000000-0000-0000-0000-000000000209", }, "deletedAt": { - "id": "00000000-0000-0000-0000-000000000199", + "id": "00000000-0000-0000-0000-000000000211", }, "favorites": { - "id": "00000000-0000-0000-0000-000000000202", + "id": "00000000-0000-0000-0000-000000000214", }, "id": { - "id": "00000000-0000-0000-0000-000000000196", + "id": "00000000-0000-0000-0000-000000000208", }, "name": { - "id": "00000000-0000-0000-0000-000000000201", + "id": "00000000-0000-0000-0000-000000000213", }, "position": { - "id": "00000000-0000-0000-0000-000000000200", + "id": "00000000-0000-0000-0000-000000000212", }, "updatedAt": { - "id": "00000000-0000-0000-0000-000000000198", + "id": "00000000-0000-0000-0000-000000000210", }, }, - "id": "00000000-0000-0000-0000-000000000203", + "id": "00000000-0000-0000-0000-000000000215", "views": undefined, }, "message": { "fields": { "createdAt": { - "id": "00000000-0000-0000-0000-000000000275", + "id": "00000000-0000-0000-0000-000000000287", }, "deletedAt": { - "id": "00000000-0000-0000-0000-000000000277", + "id": "00000000-0000-0000-0000-000000000289", }, "direction": { - "id": "00000000-0000-0000-0000-000000000280", + "id": "00000000-0000-0000-0000-000000000292", }, "headerMessageId": { - "id": "00000000-0000-0000-0000-000000000278", + "id": "00000000-0000-0000-0000-000000000290", }, "id": { - "id": "00000000-0000-0000-0000-000000000274", + "id": "00000000-0000-0000-0000-000000000286", }, "messageChannelMessageAssociations": { - "id": "00000000-0000-0000-0000-000000000285", + "id": "00000000-0000-0000-0000-000000000297", }, "messageParticipants": { - "id": "00000000-0000-0000-0000-000000000284", + "id": "00000000-0000-0000-0000-000000000296", }, "messageThread": { - "id": "00000000-0000-0000-0000-000000000279", + "id": "00000000-0000-0000-0000-000000000291", }, "receivedAt": { - "id": "00000000-0000-0000-0000-000000000283", + "id": "00000000-0000-0000-0000-000000000295", }, "subject": { - "id": "00000000-0000-0000-0000-000000000281", + "id": "00000000-0000-0000-0000-000000000293", }, "text": { - "id": "00000000-0000-0000-0000-000000000282", + "id": "00000000-0000-0000-0000-000000000294", }, "updatedAt": { - "id": "00000000-0000-0000-0000-000000000276", + "id": "00000000-0000-0000-0000-000000000288", }, }, - "id": "00000000-0000-0000-0000-000000000294", + "id": "00000000-0000-0000-0000-000000000306", "views": { "allMessages": { - "id": "00000000-0000-0000-0000-000000000293", + "id": "00000000-0000-0000-0000-000000000305", "viewFieldGroups": {}, "viewFields": { "createdAt": { - "id": "00000000-0000-0000-0000-000000000292", + "id": "00000000-0000-0000-0000-000000000304", }, "headerMessageId": { - "id": "00000000-0000-0000-0000-000000000290", + "id": "00000000-0000-0000-0000-000000000302", }, "messageParticipants": { - "id": "00000000-0000-0000-0000-000000000288", + "id": "00000000-0000-0000-0000-000000000300", }, "messageThread": { - "id": "00000000-0000-0000-0000-000000000287", + "id": "00000000-0000-0000-0000-000000000299", }, "receivedAt": { - "id": "00000000-0000-0000-0000-000000000289", + "id": "00000000-0000-0000-0000-000000000301", }, "subject": { - "id": "00000000-0000-0000-0000-000000000286", + "id": "00000000-0000-0000-0000-000000000298", }, "text": { - "id": "00000000-0000-0000-0000-000000000291", + "id": "00000000-0000-0000-0000-000000000303", }, }, "viewGroups": {}, @@ -738,227 +779,227 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object "messageChannel": { "fields": { "connectedAccount": { - "id": "00000000-0000-0000-0000-000000000221", - }, - "contactAutoCreationPolicy": { - "id": "00000000-0000-0000-0000-000000000224", - }, - "createdAt": { - "id": "00000000-0000-0000-0000-000000000216", - }, - "deletedAt": { - "id": "00000000-0000-0000-0000-000000000218", - }, - "excludeGroupEmails": { - "id": "00000000-0000-0000-0000-000000000226", - }, - "excludeNonProfessionalEmails": { - "id": "00000000-0000-0000-0000-000000000225", - }, - "handle": { - "id": "00000000-0000-0000-0000-000000000220", - }, - "id": { - "id": "00000000-0000-0000-0000-000000000215", - }, - "isContactAutoCreationEnabled": { - "id": "00000000-0000-0000-0000-000000000223", - }, - "isSyncEnabled": { - "id": "00000000-0000-0000-0000-000000000231", - }, - "messageChannelMessageAssociations": { - "id": "00000000-0000-0000-0000-000000000227", - }, - "messageFolderImportPolicy": { - "id": "00000000-0000-0000-0000-000000000229", - }, - "messageFolders": { - "id": "00000000-0000-0000-0000-000000000228", - }, - "pendingGroupEmailsAction": { - "id": "00000000-0000-0000-0000-000000000230", - }, - "syncCursor": { - "id": "00000000-0000-0000-0000-000000000232", - }, - "syncStage": { - "id": "00000000-0000-0000-0000-000000000235", - }, - "syncStageStartedAt": { - "id": "00000000-0000-0000-0000-000000000236", - }, - "syncStatus": { - "id": "00000000-0000-0000-0000-000000000234", - }, - "syncedAt": { "id": "00000000-0000-0000-0000-000000000233", }, - "throttleFailureCount": { - "id": "00000000-0000-0000-0000-000000000237", + "contactAutoCreationPolicy": { + "id": "00000000-0000-0000-0000-000000000236", }, - "throttleRetryAfter": { + "createdAt": { + "id": "00000000-0000-0000-0000-000000000228", + }, + "deletedAt": { + "id": "00000000-0000-0000-0000-000000000230", + }, + "excludeGroupEmails": { "id": "00000000-0000-0000-0000-000000000238", }, + "excludeNonProfessionalEmails": { + "id": "00000000-0000-0000-0000-000000000237", + }, + "handle": { + "id": "00000000-0000-0000-0000-000000000232", + }, + "id": { + "id": "00000000-0000-0000-0000-000000000227", + }, + "isContactAutoCreationEnabled": { + "id": "00000000-0000-0000-0000-000000000235", + }, + "isSyncEnabled": { + "id": "00000000-0000-0000-0000-000000000243", + }, + "messageChannelMessageAssociations": { + "id": "00000000-0000-0000-0000-000000000239", + }, + "messageFolderImportPolicy": { + "id": "00000000-0000-0000-0000-000000000241", + }, + "messageFolders": { + "id": "00000000-0000-0000-0000-000000000240", + }, + "pendingGroupEmailsAction": { + "id": "00000000-0000-0000-0000-000000000242", + }, + "syncCursor": { + "id": "00000000-0000-0000-0000-000000000244", + }, + "syncStage": { + "id": "00000000-0000-0000-0000-000000000247", + }, + "syncStageStartedAt": { + "id": "00000000-0000-0000-0000-000000000248", + }, + "syncStatus": { + "id": "00000000-0000-0000-0000-000000000246", + }, + "syncedAt": { + "id": "00000000-0000-0000-0000-000000000245", + }, + "throttleFailureCount": { + "id": "00000000-0000-0000-0000-000000000249", + }, + "throttleRetryAfter": { + "id": "00000000-0000-0000-0000-000000000250", + }, "type": { - "id": "00000000-0000-0000-0000-000000000222", + "id": "00000000-0000-0000-0000-000000000234", }, "updatedAt": { - "id": "00000000-0000-0000-0000-000000000217", + "id": "00000000-0000-0000-0000-000000000229", }, "visibility": { - "id": "00000000-0000-0000-0000-000000000219", + "id": "00000000-0000-0000-0000-000000000231", }, }, - "id": "00000000-0000-0000-0000-000000000239", + "id": "00000000-0000-0000-0000-000000000251", "views": undefined, }, "messageChannelMessageAssociation": { "fields": { "createdAt": { - "id": "00000000-0000-0000-0000-000000000205", + "id": "00000000-0000-0000-0000-000000000217", }, "deletedAt": { - "id": "00000000-0000-0000-0000-000000000207", + "id": "00000000-0000-0000-0000-000000000219", }, "direction": { - "id": "00000000-0000-0000-0000-000000000213", + "id": "00000000-0000-0000-0000-000000000225", }, "id": { - "id": "00000000-0000-0000-0000-000000000204", + "id": "00000000-0000-0000-0000-000000000216", }, "message": { - "id": "00000000-0000-0000-0000-000000000209", + "id": "00000000-0000-0000-0000-000000000221", }, "messageChannel": { - "id": "00000000-0000-0000-0000-000000000208", + "id": "00000000-0000-0000-0000-000000000220", }, "messageExternalId": { - "id": "00000000-0000-0000-0000-000000000210", + "id": "00000000-0000-0000-0000-000000000222", }, "messageThread": { - "id": "00000000-0000-0000-0000-000000000211", + "id": "00000000-0000-0000-0000-000000000223", }, "messageThreadExternalId": { - "id": "00000000-0000-0000-0000-000000000212", + "id": "00000000-0000-0000-0000-000000000224", }, "updatedAt": { - "id": "00000000-0000-0000-0000-000000000206", + "id": "00000000-0000-0000-0000-000000000218", }, }, - "id": "00000000-0000-0000-0000-000000000214", + "id": "00000000-0000-0000-0000-000000000226", "views": undefined, }, "messageFolder": { "fields": { "createdAt": { - "id": "00000000-0000-0000-0000-000000000241", + "id": "00000000-0000-0000-0000-000000000253", }, "deletedAt": { - "id": "00000000-0000-0000-0000-000000000243", + "id": "00000000-0000-0000-0000-000000000255", }, "externalId": { - "id": "00000000-0000-0000-0000-000000000250", + "id": "00000000-0000-0000-0000-000000000262", }, "id": { - "id": "00000000-0000-0000-0000-000000000240", + "id": "00000000-0000-0000-0000-000000000252", }, "isSentFolder": { - "id": "00000000-0000-0000-0000-000000000248", + "id": "00000000-0000-0000-0000-000000000260", }, "isSynced": { - "id": "00000000-0000-0000-0000-000000000249", + "id": "00000000-0000-0000-0000-000000000261", }, "messageChannel": { - "id": "00000000-0000-0000-0000-000000000246", + "id": "00000000-0000-0000-0000-000000000258", }, "name": { - "id": "00000000-0000-0000-0000-000000000244", + "id": "00000000-0000-0000-0000-000000000256", }, "parentFolderId": { - "id": "00000000-0000-0000-0000-000000000245", + "id": "00000000-0000-0000-0000-000000000257", }, "pendingSyncAction": { - "id": "00000000-0000-0000-0000-000000000251", + "id": "00000000-0000-0000-0000-000000000263", }, "syncCursor": { - "id": "00000000-0000-0000-0000-000000000247", + "id": "00000000-0000-0000-0000-000000000259", }, "updatedAt": { - "id": "00000000-0000-0000-0000-000000000242", + "id": "00000000-0000-0000-0000-000000000254", }, }, - "id": "00000000-0000-0000-0000-000000000252", + "id": "00000000-0000-0000-0000-000000000264", "views": undefined, }, "messageParticipant": { "fields": { "createdAt": { - "id": "00000000-0000-0000-0000-000000000254", + "id": "00000000-0000-0000-0000-000000000266", }, "deletedAt": { - "id": "00000000-0000-0000-0000-000000000256", + "id": "00000000-0000-0000-0000-000000000268", }, "displayName": { - "id": "00000000-0000-0000-0000-000000000260", + "id": "00000000-0000-0000-0000-000000000272", }, "handle": { - "id": "00000000-0000-0000-0000-000000000259", + "id": "00000000-0000-0000-0000-000000000271", }, "id": { - "id": "00000000-0000-0000-0000-000000000253", + "id": "00000000-0000-0000-0000-000000000265", }, "message": { - "id": "00000000-0000-0000-0000-000000000257", + "id": "00000000-0000-0000-0000-000000000269", }, "person": { - "id": "00000000-0000-0000-0000-000000000261", + "id": "00000000-0000-0000-0000-000000000273", }, "role": { - "id": "00000000-0000-0000-0000-000000000258", + "id": "00000000-0000-0000-0000-000000000270", }, "updatedAt": { - "id": "00000000-0000-0000-0000-000000000255", + "id": "00000000-0000-0000-0000-000000000267", }, "workspaceMember": { - "id": "00000000-0000-0000-0000-000000000262", + "id": "00000000-0000-0000-0000-000000000274", }, }, - "id": "00000000-0000-0000-0000-000000000263", + "id": "00000000-0000-0000-0000-000000000275", "views": undefined, }, "messageThread": { "fields": { "createdAt": { - "id": "00000000-0000-0000-0000-000000000265", + "id": "00000000-0000-0000-0000-000000000277", }, "deletedAt": { - "id": "00000000-0000-0000-0000-000000000267", + "id": "00000000-0000-0000-0000-000000000279", }, "id": { - "id": "00000000-0000-0000-0000-000000000264", + "id": "00000000-0000-0000-0000-000000000276", }, "messageChannelMessageAssociations": { - "id": "00000000-0000-0000-0000-000000000269", + "id": "00000000-0000-0000-0000-000000000281", }, "messages": { - "id": "00000000-0000-0000-0000-000000000268", + "id": "00000000-0000-0000-0000-000000000280", }, "updatedAt": { - "id": "00000000-0000-0000-0000-000000000266", + "id": "00000000-0000-0000-0000-000000000278", }, }, - "id": "00000000-0000-0000-0000-000000000273", + "id": "00000000-0000-0000-0000-000000000285", "views": { "allMessageThreads": { - "id": "00000000-0000-0000-0000-000000000272", + "id": "00000000-0000-0000-0000-000000000284", "viewFieldGroups": {}, "viewFields": { "createdAt": { - "id": "00000000-0000-0000-0000-000000000271", + "id": "00000000-0000-0000-0000-000000000283", }, "messages": { - "id": "00000000-0000-0000-0000-000000000270", + "id": "00000000-0000-0000-0000-000000000282", }, }, "viewGroups": {}, @@ -968,94 +1009,94 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object "note": { "fields": { "attachments": { - "id": "00000000-0000-0000-0000-000000000305", + "id": "00000000-0000-0000-0000-000000000317", }, "bodyV2": { - "id": "00000000-0000-0000-0000-000000000301", + "id": "00000000-0000-0000-0000-000000000313", }, "createdAt": { - "id": "00000000-0000-0000-0000-000000000296", - }, - "createdBy": { - "id": "00000000-0000-0000-0000-000000000302", - }, - "deletedAt": { - "id": "00000000-0000-0000-0000-000000000298", - }, - "favorites": { - "id": "00000000-0000-0000-0000-000000000307", - }, - "id": { - "id": "00000000-0000-0000-0000-000000000295", - }, - "noteTargets": { - "id": "00000000-0000-0000-0000-000000000304", - }, - "position": { - "id": "00000000-0000-0000-0000-000000000299", - }, - "searchVector": { "id": "00000000-0000-0000-0000-000000000308", }, + "createdBy": { + "id": "00000000-0000-0000-0000-000000000314", + }, + "deletedAt": { + "id": "00000000-0000-0000-0000-000000000310", + }, + "favorites": { + "id": "00000000-0000-0000-0000-000000000319", + }, + "id": { + "id": "00000000-0000-0000-0000-000000000307", + }, + "noteTargets": { + "id": "00000000-0000-0000-0000-000000000316", + }, + "position": { + "id": "00000000-0000-0000-0000-000000000311", + }, + "searchVector": { + "id": "00000000-0000-0000-0000-000000000320", + }, "timelineActivities": { - "id": "00000000-0000-0000-0000-000000000306", + "id": "00000000-0000-0000-0000-000000000318", }, "title": { - "id": "00000000-0000-0000-0000-000000000300", + "id": "00000000-0000-0000-0000-000000000312", }, "updatedAt": { - "id": "00000000-0000-0000-0000-000000000297", + "id": "00000000-0000-0000-0000-000000000309", }, "updatedBy": { - "id": "00000000-0000-0000-0000-000000000303", + "id": "00000000-0000-0000-0000-000000000315", }, }, - "id": "00000000-0000-0000-0000-000000000322", + "id": "00000000-0000-0000-0000-000000000334", "views": { "allNotes": { - "id": "00000000-0000-0000-0000-000000000314", + "id": "00000000-0000-0000-0000-000000000326", "viewFieldGroups": {}, "viewFields": { "bodyV2": { - "id": "00000000-0000-0000-0000-000000000311", + "id": "00000000-0000-0000-0000-000000000323", }, "createdAt": { - "id": "00000000-0000-0000-0000-000000000313", + "id": "00000000-0000-0000-0000-000000000325", }, "createdBy": { - "id": "00000000-0000-0000-0000-000000000312", + "id": "00000000-0000-0000-0000-000000000324", }, "noteTargets": { - "id": "00000000-0000-0000-0000-000000000310", + "id": "00000000-0000-0000-0000-000000000322", }, "title": { - "id": "00000000-0000-0000-0000-000000000309", + "id": "00000000-0000-0000-0000-000000000321", }, }, "viewGroups": {}, }, "noteRecordPageFields": { - "id": "00000000-0000-0000-0000-000000000321", + "id": "00000000-0000-0000-0000-000000000333", "viewFieldGroups": { "additional": { - "id": "00000000-0000-0000-0000-000000000319", + "id": "00000000-0000-0000-0000-000000000331", }, "general": { - "id": "00000000-0000-0000-0000-000000000318", + "id": "00000000-0000-0000-0000-000000000330", }, "other": { - "id": "00000000-0000-0000-0000-000000000320", + "id": "00000000-0000-0000-0000-000000000332", }, }, "viewFields": { "createdAt": { - "id": "00000000-0000-0000-0000-000000000316", + "id": "00000000-0000-0000-0000-000000000328", }, "createdBy": { - "id": "00000000-0000-0000-0000-000000000317", + "id": "00000000-0000-0000-0000-000000000329", }, "title": { - "id": "00000000-0000-0000-0000-000000000315", + "id": "00000000-0000-0000-0000-000000000327", }, }, "viewGroups": {}, @@ -1065,201 +1106,224 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object "noteTarget": { "fields": { "createdAt": { - "id": "00000000-0000-0000-0000-000000000324", - }, - "deletedAt": { - "id": "00000000-0000-0000-0000-000000000326", - }, - "id": { - "id": "00000000-0000-0000-0000-000000000323", - }, - "note": { - "id": "00000000-0000-0000-0000-000000000327", - }, - "targetCompany": { - "id": "00000000-0000-0000-0000-000000000329", - }, - "targetOpportunity": { - "id": "00000000-0000-0000-0000-000000000330", - }, - "targetPerson": { - "id": "00000000-0000-0000-0000-000000000328", - }, - "updatedAt": { - "id": "00000000-0000-0000-0000-000000000325", - }, - }, - "id": "00000000-0000-0000-0000-000000000331", - "views": undefined, - }, - "opportunity": { - "fields": { - "amount": { - "id": "00000000-0000-0000-0000-000000000337", - }, - "attachments": { - "id": "00000000-0000-0000-0000-000000000349", - }, - "closeDate": { - "id": "00000000-0000-0000-0000-000000000338", - }, - "company": { - "id": "00000000-0000-0000-0000-000000000344", - }, - "createdAt": { - "id": "00000000-0000-0000-0000-000000000333", - }, - "createdBy": { - "id": "00000000-0000-0000-0000-000000000341", - }, - "deletedAt": { - "id": "00000000-0000-0000-0000-000000000335", - }, - "favorites": { - "id": "00000000-0000-0000-0000-000000000346", - }, - "id": { - "id": "00000000-0000-0000-0000-000000000332", - }, - "name": { "id": "00000000-0000-0000-0000-000000000336", }, - "noteTargets": { - "id": "00000000-0000-0000-0000-000000000348", + "deletedAt": { + "id": "00000000-0000-0000-0000-000000000338", }, - "owner": { - "id": "00000000-0000-0000-0000-000000000345", + "id": { + "id": "00000000-0000-0000-0000-000000000335", }, - "pointOfContact": { - "id": "00000000-0000-0000-0000-000000000343", - }, - "position": { - "id": "00000000-0000-0000-0000-000000000340", - }, - "searchVector": { - "id": "00000000-0000-0000-0000-000000000351", - }, - "stage": { + "note": { "id": "00000000-0000-0000-0000-000000000339", }, - "taskTargets": { - "id": "00000000-0000-0000-0000-000000000347", + "targetCompany": { + "id": "00000000-0000-0000-0000-000000000341", }, - "timelineActivities": { - "id": "00000000-0000-0000-0000-000000000350", - }, - "updatedAt": { - "id": "00000000-0000-0000-0000-000000000334", - }, - "updatedBy": { + "targetOpportunity": { "id": "00000000-0000-0000-0000-000000000342", }, + "targetPerson": { + "id": "00000000-0000-0000-0000-000000000340", + }, + "updatedAt": { + "id": "00000000-0000-0000-0000-000000000337", + }, }, - "id": "00000000-0000-0000-0000-000000000383", + "id": "00000000-0000-0000-0000-000000000349", "views": { - "allOpportunities": { - "id": "00000000-0000-0000-0000-000000000358", + "allNoteTargets": { + "id": "00000000-0000-0000-0000-000000000348", "viewFieldGroups": {}, "viewFields": { - "amount": { - "id": "00000000-0000-0000-0000-000000000353", + "id": { + "id": "00000000-0000-0000-0000-000000000343", }, - "closeDate": { - "id": "00000000-0000-0000-0000-000000000355", + "note": { + "id": "00000000-0000-0000-0000-000000000344", }, - "company": { - "id": "00000000-0000-0000-0000-000000000356", + "targetCompany": { + "id": "00000000-0000-0000-0000-000000000346", }, - "createdBy": { - "id": "00000000-0000-0000-0000-000000000354", + "targetOpportunity": { + "id": "00000000-0000-0000-0000-000000000347", }, - "name": { - "id": "00000000-0000-0000-0000-000000000352", - }, - "pointOfContact": { - "id": "00000000-0000-0000-0000-000000000357", + "targetPerson": { + "id": "00000000-0000-0000-0000-000000000345", }, }, "viewGroups": {}, }, - "byStage": { - "id": "00000000-0000-0000-0000-000000000370", - "viewFieldGroups": {}, - "viewFields": { - "amount": { - "id": "00000000-0000-0000-0000-000000000360", - }, - "closeDate": { - "id": "00000000-0000-0000-0000-000000000362", - }, - "company": { - "id": "00000000-0000-0000-0000-000000000363", - }, - "createdBy": { - "id": "00000000-0000-0000-0000-000000000361", - }, - "name": { - "id": "00000000-0000-0000-0000-000000000359", - }, - "pointOfContact": { - "id": "00000000-0000-0000-0000-000000000364", - }, - }, - "viewGroups": { - "customer": { - "id": "00000000-0000-0000-0000-000000000369", - }, - "meeting": { - "id": "00000000-0000-0000-0000-000000000367", - }, - "new": { - "id": "00000000-0000-0000-0000-000000000365", - }, - "proposal": { - "id": "00000000-0000-0000-0000-000000000368", - }, - "screening": { - "id": "00000000-0000-0000-0000-000000000366", - }, - }, + }, + }, + "opportunity": { + "fields": { + "amount": { + "id": "00000000-0000-0000-0000-000000000355", }, - "opportunityRecordPageFields": { - "id": "00000000-0000-0000-0000-000000000382", - "viewFieldGroups": { - "additional": { - "id": "00000000-0000-0000-0000-000000000380", - }, - "general": { - "id": "00000000-0000-0000-0000-000000000379", - }, - "other": { - "id": "00000000-0000-0000-0000-000000000381", - }, - }, + "attachments": { + "id": "00000000-0000-0000-0000-000000000367", + }, + "closeDate": { + "id": "00000000-0000-0000-0000-000000000356", + }, + "company": { + "id": "00000000-0000-0000-0000-000000000362", + }, + "createdAt": { + "id": "00000000-0000-0000-0000-000000000351", + }, + "createdBy": { + "id": "00000000-0000-0000-0000-000000000359", + }, + "deletedAt": { + "id": "00000000-0000-0000-0000-000000000353", + }, + "favorites": { + "id": "00000000-0000-0000-0000-000000000364", + }, + "id": { + "id": "00000000-0000-0000-0000-000000000350", + }, + "name": { + "id": "00000000-0000-0000-0000-000000000354", + }, + "noteTargets": { + "id": "00000000-0000-0000-0000-000000000366", + }, + "owner": { + "id": "00000000-0000-0000-0000-000000000363", + }, + "pointOfContact": { + "id": "00000000-0000-0000-0000-000000000361", + }, + "position": { + "id": "00000000-0000-0000-0000-000000000358", + }, + "searchVector": { + "id": "00000000-0000-0000-0000-000000000369", + }, + "stage": { + "id": "00000000-0000-0000-0000-000000000357", + }, + "taskTargets": { + "id": "00000000-0000-0000-0000-000000000365", + }, + "timelineActivities": { + "id": "00000000-0000-0000-0000-000000000368", + }, + "updatedAt": { + "id": "00000000-0000-0000-0000-000000000352", + }, + "updatedBy": { + "id": "00000000-0000-0000-0000-000000000360", + }, + }, + "id": "00000000-0000-0000-0000-000000000401", + "views": { + "allOpportunities": { + "id": "00000000-0000-0000-0000-000000000376", + "viewFieldGroups": {}, "viewFields": { "amount": { "id": "00000000-0000-0000-0000-000000000371", }, "closeDate": { - "id": "00000000-0000-0000-0000-000000000372", + "id": "00000000-0000-0000-0000-000000000373", }, "company": { "id": "00000000-0000-0000-0000-000000000374", }, - "createdAt": { - "id": "00000000-0000-0000-0000-000000000377", - }, "createdBy": { - "id": "00000000-0000-0000-0000-000000000378", + "id": "00000000-0000-0000-0000-000000000372", }, - "owner": { - "id": "00000000-0000-0000-0000-000000000376", + "name": { + "id": "00000000-0000-0000-0000-000000000370", }, "pointOfContact": { "id": "00000000-0000-0000-0000-000000000375", }, + }, + "viewGroups": {}, + }, + "byStage": { + "id": "00000000-0000-0000-0000-000000000388", + "viewFieldGroups": {}, + "viewFields": { + "amount": { + "id": "00000000-0000-0000-0000-000000000378", + }, + "closeDate": { + "id": "00000000-0000-0000-0000-000000000380", + }, + "company": { + "id": "00000000-0000-0000-0000-000000000381", + }, + "createdBy": { + "id": "00000000-0000-0000-0000-000000000379", + }, + "name": { + "id": "00000000-0000-0000-0000-000000000377", + }, + "pointOfContact": { + "id": "00000000-0000-0000-0000-000000000382", + }, + }, + "viewGroups": { + "customer": { + "id": "00000000-0000-0000-0000-000000000387", + }, + "meeting": { + "id": "00000000-0000-0000-0000-000000000385", + }, + "new": { + "id": "00000000-0000-0000-0000-000000000383", + }, + "proposal": { + "id": "00000000-0000-0000-0000-000000000386", + }, + "screening": { + "id": "00000000-0000-0000-0000-000000000384", + }, + }, + }, + "opportunityRecordPageFields": { + "id": "00000000-0000-0000-0000-000000000400", + "viewFieldGroups": { + "additional": { + "id": "00000000-0000-0000-0000-000000000398", + }, + "general": { + "id": "00000000-0000-0000-0000-000000000397", + }, + "other": { + "id": "00000000-0000-0000-0000-000000000399", + }, + }, + "viewFields": { + "amount": { + "id": "00000000-0000-0000-0000-000000000389", + }, + "closeDate": { + "id": "00000000-0000-0000-0000-000000000390", + }, + "company": { + "id": "00000000-0000-0000-0000-000000000392", + }, + "createdAt": { + "id": "00000000-0000-0000-0000-000000000395", + }, + "createdBy": { + "id": "00000000-0000-0000-0000-000000000396", + }, + "owner": { + "id": "00000000-0000-0000-0000-000000000394", + }, + "pointOfContact": { + "id": "00000000-0000-0000-0000-000000000393", + }, "stage": { - "id": "00000000-0000-0000-0000-000000000373", + "id": "00000000-0000-0000-0000-000000000391", }, }, "viewGroups": {}, @@ -1269,166 +1333,166 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object "person": { "fields": { "attachments": { - "id": "00000000-0000-0000-0000-000000000405", + "id": "00000000-0000-0000-0000-000000000423", }, "avatarFile": { - "id": "00000000-0000-0000-0000-000000000396", + "id": "00000000-0000-0000-0000-000000000414", }, "avatarUrl": { - "id": "00000000-0000-0000-0000-000000000395", + "id": "00000000-0000-0000-0000-000000000413", }, "calendarEventParticipants": { - "id": "00000000-0000-0000-0000-000000000407", + "id": "00000000-0000-0000-0000-000000000425", }, "city": { - "id": "00000000-0000-0000-0000-000000000394", + "id": "00000000-0000-0000-0000-000000000412", }, "company": { - "id": "00000000-0000-0000-0000-000000000400", + "id": "00000000-0000-0000-0000-000000000418", }, "createdAt": { - "id": "00000000-0000-0000-0000-000000000385", - }, - "createdBy": { - "id": "00000000-0000-0000-0000-000000000398", - }, - "deletedAt": { - "id": "00000000-0000-0000-0000-000000000387", - }, - "emails": { - "id": "00000000-0000-0000-0000-000000000389", - }, - "favorites": { - "id": "00000000-0000-0000-0000-000000000404", - }, - "id": { - "id": "00000000-0000-0000-0000-000000000384", - }, - "jobTitle": { - "id": "00000000-0000-0000-0000-000000000392", - }, - "linkedinLink": { - "id": "00000000-0000-0000-0000-000000000390", - }, - "messageParticipants": { - "id": "00000000-0000-0000-0000-000000000406", - }, - "name": { - "id": "00000000-0000-0000-0000-000000000388", - }, - "noteTargets": { "id": "00000000-0000-0000-0000-000000000403", }, - "phones": { - "id": "00000000-0000-0000-0000-000000000393", + "createdBy": { + "id": "00000000-0000-0000-0000-000000000416", }, - "pointOfContactForOpportunities": { - "id": "00000000-0000-0000-0000-000000000401", + "deletedAt": { + "id": "00000000-0000-0000-0000-000000000405", }, - "position": { - "id": "00000000-0000-0000-0000-000000000397", + "emails": { + "id": "00000000-0000-0000-0000-000000000407", }, - "searchVector": { - "id": "00000000-0000-0000-0000-000000000409", + "favorites": { + "id": "00000000-0000-0000-0000-000000000422", }, - "taskTargets": { + "id": { "id": "00000000-0000-0000-0000-000000000402", }, - "timelineActivities": { + "jobTitle": { + "id": "00000000-0000-0000-0000-000000000410", + }, + "linkedinLink": { "id": "00000000-0000-0000-0000-000000000408", }, + "messageParticipants": { + "id": "00000000-0000-0000-0000-000000000424", + }, + "name": { + "id": "00000000-0000-0000-0000-000000000406", + }, + "noteTargets": { + "id": "00000000-0000-0000-0000-000000000421", + }, + "phones": { + "id": "00000000-0000-0000-0000-000000000411", + }, + "pointOfContactForOpportunities": { + "id": "00000000-0000-0000-0000-000000000419", + }, + "position": { + "id": "00000000-0000-0000-0000-000000000415", + }, + "searchVector": { + "id": "00000000-0000-0000-0000-000000000427", + }, + "taskTargets": { + "id": "00000000-0000-0000-0000-000000000420", + }, + "timelineActivities": { + "id": "00000000-0000-0000-0000-000000000426", + }, "updatedAt": { - "id": "00000000-0000-0000-0000-000000000386", + "id": "00000000-0000-0000-0000-000000000404", }, "updatedBy": { - "id": "00000000-0000-0000-0000-000000000399", + "id": "00000000-0000-0000-0000-000000000417", }, "xLink": { - "id": "00000000-0000-0000-0000-000000000391", + "id": "00000000-0000-0000-0000-000000000409", }, }, - "id": "00000000-0000-0000-0000-000000000435", + "id": "00000000-0000-0000-0000-000000000453", "views": { "allPeople": { - "id": "00000000-0000-0000-0000-000000000420", + "id": "00000000-0000-0000-0000-000000000438", "viewFieldGroups": {}, "viewFields": { "city": { - "id": "00000000-0000-0000-0000-000000000416", + "id": "00000000-0000-0000-0000-000000000434", }, "company": { - "id": "00000000-0000-0000-0000-000000000413", - }, - "createdAt": { - "id": "00000000-0000-0000-0000-000000000415", - }, - "createdBy": { - "id": "00000000-0000-0000-0000-000000000412", - }, - "emails": { - "id": "00000000-0000-0000-0000-000000000411", - }, - "jobTitle": { - "id": "00000000-0000-0000-0000-000000000417", - }, - "linkedinLink": { - "id": "00000000-0000-0000-0000-000000000418", - }, - "name": { - "id": "00000000-0000-0000-0000-000000000410", - }, - "phones": { - "id": "00000000-0000-0000-0000-000000000414", - }, - "xLink": { - "id": "00000000-0000-0000-0000-000000000419", - }, - }, - "viewGroups": {}, - }, - "personRecordPageFields": { - "id": "00000000-0000-0000-0000-000000000434", - "viewFieldGroups": { - "additional": { - "id": "00000000-0000-0000-0000-000000000432", - }, - "general": { "id": "00000000-0000-0000-0000-000000000431", }, - "other": { - "id": "00000000-0000-0000-0000-000000000433", - }, - }, - "viewFields": { - "avatarUrl": { - "id": "00000000-0000-0000-0000-000000000428", - }, - "city": { - "id": "00000000-0000-0000-0000-000000000427", - }, - "company": { - "id": "00000000-0000-0000-0000-000000000423", - }, "createdAt": { - "id": "00000000-0000-0000-0000-000000000429", + "id": "00000000-0000-0000-0000-000000000433", }, "createdBy": { "id": "00000000-0000-0000-0000-000000000430", }, "emails": { - "id": "00000000-0000-0000-0000-000000000421", + "id": "00000000-0000-0000-0000-000000000429", }, "jobTitle": { - "id": "00000000-0000-0000-0000-000000000424", + "id": "00000000-0000-0000-0000-000000000435", }, "linkedinLink": { - "id": "00000000-0000-0000-0000-000000000425", + "id": "00000000-0000-0000-0000-000000000436", + }, + "name": { + "id": "00000000-0000-0000-0000-000000000428", }, "phones": { - "id": "00000000-0000-0000-0000-000000000422", + "id": "00000000-0000-0000-0000-000000000432", }, "xLink": { - "id": "00000000-0000-0000-0000-000000000426", + "id": "00000000-0000-0000-0000-000000000437", + }, + }, + "viewGroups": {}, + }, + "personRecordPageFields": { + "id": "00000000-0000-0000-0000-000000000452", + "viewFieldGroups": { + "additional": { + "id": "00000000-0000-0000-0000-000000000450", + }, + "general": { + "id": "00000000-0000-0000-0000-000000000449", + }, + "other": { + "id": "00000000-0000-0000-0000-000000000451", + }, + }, + "viewFields": { + "avatarUrl": { + "id": "00000000-0000-0000-0000-000000000446", + }, + "city": { + "id": "00000000-0000-0000-0000-000000000445", + }, + "company": { + "id": "00000000-0000-0000-0000-000000000441", + }, + "createdAt": { + "id": "00000000-0000-0000-0000-000000000447", + }, + "createdBy": { + "id": "00000000-0000-0000-0000-000000000448", + }, + "emails": { + "id": "00000000-0000-0000-0000-000000000439", + }, + "jobTitle": { + "id": "00000000-0000-0000-0000-000000000442", + }, + "linkedinLink": { + "id": "00000000-0000-0000-0000-000000000443", + }, + "phones": { + "id": "00000000-0000-0000-0000-000000000440", + }, + "xLink": { + "id": "00000000-0000-0000-0000-000000000444", }, }, "viewGroups": {}, @@ -1438,194 +1502,194 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object "task": { "fields": { "assignee": { - "id": "00000000-0000-0000-0000-000000000449", + "id": "00000000-0000-0000-0000-000000000467", }, "attachments": { - "id": "00000000-0000-0000-0000-000000000448", + "id": "00000000-0000-0000-0000-000000000466", }, "bodyV2": { - "id": "00000000-0000-0000-0000-000000000442", + "id": "00000000-0000-0000-0000-000000000460", }, "createdAt": { - "id": "00000000-0000-0000-0000-000000000437", + "id": "00000000-0000-0000-0000-000000000455", }, "createdBy": { - "id": "00000000-0000-0000-0000-000000000445", + "id": "00000000-0000-0000-0000-000000000463", }, "deletedAt": { - "id": "00000000-0000-0000-0000-000000000439", + "id": "00000000-0000-0000-0000-000000000457", }, "dueAt": { - "id": "00000000-0000-0000-0000-000000000443", + "id": "00000000-0000-0000-0000-000000000461", }, "favorites": { - "id": "00000000-0000-0000-0000-000000000451", + "id": "00000000-0000-0000-0000-000000000469", }, "id": { - "id": "00000000-0000-0000-0000-000000000436", + "id": "00000000-0000-0000-0000-000000000454", }, "position": { - "id": "00000000-0000-0000-0000-000000000440", + "id": "00000000-0000-0000-0000-000000000458", }, "searchVector": { - "id": "00000000-0000-0000-0000-000000000452", + "id": "00000000-0000-0000-0000-000000000470", }, "status": { - "id": "00000000-0000-0000-0000-000000000444", + "id": "00000000-0000-0000-0000-000000000462", }, "taskTargets": { - "id": "00000000-0000-0000-0000-000000000447", + "id": "00000000-0000-0000-0000-000000000465", }, "timelineActivities": { - "id": "00000000-0000-0000-0000-000000000450", + "id": "00000000-0000-0000-0000-000000000468", }, "title": { - "id": "00000000-0000-0000-0000-000000000441", + "id": "00000000-0000-0000-0000-000000000459", }, "updatedAt": { - "id": "00000000-0000-0000-0000-000000000438", + "id": "00000000-0000-0000-0000-000000000456", }, "updatedBy": { - "id": "00000000-0000-0000-0000-000000000446", + "id": "00000000-0000-0000-0000-000000000464", }, }, - "id": "00000000-0000-0000-0000-000000000493", + "id": "00000000-0000-0000-0000-000000000511", "views": { "allTasks": { - "id": "00000000-0000-0000-0000-000000000461", + "id": "00000000-0000-0000-0000-000000000479", "viewFieldGroups": {}, "viewFields": { "assignee": { - "id": "00000000-0000-0000-0000-000000000458", + "id": "00000000-0000-0000-0000-000000000476", }, "bodyV2": { - "id": "00000000-0000-0000-0000-000000000459", - }, - "createdAt": { - "id": "00000000-0000-0000-0000-000000000460", - }, - "createdBy": { - "id": "00000000-0000-0000-0000-000000000456", - }, - "dueAt": { - "id": "00000000-0000-0000-0000-000000000457", - }, - "status": { - "id": "00000000-0000-0000-0000-000000000454", - }, - "taskTargets": { - "id": "00000000-0000-0000-0000-000000000455", - }, - "title": { - "id": "00000000-0000-0000-0000-000000000453", - }, - }, - "viewGroups": {}, - }, - "assignedToMe": { - "id": "00000000-0000-0000-0000-000000000473", - "viewFieldGroups": {}, - "viewFields": { - "assignee": { - "id": "00000000-0000-0000-0000-000000000466", - }, - "bodyV2": { - "id": "00000000-0000-0000-0000-000000000467", - }, - "createdAt": { - "id": "00000000-0000-0000-0000-000000000468", - }, - "createdBy": { - "id": "00000000-0000-0000-0000-000000000464", - }, - "dueAt": { - "id": "00000000-0000-0000-0000-000000000465", - }, - "taskTargets": { - "id": "00000000-0000-0000-0000-000000000463", - }, - "title": { - "id": "00000000-0000-0000-0000-000000000462", - }, - }, - "viewGroups": { - "done": { - "id": "00000000-0000-0000-0000-000000000471", - }, - "empty": { - "id": "00000000-0000-0000-0000-000000000472", - }, - "inProgress": { - "id": "00000000-0000-0000-0000-000000000470", - }, - "todo": { - "id": "00000000-0000-0000-0000-000000000469", - }, - }, - }, - "byStatus": { - "id": "00000000-0000-0000-0000-000000000482", - "viewFieldGroups": {}, - "viewFields": { - "assignee": { "id": "00000000-0000-0000-0000-000000000477", }, "createdAt": { "id": "00000000-0000-0000-0000-000000000478", }, - "dueAt": { - "id": "00000000-0000-0000-0000-000000000476", + "createdBy": { + "id": "00000000-0000-0000-0000-000000000474", }, - "status": { + "dueAt": { "id": "00000000-0000-0000-0000-000000000475", }, + "status": { + "id": "00000000-0000-0000-0000-000000000472", + }, + "taskTargets": { + "id": "00000000-0000-0000-0000-000000000473", + }, "title": { - "id": "00000000-0000-0000-0000-000000000474", + "id": "00000000-0000-0000-0000-000000000471", + }, + }, + "viewGroups": {}, + }, + "assignedToMe": { + "id": "00000000-0000-0000-0000-000000000491", + "viewFieldGroups": {}, + "viewFields": { + "assignee": { + "id": "00000000-0000-0000-0000-000000000484", + }, + "bodyV2": { + "id": "00000000-0000-0000-0000-000000000485", + }, + "createdAt": { + "id": "00000000-0000-0000-0000-000000000486", + }, + "createdBy": { + "id": "00000000-0000-0000-0000-000000000482", + }, + "dueAt": { + "id": "00000000-0000-0000-0000-000000000483", + }, + "taskTargets": { + "id": "00000000-0000-0000-0000-000000000481", + }, + "title": { + "id": "00000000-0000-0000-0000-000000000480", }, }, "viewGroups": { "done": { - "id": "00000000-0000-0000-0000-000000000481", + "id": "00000000-0000-0000-0000-000000000489", + }, + "empty": { + "id": "00000000-0000-0000-0000-000000000490", }, "inProgress": { - "id": "00000000-0000-0000-0000-000000000480", + "id": "00000000-0000-0000-0000-000000000488", }, "todo": { - "id": "00000000-0000-0000-0000-000000000479", + "id": "00000000-0000-0000-0000-000000000487", + }, + }, + }, + "byStatus": { + "id": "00000000-0000-0000-0000-000000000500", + "viewFieldGroups": {}, + "viewFields": { + "assignee": { + "id": "00000000-0000-0000-0000-000000000495", + }, + "createdAt": { + "id": "00000000-0000-0000-0000-000000000496", + }, + "dueAt": { + "id": "00000000-0000-0000-0000-000000000494", + }, + "status": { + "id": "00000000-0000-0000-0000-000000000493", + }, + "title": { + "id": "00000000-0000-0000-0000-000000000492", + }, + }, + "viewGroups": { + "done": { + "id": "00000000-0000-0000-0000-000000000499", + }, + "inProgress": { + "id": "00000000-0000-0000-0000-000000000498", + }, + "todo": { + "id": "00000000-0000-0000-0000-000000000497", }, }, }, "taskRecordPageFields": { - "id": "00000000-0000-0000-0000-000000000492", + "id": "00000000-0000-0000-0000-000000000510", "viewFieldGroups": { "additional": { - "id": "00000000-0000-0000-0000-000000000490", + "id": "00000000-0000-0000-0000-000000000508", }, "general": { - "id": "00000000-0000-0000-0000-000000000489", + "id": "00000000-0000-0000-0000-000000000507", }, "other": { - "id": "00000000-0000-0000-0000-000000000491", + "id": "00000000-0000-0000-0000-000000000509", }, }, "viewFields": { "assignee": { - "id": "00000000-0000-0000-0000-000000000486", + "id": "00000000-0000-0000-0000-000000000504", }, "createdAt": { - "id": "00000000-0000-0000-0000-000000000487", + "id": "00000000-0000-0000-0000-000000000505", }, "createdBy": { - "id": "00000000-0000-0000-0000-000000000488", + "id": "00000000-0000-0000-0000-000000000506", }, "dueAt": { - "id": "00000000-0000-0000-0000-000000000484", + "id": "00000000-0000-0000-0000-000000000502", }, "status": { - "id": "00000000-0000-0000-0000-000000000485", + "id": "00000000-0000-0000-0000-000000000503", }, "title": { - "id": "00000000-0000-0000-0000-000000000483", + "id": "00000000-0000-0000-0000-000000000501", }, }, "viewGroups": {}, @@ -1635,116 +1699,166 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object "taskTarget": { "fields": { "createdAt": { - "id": "00000000-0000-0000-0000-000000000495", + "id": "00000000-0000-0000-0000-000000000513", }, "deletedAt": { - "id": "00000000-0000-0000-0000-000000000497", + "id": "00000000-0000-0000-0000-000000000515", }, "id": { - "id": "00000000-0000-0000-0000-000000000494", + "id": "00000000-0000-0000-0000-000000000512", }, "targetCompany": { - "id": "00000000-0000-0000-0000-000000000500", + "id": "00000000-0000-0000-0000-000000000518", }, "targetOpportunity": { - "id": "00000000-0000-0000-0000-000000000501", + "id": "00000000-0000-0000-0000-000000000519", }, "targetPerson": { - "id": "00000000-0000-0000-0000-000000000499", + "id": "00000000-0000-0000-0000-000000000517", }, "task": { - "id": "00000000-0000-0000-0000-000000000498", + "id": "00000000-0000-0000-0000-000000000516", }, "updatedAt": { - "id": "00000000-0000-0000-0000-000000000496", + "id": "00000000-0000-0000-0000-000000000514", + }, + }, + "id": "00000000-0000-0000-0000-000000000526", + "views": { + "allTaskTargets": { + "id": "00000000-0000-0000-0000-000000000525", + "viewFieldGroups": {}, + "viewFields": { + "id": { + "id": "00000000-0000-0000-0000-000000000520", + }, + "targetCompany": { + "id": "00000000-0000-0000-0000-000000000523", + }, + "targetOpportunity": { + "id": "00000000-0000-0000-0000-000000000524", + }, + "targetPerson": { + "id": "00000000-0000-0000-0000-000000000522", + }, + "task": { + "id": "00000000-0000-0000-0000-000000000521", + }, + }, + "viewGroups": {}, }, }, - "id": "00000000-0000-0000-0000-000000000502", - "views": undefined, }, "timelineActivity": { "fields": { "createdAt": { - "id": "00000000-0000-0000-0000-000000000504", + "id": "00000000-0000-0000-0000-000000000528", }, "deletedAt": { - "id": "00000000-0000-0000-0000-000000000506", + "id": "00000000-0000-0000-0000-000000000530", }, "happensAt": { - "id": "00000000-0000-0000-0000-000000000507", + "id": "00000000-0000-0000-0000-000000000531", }, "id": { - "id": "00000000-0000-0000-0000-000000000503", + "id": "00000000-0000-0000-0000-000000000527", }, "linkedObjectMetadataId": { - "id": "00000000-0000-0000-0000-000000000522", + "id": "00000000-0000-0000-0000-000000000546", }, "linkedRecordCachedName": { - "id": "00000000-0000-0000-0000-000000000520", + "id": "00000000-0000-0000-0000-000000000544", }, "linkedRecordId": { - "id": "00000000-0000-0000-0000-000000000521", + "id": "00000000-0000-0000-0000-000000000545", }, "name": { - "id": "00000000-0000-0000-0000-000000000508", + "id": "00000000-0000-0000-0000-000000000532", }, "properties": { - "id": "00000000-0000-0000-0000-000000000509", + "id": "00000000-0000-0000-0000-000000000533", }, "targetCompany": { - "id": "00000000-0000-0000-0000-000000000512", + "id": "00000000-0000-0000-0000-000000000536", }, "targetDashboard": { - "id": "00000000-0000-0000-0000-000000000519", + "id": "00000000-0000-0000-0000-000000000543", }, "targetNote": { - "id": "00000000-0000-0000-0000-000000000515", + "id": "00000000-0000-0000-0000-000000000539", }, "targetOpportunity": { - "id": "00000000-0000-0000-0000-000000000513", + "id": "00000000-0000-0000-0000-000000000537", }, "targetPerson": { - "id": "00000000-0000-0000-0000-000000000511", + "id": "00000000-0000-0000-0000-000000000535", }, "targetTask": { - "id": "00000000-0000-0000-0000-000000000514", + "id": "00000000-0000-0000-0000-000000000538", }, "targetWorkflow": { - "id": "00000000-0000-0000-0000-000000000516", + "id": "00000000-0000-0000-0000-000000000540", }, "targetWorkflowRun": { - "id": "00000000-0000-0000-0000-000000000518", + "id": "00000000-0000-0000-0000-000000000542", }, "targetWorkflowVersion": { - "id": "00000000-0000-0000-0000-000000000517", + "id": "00000000-0000-0000-0000-000000000541", }, "updatedAt": { - "id": "00000000-0000-0000-0000-000000000505", + "id": "00000000-0000-0000-0000-000000000529", }, "workspaceMember": { - "id": "00000000-0000-0000-0000-000000000510", + "id": "00000000-0000-0000-0000-000000000534", }, }, - "id": "00000000-0000-0000-0000-000000000529", + "id": "00000000-0000-0000-0000-000000000562", "views": { "allTimelineActivities": { - "id": "00000000-0000-0000-0000-000000000528", + "id": "00000000-0000-0000-0000-000000000561", "viewFieldGroups": {}, "viewFields": { "happensAt": { - "id": "00000000-0000-0000-0000-000000000524", + "id": "00000000-0000-0000-0000-000000000548", }, "linkedRecordCachedName": { - "id": "00000000-0000-0000-0000-000000000527", + "id": "00000000-0000-0000-0000-000000000551", }, "name": { - "id": "00000000-0000-0000-0000-000000000523", + "id": "00000000-0000-0000-0000-000000000547", }, "properties": { - "id": "00000000-0000-0000-0000-000000000525", + "id": "00000000-0000-0000-0000-000000000549", + }, + "targetCompany": { + "id": "00000000-0000-0000-0000-000000000553", + }, + "targetDashboard": { + "id": "00000000-0000-0000-0000-000000000560", + }, + "targetNote": { + "id": "00000000-0000-0000-0000-000000000556", + }, + "targetOpportunity": { + "id": "00000000-0000-0000-0000-000000000554", + }, + "targetPerson": { + "id": "00000000-0000-0000-0000-000000000552", + }, + "targetTask": { + "id": "00000000-0000-0000-0000-000000000555", + }, + "targetWorkflow": { + "id": "00000000-0000-0000-0000-000000000557", + }, + "targetWorkflowRun": { + "id": "00000000-0000-0000-0000-000000000559", + }, + "targetWorkflowVersion": { + "id": "00000000-0000-0000-0000-000000000558", }, "workspaceMember": { - "id": "00000000-0000-0000-0000-000000000526", + "id": "00000000-0000-0000-0000-000000000550", }, }, "viewGroups": {}, @@ -1754,80 +1868,80 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object "workflow": { "fields": { "attachments": { - "id": "00000000-0000-0000-0000-000000000543", + "id": "00000000-0000-0000-0000-000000000576", }, "automatedTriggers": { - "id": "00000000-0000-0000-0000-000000000540", + "id": "00000000-0000-0000-0000-000000000573", }, "createdAt": { - "id": "00000000-0000-0000-0000-000000000531", + "id": "00000000-0000-0000-0000-000000000564", }, "createdBy": { - "id": "00000000-0000-0000-0000-000000000544", + "id": "00000000-0000-0000-0000-000000000577", }, "deletedAt": { - "id": "00000000-0000-0000-0000-000000000533", + "id": "00000000-0000-0000-0000-000000000566", }, "favorites": { - "id": "00000000-0000-0000-0000-000000000541", + "id": "00000000-0000-0000-0000-000000000574", }, "id": { - "id": "00000000-0000-0000-0000-000000000530", + "id": "00000000-0000-0000-0000-000000000563", }, "lastPublishedVersionId": { - "id": "00000000-0000-0000-0000-000000000535", + "id": "00000000-0000-0000-0000-000000000568", }, "name": { - "id": "00000000-0000-0000-0000-000000000534", + "id": "00000000-0000-0000-0000-000000000567", }, "position": { - "id": "00000000-0000-0000-0000-000000000537", + "id": "00000000-0000-0000-0000-000000000570", }, "runs": { - "id": "00000000-0000-0000-0000-000000000539", + "id": "00000000-0000-0000-0000-000000000572", }, "searchVector": { - "id": "00000000-0000-0000-0000-000000000546", + "id": "00000000-0000-0000-0000-000000000579", }, "statuses": { - "id": "00000000-0000-0000-0000-000000000536", + "id": "00000000-0000-0000-0000-000000000569", }, "timelineActivities": { - "id": "00000000-0000-0000-0000-000000000542", + "id": "00000000-0000-0000-0000-000000000575", }, "updatedAt": { - "id": "00000000-0000-0000-0000-000000000532", + "id": "00000000-0000-0000-0000-000000000565", }, "updatedBy": { - "id": "00000000-0000-0000-0000-000000000545", + "id": "00000000-0000-0000-0000-000000000578", }, "versions": { - "id": "00000000-0000-0000-0000-000000000538", + "id": "00000000-0000-0000-0000-000000000571", }, }, - "id": "00000000-0000-0000-0000-000000000554", + "id": "00000000-0000-0000-0000-000000000587", "views": { "allWorkflows": { - "id": "00000000-0000-0000-0000-000000000553", + "id": "00000000-0000-0000-0000-000000000586", "viewFieldGroups": {}, "viewFields": { "createdBy": { - "id": "00000000-0000-0000-0000-000000000550", + "id": "00000000-0000-0000-0000-000000000583", }, "name": { - "id": "00000000-0000-0000-0000-000000000547", + "id": "00000000-0000-0000-0000-000000000580", }, "runs": { - "id": "00000000-0000-0000-0000-000000000552", + "id": "00000000-0000-0000-0000-000000000585", }, "statuses": { - "id": "00000000-0000-0000-0000-000000000548", + "id": "00000000-0000-0000-0000-000000000581", }, "updatedAt": { - "id": "00000000-0000-0000-0000-000000000549", + "id": "00000000-0000-0000-0000-000000000582", }, "versions": { - "id": "00000000-0000-0000-0000-000000000551", + "id": "00000000-0000-0000-0000-000000000584", }, }, "viewGroups": {}, @@ -1837,116 +1951,116 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object "workflowAutomatedTrigger": { "fields": { "createdAt": { - "id": "00000000-0000-0000-0000-000000000556", + "id": "00000000-0000-0000-0000-000000000589", }, "deletedAt": { - "id": "00000000-0000-0000-0000-000000000558", + "id": "00000000-0000-0000-0000-000000000591", }, "id": { - "id": "00000000-0000-0000-0000-000000000555", + "id": "00000000-0000-0000-0000-000000000588", }, "settings": { - "id": "00000000-0000-0000-0000-000000000560", + "id": "00000000-0000-0000-0000-000000000593", }, "type": { - "id": "00000000-0000-0000-0000-000000000559", + "id": "00000000-0000-0000-0000-000000000592", }, "updatedAt": { - "id": "00000000-0000-0000-0000-000000000557", + "id": "00000000-0000-0000-0000-000000000590", }, "workflow": { - "id": "00000000-0000-0000-0000-000000000561", + "id": "00000000-0000-0000-0000-000000000594", }, }, - "id": "00000000-0000-0000-0000-000000000562", + "id": "00000000-0000-0000-0000-000000000595", "views": undefined, }, "workflowRun": { "fields": { "context": { - "id": "00000000-0000-0000-0000-000000000578", + "id": "00000000-0000-0000-0000-000000000611", }, "createdAt": { - "id": "00000000-0000-0000-0000-000000000564", + "id": "00000000-0000-0000-0000-000000000597", }, "createdBy": { - "id": "00000000-0000-0000-0000-000000000575", + "id": "00000000-0000-0000-0000-000000000608", }, "deletedAt": { - "id": "00000000-0000-0000-0000-000000000566", + "id": "00000000-0000-0000-0000-000000000599", }, "endedAt": { - "id": "00000000-0000-0000-0000-000000000572", + "id": "00000000-0000-0000-0000-000000000605", }, "enqueuedAt": { - "id": "00000000-0000-0000-0000-000000000570", + "id": "00000000-0000-0000-0000-000000000603", }, "favorites": { - "id": "00000000-0000-0000-0000-000000000580", + "id": "00000000-0000-0000-0000-000000000613", }, "id": { - "id": "00000000-0000-0000-0000-000000000563", + "id": "00000000-0000-0000-0000-000000000596", }, "name": { - "id": "00000000-0000-0000-0000-000000000567", + "id": "00000000-0000-0000-0000-000000000600", }, "output": { - "id": "00000000-0000-0000-0000-000000000577", + "id": "00000000-0000-0000-0000-000000000610", }, "position": { - "id": "00000000-0000-0000-0000-000000000574", + "id": "00000000-0000-0000-0000-000000000607", }, "searchVector": { - "id": "00000000-0000-0000-0000-000000000582", + "id": "00000000-0000-0000-0000-000000000615", }, "startedAt": { - "id": "00000000-0000-0000-0000-000000000571", + "id": "00000000-0000-0000-0000-000000000604", }, "state": { - "id": "00000000-0000-0000-0000-000000000579", + "id": "00000000-0000-0000-0000-000000000612", }, "status": { - "id": "00000000-0000-0000-0000-000000000573", + "id": "00000000-0000-0000-0000-000000000606", }, "timelineActivities": { - "id": "00000000-0000-0000-0000-000000000581", + "id": "00000000-0000-0000-0000-000000000614", }, "updatedAt": { - "id": "00000000-0000-0000-0000-000000000565", + "id": "00000000-0000-0000-0000-000000000598", }, "updatedBy": { - "id": "00000000-0000-0000-0000-000000000576", + "id": "00000000-0000-0000-0000-000000000609", }, "workflow": { - "id": "00000000-0000-0000-0000-000000000569", + "id": "00000000-0000-0000-0000-000000000602", }, "workflowVersion": { - "id": "00000000-0000-0000-0000-000000000568", + "id": "00000000-0000-0000-0000-000000000601", }, }, - "id": "00000000-0000-0000-0000-000000000590", + "id": "00000000-0000-0000-0000-000000000623", "views": { "allWorkflowRuns": { - "id": "00000000-0000-0000-0000-000000000589", + "id": "00000000-0000-0000-0000-000000000622", "viewFieldGroups": {}, "viewFields": { "createdBy": { - "id": "00000000-0000-0000-0000-000000000587", + "id": "00000000-0000-0000-0000-000000000620", }, "name": { - "id": "00000000-0000-0000-0000-000000000583", + "id": "00000000-0000-0000-0000-000000000616", }, "startedAt": { - "id": "00000000-0000-0000-0000-000000000586", + "id": "00000000-0000-0000-0000-000000000619", }, "status": { - "id": "00000000-0000-0000-0000-000000000585", + "id": "00000000-0000-0000-0000-000000000618", }, "workflow": { - "id": "00000000-0000-0000-0000-000000000584", + "id": "00000000-0000-0000-0000-000000000617", }, "workflowVersion": { - "id": "00000000-0000-0000-0000-000000000588", + "id": "00000000-0000-0000-0000-000000000621", }, }, "viewGroups": {}, @@ -1956,68 +2070,68 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object "workflowVersion": { "fields": { "createdAt": { - "id": "00000000-0000-0000-0000-000000000592", + "id": "00000000-0000-0000-0000-000000000625", }, "deletedAt": { - "id": "00000000-0000-0000-0000-000000000594", + "id": "00000000-0000-0000-0000-000000000627", }, "favorites": { - "id": "00000000-0000-0000-0000-000000000602", + "id": "00000000-0000-0000-0000-000000000635", }, "id": { - "id": "00000000-0000-0000-0000-000000000591", + "id": "00000000-0000-0000-0000-000000000624", }, "name": { - "id": "00000000-0000-0000-0000-000000000595", + "id": "00000000-0000-0000-0000-000000000628", }, "position": { - "id": "00000000-0000-0000-0000-000000000599", + "id": "00000000-0000-0000-0000-000000000632", }, "runs": { - "id": "00000000-0000-0000-0000-000000000600", + "id": "00000000-0000-0000-0000-000000000633", }, "searchVector": { - "id": "00000000-0000-0000-0000-000000000604", + "id": "00000000-0000-0000-0000-000000000637", }, "status": { - "id": "00000000-0000-0000-0000-000000000598", + "id": "00000000-0000-0000-0000-000000000631", }, "steps": { - "id": "00000000-0000-0000-0000-000000000601", + "id": "00000000-0000-0000-0000-000000000634", }, "timelineActivities": { - "id": "00000000-0000-0000-0000-000000000603", + "id": "00000000-0000-0000-0000-000000000636", }, "trigger": { - "id": "00000000-0000-0000-0000-000000000597", + "id": "00000000-0000-0000-0000-000000000630", }, "updatedAt": { - "id": "00000000-0000-0000-0000-000000000593", + "id": "00000000-0000-0000-0000-000000000626", }, "workflow": { - "id": "00000000-0000-0000-0000-000000000596", + "id": "00000000-0000-0000-0000-000000000629", }, }, - "id": "00000000-0000-0000-0000-000000000611", + "id": "00000000-0000-0000-0000-000000000644", "views": { "allWorkflowVersions": { - "id": "00000000-0000-0000-0000-000000000610", + "id": "00000000-0000-0000-0000-000000000643", "viewFieldGroups": {}, "viewFields": { "name": { - "id": "00000000-0000-0000-0000-000000000605", + "id": "00000000-0000-0000-0000-000000000638", }, "runs": { - "id": "00000000-0000-0000-0000-000000000609", + "id": "00000000-0000-0000-0000-000000000642", }, "status": { - "id": "00000000-0000-0000-0000-000000000607", + "id": "00000000-0000-0000-0000-000000000640", }, "updatedAt": { - "id": "00000000-0000-0000-0000-000000000608", + "id": "00000000-0000-0000-0000-000000000641", }, "workflow": { - "id": "00000000-0000-0000-0000-000000000606", + "id": "00000000-0000-0000-0000-000000000639", }, }, "viewGroups": {}, @@ -2027,116 +2141,122 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object "workspaceMember": { "fields": { "accountOwnerForCompanies": { - "id": "00000000-0000-0000-0000-000000000626", + "id": "00000000-0000-0000-0000-000000000659", }, "assignedTasks": { - "id": "00000000-0000-0000-0000-000000000623", + "id": "00000000-0000-0000-0000-000000000656", }, "avatarUrl": { - "id": "00000000-0000-0000-0000-000000000620", + "id": "00000000-0000-0000-0000-000000000653", }, "blocklist": { - "id": "00000000-0000-0000-0000-000000000629", + "id": "00000000-0000-0000-0000-000000000662", }, "calendarEventParticipants": { - "id": "00000000-0000-0000-0000-000000000630", + "id": "00000000-0000-0000-0000-000000000663", }, "calendarStartDay": { - "id": "00000000-0000-0000-0000-000000000636", + "id": "00000000-0000-0000-0000-000000000669", }, "colorScheme": { - "id": "00000000-0000-0000-0000-000000000618", + "id": "00000000-0000-0000-0000-000000000651", }, "connectedAccounts": { - "id": "00000000-0000-0000-0000-000000000627", + "id": "00000000-0000-0000-0000-000000000660", }, "createdAt": { - "id": "00000000-0000-0000-0000-000000000613", + "id": "00000000-0000-0000-0000-000000000646", }, "dateFormat": { - "id": "00000000-0000-0000-0000-000000000633", + "id": "00000000-0000-0000-0000-000000000666", }, "deletedAt": { - "id": "00000000-0000-0000-0000-000000000615", + "id": "00000000-0000-0000-0000-000000000648", }, "favorites": { - "id": "00000000-0000-0000-0000-000000000625", + "id": "00000000-0000-0000-0000-000000000658", }, "id": { - "id": "00000000-0000-0000-0000-000000000612", + "id": "00000000-0000-0000-0000-000000000645", }, "locale": { - "id": "00000000-0000-0000-0000-000000000619", + "id": "00000000-0000-0000-0000-000000000652", }, "messageParticipants": { - "id": "00000000-0000-0000-0000-000000000628", + "id": "00000000-0000-0000-0000-000000000661", }, "name": { - "id": "00000000-0000-0000-0000-000000000617", + "id": "00000000-0000-0000-0000-000000000650", }, "numberFormat": { - "id": "00000000-0000-0000-0000-000000000637", + "id": "00000000-0000-0000-0000-000000000670", }, "ownedOpportunities": { - "id": "00000000-0000-0000-0000-000000000624", + "id": "00000000-0000-0000-0000-000000000657", }, "position": { - "id": "00000000-0000-0000-0000-000000000616", + "id": "00000000-0000-0000-0000-000000000649", }, "searchVector": { - "id": "00000000-0000-0000-0000-000000000635", + "id": "00000000-0000-0000-0000-000000000668", }, "timeFormat": { - "id": "00000000-0000-0000-0000-000000000634", + "id": "00000000-0000-0000-0000-000000000667", }, "timeZone": { - "id": "00000000-0000-0000-0000-000000000632", + "id": "00000000-0000-0000-0000-000000000665", }, "timelineActivities": { - "id": "00000000-0000-0000-0000-000000000631", + "id": "00000000-0000-0000-0000-000000000664", }, "updatedAt": { - "id": "00000000-0000-0000-0000-000000000614", + "id": "00000000-0000-0000-0000-000000000647", }, "userEmail": { - "id": "00000000-0000-0000-0000-000000000621", + "id": "00000000-0000-0000-0000-000000000654", }, "userId": { - "id": "00000000-0000-0000-0000-000000000622", + "id": "00000000-0000-0000-0000-000000000655", }, }, - "id": "00000000-0000-0000-0000-000000000648", + "id": "00000000-0000-0000-0000-000000000683", "views": { "allWorkspaceMembers": { - "id": "00000000-0000-0000-0000-000000000647", + "id": "00000000-0000-0000-0000-000000000682", "viewFieldGroups": {}, "viewFields": { + "assignedTasks": { + "id": "00000000-0000-0000-0000-000000000681", + }, "avatarUrl": { - "id": "00000000-0000-0000-0000-000000000640", + "id": "00000000-0000-0000-0000-000000000673", }, "colorScheme": { - "id": "00000000-0000-0000-0000-000000000641", + "id": "00000000-0000-0000-0000-000000000674", }, "createdAt": { - "id": "00000000-0000-0000-0000-000000000646", + "id": "00000000-0000-0000-0000-000000000679", }, "dateFormat": { - "id": "00000000-0000-0000-0000-000000000644", + "id": "00000000-0000-0000-0000-000000000677", }, "locale": { - "id": "00000000-0000-0000-0000-000000000642", + "id": "00000000-0000-0000-0000-000000000675", }, "name": { - "id": "00000000-0000-0000-0000-000000000638", + "id": "00000000-0000-0000-0000-000000000671", + }, + "ownedOpportunities": { + "id": "00000000-0000-0000-0000-000000000680", }, "timeFormat": { - "id": "00000000-0000-0000-0000-000000000645", + "id": "00000000-0000-0000-0000-000000000678", }, "timeZone": { - "id": "00000000-0000-0000-0000-000000000643", + "id": "00000000-0000-0000-0000-000000000676", }, "userEmail": { - "id": "00000000-0000-0000-0000-000000000639", + "id": "00000000-0000-0000-0000-000000000672", }, }, "viewGroups": {}, diff --git a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/compute-attachment-standard-flat-field-metadata.util.ts b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/compute-attachment-standard-flat-field-metadata.util.ts index 065052cb11b..d9bc2ffc67b 100644 --- a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/compute-attachment-standard-flat-field-metadata.util.ts +++ b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/compute-attachment-standard-flat-field-metadata.util.ts @@ -156,6 +156,7 @@ export const buildAttachmentStandardFlatFieldMetadatas = ({ label: 'Full path', description: 'Attachment full path', icon: 'IconLink', + isSystem: true, isNullable: true, isUIReadOnly: true, }, @@ -174,6 +175,7 @@ export const buildAttachmentStandardFlatFieldMetadatas = ({ label: 'File category', description: 'Attachment file category', icon: 'IconList', + isSystem: true, isNullable: false, isUIReadOnly: true, defaultValue: "'OTHER'", @@ -261,9 +263,9 @@ export const buildAttachmentStandardFlatFieldMetadatas = ({ type: FieldMetadataType.MORPH_RELATION, morphId: STANDARD_OBJECTS.attachment.morphIds.targetMorphId.morphId, fieldName: 'targetTask', - label: 'Task', - description: 'Attachment task', - icon: 'IconNotes', + label: 'Target', + description: 'Attachment target', + icon: 'IconArrowUpRight', isNullable: true, isUIReadOnly: true, targetObjectName: 'task', @@ -286,9 +288,9 @@ export const buildAttachmentStandardFlatFieldMetadatas = ({ type: FieldMetadataType.MORPH_RELATION, morphId: STANDARD_OBJECTS.attachment.morphIds.targetMorphId.morphId, fieldName: 'targetNote', - label: 'Note', - description: 'Attachment note', - icon: 'IconNotes', + label: 'Target', + description: 'Attachment target', + icon: 'IconArrowUpRight', isNullable: true, isUIReadOnly: true, targetObjectName: 'note', @@ -311,9 +313,9 @@ export const buildAttachmentStandardFlatFieldMetadatas = ({ type: FieldMetadataType.MORPH_RELATION, morphId: STANDARD_OBJECTS.attachment.morphIds.targetMorphId.morphId, fieldName: 'targetPerson', - label: 'Person', - description: 'Attachment person', - icon: 'IconUser', + label: 'Target', + description: 'Attachment target', + icon: 'IconArrowUpRight', isNullable: true, isUIReadOnly: true, targetObjectName: 'person', @@ -336,9 +338,9 @@ export const buildAttachmentStandardFlatFieldMetadatas = ({ type: FieldMetadataType.MORPH_RELATION, morphId: STANDARD_OBJECTS.attachment.morphIds.targetMorphId.morphId, fieldName: 'targetCompany', - label: 'Company', - description: 'Attachment company', - icon: 'IconBuildingSkyscraper', + label: 'Target', + description: 'Attachment target', + icon: 'IconArrowUpRight', isNullable: true, isUIReadOnly: true, targetObjectName: 'company', @@ -361,9 +363,9 @@ export const buildAttachmentStandardFlatFieldMetadatas = ({ type: FieldMetadataType.MORPH_RELATION, morphId: STANDARD_OBJECTS.attachment.morphIds.targetMorphId.morphId, fieldName: 'targetOpportunity', - label: 'Opportunity', - description: 'Attachment opportunity', - icon: 'IconBuildingSkyscraper', + label: 'Target', + description: 'Attachment target', + icon: 'IconArrowUpRight', isNullable: true, isUIReadOnly: true, targetObjectName: 'opportunity', @@ -386,9 +388,9 @@ export const buildAttachmentStandardFlatFieldMetadatas = ({ type: FieldMetadataType.MORPH_RELATION, morphId: STANDARD_OBJECTS.attachment.morphIds.targetMorphId.morphId, fieldName: 'targetDashboard', - label: 'Dashboard', - description: 'Attachment dashboard', - icon: 'IconLayout', + label: 'Target', + description: 'Attachment target', + icon: 'IconArrowUpRight', isNullable: true, isUIReadOnly: true, targetObjectName: 'dashboard', @@ -411,9 +413,9 @@ export const buildAttachmentStandardFlatFieldMetadatas = ({ type: FieldMetadataType.MORPH_RELATION, morphId: STANDARD_OBJECTS.attachment.morphIds.targetMorphId.morphId, fieldName: 'targetWorkflow', - label: 'Workflow', - description: 'Attachment workflow', - icon: 'IconSettingsAutomation', + label: 'Target', + description: 'Attachment target', + icon: 'IconArrowUpRight', isNullable: true, isUIReadOnly: true, targetObjectName: 'workflow', diff --git a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/compute-note-target-standard-flat-field-metadata.util.ts b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/compute-note-target-standard-flat-field-metadata.util.ts index 12a8dee1c54..6b80da08f54 100644 --- a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/compute-note-target-standard-flat-field-metadata.util.ts +++ b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/compute-note-target-standard-flat-field-metadata.util.ts @@ -141,9 +141,9 @@ export const buildNoteTargetStandardFlatFieldMetadatas = ({ type: FieldMetadataType.MORPH_RELATION, morphId: STANDARD_OBJECTS.noteTarget.morphIds.targetMorphId.morphId, fieldName: 'targetPerson', - label: 'Person', - description: 'NoteTarget person', - icon: 'IconUser', + label: 'Target', + description: 'NoteTarget target', + icon: 'IconArrowUpRight', isNullable: true, isUIReadOnly: true, targetObjectName: 'person', @@ -166,9 +166,9 @@ export const buildNoteTargetStandardFlatFieldMetadatas = ({ type: FieldMetadataType.MORPH_RELATION, morphId: STANDARD_OBJECTS.noteTarget.morphIds.targetMorphId.morphId, fieldName: 'targetCompany', - label: 'Company', - description: 'NoteTarget company', - icon: 'IconBuildingSkyscraper', + label: 'Target', + description: 'NoteTarget target', + icon: 'IconArrowUpRight', isNullable: true, isUIReadOnly: true, targetObjectName: 'company', @@ -191,9 +191,9 @@ export const buildNoteTargetStandardFlatFieldMetadatas = ({ type: FieldMetadataType.MORPH_RELATION, morphId: STANDARD_OBJECTS.noteTarget.morphIds.targetMorphId.morphId, fieldName: 'targetOpportunity', - label: 'Opportunity', - description: 'NoteTarget opportunity', - icon: 'IconTargetArrow', + label: 'Target', + description: 'NoteTarget target', + icon: 'IconArrowUpRight', isNullable: true, isUIReadOnly: true, targetObjectName: 'opportunity', diff --git a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/compute-task-target-standard-flat-field-metadata.util.ts b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/compute-task-target-standard-flat-field-metadata.util.ts index 76cf065af09..270e670aef3 100644 --- a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/compute-task-target-standard-flat-field-metadata.util.ts +++ b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/compute-task-target-standard-flat-field-metadata.util.ts @@ -141,9 +141,9 @@ export const buildTaskTargetStandardFlatFieldMetadatas = ({ type: FieldMetadataType.MORPH_RELATION, morphId: STANDARD_OBJECTS.taskTarget.morphIds.targetMorphId.morphId, fieldName: 'targetPerson', - label: 'Person', - description: 'TaskTarget person', - icon: 'IconUser', + label: 'Target', + description: 'TaskTarget target', + icon: 'IconArrowUpRight', isNullable: true, isUIReadOnly: true, targetObjectName: 'person', @@ -166,9 +166,9 @@ export const buildTaskTargetStandardFlatFieldMetadatas = ({ type: FieldMetadataType.MORPH_RELATION, morphId: STANDARD_OBJECTS.taskTarget.morphIds.targetMorphId.morphId, fieldName: 'targetCompany', - label: 'Company', - description: 'TaskTarget company', - icon: 'IconBuildingSkyscraper', + label: 'Target', + description: 'TaskTarget target', + icon: 'IconArrowUpRight', isNullable: true, isUIReadOnly: true, targetObjectName: 'company', @@ -191,9 +191,9 @@ export const buildTaskTargetStandardFlatFieldMetadatas = ({ type: FieldMetadataType.MORPH_RELATION, morphId: STANDARD_OBJECTS.taskTarget.morphIds.targetMorphId.morphId, fieldName: 'targetOpportunity', - label: 'Opportunity', - description: 'TaskTarget opportunity', - icon: 'IconTargetArrow', + label: 'Target', + description: 'TaskTarget target', + icon: 'IconArrowUpRight', isNullable: true, isUIReadOnly: true, targetObjectName: 'opportunity', diff --git a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/compute-timeline-activity-standard-flat-field-metadata.util.ts b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/compute-timeline-activity-standard-flat-field-metadata.util.ts index dc21a4d4fd1..f9d58d6ae0c 100644 --- a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/compute-timeline-activity-standard-flat-field-metadata.util.ts +++ b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/compute-timeline-activity-standard-flat-field-metadata.util.ts @@ -167,6 +167,7 @@ export const buildTimelineActivityStandardFlatFieldMetadatas = ({ label: 'Linked Record cached name', description: 'Cached record name', icon: 'IconAbc', + isSystem: true, isNullable: true, isUIReadOnly: true, }, @@ -184,6 +185,7 @@ export const buildTimelineActivityStandardFlatFieldMetadatas = ({ label: 'Linked Record id', description: 'Linked Record id', icon: 'IconAbc', + isSystem: true, isNullable: true, isUIReadOnly: true, }, @@ -201,6 +203,7 @@ export const buildTimelineActivityStandardFlatFieldMetadatas = ({ label: 'Linked Object Metadata Id', description: 'Linked Object Metadata Id', icon: 'IconAbc', + isSystem: true, isNullable: true, isUIReadOnly: true, }, @@ -243,9 +246,9 @@ export const buildTimelineActivityStandardFlatFieldMetadatas = ({ type: FieldMetadataType.MORPH_RELATION, morphId: STANDARD_OBJECTS.timelineActivity.morphIds.targetMorphId.morphId, fieldName: 'targetPerson', - label: 'Person', - description: 'Event person', - icon: 'IconUser', + label: 'Target', + description: 'Event target', + icon: 'IconArrowUpRight', isNullable: true, isUIReadOnly: true, targetObjectName: 'person', @@ -268,9 +271,9 @@ export const buildTimelineActivityStandardFlatFieldMetadatas = ({ type: FieldMetadataType.MORPH_RELATION, morphId: STANDARD_OBJECTS.timelineActivity.morphIds.targetMorphId.morphId, fieldName: 'targetCompany', - label: 'Company', - description: 'Event company', - icon: 'IconBuildingSkyscraper', + label: 'Target', + description: 'Event target', + icon: 'IconArrowUpRight', isNullable: true, isUIReadOnly: true, targetObjectName: 'company', @@ -293,9 +296,9 @@ export const buildTimelineActivityStandardFlatFieldMetadatas = ({ type: FieldMetadataType.MORPH_RELATION, morphId: STANDARD_OBJECTS.timelineActivity.morphIds.targetMorphId.morphId, fieldName: 'targetOpportunity', - label: 'Opportunity', - description: 'Event opportunity', - icon: 'IconTargetArrow', + label: 'Target', + description: 'Event target', + icon: 'IconArrowUpRight', isNullable: true, isUIReadOnly: true, targetObjectName: 'opportunity', @@ -318,9 +321,9 @@ export const buildTimelineActivityStandardFlatFieldMetadatas = ({ type: FieldMetadataType.MORPH_RELATION, morphId: STANDARD_OBJECTS.timelineActivity.morphIds.targetMorphId.morphId, fieldName: 'targetNote', - label: 'Note', - description: 'Event note', - icon: 'IconTargetArrow', + label: 'Target', + description: 'Event target', + icon: 'IconArrowUpRight', isNullable: true, isUIReadOnly: true, targetObjectName: 'note', @@ -343,9 +346,9 @@ export const buildTimelineActivityStandardFlatFieldMetadatas = ({ type: FieldMetadataType.MORPH_RELATION, morphId: STANDARD_OBJECTS.timelineActivity.morphIds.targetMorphId.morphId, fieldName: 'targetTask', - label: 'Task', - description: 'Event task', - icon: 'IconTargetArrow', + label: 'Target', + description: 'Event target', + icon: 'IconArrowUpRight', isNullable: true, isUIReadOnly: true, targetObjectName: 'task', @@ -368,9 +371,9 @@ export const buildTimelineActivityStandardFlatFieldMetadatas = ({ type: FieldMetadataType.MORPH_RELATION, morphId: STANDARD_OBJECTS.timelineActivity.morphIds.targetMorphId.morphId, fieldName: 'targetWorkflow', - label: 'Workflow', - description: 'Event workflow', - icon: 'IconTargetArrow', + label: 'Target', + description: 'Event target', + icon: 'IconArrowUpRight', isNullable: true, isUIReadOnly: true, targetObjectName: 'workflow', @@ -393,9 +396,9 @@ export const buildTimelineActivityStandardFlatFieldMetadatas = ({ type: FieldMetadataType.MORPH_RELATION, morphId: STANDARD_OBJECTS.timelineActivity.morphIds.targetMorphId.morphId, fieldName: 'targetWorkflowVersion', - label: 'WorkflowVersion', - description: 'Event workflow version', - icon: 'IconTargetArrow', + label: 'Target', + description: 'Event target', + icon: 'IconArrowUpRight', isNullable: true, isUIReadOnly: true, targetObjectName: 'workflowVersion', @@ -418,9 +421,9 @@ export const buildTimelineActivityStandardFlatFieldMetadatas = ({ type: FieldMetadataType.MORPH_RELATION, morphId: STANDARD_OBJECTS.timelineActivity.morphIds.targetMorphId.morphId, fieldName: 'targetWorkflowRun', - label: 'Workflow Run', - description: 'Event workflow run', - icon: 'IconTargetArrow', + label: 'Target', + description: 'Event target', + icon: 'IconArrowUpRight', isNullable: true, isUIReadOnly: true, targetObjectName: 'workflowRun', @@ -443,9 +446,9 @@ export const buildTimelineActivityStandardFlatFieldMetadatas = ({ type: FieldMetadataType.MORPH_RELATION, morphId: STANDARD_OBJECTS.timelineActivity.morphIds.targetMorphId.morphId, fieldName: 'targetDashboard', - label: 'Dashboard', - description: 'Event dashboard', - icon: 'IconTargetArrow', + label: 'Target', + description: 'Event target', + icon: 'IconArrowUpRight', isNullable: true, isUIReadOnly: true, targetObjectName: 'dashboard', diff --git a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/compute-workspace-member-standard-flat-field-metadata.util.ts b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/compute-workspace-member-standard-flat-field-metadata.util.ts index bf937b189a4..54c70b92cc5 100644 --- a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/compute-workspace-member-standard-flat-field-metadata.util.ts +++ b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/compute-workspace-member-standard-flat-field-metadata.util.ts @@ -444,6 +444,7 @@ export const buildWorkspaceMemberStandardFlatFieldMetadatas = ({ label: 'Favorites', description: 'Favorites linked to the workspace member', icon: 'IconHeart', + isSystem: true, isNullable: false, isUIReadOnly: true, targetObjectName: 'favorite', @@ -467,6 +468,7 @@ export const buildWorkspaceMemberStandardFlatFieldMetadatas = ({ label: 'Account Owner For Companies', description: 'Account owner for companies', icon: 'IconBriefcase', + isSystem: true, isNullable: false, isUIReadOnly: true, targetObjectName: 'company', @@ -490,6 +492,7 @@ export const buildWorkspaceMemberStandardFlatFieldMetadatas = ({ label: 'Connected accounts', description: 'Connected accounts', icon: 'IconAt', + isSystem: true, isNullable: false, isUIReadOnly: true, targetObjectName: 'connectedAccount', @@ -513,6 +516,7 @@ export const buildWorkspaceMemberStandardFlatFieldMetadatas = ({ label: 'Message Participants', description: 'Message Participants', icon: 'IconUserCircle', + isSystem: true, isNullable: false, isUIReadOnly: true, targetObjectName: 'messageParticipant', @@ -536,6 +540,7 @@ export const buildWorkspaceMemberStandardFlatFieldMetadatas = ({ label: 'Blocklist', description: 'Blocklisted handles', icon: 'IconForbid2', + isSystem: true, isNullable: false, isUIReadOnly: true, targetObjectName: 'blocklist', @@ -559,6 +564,7 @@ export const buildWorkspaceMemberStandardFlatFieldMetadatas = ({ label: 'Calendar Event Participants', description: 'Calendar Event Participants', icon: 'IconCalendar', + isSystem: true, isNullable: false, isUIReadOnly: true, targetObjectName: 'calendarEventParticipant', diff --git a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view-field/build-standard-flat-view-field-metadata-maps.util.ts b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view-field/build-standard-flat-view-field-metadata-maps.util.ts index c4e829fcb5c..12627595d0d 100644 --- a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view-field/build-standard-flat-view-field-metadata-maps.util.ts +++ b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view-field/build-standard-flat-view-field-metadata-maps.util.ts @@ -5,18 +5,23 @@ import { type FlatEntityMaps } from 'src/engine/metadata-modules/flat-entity/typ import { addFlatEntityToFlatEntityMapsOrThrow } from 'src/engine/metadata-modules/flat-entity/utils/add-flat-entity-to-flat-entity-maps-or-throw.util'; import { type FlatViewField } from 'src/engine/metadata-modules/flat-view-field/types/flat-view-field.type'; import { type AllStandardObjectName } from 'src/engine/workspace-manager/twenty-standard-application/types/all-standard-object-name.type'; +import { computeStandardAttachmentViewFields } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-attachment-view-fields.util'; import { computeStandardCalendarEventViewFields } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-calendar-event-view-fields.util'; import { computeStandardCompanyViewFields } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-company-view-fields.util'; import { computeStandardDashboardViewFields } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-dashboard-view-fields.util'; import { computeStandardMessageThreadViewFields } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-message-thread-view-fields.util'; import { computeStandardMessageViewFields } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-message-view-fields.util'; +import { computeStandardNoteTargetViewFields } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-note-target-view-fields.util'; import { computeStandardNoteViewFields } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-note-view-fields.util'; import { computeStandardOpportunityViewFields } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-opportunity-view-fields.util'; import { computeStandardPersonViewFields } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-person-view-fields.util'; +import { computeStandardTaskTargetViewFields } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-task-target-view-fields.util'; import { computeStandardTaskViewFields } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-task-view-fields.util'; +import { computeStandardTimelineActivityViewFields } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-timeline-activity-view-fields.util'; import { computeStandardWorkflowRunViewFields } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-workflow-run-view-fields.util'; import { computeStandardWorkflowVersionViewFields } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-workflow-version-view-fields.util'; import { computeStandardWorkflowViewFields } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-workflow-view-fields.util'; +import { computeStandardWorkspaceMemberViewFields } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-workspace-member-view-fields.util'; import { type CreateStandardViewFieldArgs } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field/create-standard-view-field-flat-metadata.util'; type StandardViewFieldBuilder

= ( @@ -24,18 +29,23 @@ type StandardViewFieldBuilder

= ( ) => Record; const STANDARD_FLAT_VIEW_FIELD_METADATA_BUILDERS_BY_OBJECT_NAME = { + attachment: computeStandardAttachmentViewFields, calendarEvent: computeStandardCalendarEventViewFields, company: computeStandardCompanyViewFields, dashboard: computeStandardDashboardViewFields, message: computeStandardMessageViewFields, messageThread: computeStandardMessageThreadViewFields, note: computeStandardNoteViewFields, + noteTarget: computeStandardNoteTargetViewFields, opportunity: computeStandardOpportunityViewFields, person: computeStandardPersonViewFields, task: computeStandardTaskViewFields, + taskTarget: computeStandardTaskTargetViewFields, + timelineActivity: computeStandardTimelineActivityViewFields, workflow: computeStandardWorkflowViewFields, workflowRun: computeStandardWorkflowRunViewFields, workflowVersion: computeStandardWorkflowVersionViewFields, + workspaceMember: computeStandardWorkspaceMemberViewFields, } as const satisfies { [P in AllStandardObjectName]?: StandardViewFieldBuilder

; }; diff --git a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-attachment-view-fields.util.ts b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-attachment-view-fields.util.ts new file mode 100644 index 00000000000..59d4095787c --- /dev/null +++ b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-attachment-view-fields.util.ts @@ -0,0 +1,145 @@ +import { type FlatViewField } from 'src/engine/metadata-modules/flat-view-field/types/flat-view-field.type'; +import { + createStandardViewFieldFlatMetadata, + type CreateStandardViewFieldArgs, +} from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field/create-standard-view-field-flat-metadata.util'; + +export const computeStandardAttachmentViewFields = ( + args: Omit, 'context'>, +): Record => { + return { + allAttachmentsName: createStandardViewFieldFlatMetadata({ + ...args, + objectName: 'attachment', + context: { + viewName: 'allAttachments', + viewFieldName: 'name', + fieldName: 'name', + position: 0, + isVisible: true, + size: 210, + }, + }), + allAttachmentsFile: createStandardViewFieldFlatMetadata({ + ...args, + objectName: 'attachment', + context: { + viewName: 'allAttachments', + viewFieldName: 'file', + fieldName: 'file', + position: 1, + isVisible: true, + size: 150, + }, + }), + // All morph targets are included so the surviving field after dedup always has a viewField + allAttachmentsTargetPerson: createStandardViewFieldFlatMetadata({ + ...args, + objectName: 'attachment', + context: { + viewName: 'allAttachments', + viewFieldName: 'targetPerson', + fieldName: 'targetPerson', + position: 2, + isVisible: true, + size: 150, + }, + }), + allAttachmentsTargetCompany: createStandardViewFieldFlatMetadata({ + ...args, + objectName: 'attachment', + context: { + viewName: 'allAttachments', + viewFieldName: 'targetCompany', + fieldName: 'targetCompany', + position: 3, + isVisible: true, + size: 150, + }, + }), + allAttachmentsTargetOpportunity: createStandardViewFieldFlatMetadata({ + ...args, + objectName: 'attachment', + context: { + viewName: 'allAttachments', + viewFieldName: 'targetOpportunity', + fieldName: 'targetOpportunity', + position: 4, + isVisible: true, + size: 150, + }, + }), + allAttachmentsTargetTask: createStandardViewFieldFlatMetadata({ + ...args, + objectName: 'attachment', + context: { + viewName: 'allAttachments', + viewFieldName: 'targetTask', + fieldName: 'targetTask', + position: 5, + isVisible: true, + size: 150, + }, + }), + allAttachmentsTargetNote: createStandardViewFieldFlatMetadata({ + ...args, + objectName: 'attachment', + context: { + viewName: 'allAttachments', + viewFieldName: 'targetNote', + fieldName: 'targetNote', + position: 6, + isVisible: true, + size: 150, + }, + }), + allAttachmentsTargetDashboard: createStandardViewFieldFlatMetadata({ + ...args, + objectName: 'attachment', + context: { + viewName: 'allAttachments', + viewFieldName: 'targetDashboard', + fieldName: 'targetDashboard', + position: 7, + isVisible: true, + size: 150, + }, + }), + allAttachmentsTargetWorkflow: createStandardViewFieldFlatMetadata({ + ...args, + objectName: 'attachment', + context: { + viewName: 'allAttachments', + viewFieldName: 'targetWorkflow', + fieldName: 'targetWorkflow', + position: 8, + isVisible: true, + size: 150, + }, + }), + allAttachmentsCreatedBy: createStandardViewFieldFlatMetadata({ + ...args, + objectName: 'attachment', + context: { + viewName: 'allAttachments', + viewFieldName: 'createdBy', + fieldName: 'createdBy', + position: 9, + isVisible: true, + size: 150, + }, + }), + allAttachmentsCreatedAt: createStandardViewFieldFlatMetadata({ + ...args, + objectName: 'attachment', + context: { + viewName: 'allAttachments', + viewFieldName: 'createdAt', + fieldName: 'createdAt', + position: 10, + isVisible: true, + size: 150, + }, + }), + }; +}; diff --git a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-note-target-view-fields.util.ts b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-note-target-view-fields.util.ts new file mode 100644 index 00000000000..33158bd8d79 --- /dev/null +++ b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-note-target-view-fields.util.ts @@ -0,0 +1,74 @@ +import { type FlatViewField } from 'src/engine/metadata-modules/flat-view-field/types/flat-view-field.type'; +import { + createStandardViewFieldFlatMetadata, + type CreateStandardViewFieldArgs, +} from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field/create-standard-view-field-flat-metadata.util'; + +export const computeStandardNoteTargetViewFields = ( + args: Omit, 'context'>, +): Record => { + return { + // Label identifier for junction tables + allNoteTargetsId: createStandardViewFieldFlatMetadata({ + ...args, + objectName: 'noteTarget', + context: { + viewName: 'allNoteTargets', + viewFieldName: 'id', + fieldName: 'id', + position: 0, + isVisible: true, + size: 210, + }, + }), + allNoteTargetsNote: createStandardViewFieldFlatMetadata({ + ...args, + objectName: 'noteTarget', + context: { + viewName: 'allNoteTargets', + viewFieldName: 'note', + fieldName: 'note', + position: 1, + isVisible: true, + size: 150, + }, + }), + // All morph targets are included so the surviving field after dedup always has a viewField + allNoteTargetsTargetPerson: createStandardViewFieldFlatMetadata({ + ...args, + objectName: 'noteTarget', + context: { + viewName: 'allNoteTargets', + viewFieldName: 'targetPerson', + fieldName: 'targetPerson', + position: 2, + isVisible: true, + size: 150, + }, + }), + allNoteTargetsTargetCompany: createStandardViewFieldFlatMetadata({ + ...args, + objectName: 'noteTarget', + context: { + viewName: 'allNoteTargets', + viewFieldName: 'targetCompany', + fieldName: 'targetCompany', + position: 3, + isVisible: true, + size: 150, + }, + }), + allNoteTargetsTargetOpportunity: createStandardViewFieldFlatMetadata({ + ...args, + objectName: 'noteTarget', + context: { + viewName: 'allNoteTargets', + viewFieldName: 'targetOpportunity', + fieldName: 'targetOpportunity', + position: 4, + isVisible: true, + size: 150, + }, + }), + }; +}; diff --git a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-task-target-view-fields.util.ts b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-task-target-view-fields.util.ts new file mode 100644 index 00000000000..85dd70223ea --- /dev/null +++ b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-task-target-view-fields.util.ts @@ -0,0 +1,74 @@ +import { type FlatViewField } from 'src/engine/metadata-modules/flat-view-field/types/flat-view-field.type'; +import { + createStandardViewFieldFlatMetadata, + type CreateStandardViewFieldArgs, +} from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field/create-standard-view-field-flat-metadata.util'; + +export const computeStandardTaskTargetViewFields = ( + args: Omit, 'context'>, +): Record => { + return { + // Label identifier for junction tables + allTaskTargetsId: createStandardViewFieldFlatMetadata({ + ...args, + objectName: 'taskTarget', + context: { + viewName: 'allTaskTargets', + viewFieldName: 'id', + fieldName: 'id', + position: 0, + isVisible: true, + size: 210, + }, + }), + allTaskTargetsTask: createStandardViewFieldFlatMetadata({ + ...args, + objectName: 'taskTarget', + context: { + viewName: 'allTaskTargets', + viewFieldName: 'task', + fieldName: 'task', + position: 1, + isVisible: true, + size: 150, + }, + }), + // All morph targets are included so the surviving field after dedup always has a viewField + allTaskTargetsTargetPerson: createStandardViewFieldFlatMetadata({ + ...args, + objectName: 'taskTarget', + context: { + viewName: 'allTaskTargets', + viewFieldName: 'targetPerson', + fieldName: 'targetPerson', + position: 2, + isVisible: true, + size: 150, + }, + }), + allTaskTargetsTargetCompany: createStandardViewFieldFlatMetadata({ + ...args, + objectName: 'taskTarget', + context: { + viewName: 'allTaskTargets', + viewFieldName: 'targetCompany', + fieldName: 'targetCompany', + position: 3, + isVisible: true, + size: 150, + }, + }), + allTaskTargetsTargetOpportunity: createStandardViewFieldFlatMetadata({ + ...args, + objectName: 'taskTarget', + context: { + viewName: 'allTaskTargets', + viewFieldName: 'targetOpportunity', + fieldName: 'targetOpportunity', + position: 4, + isVisible: true, + size: 150, + }, + }), + }; +}; diff --git a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-timeline-activity-view-fields.util.ts b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-timeline-activity-view-fields.util.ts new file mode 100644 index 00000000000..02eda341de2 --- /dev/null +++ b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-timeline-activity-view-fields.util.ts @@ -0,0 +1,162 @@ +import { type FlatViewField } from 'src/engine/metadata-modules/flat-view-field/types/flat-view-field.type'; +import { + createStandardViewFieldFlatMetadata, + type CreateStandardViewFieldArgs, +} from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field/create-standard-view-field-flat-metadata.util'; + +export const computeStandardTimelineActivityViewFields = ( + args: Omit, 'context'>, +): Record => { + return { + allTimelineActivitiesName: createStandardViewFieldFlatMetadata({ + ...args, + objectName: 'timelineActivity', + context: { + viewName: 'allTimelineActivities', + viewFieldName: 'name', + fieldName: 'name', + position: 0, + isVisible: true, + size: 210, + }, + }), + allTimelineActivitiesHappensAt: createStandardViewFieldFlatMetadata({ + ...args, + objectName: 'timelineActivity', + context: { + viewName: 'allTimelineActivities', + viewFieldName: 'happensAt', + fieldName: 'happensAt', + position: 1, + isVisible: true, + size: 150, + }, + }), + // All morph targets are included so the surviving field after dedup always has a viewField + allTimelineActivitiesTargetPerson: createStandardViewFieldFlatMetadata({ + ...args, + objectName: 'timelineActivity', + context: { + viewName: 'allTimelineActivities', + viewFieldName: 'targetPerson', + fieldName: 'targetPerson', + position: 2, + isVisible: true, + size: 150, + }, + }), + allTimelineActivitiesTargetCompany: createStandardViewFieldFlatMetadata({ + ...args, + objectName: 'timelineActivity', + context: { + viewName: 'allTimelineActivities', + viewFieldName: 'targetCompany', + fieldName: 'targetCompany', + position: 3, + isVisible: true, + size: 150, + }, + }), + allTimelineActivitiesTargetOpportunity: createStandardViewFieldFlatMetadata( + { + ...args, + objectName: 'timelineActivity', + context: { + viewName: 'allTimelineActivities', + viewFieldName: 'targetOpportunity', + fieldName: 'targetOpportunity', + position: 4, + isVisible: true, + size: 150, + }, + }, + ), + allTimelineActivitiesTargetTask: createStandardViewFieldFlatMetadata({ + ...args, + objectName: 'timelineActivity', + context: { + viewName: 'allTimelineActivities', + viewFieldName: 'targetTask', + fieldName: 'targetTask', + position: 5, + isVisible: true, + size: 150, + }, + }), + allTimelineActivitiesTargetNote: createStandardViewFieldFlatMetadata({ + ...args, + objectName: 'timelineActivity', + context: { + viewName: 'allTimelineActivities', + viewFieldName: 'targetNote', + fieldName: 'targetNote', + position: 6, + isVisible: true, + size: 150, + }, + }), + allTimelineActivitiesTargetWorkflow: createStandardViewFieldFlatMetadata({ + ...args, + objectName: 'timelineActivity', + context: { + viewName: 'allTimelineActivities', + viewFieldName: 'targetWorkflow', + fieldName: 'targetWorkflow', + position: 7, + isVisible: true, + size: 150, + }, + }), + allTimelineActivitiesTargetWorkflowVersion: + createStandardViewFieldFlatMetadata({ + ...args, + objectName: 'timelineActivity', + context: { + viewName: 'allTimelineActivities', + viewFieldName: 'targetWorkflowVersion', + fieldName: 'targetWorkflowVersion', + position: 8, + isVisible: true, + size: 150, + }, + }), + allTimelineActivitiesTargetWorkflowRun: createStandardViewFieldFlatMetadata( + { + ...args, + objectName: 'timelineActivity', + context: { + viewName: 'allTimelineActivities', + viewFieldName: 'targetWorkflowRun', + fieldName: 'targetWorkflowRun', + position: 9, + isVisible: true, + size: 150, + }, + }, + ), + allTimelineActivitiesTargetDashboard: createStandardViewFieldFlatMetadata({ + ...args, + objectName: 'timelineActivity', + context: { + viewName: 'allTimelineActivities', + viewFieldName: 'targetDashboard', + fieldName: 'targetDashboard', + position: 10, + isVisible: true, + size: 150, + }, + }), + allTimelineActivitiesWorkspaceMember: createStandardViewFieldFlatMetadata({ + ...args, + objectName: 'timelineActivity', + context: { + viewName: 'allTimelineActivities', + viewFieldName: 'workspaceMember', + fieldName: 'workspaceMember', + position: 11, + isVisible: true, + size: 150, + }, + }), + }; +}; diff --git a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-workspace-member-view-fields.util.ts b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-workspace-member-view-fields.util.ts new file mode 100644 index 00000000000..0dba420cf2e --- /dev/null +++ b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-workspace-member-view-fields.util.ts @@ -0,0 +1,60 @@ +import { type FlatViewField } from 'src/engine/metadata-modules/flat-view-field/types/flat-view-field.type'; +import { + createStandardViewFieldFlatMetadata, + type CreateStandardViewFieldArgs, +} from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field/create-standard-view-field-flat-metadata.util'; + +export const computeStandardWorkspaceMemberViewFields = ( + args: Omit, 'context'>, +): Record => { + return { + allWorkspaceMembersName: createStandardViewFieldFlatMetadata({ + ...args, + objectName: 'workspaceMember', + context: { + viewName: 'allWorkspaceMembers', + viewFieldName: 'name', + fieldName: 'name', + position: 0, + isVisible: true, + size: 210, + }, + }), + allWorkspaceMembersCreatedAt: createStandardViewFieldFlatMetadata({ + ...args, + objectName: 'workspaceMember', + context: { + viewName: 'allWorkspaceMembers', + viewFieldName: 'createdAt', + fieldName: 'createdAt', + position: 1, + isVisible: true, + size: 150, + }, + }), + allWorkspaceMembersOwnedOpportunities: createStandardViewFieldFlatMetadata({ + ...args, + objectName: 'workspaceMember', + context: { + viewName: 'allWorkspaceMembers', + viewFieldName: 'ownedOpportunities', + fieldName: 'ownedOpportunities', + position: 2, + isVisible: true, + size: 150, + }, + }), + allWorkspaceMembersAssignedTasks: createStandardViewFieldFlatMetadata({ + ...args, + objectName: 'workspaceMember', + context: { + viewName: 'allWorkspaceMembers', + viewFieldName: 'assignedTasks', + fieldName: 'assignedTasks', + position: 3, + isVisible: true, + size: 150, + }, + }), + }; +}; diff --git a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view/build-standard-flat-view-metadata-maps.util.ts b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view/build-standard-flat-view-metadata-maps.util.ts index 9bbea2fccb7..6287c232bc5 100644 --- a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view/build-standard-flat-view-metadata-maps.util.ts +++ b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view/build-standard-flat-view-metadata-maps.util.ts @@ -4,18 +4,23 @@ import { addFlatEntityToFlatEntityMapsOrThrow } from 'src/engine/metadata-module import { type FlatView } from 'src/engine/metadata-modules/flat-view/types/flat-view.type'; import { ViewType } from 'src/engine/metadata-modules/view/enums/view-type.enum'; import { type AllStandardObjectName } from 'src/engine/workspace-manager/twenty-standard-application/types/all-standard-object-name.type'; +import { computeStandardAttachmentViews } from 'src/engine/workspace-manager/twenty-standard-application/utils/view/compute-standard-attachment-views.util'; import { computeStandardCalendarEventViews } from 'src/engine/workspace-manager/twenty-standard-application/utils/view/compute-standard-calendar-event-views.util'; import { computeStandardCompanyViews } from 'src/engine/workspace-manager/twenty-standard-application/utils/view/compute-standard-company-views.util'; import { computeStandardDashboardViews } from 'src/engine/workspace-manager/twenty-standard-application/utils/view/compute-standard-dashboard-views.util'; import { computeStandardMessageThreadViews } from 'src/engine/workspace-manager/twenty-standard-application/utils/view/compute-standard-message-thread-views.util'; import { computeStandardMessageViews } from 'src/engine/workspace-manager/twenty-standard-application/utils/view/compute-standard-message-views.util'; +import { computeStandardNoteTargetViews } from 'src/engine/workspace-manager/twenty-standard-application/utils/view/compute-standard-note-target-views.util'; import { computeStandardNoteViews } from 'src/engine/workspace-manager/twenty-standard-application/utils/view/compute-standard-note-views.util'; import { computeStandardOpportunityViews } from 'src/engine/workspace-manager/twenty-standard-application/utils/view/compute-standard-opportunity-views.util'; import { computeStandardPersonViews } from 'src/engine/workspace-manager/twenty-standard-application/utils/view/compute-standard-person-views.util'; +import { computeStandardTaskTargetViews } from 'src/engine/workspace-manager/twenty-standard-application/utils/view/compute-standard-task-target-views.util'; import { computeStandardTaskViews } from 'src/engine/workspace-manager/twenty-standard-application/utils/view/compute-standard-task-views.util'; +import { computeStandardTimelineActivityViews } from 'src/engine/workspace-manager/twenty-standard-application/utils/view/compute-standard-timeline-activity-views.util'; import { computeStandardWorkflowRunViews } from 'src/engine/workspace-manager/twenty-standard-application/utils/view/compute-standard-workflow-run-views.util'; import { computeStandardWorkflowVersionViews } from 'src/engine/workspace-manager/twenty-standard-application/utils/view/compute-standard-workflow-version-views.util'; import { computeStandardWorkflowViews } from 'src/engine/workspace-manager/twenty-standard-application/utils/view/compute-standard-workflow-views.util'; +import { computeStandardWorkspaceMemberViews } from 'src/engine/workspace-manager/twenty-standard-application/utils/view/compute-standard-workspace-member-views.util'; import { type CreateStandardViewArgs } from 'src/engine/workspace-manager/twenty-standard-application/utils/view/create-standard-view-flat-metadata.util'; type StandardViewBuilder

= ( @@ -23,18 +28,23 @@ type StandardViewBuilder

= ( ) => Record; const STANDARD_FLAT_VIEW_METADATA_BUILDERS_BY_OBJECT_NAME = { + attachment: computeStandardAttachmentViews, calendarEvent: computeStandardCalendarEventViews, company: computeStandardCompanyViews, dashboard: computeStandardDashboardViews, message: computeStandardMessageViews, messageThread: computeStandardMessageThreadViews, note: computeStandardNoteViews, + noteTarget: computeStandardNoteTargetViews, opportunity: computeStandardOpportunityViews, person: computeStandardPersonViews, task: computeStandardTaskViews, + taskTarget: computeStandardTaskTargetViews, + timelineActivity: computeStandardTimelineActivityViews, workflow: computeStandardWorkflowViews, workflowRun: computeStandardWorkflowRunViews, workflowVersion: computeStandardWorkflowVersionViews, + workspaceMember: computeStandardWorkspaceMemberViews, } as const satisfies { [P in AllStandardObjectName]?: StandardViewBuilder

; }; diff --git a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view/compute-standard-attachment-views.util.ts b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view/compute-standard-attachment-views.util.ts new file mode 100644 index 00000000000..7ef8f865604 --- /dev/null +++ b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view/compute-standard-attachment-views.util.ts @@ -0,0 +1,26 @@ +import { type FlatView } from 'src/engine/metadata-modules/flat-view/types/flat-view.type'; +import { ViewKey } from 'src/engine/metadata-modules/view/enums/view-key.enum'; +import { ViewType } from 'src/engine/metadata-modules/view/enums/view-type.enum'; +import { + createStandardViewFlatMetadata, + type CreateStandardViewArgs, +} from 'src/engine/workspace-manager/twenty-standard-application/utils/view/create-standard-view-flat-metadata.util'; + +export const computeStandardAttachmentViews = ( + args: Omit, 'context'>, +): Record => { + return { + allAttachments: createStandardViewFlatMetadata({ + ...args, + objectName: 'attachment', + context: { + viewName: 'allAttachments', + name: 'All Attachments', + type: ViewType.TABLE, + key: ViewKey.INDEX, + position: 0, + icon: 'IconList', + }, + }), + }; +}; diff --git a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view/compute-standard-note-target-views.util.ts b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view/compute-standard-note-target-views.util.ts new file mode 100644 index 00000000000..3f404d53f07 --- /dev/null +++ b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view/compute-standard-note-target-views.util.ts @@ -0,0 +1,26 @@ +import { type FlatView } from 'src/engine/metadata-modules/flat-view/types/flat-view.type'; +import { ViewKey } from 'src/engine/metadata-modules/view/enums/view-key.enum'; +import { ViewType } from 'src/engine/metadata-modules/view/enums/view-type.enum'; +import { + createStandardViewFlatMetadata, + type CreateStandardViewArgs, +} from 'src/engine/workspace-manager/twenty-standard-application/utils/view/create-standard-view-flat-metadata.util'; + +export const computeStandardNoteTargetViews = ( + args: Omit, 'context'>, +): Record => { + return { + allNoteTargets: createStandardViewFlatMetadata({ + ...args, + objectName: 'noteTarget', + context: { + viewName: 'allNoteTargets', + name: 'All Note Targets', + type: ViewType.TABLE, + key: ViewKey.INDEX, + position: 0, + icon: 'IconList', + }, + }), + }; +}; diff --git a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view/compute-standard-task-target-views.util.ts b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view/compute-standard-task-target-views.util.ts new file mode 100644 index 00000000000..57ff0a45f75 --- /dev/null +++ b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view/compute-standard-task-target-views.util.ts @@ -0,0 +1,26 @@ +import { type FlatView } from 'src/engine/metadata-modules/flat-view/types/flat-view.type'; +import { ViewKey } from 'src/engine/metadata-modules/view/enums/view-key.enum'; +import { ViewType } from 'src/engine/metadata-modules/view/enums/view-type.enum'; +import { + createStandardViewFlatMetadata, + type CreateStandardViewArgs, +} from 'src/engine/workspace-manager/twenty-standard-application/utils/view/create-standard-view-flat-metadata.util'; + +export const computeStandardTaskTargetViews = ( + args: Omit, 'context'>, +): Record => { + return { + allTaskTargets: createStandardViewFlatMetadata({ + ...args, + objectName: 'taskTarget', + context: { + viewName: 'allTaskTargets', + name: 'All Task Targets', + type: ViewType.TABLE, + key: ViewKey.INDEX, + position: 0, + icon: 'IconList', + }, + }), + }; +}; diff --git a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view/compute-standard-timeline-activity-views.util.ts b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view/compute-standard-timeline-activity-views.util.ts new file mode 100644 index 00000000000..51ab814926c --- /dev/null +++ b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view/compute-standard-timeline-activity-views.util.ts @@ -0,0 +1,26 @@ +import { type FlatView } from 'src/engine/metadata-modules/flat-view/types/flat-view.type'; +import { ViewKey } from 'src/engine/metadata-modules/view/enums/view-key.enum'; +import { ViewType } from 'src/engine/metadata-modules/view/enums/view-type.enum'; +import { + createStandardViewFlatMetadata, + type CreateStandardViewArgs, +} from 'src/engine/workspace-manager/twenty-standard-application/utils/view/create-standard-view-flat-metadata.util'; + +export const computeStandardTimelineActivityViews = ( + args: Omit, 'context'>, +): Record => { + return { + allTimelineActivities: createStandardViewFlatMetadata({ + ...args, + objectName: 'timelineActivity', + context: { + viewName: 'allTimelineActivities', + name: 'All Timeline Activities', + type: ViewType.TABLE, + key: ViewKey.INDEX, + position: 0, + icon: 'IconList', + }, + }), + }; +}; diff --git a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view/compute-standard-workspace-member-views.util.ts b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view/compute-standard-workspace-member-views.util.ts new file mode 100644 index 00000000000..9a248b3da30 --- /dev/null +++ b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view/compute-standard-workspace-member-views.util.ts @@ -0,0 +1,26 @@ +import { type FlatView } from 'src/engine/metadata-modules/flat-view/types/flat-view.type'; +import { ViewKey } from 'src/engine/metadata-modules/view/enums/view-key.enum'; +import { ViewType } from 'src/engine/metadata-modules/view/enums/view-type.enum'; +import { + createStandardViewFlatMetadata, + type CreateStandardViewArgs, +} from 'src/engine/workspace-manager/twenty-standard-application/utils/view/create-standard-view-flat-metadata.util'; + +export const computeStandardWorkspaceMemberViews = ( + args: Omit, 'context'>, +): Record => { + return { + allWorkspaceMembers: createStandardViewFlatMetadata({ + ...args, + objectName: 'workspaceMember', + context: { + viewName: 'allWorkspaceMembers', + name: 'All Workspace Members', + type: ViewType.TABLE, + key: ViewKey.INDEX, + position: 0, + icon: 'IconList', + }, + }), + }; +}; diff --git a/packages/twenty-shared/src/metadata/standard-object.constant.ts b/packages/twenty-shared/src/metadata/standard-object.constant.ts index 864571cd1ea..887e96483b0 100644 --- a/packages/twenty-shared/src/metadata/standard-object.constant.ts +++ b/packages/twenty-shared/src/metadata/standard-object.constant.ts @@ -80,6 +80,46 @@ export const STANDARD_OBJECTS = { universalIdentifier: '14d0f5a9-6c81-4e3b-5f2a-8d9e0c1b2f36', }, }, + views: { + allAttachments: { + universalIdentifier: '3f7f3363-7087-44cc-902d-5e8904262316', + viewFields: { + name: { + universalIdentifier: 'be56712f-d7a6-4fbe-b92b-d750f0708a0a', + }, + file: { + universalIdentifier: '873cf114-5477-4b62-9023-7ea6ad69fbe5', + }, + createdBy: { + universalIdentifier: 'fa363372-0fdf-4bb3-bdf1-0ead354b9225', + }, + createdAt: { + universalIdentifier: '6c092c26-b1cb-488f-ae2e-5af4bec1162b', + }, + targetPerson: { + universalIdentifier: '73a4c3a7-c7f9-4ed6-a2b6-117d7efad0f3', + }, + targetCompany: { + universalIdentifier: 'b335ad04-059e-4c36-8666-f40431849044', + }, + targetOpportunity: { + universalIdentifier: '15f2d457-dc09-4c52-bf2a-47083d6bf017', + }, + targetTask: { + universalIdentifier: 'c2913c5e-6cc6-438d-9c2f-3212a9b2a82b', + }, + targetNote: { + universalIdentifier: 'fc8dba49-bcf2-41b8-a435-0c4a3bbf2af6', + }, + targetDashboard: { + universalIdentifier: 'bcc6d6e1-7c0b-4291-9270-66e42024d8dd', + }, + targetWorkflow: { + universalIdentifier: '11fcf58b-dbab-42dd-be67-689462111070', + }, + }, + }, + }, }, blocklist: { universalIdentifier: '20202020-0408-4f38-b8a8-4d5e3e26e24d', @@ -1152,6 +1192,28 @@ export const STANDARD_OBJECTS = { universalIdentifier: '2527a2b6-3558-4f0c-2a9b-56e7f58e9e57', }, }, + views: { + allNoteTargets: { + universalIdentifier: 'd124d587-ef78-402b-9341-7673e6cea033', + viewFields: { + id: { + universalIdentifier: 'f2d912fe-7c6f-4a9c-b808-b7b5a18d2818', + }, + note: { + universalIdentifier: '9d4ac173-d32b-4a44-9dbd-8a47ab844f98', + }, + targetPerson: { + universalIdentifier: 'b6f67de5-c5cf-4235-b740-a6a007c8eae3', + }, + targetCompany: { + universalIdentifier: 'a9c7f370-4b22-4f29-8e3f-678e91a59576', + }, + targetOpportunity: { + universalIdentifier: '3efeb162-cd03-458b-9c7b-47032d045204', + }, + }, + }, + }, }, opportunity: { universalIdentifier: '20202020-9549-49dd-b2b2-883999db8938', @@ -1716,6 +1778,28 @@ export const STANDARD_OBJECTS = { universalIdentifier: '5850b5c9-6881-4a3d-5b2c-89f0a81f2f80', }, }, + views: { + allTaskTargets: { + universalIdentifier: '1dbf1d24-6cca-4f55-ae2f-e3d1b425a495', + viewFields: { + id: { + universalIdentifier: 'a49287c9-8aa6-4fca-9ec5-08d643f7239f', + }, + task: { + universalIdentifier: '1f79839e-42f6-4a69-839a-369e21a7497d', + }, + targetPerson: { + universalIdentifier: 'cadc7a33-1527-4ef8-ac00-7ed0b54d1bae', + }, + targetCompany: { + universalIdentifier: 'e9fa1305-4ba2-41c5-9198-fdc622b69f90', + }, + targetOpportunity: { + universalIdentifier: '526f3354-34d6-4e7e-a870-5f99c28353c2', + }, + }, + }, + }, }, timelineActivity: { universalIdentifier: '20202020-6736-4337-b5c4-8b39fae325a5', @@ -1831,6 +1915,33 @@ export const STANDARD_OBJECTS = { linkedRecordCachedName: { universalIdentifier: '20202020-bf01-4b01-8b01-ba5cc01aa017', }, + targetPerson: { + universalIdentifier: '37b38a8b-abd7-4f72-92d2-ad82bbef0296', + }, + targetCompany: { + universalIdentifier: '2015825f-0786-4b0d-88a7-dfce1b4b1c1a', + }, + targetOpportunity: { + universalIdentifier: 'f7b5ced9-eba6-4454-8849-7a92d27c11ca', + }, + targetTask: { + universalIdentifier: '3899138d-e6fa-414c-9432-214c9b797ebb', + }, + targetNote: { + universalIdentifier: 'ab74ed52-0195-4b65-987a-8367c07ee222', + }, + targetWorkflow: { + universalIdentifier: 'd2c3ddc3-afad-40b9-a2cb-d2765f2f5691', + }, + targetWorkflowVersion: { + universalIdentifier: '4a7e3213-afd5-4691-8bba-0a10e8697afb', + }, + targetWorkflowRun: { + universalIdentifier: '97910946-04f0-4634-804e-880bc0019225', + }, + targetDashboard: { + universalIdentifier: '538847e8-ab09-407c-a433-505f6d7be7a1', + }, }, }, }, @@ -2213,6 +2324,12 @@ export const STANDARD_OBJECTS = { createdAt: { universalIdentifier: '20202020-ef01-4e01-8e01-a0bcaeabe1f8', }, + ownedOpportunities: { + universalIdentifier: '8a0503f3-ba61-453e-86dc-6c79f7bc235b', + }, + assignedTasks: { + universalIdentifier: 'af16226e-6375-4676-8bd9-9d1a57076fc4', + }, }, }, },