Skip to content

The open alternative to Salesforce, designed for AI.

Add the accessGroup hidden standard object (#29331)

Charles Bochet6fb06974dbfe
diff --git a/packages/twenty-server/src/database/commands/upgrade-version-command/2-55/2-55-upgrade-version-command.module.ts b/packages/twenty-server/src/database/commands/upgrade-version-command/2-55/2-55-upgrade-version-command.module.ts
index 320aa53d0cc..ab63acaa565 100644
--- a/packages/twenty-server/src/database/commands/upgrade-version-command/2-55/2-55-upgrade-version-command.module.ts
+++ b/packages/twenty-server/src/database/commands/upgrade-version-command/2-55/2-55-upgrade-version-command.module.ts
@@ -3,6 +3,7 @@ import { Module } from '@nestjs/common';
import { WorkspaceIteratorModule } from 'src/database/commands/command-runners/workspace-iterator.module';
import { BackfillWebhookAdminRoleCommand } from 'src/database/commands/upgrade-version-command/2-55/2-55-workspace-command-1793369399691-backfill-webhook-admin-role.command';
import { AddStandardRelatedRecordPathsCommand } from 'src/database/commands/upgrade-version-command/2-55/2-55-workspace-command-1793375369182-add-standard-related-record-paths.command';
+import { SyncAccessGroupObjectCommand } from 'src/database/commands/upgrade-version-command/2-55/2-55-workspace-command-1793384492383-sync-access-group-object.command';
import { ApplicationModule } from 'src/engine/core-modules/application/application.module';
import { WorkspaceCacheModule } from 'src/engine/workspace-cache/workspace-cache.module';
import { WorkspaceMigrationModule } from 'src/engine/workspace-manager/workspace-migration/workspace-migration.module';
@@ -17,6 +18,7 @@ import { WorkspaceMigrationModule } from 'src/engine/workspace-manager/workspace
providers: [
BackfillWebhookAdminRoleCommand,
AddStandardRelatedRecordPathsCommand,
+ SyncAccessGroupObjectCommand,
],
})
export class V2_55_UpgradeVersionCommandModule {}
diff --git a/packages/twenty-server/src/database/commands/upgrade-version-command/2-55/2-55-workspace-command-1793384492383-sync-access-group-object.command.ts b/packages/twenty-server/src/database/commands/upgrade-version-command/2-55/2-55-workspace-command-1793384492383-sync-access-group-object.command.ts
new file mode 100644
index 00000000000..19843f44fd8
--- /dev/null
+++ b/packages/twenty-server/src/database/commands/upgrade-version-command/2-55/2-55-workspace-command-1793384492383-sync-access-group-object.command.ts
@@ -0,0 +1,158 @@
+import { Command } from 'nest-commander';
+import { STANDARD_OBJECTS } from 'twenty-shared/metadata';
+import { isDefined } from 'twenty-shared/utils';
+
+import { ProvisionedWorkspaceCommandRunner } from 'src/database/commands/command-runners/provisioned-workspace.command-runner';
+import { WorkspaceIteratorService } from 'src/database/commands/command-runners/workspace-iterator.service';
+import { type RunOnWorkspaceArgs } from 'src/database/commands/command-runners/workspace.command-runner';
+import { getStandardFlatEntitiesToCreateOrThrow } from 'src/database/commands/upgrade-version-command/2-10/utils/get-standard-flat-entities-to-create-or-throw.util';
+import { ApplicationService } from 'src/engine/core-modules/application/application.service';
+import { RegisteredWorkspaceCommand } from 'src/engine/core-modules/upgrade/decorators/registered-workspace-command.decorator';
+import { type FlatFieldMetadata } from 'src/engine/metadata-modules/flat-field-metadata/types/flat-field-metadata.type';
+import { type FlatIndexMetadata } from 'src/engine/metadata-modules/flat-index-metadata/types/flat-index-metadata.type';
+import { type FlatObjectMetadata } from 'src/engine/metadata-modules/flat-object-metadata/types/flat-object-metadata.type';
+import { WorkspaceCacheService } from 'src/engine/workspace-cache/services/workspace-cache.service';
+import { computeTwentyStandardApplicationAllFlatEntityMaps } from 'src/engine/workspace-manager/twenty-standard-application/utils/twenty-standard-application-all-flat-entity-maps.constant';
+import { WorkspaceMigrationBuilderException } from 'src/engine/workspace-manager/workspace-migration/exceptions/workspace-migration-builder-exception';
+import { WorkspaceMigrationValidateBuildAndRunService } from 'src/engine/workspace-manager/workspace-migration/services/workspace-migration-validate-build-and-run-service';
+import { getWorkspaceSchemaName } from 'src/engine/workspace-datasource/utils/get-workspace-schema-name.util';
+
+@RegisteredWorkspaceCommand('2.55.0', 1793384492383)
+@Command({
+ name: 'upgrade:2-55:sync-access-group-object',
+ description: 'Create the accessGroup standard object in existing workspaces',
+})
+export class SyncAccessGroupObjectCommand extends ProvisionedWorkspaceCommandRunner {
+ constructor(
+ protected readonly workspaceIteratorService: WorkspaceIteratorService,
+ private readonly applicationService: ApplicationService,
+ private readonly workspaceCacheService: WorkspaceCacheService,
+ private readonly workspaceMigrationValidateBuildAndRunService: WorkspaceMigrationValidateBuildAndRunService,
+ ) {
+ super(workspaceIteratorService);
+ }
+
+ override async runOnWorkspace({
+ workspaceId,
+ options,
+ dataSource,
+ }: RunOnWorkspaceArgs): Promise<void> {
+ if (!isDefined(dataSource)) {
+ this.logger.log(
+ `Skipping accessGroup upgrade for workspace ${workspaceId}: no workspace data source`,
+ );
+
+ return;
+ }
+
+ const queryRunner = dataSource.createQueryRunner('master');
+
+ try {
+ await queryRunner.connect();
+
+ if (!(await queryRunner.hasSchema(getWorkspaceSchemaName(workspaceId)))) {
+ this.logger.log(
+ `Skipping accessGroup upgrade for workspace ${workspaceId}: workspace schema is absent`,
+ );
+
+ return;
+ }
+ } finally {
+ await queryRunner.release();
+ }
+
+ const { flatObjectMetadataMaps, flatFieldMetadataMaps, flatIndexMaps } =
+ await this.workspaceCacheService.getOrRecompute(workspaceId, [
+ 'flatObjectMetadataMaps',
+ 'flatFieldMetadataMaps',
+ 'flatIndexMaps',
+ ]);
+ const { twentyStandardFlatApplication } =
+ await this.applicationService.findWorkspaceTwentyStandardAndCustomApplicationOrThrow(
+ { workspaceId },
+ );
+ const { allFlatEntityMaps: standardAllFlatEntityMaps } =
+ computeTwentyStandardApplicationAllFlatEntityMaps({
+ now: new Date().toISOString(),
+ workspaceId,
+ twentyStandardApplicationId: twentyStandardFlatApplication.id,
+ });
+ const allFlatEntityOperationByMetadataName = {
+ objectMetadata: {
+ flatEntityToCreate:
+ getStandardFlatEntitiesToCreateOrThrow<FlatObjectMetadata>({
+ standardFlatEntityMaps:
+ standardAllFlatEntityMaps.flatObjectMetadataMaps,
+ existingFlatEntityMaps: flatObjectMetadataMaps,
+ universalIdentifiers: [
+ STANDARD_OBJECTS.accessGroup.universalIdentifier,
+ ],
+ }),
+ flatEntityToDelete: [],
+ flatEntityToUpdate: [],
+ },
+ fieldMetadata: {
+ flatEntityToCreate:
+ getStandardFlatEntitiesToCreateOrThrow<FlatFieldMetadata>({
+ standardFlatEntityMaps:
+ standardAllFlatEntityMaps.flatFieldMetadataMaps,
+ existingFlatEntityMaps: flatFieldMetadataMaps,
+ universalIdentifiers: Object.values(
+ STANDARD_OBJECTS.accessGroup.fields,
+ ).map((field) => field.universalIdentifier),
+ }),
+ flatEntityToDelete: [],
+ flatEntityToUpdate: [],
+ },
+ index: {
+ flatEntityToCreate:
+ getStandardFlatEntitiesToCreateOrThrow<FlatIndexMetadata>({
+ standardFlatEntityMaps: standardAllFlatEntityMaps.flatIndexMaps,
+ existingFlatEntityMaps: flatIndexMaps,
+ universalIdentifiers: Object.values(
+ STANDARD_OBJECTS.accessGroup.indexes,
+ ).map((index) => index.universalIdentifier),
+ }),
+ flatEntityToDelete: [],
+ flatEntityToUpdate: [],
+ },
+ };
+ const totalOperationCount = Object.values(
+ allFlatEntityOperationByMetadataName,
+ ).reduce(
+ (total, operations) => total + operations.flatEntityToCreate.length,
+ 0,
+ );
+
+ if (totalOperationCount === 0) {
+ return;
+ }
+
+ if (options.dryRun) {
+ this.logger.log(
+ `[DRY RUN] Would create accessGroup metadata for workspace ${workspaceId}`,
+ );
+
+ return;
+ }
+
+ const result =
+ await this.workspaceMigrationValidateBuildAndRunService.validateBuildAndRunLegacyWorkspaceMigration(
+ {
+ shouldDeferActions: false,
+ allFlatEntityOperationByMetadataName,
+ workspaceId,
+ isSystemBuild: true,
+ applicationUniversalIdentifier:
+ twentyStandardFlatApplication.universalIdentifier,
+ },
+ );
+
+ if (result.status === 'fail') {
+ throw new WorkspaceMigrationBuilderException(
+ result,
+ `Failed to create the accessGroup object for workspace ${workspaceId}`,
+ );
+ }
+ }
+}
diff --git a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/constants/search-fields-by-standard-object-name.constant.ts b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/constants/search-fields-by-standard-object-name.constant.ts
index 6f01431f70b..c28318e7eb7 100644
--- a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/constants/search-fields-by-standard-object-name.constant.ts
+++ b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/constants/search-fields-by-standard-object-name.constant.ts
@@ -53,6 +53,7 @@ export const SEARCH_FIELDS_BY_STANDARD_OBJECT_NAME = {
{ name: 'phones', type: FieldMetadataType.PHONES },
{ name: 'jobTitle', type: FieldMetadataType.TEXT },
],
+ accessGroup: [],
recordShare: [],
shortLink: [],
task: [
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 18e95a7c44d..f25a8d0ff37 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
@@ -2,409 +2,451 @@
exports[`getStandardObjectMetadataRelatedEntityIds should return standard object metadata related entity ids 1`] = `
{
+ "accessGroup": {
+ "fields": {
+ "createdAt": {
+ "id": "00000000-0000-0000-0000-000000000726",
+ },
+ "createdBy": {
+ "id": "00000000-0000-0000-0000-000000000729",
+ },
+ "deletedAt": {
+ "id": "00000000-0000-0000-0000-000000000728",
+ },
+ "groupHash": {
+ "id": "00000000-0000-0000-0000-000000000736",
+ },
+ "id": {
+ "id": "00000000-0000-0000-0000-000000000725",
+ },
+ "memberFieldValues": {
+ "id": "00000000-0000-0000-0000-000000000735",
+ },
+ "position": {
+ "id": "00000000-0000-0000-0000-000000000731",
+ },
+ "roleId": {
+ "id": "00000000-0000-0000-0000-000000000733",
+ },
+ "rowLevelPermissionPredicateGroupId": {
+ "id": "00000000-0000-0000-0000-000000000734",
+ },
+ "searchVector": {
+ "id": "00000000-0000-0000-0000-000000000732",
+ },
+ "updatedAt": {
+ "id": "00000000-0000-0000-0000-000000000727",
+ },
+ "updatedBy": {
+ "id": "00000000-0000-0000-0000-000000000730",
+ },
+ },
+ "id": "00000000-0000-0000-0000-000000000737",
+ "views": {},
+ },
"agentChatThread": {
"fields": {
"activeStreamId": {
- "id": "00000000-0000-0000-0000-000000001062",
+ "id": "00000000-0000-0000-0000-000000001075",
},
"archivedAt": {
- "id": "00000000-0000-0000-0000-000000001049",
+ "id": "00000000-0000-0000-0000-000000001062",
},
"assignee": {
- "id": "00000000-0000-0000-0000-000000001069",
+ "id": "00000000-0000-0000-0000-000000001082",
},
"attachments": {
- "id": "00000000-0000-0000-0000-000000001066",
+ "id": "00000000-0000-0000-0000-000000001079",
},
"channelArchivedAt": {
- "id": "00000000-0000-0000-0000-000000001071",
+ "id": "00000000-0000-0000-0000-000000001084",
},
"channelId": {
- "id": "00000000-0000-0000-0000-000000001070",
+ "id": "00000000-0000-0000-0000-000000001083",
},
"channelSnoozedUntil": {
- "id": "00000000-0000-0000-0000-000000001072",
+ "id": "00000000-0000-0000-0000-000000001085",
},
"contextWindowTokens": {
- "id": "00000000-0000-0000-0000-000000001056",
+ "id": "00000000-0000-0000-0000-000000001069",
},
"conversationSize": {
- "id": "00000000-0000-0000-0000-000000001057",
+ "id": "00000000-0000-0000-0000-000000001070",
},
"conversationType": {
- "id": "00000000-0000-0000-0000-000000001052",
+ "id": "00000000-0000-0000-0000-000000001065",
},
"createdAt": {
- "id": "00000000-0000-0000-0000-000000001046",
+ "id": "00000000-0000-0000-0000-000000001059",
},
"deletedAt": {
- "id": "00000000-0000-0000-0000-000000001048",
+ "id": "00000000-0000-0000-0000-000000001061",
},
"id": {
- "id": "00000000-0000-0000-0000-000000001045",
+ "id": "00000000-0000-0000-0000-000000001058",
},
"isAssistantParticipant": {
- "id": "00000000-0000-0000-0000-000000001053",
+ "id": "00000000-0000-0000-0000-000000001066",
},
"lastActivityAt": {
- "id": "00000000-0000-0000-0000-000000001073",
+ "id": "00000000-0000-0000-0000-000000001086",
},
"lastMessageSenderWorkspaceMemberId": {
- "id": "00000000-0000-0000-0000-000000001075",
+ "id": "00000000-0000-0000-0000-000000001088",
},
"lastMessageText": {
- "id": "00000000-0000-0000-0000-000000001074",
+ "id": "00000000-0000-0000-0000-000000001087",
},
"messages": {
- "id": "00000000-0000-0000-0000-000000001065",
+ "id": "00000000-0000-0000-0000-000000001078",
},
"participants": {
- "id": "00000000-0000-0000-0000-000000001068",
+ "id": "00000000-0000-0000-0000-000000001081",
},
"pendingQuestionMessageId": {
- "id": "00000000-0000-0000-0000-000000001063",
+ "id": "00000000-0000-0000-0000-000000001076",
},
"recordTargets": {
- "id": "00000000-0000-0000-0000-000000001067",
+ "id": "00000000-0000-0000-0000-000000001080",
},
"title": {
- "id": "00000000-0000-0000-0000-000000001051",
+ "id": "00000000-0000-0000-0000-000000001064",
},
"totalCacheCreationTokens": {
- "id": "00000000-0000-0000-0000-000000001061",
+ "id": "00000000-0000-0000-0000-000000001074",
},
"totalCacheReadTokens": {
- "id": "00000000-0000-0000-0000-000000001060",
+ "id": "00000000-0000-0000-0000-000000001073",
},
"totalInputCredits": {
- "id": "00000000-0000-0000-0000-000000001058",
+ "id": "00000000-0000-0000-0000-000000001071",
},
"totalInputTokens": {
- "id": "00000000-0000-0000-0000-000000001054",
+ "id": "00000000-0000-0000-0000-000000001067",
},
"totalOutputCredits": {
- "id": "00000000-0000-0000-0000-000000001059",
+ "id": "00000000-0000-0000-0000-000000001072",
},
"totalOutputTokens": {
- "id": "00000000-0000-0000-0000-000000001055",
+ "id": "00000000-0000-0000-0000-000000001068",
},
"turns": {
- "id": "00000000-0000-0000-0000-000000001064",
+ "id": "00000000-0000-0000-0000-000000001077",
},
"updatedAt": {
- "id": "00000000-0000-0000-0000-000000001047",
+ "id": "00000000-0000-0000-0000-000000001060",
},
"workspaceMember": {
- "id": "00000000-0000-0000-0000-000000001050",
+ "id": "00000000-0000-0000-0000-000000001063",
},
"writerWorkspaceMemberIds": {
- "id": "00000000-0000-0000-0000-000000001076",
+ "id": "00000000-0000-0000-0000-000000001089",
},
},
- "id": "00000000-0000-0000-0000-000000001077",
+ "id": "00000000-0000-0000-0000-000000001090",
"views": undefined,
},
"agentChatThreadParticipant": {
"fields": {
"archivedAt": {
- "id": "00000000-0000-0000-0000-000000001085",
+ "id": "00000000-0000-0000-0000-000000001098",
},
"createdAt": {
- "id": "00000000-0000-0000-0000-000000001079",
+ "id": "00000000-0000-0000-0000-000000001092",
},
"deletedAt": {
- "id": "00000000-0000-0000-0000-000000001081",
+ "id": "00000000-0000-0000-0000-000000001094",
},
"id": {
- "id": "00000000-0000-0000-0000-000000001078",
+ "id": "00000000-0000-0000-0000-000000001091",
},
"isSubscribed": {
- "id": "00000000-0000-0000-0000-000000001087",
+ "id": "00000000-0000-0000-0000-000000001100",
},
"lastMentionedAt": {
- "id": "00000000-0000-0000-0000-000000001088",
+ "id": "00000000-0000-0000-0000-000000001101",
},
"lastReadAt": {
- "id": "00000000-0000-0000-0000-000000001084",
+ "id": "00000000-0000-0000-0000-000000001097",
},
"mentionsResolvedAt": {
- "id": "00000000-0000-0000-0000-000000001089",
+ "id": "00000000-0000-0000-0000-000000001102",
},
"snoozedUntil": {
- "id": "00000000-0000-0000-0000-000000001086",
+ "id": "00000000-0000-0000-0000-000000001099",
},
"thread": {
- "id": "00000000-0000-0000-0000-000000001082",
+ "id": "00000000-0000-0000-0000-000000001095",
},
"updatedAt": {
- "id": "00000000-0000-0000-0000-000000001080",
+ "id": "00000000-0000-0000-0000-000000001093",
},
"workspaceMember": {
- "id": "00000000-0000-0000-0000-000000001083",
+ "id": "00000000-0000-0000-0000-000000001096",
},
},
- "id": "00000000-0000-0000-0000-000000001090",
+ "id": "00000000-0000-0000-0000-000000001103",
"views": undefined,
},
"agentChatThreadTarget": {
"fields": {
"createdAt": {
- "id": "00000000-0000-0000-0000-000000001093",
+ "id": "00000000-0000-0000-0000-000000001106",
},
"deletedAt": {
- "id": "00000000-0000-0000-0000-000000001095",
+ "id": "00000000-0000-0000-0000-000000001108",
},
"id": {
- "id": "00000000-0000-0000-0000-000000001092",
+ "id": "00000000-0000-0000-0000-000000001105",
},
"target": {
- "id": "00000000-0000-0000-0000-000000001091",
+ "id": "00000000-0000-0000-0000-000000001104",
},
"targetCompany": {
- "id": "00000000-0000-0000-0000-000000001098",
+ "id": "00000000-0000-0000-0000-000000001111",
},
"targetOpportunity": {
- "id": "00000000-0000-0000-0000-000000001099",
+ "id": "00000000-0000-0000-0000-000000001112",
},
"targetPerson": {
- "id": "00000000-0000-0000-0000-000000001097",
+ "id": "00000000-0000-0000-0000-000000001110",
},
"thread": {
- "id": "00000000-0000-0000-0000-000000001096",
+ "id": "00000000-0000-0000-0000-000000001109",
},
"updatedAt": {
- "id": "00000000-0000-0000-0000-000000001094",
+ "id": "00000000-0000-0000-0000-000000001107",
},
},
- "id": "00000000-0000-0000-0000-000000001100",
+ "id": "00000000-0000-0000-0000-000000001113",
"views": {},
},
"agentMessage": {
"fields": {
"agentId": {
- "id": "00000000-0000-0000-0000-000000001125",
+ "id": "00000000-0000-0000-0000-000000001138",
},
"createdAt": {
- "id": "00000000-0000-0000-0000-000000001122",
+ "id": "00000000-0000-0000-0000-000000001135",
},
"deletedAt": {
- "id": "00000000-0000-0000-0000-000000001124",
+ "id": "00000000-0000-0000-0000-000000001137",
},
"id": {
- "id": "00000000-0000-0000-0000-000000001121",
+ "id": "00000000-0000-0000-0000-000000001134",
},
"parts": {
- "id": "00000000-0000-0000-0000-000000001133",
+ "id": "00000000-0000-0000-0000-000000001146",
},
"processedAt": {
- "id": "00000000-0000-0000-0000-000000001130",
+ "id": "00000000-0000-0000-0000-000000001143",
},
"reactions": {
- "id": "00000000-0000-0000-0000-000000001134",
+ "id": "00000000-0000-0000-0000-000000001147",
},
"role": {
- "id": "00000000-0000-0000-0000-000000001128",
+ "id": "00000000-0000-0000-0000-000000001141",
},
"senderApplicationId": {
- "id": "00000000-0000-0000-0000-000000001127",
+ "id": "00000000-0000-0000-0000-000000001140",
},
"senderWorkspaceMember": {
- "id": "00000000-0000-0000-0000-000000001126",
+ "id": "00000000-0000-0000-0000-000000001139",
},
"status": {
- "id": "00000000-0000-0000-0000-000000001129",
+ "id": "00000000-0000-0000-0000-000000001142",
},
"thread": {
- "id": "00000000-0000-0000-0000-000000001131",
+ "id": "00000000-0000-0000-0000-000000001144",
},
"turn": {
- "id": "00000000-0000-0000-0000-000000001132",
+ "id": "00000000-0000-0000-0000-000000001145",
},
"updatedAt": {
- "id": "00000000-0000-0000-0000-000000001123",
+ "id": "00000000-0000-0000-0000-000000001136",
},
},
- "id": "00000000-0000-0000-0000-000000001135",
+ "id": "00000000-0000-0000-0000-000000001148",
"views": undefined,
},
"agentMessagePart": {
"fields": {
"createdAt": {
- "id": "00000000-0000-0000-0000-000000001146",
+ "id": "00000000-0000-0000-0000-000000001159",
},
"deletedAt": {
- "id": "00000000-0000-0000-0000-000000001148",
+ "id": "00000000-0000-0000-0000-000000001161",
},
"errorDetails": {
- "id": "00000000-0000-0000-0000-000000001160",
+ "id": "00000000-0000-0000-0000-000000001173",
},
"errorMessage": {
- "id": "00000000-0000-0000-0000-000000001159",
+ "id": "00000000-0000-0000-0000-000000001172",
},
"fileFilename": {
- "id": "00000000-0000-0000-0000-000000001168",
+ "id": "00000000-0000-0000-0000-000000001181",
},
"fileId": {
- "id": "00000000-0000-0000-0000-000000001169",
+ "id": "00000000-0000-0000-0000-000000001182",
},
"id": {
- "id": "00000000-0000-0000-0000-000000001145",
+ "id": "00000000-0000-0000-0000-000000001158",
},
"message": {
- "id": "00000000-0000-0000-0000-000000001171",
+ "id": "00000000-0000-0000-0000-000000001184",
},
"orderIndex": {
- "id": "00000000-0000-0000-0000-000000001149",
+ "id": "00000000-0000-0000-0000-000000001162",
},
"providerExecuted": {
- "id": "00000000-0000-0000-0000-000000001158",
+ "id": "00000000-0000-0000-0000-000000001171",
},
"providerMetadata": {
- "id": "00000000-0000-0000-0000-000000001170",
+ "id": "00000000-0000-0000-0000-000000001183",
},
"reasoningContent": {
- "id": "00000000-0000-0000-0000-000000001152",
+ "id": "00000000-0000-0000-0000-000000001165",
},
"sourceDocumentFilename": {
- "id": "00000000-0000-0000-0000-000000001167",
+ "id": "00000000-0000-0000-0000-000000001180",
},
"sourceDocumentMediaType": {
- "id": "00000000-0000-0000-0000-000000001165",
+ "id": "00000000-0000-0000-0000-000000001178",
},
"sourceDocumentSourceId": {
- "id": "00000000-0000-0000-0000-000000001164",
+ "id": "00000000-0000-0000-0000-000000001177",
},
"sourceDocumentTitle": {
- "id": "00000000-0000-0000-0000-000000001166",
+ "id": "00000000-0000-0000-0000-000000001179",
},
"sourceUrlSourceId": {
- "id": "00000000-0000-0000-0000-000000001161",
+ "id": "00000000-0000-0000-0000-000000001174",
},
"sourceUrlTitle": {
- "id": "00000000-0000-0000-0000-000000001163",
+ "id": "00000000-0000-0000-0000-000000001176",
},
"sourceUrlUrl": {
- "id": "00000000-0000-0000-0000-000000001162",
+ "id": "00000000-0000-0000-0000-000000001175",
},
"state": {
- "id": "00000000-0000-0000-0000-000000001157",
+ "id": "00000000-0000-0000-0000-000000001170",
},
"textContent": {
- "id": "00000000-0000-0000-0000-000000001151",
+ "id": "00000000-0000-0000-0000-000000001164",
},
"toolCallId": {
- "id": "00000000-0000-0000-0000-000000001154",
+ "id": "00000000-0000-0000-0000-000000001167",
},
"toolInput": {
- "id": "00000000-0000-0000-0000-000000001155",
+ "id": "00000000-0000-0000-0000-000000001168",
},
"toolName": {
- "id": "00000000-0000-0000-0000-000000001153",
+ "id": "00000000-0000-0000-0000-000000001166",
},
"toolOutput": {
- "id": "00000000-0000-0000-0000-000000001156",
+ "id": "00000000-0000-0000-0000-000000001169",
},
"type": {
- "id": "00000000-0000-0000-0000-000000001150",
+ "id": "00000000-0000-0000-0000-000000001163",
},
"updatedAt": {
- "id": "00000000-0000-0000-0000-000000001147",
+ "id": "00000000-0000-0000-0000-000000001160",
},
},
- "id": "00000000-0000-0000-0000-000000001172",
+ "id": "00000000-0000-0000-0000-000000001185",
"views": undefined,
},
"agentMessageReaction": {
"fields": {
"agentId": {
- "id": "00000000-0000-0000-0000-000000001142",
+ "id": "00000000-0000-0000-0000-000000001155",
},
"createdAt": {
- "id": "00000000-0000-0000-0000-000000001137",
+ "id": "00000000-0000-0000-0000-000000001150",
},
"deletedAt": {
- "id": "00000000-0000-0000-0000-000000001139",
+ "id": "00000000-0000-0000-0000-000000001152",
},
"emoji": {
- "id": "00000000-0000-0000-0000-000000001143",
+ "id": "00000000-0000-0000-0000-000000001156",
},
"id": {
- "id": "00000000-0000-0000-0000-000000001136",
+ "id": "00000000-0000-0000-0000-000000001149",
},
"message": {
- "id": "00000000-0000-0000-0000-000000001140",
+ "id": "00000000-0000-0000-0000-000000001153",
},
"updatedAt": {
- "id": "00000000-0000-0000-0000-000000001138",
+ "id": "00000000-0000-0000-0000-000000001151",
},
"workspaceMember": {
- "id": "00000000-0000-0000-0000-000000001141",
+ "id": "00000000-0000-0000-0000-000000001154",
},
},
- "id": "00000000-0000-0000-0000-000000001144",
+ "id": "00000000-0000-0000-0000-000000001157",
"views": undefined,
},
"agentTurn": {
"fields": {
"agentId": {
- "id": "00000000-0000-0000-0000-000000001105",
+ "id": "00000000-0000-0000-0000-000000001118",
},
"cacheCreationTokens": {
- "id": "00000000-0000-0000-0000-000000001116",
+ "id": "00000000-0000-0000-0000-000000001129",
},
"cacheReadTokens": {
- "id": "00000000-0000-0000-0000-000000001115",
+ "id": "00000000-0000-0000-0000-000000001128",
},
"createdAt": {
- "id": "00000000-0000-0000-0000-000000001102",
+ "id": "00000000-0000-0000-0000-000000001115",
},
"createdBy": {
- "id": "00000000-0000-0000-0000-000000001119",
+ "id": "00000000-0000-0000-0000-000000001132",
},
"deletedAt": {
- "id": "00000000-0000-0000-0000-000000001104",
+ "id": "00000000-0000-0000-0000-000000001117",
},
"endedAt": {
- "id": "00000000-0000-0000-0000-000000001111",
+ "id": "00000000-0000-0000-0000-000000001124",
},
"error": {
- "id": "00000000-0000-0000-0000-000000001109",
+ "id": "00000000-0000-0000-0000-000000001122",
},
"id": {
- "id": "00000000-0000-0000-0000-000000001101",
+ "id": "00000000-0000-0000-0000-000000001114",
},
"inputCredits": {
- "id": "00000000-0000-0000-0000-000000001117",
+ "id": "00000000-0000-0000-0000-000000001130",
},
"inputTokens": {
- "id": "00000000-0000-0000-0000-000000001113",
+ "id": "00000000-0000-0000-0000-000000001126",
},
"messages": {
- "id": "00000000-0000-0000-0000-000000001107",
+ "id": "00000000-0000-0000-0000-000000001120",
},
"modelId": {
- "id": "00000000-0000-0000-0000-000000001112",
+ "id": "00000000-0000-0000-0000-000000001125",
},
"outputCredits": {
- "id": "00000000-0000-0000-0000-000000001118",
+ "id": "00000000-0000-0000-0000-000000001131",
},
"outputTokens": {
- "id": "00000000-0000-0000-0000-000000001114",
+ "id": "00000000-0000-0000-0000-000000001127",
},
"startedAt": {
- "id": "00000000-0000-0000-0000-000000001110",
+ "id": "00000000-0000-0000-0000-000000001123",
},
"status": {
- "id": "00000000-0000-0000-0000-000000001108",
+ "id": "00000000-0000-0000-0000-000000001121",
},
"thread": {
- "id": "00000000-0000-0000-0000-000000001106",
+ "id": "00000000-0000-0000-0000-000000001119",
},
"updatedAt": {
- "id": "00000000-0000-0000-0000-000000001103",
+ "id": "00000000-0000-0000-0000-000000001116",
},
},
- "id": "00000000-0000-0000-0000-000000001120",
+ "id": "00000000-0000-0000-0000-000000001133",
"views": undefined,
},
"attachment": {
@@ -1168,64 +1210,64 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object
"campaignDelivery": {
"fields": {
"bouncedAt": {
- "id": "00000000-0000-0000-0000-000000001188",
+ "id": "00000000-0000-0000-0000-000000001201",
},
"campaignId": {
- "id": "00000000-0000-0000-0000-000000001177",
+ "id": "00000000-0000-0000-0000-000000001190",
},
"claimExpiresAt": {
- "id": "00000000-0000-0000-0000-000000001184",
+ "id": "00000000-0000-0000-0000-000000001197",
},
"claimToken": {
- "id": "00000000-0000-0000-0000-000000001183",
+ "id": "00000000-0000-0000-0000-000000001196",
},
"complainedAt": {
- "id": "00000000-0000-0000-0000-000000001189",
+ "id": "00000000-0000-0000-0000-000000001202",
},
"createdAt": {
- "id": "00000000-0000-0000-0000-000000001174",
+ "id": "00000000-0000-0000-0000-000000001187",
},
"deletedAt": {
- "id": "00000000-0000-0000-0000-000000001176",
+ "id": "00000000-0000-0000-0000-000000001189",
},
"deliveredAt": {
- "id": "00000000-0000-0000-0000-000000001187",
+ "id": "00000000-0000-0000-0000-000000001200",
},
"failureReason": {
- "id": "00000000-0000-0000-0000-000000001182",
+ "id": "00000000-0000-0000-0000-000000001195",
},
"id": {
- "id": "00000000-0000-0000-0000-000000001173",
+ "id": "00000000-0000-0000-0000-000000001186",
},
"personId": {
- "id": "00000000-0000-0000-0000-000000001178",
+ "id": "00000000-0000-0000-0000-000000001191",
},
"providerMessageId": {
- "id": "00000000-0000-0000-0000-000000001185",
+ "id": "00000000-0000-0000-0000-000000001198",
},
"recipientEmail": {
- "id": "00000000-0000-0000-0000-000000001179",
+ "id": "00000000-0000-0000-0000-000000001192",
},
"rejectedAt": {
- "id": "00000000-0000-0000-0000-000000001190",
+ "id": "00000000-0000-0000-0000-000000001203",
},
"renderingFailedAt": {
- "id": "00000000-0000-0000-0000-000000001191",
+ "id": "00000000-0000-0000-0000-000000001204",
},
"sentAt": {
- "id": "00000000-0000-0000-0000-000000001186",
+ "id": "00000000-0000-0000-0000-000000001199",
},
"skipReason": {
- "id": "00000000-0000-0000-0000-000000001181",
+ "id": "00000000-0000-0000-0000-000000001194",
},
"state": {
- "id": "00000000-0000-0000-0000-000000001180",
+ "id": "00000000-0000-0000-0000-000000001193",
},
"updatedAt": {
- "id": "00000000-0000-0000-0000-000000001175",
+ "id": "00000000-0000-0000-0000-000000001188",
},
},
- "id": "00000000-0000-0000-0000-000000001192",
+ "id": "00000000-0000-0000-0000-000000001205",
"views": undefined,
},
"company": {
@@ -2222,34 +2264,34 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object
"messageSuppression": {
"fields": {
"createdAt": {
- "id": "00000000-0000-0000-0000-000000001194",
+ "id": "00000000-0000-0000-0000-000000001207",
},
"deletedAt": {
- "id": "00000000-0000-0000-0000-000000001196",
+ "id": "00000000-0000-0000-0000-000000001209",
},
"emailAddress": {
- "id": "00000000-0000-0000-0000-000000001197",
+ "id": "00000000-0000-0000-0000-000000001210",
},
"id": {
- "id": "00000000-0000-0000-0000-000000001193",
+ "id": "00000000-0000-0000-0000-000000001206",
},
"providerEventId": {
- "id": "00000000-0000-0000-0000-000000001200",
+ "id": "00000000-0000-0000-0000-000000001213",
},
"reason": {
- "id": "00000000-0000-0000-0000-000000001198",
+ "id": "00000000-0000-0000-0000-000000001211",
},
"source": {
- "id": "00000000-0000-0000-0000-000000001199",
+ "id": "00000000-0000-0000-0000-000000001212",
},
"unsubscribeTopicId": {
- "id": "00000000-0000-0000-0000-000000001201",
+ "id": "00000000-0000-0000-0000-000000001214",
},
"updatedAt": {
- "id": "00000000-0000-0000-0000-000000001195",
+ "id": "00000000-0000-0000-0000-000000001208",
},
},
- "id": "00000000-0000-0000-0000-000000001202",
+ "id": "00000000-0000-0000-0000-000000001215",
"views": undefined,
},
"messageThread": {
@@ -2931,275 +2973,275 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object
"recordShare": {
"fields": {
"accessLevel": {
- "id": "00000000-0000-0000-0000-000000000737",
+ "id": "00000000-0000-0000-0000-000000000750",
},
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000726",
+ "id": "00000000-0000-0000-0000-000000000739",
},
"createdBy": {
- "id": "00000000-0000-0000-0000-000000000729",
+ "id": "00000000-0000-0000-0000-000000000742",
},
"deletedAt": {
- "id": "00000000-0000-0000-0000-000000000728",
+ "id": "00000000-0000-0000-0000-000000000741",
},
"id": {
- "id": "00000000-0000-0000-0000-000000000725",
+ "id": "00000000-0000-0000-0000-000000000738",
},
"objectMetadataId": {
- "id": "00000000-0000-0000-0000-000000000734",
+ "id": "00000000-0000-0000-0000-000000000747",
},
"position": {
- "id": "00000000-0000-0000-0000-000000000731",
+ "id": "00000000-0000-0000-0000-000000000744",
},
"principalId": {
- "id": "00000000-0000-0000-0000-000000000735",
+ "id": "00000000-0000-0000-0000-000000000748",
},
"principalType": {
- "id": "00000000-0000-0000-0000-000000000736",
+ "id": "00000000-0000-0000-0000-000000000749",
},
"recordId": {
- "id": "00000000-0000-0000-0000-000000000733",
+ "id": "00000000-0000-0000-0000-000000000746",
},
"rowCause": {
- "id": "00000000-0000-0000-0000-000000000738",
+ "id": "00000000-0000-0000-0000-000000000751",
},
"searchVector": {
- "id": "00000000-0000-0000-0000-000000000732",
+ "id": "00000000-0000-0000-0000-000000000745",
},
"sourceId": {
- "id": "00000000-0000-0000-0000-000000000739",
+ "id": "00000000-0000-0000-0000-000000000752",
},
"updatedAt": {
- "id": "00000000-0000-0000-0000-000000000727",
+ "id": "00000000-0000-0000-0000-000000000740",
},
"updatedBy": {
- "id": "00000000-0000-0000-0000-000000000730",
+ "id": "00000000-0000-0000-0000-000000000743",
},
},
- "id": "00000000-0000-0000-0000-000000000740",
+ "id": "00000000-0000-0000-0000-000000000753",
"views": {},
},
"shortLink": {
"fields": {
"authoredTemplateUrl": {
- "id": "00000000-0000-0000-0000-000000000749",
+ "id": "00000000-0000-0000-0000-000000000762",
},
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000742",
+ "id": "00000000-0000-0000-0000-000000000755",
},
"createdBy": {
- "id": "00000000-0000-0000-0000-000000000745",
+ "id": "00000000-0000-0000-0000-000000000758",
},
"deletedAt": {
- "id": "00000000-0000-0000-0000-000000000744",
+ "id": "00000000-0000-0000-0000-000000000757",
},
"id": {
- "id": "00000000-0000-0000-0000-000000000741",
+ "id": "00000000-0000-0000-0000-000000000754",
},
"position": {
- "id": "00000000-0000-0000-0000-000000000747",
+ "id": "00000000-0000-0000-0000-000000000760",
},
"resolvedDestinationUrl": {
- "id": "00000000-0000-0000-0000-000000000750",
+ "id": "00000000-0000-0000-0000-000000000763",
},
"searchVector": {
- "id": "00000000-0000-0000-0000-000000000748",
+ "id": "00000000-0000-0000-0000-000000000761",
},
"templateAndResolvedUrlHash": {
- "id": "00000000-0000-0000-0000-000000000751",
+ "id": "00000000-0000-0000-0000-000000000764",
},
"updatedAt": {
- "id": "00000000-0000-0000-0000-000000000743",
+ "id": "00000000-0000-0000-0000-000000000756",
},
"updatedBy": {
- "id": "00000000-0000-0000-0000-000000000746",
+ "id": "00000000-0000-0000-0000-000000000759",
},
},
- "id": "00000000-0000-0000-0000-000000000752",
+ "id": "00000000-0000-0000-0000-000000000765",
"views": {},
},
"task": {
"fields": {
"assignee": {
- "id": "00000000-0000-0000-0000-000000000767",
+ "id": "00000000-0000-0000-0000-000000000780",
},
"attachments": {
- "id": "00000000-0000-0000-0000-000000000766",
+ "id": "00000000-0000-0000-0000-000000000779",
},
"bodyV2": {
- "id": "00000000-0000-0000-0000-000000000762",
+ "id": "00000000-0000-0000-0000-000000000775",
},
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000754",
+ "id": "00000000-0000-0000-0000-000000000767",
},
"createdBy": {
- "id": "00000000-0000-0000-0000-000000000757",
+ "id": "00000000-0000-0000-0000-000000000770",
},
"deletedAt": {
- "id": "00000000-0000-0000-0000-000000000756",
+ "id": "00000000-0000-0000-0000-000000000769",
},
"dueAt": {
- "id": "00000000-0000-0000-0000-000000000763",
+ "id": "00000000-0000-0000-0000-000000000776",
},
"id": {
- "id": "00000000-0000-0000-0000-000000000753",
+ "id": "00000000-0000-0000-0000-000000000766",
},
"position": {
- "id": "00000000-0000-0000-0000-000000000759",
+ "id": "00000000-0000-0000-0000-000000000772",
},
"searchVector": {
- "id": "00000000-0000-0000-0000-000000000760",
+ "id": "00000000-0000-0000-0000-000000000773",
},
"status": {
- "id": "00000000-0000-0000-0000-000000000764",
+ "id": "00000000-0000-0000-0000-000000000777",
},
"taskTargets": {
- "id": "00000000-0000-0000-0000-000000000765",
+ "id": "00000000-0000-0000-0000-000000000778",
},
"timelineActivities": {
- "id": "00000000-0000-0000-0000-000000000768",
+ "id": "00000000-0000-0000-0000-000000000781",
},
"title": {
- "id": "00000000-0000-0000-0000-000000000761",
+ "id": "00000000-0000-0000-0000-000000000774",
},
"updatedAt": {
- "id": "00000000-0000-0000-0000-000000000755",
+ "id": "00000000-0000-0000-0000-000000000768",
},
"updatedBy": {
- "id": "00000000-0000-0000-0000-000000000758",
+ "id": "00000000-0000-0000-0000-000000000771",
},
},
- "id": "00000000-0000-0000-0000-000000000807",
+ "id": "00000000-0000-0000-0000-000000000820",
"views": {
"allTasks": {
- "id": "00000000-0000-0000-0000-000000000777",
+ "id": "00000000-0000-0000-0000-000000000790",
"viewFieldGroups": {},
"viewFields": {
"assignee": {
- "id": "00000000-0000-0000-0000-000000000774",
+ "id": "00000000-0000-0000-0000-000000000787",
},
"bodyV2": {
- "id": "00000000-0000-0000-0000-000000000775",
+ "id": "00000000-0000-0000-0000-000000000788",
},
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000776",
+ "id": "00000000-0000-0000-0000-000000000789",
},
"createdBy": {
- "id": "00000000-0000-0000-0000-000000000772",
+ "id": "00000000-0000-0000-0000-000000000785",
},
"dueAt": {
- "id": "00000000-0000-0000-0000-000000000773",
+ "id": "00000000-0000-0000-0000-000000000786",
},
"status": {
- "id": "00000000-0000-0000-0000-000000000770",
+ "id": "00000000-0000-0000-0000-000000000783",
},
"taskTargets": {
- "id": "00000000-0000-0000-0000-000000000771",
+ "id": "00000000-0000-0000-0000-000000000784",
},
"title": {
- "id": "00000000-0000-0000-0000-000000000769",
+ "id": "00000000-0000-0000-0000-000000000782",
},
},
"viewGroups": {},
},
"assignedToMe": {
- "id": "00000000-0000-0000-0000-000000000789",
+ "id": "00000000-0000-0000-0000-000000000802",
"viewFieldGroups": {},
"viewFields": {
"assignee": {
- "id": "00000000-0000-0000-0000-000000000782",
+ "id": "00000000-0000-0000-0000-000000000795",
},
"bodyV2": {
- "id": "00000000-0000-0000-0000-000000000783",
+ "id": "00000000-0000-0000-0000-000000000796",
},
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000784",
+ "id": "00000000-0000-0000-0000-000000000797",
},
"createdBy": {
- "id": "00000000-0000-0000-0000-000000000780",
+ "id": "00000000-0000-0000-0000-000000000793",
},
"dueAt": {
- "id": "00000000-0000-0000-0000-000000000781",
+ "id": "00000000-0000-0000-0000-000000000794",
},
"taskTargets": {
- "id": "00000000-0000-0000-0000-000000000779",
+ "id": "00000000-0000-0000-0000-000000000792",
},
"title": {
- "id": "00000000-0000-0000-0000-000000000778",
+ "id": "00000000-0000-0000-0000-000000000791",
},
},
"viewGroups": {
"done": {
- "id": "00000000-0000-0000-0000-000000000787",
+ "id": "00000000-0000-0000-0000-000000000800",
},
"empty": {
- "id": "00000000-0000-0000-0000-000000000788",
+ "id": "00000000-0000-0000-0000-000000000801",
},
"inProgress": {
- "id": "00000000-0000-0000-0000-000000000786",
+ "id": "00000000-0000-0000-0000-000000000799",
},
"todo": {
- "id": "00000000-0000-0000-0000-000000000785",
+ "id": "00000000-0000-0000-0000-000000000798",
},
},
},
"byStatus": {
- "id": "00000000-0000-0000-0000-000000000798",
+ "id": "00000000-0000-0000-0000-000000000811",
"viewFieldGroups": {},
"viewFields": {
"assignee": {
- "id": "00000000-0000-0000-0000-000000000793",
+ "id": "00000000-0000-0000-0000-000000000806",
},
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000794",
+ "id": "00000000-0000-0000-0000-000000000807",
},
"dueAt": {
- "id": "00000000-0000-0000-0000-000000000792",
+ "id": "00000000-0000-0000-0000-000000000805",
},
"status": {
- "id": "00000000-0000-0000-0000-000000000791",
+ "id": "00000000-0000-0000-0000-000000000804",
},
"title": {
- "id": "00000000-0000-0000-0000-000000000790",
+ "id": "00000000-0000-0000-0000-000000000803",
},
},
"viewGroups": {
"done": {
- "id": "00000000-0000-0000-0000-000000000797",
+ "id": "00000000-0000-0000-0000-000000000810",
},
"inProgress": {
- "id": "00000000-0000-0000-0000-000000000796",
+ "id": "00000000-0000-0000-0000-000000000809",
},
"todo": {
- "id": "00000000-0000-0000-0000-000000000795",
+ "id": "00000000-0000-0000-0000-000000000808",
},
},
},
"taskRecordPageFields": {
- "id": "00000000-0000-0000-0000-000000000806",
+ "id": "00000000-0000-0000-0000-000000000819",
"viewFieldGroups": {
"general": {
- "id": "00000000-0000-0000-0000-000000000805",
+ "id": "00000000-0000-0000-0000-000000000818",
},
},
"viewFields": {
"assignee": {
- "id": "00000000-0000-0000-0000-000000000801",
+ "id": "00000000-0000-0000-0000-000000000814",
},
"attachments": {
- "id": "00000000-0000-0000-0000-000000000803",
+ "id": "00000000-0000-0000-0000-000000000816",
},
"dueAt": {
- "id": "00000000-0000-0000-0000-000000000799",
+ "id": "00000000-0000-0000-0000-000000000812",
},
"status": {
- "id": "00000000-0000-0000-0000-000000000800",
+ "id": "00000000-0000-0000-0000-000000000813",
},
"taskTargets": {
- "id": "00000000-0000-0000-0000-000000000802",
+ "id": "00000000-0000-0000-0000-000000000815",
},
"timelineActivities": {
- "id": "00000000-0000-0000-0000-000000000804",
+ "id": "00000000-0000-0000-0000-000000000817",
},
},
"viewGroups": {},
@@ -3209,65 +3251,65 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object
"taskTarget": {
"fields": {
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000810",
+ "id": "00000000-0000-0000-0000-000000000823",
},
"createdBy": {
- "id": "00000000-0000-0000-0000-000000000813",
+ "id": "00000000-0000-0000-0000-000000000826",
},
"deletedAt": {
- "id": "00000000-0000-0000-0000-000000000812",
+ "id": "00000000-0000-0000-0000-000000000825",
},
"id": {
- "id": "00000000-0000-0000-0000-000000000809",
+ "id": "00000000-0000-0000-0000-000000000822",
},
"position": {
- "id": "00000000-0000-0000-0000-000000000815",
+ "id": "00000000-0000-0000-0000-000000000828",
},
"searchVector": {
- "id": "00000000-0000-0000-0000-000000000816",
+ "id": "00000000-0000-0000-0000-000000000829",
},
"target": {
- "id": "00000000-0000-0000-0000-000000000808",
+ "id": "00000000-0000-0000-0000-000000000821",
},
"targetCompany": {
- "id": "00000000-0000-0000-0000-000000000819",
+ "id": "00000000-0000-0000-0000-000000000832",
},
"targetOpportunity": {
- "id": "00000000-0000-0000-0000-000000000820",
+ "id": "00000000-0000-0000-0000-000000000833",
},
"targetPerson": {
- "id": "00000000-0000-0000-0000-000000000818",
+ "id": "00000000-0000-0000-0000-000000000831",
},
"task": {
- "id": "00000000-0000-0000-0000-000000000817",
+ "id": "00000000-0000-0000-0000-000000000830",
},
"updatedAt": {
- "id": "00000000-0000-0000-0000-000000000811",
+ "id": "00000000-0000-0000-0000-000000000824",
},
"updatedBy": {
- "id": "00000000-0000-0000-0000-000000000814",
+ "id": "00000000-0000-0000-0000-000000000827",
},
},
- "id": "00000000-0000-0000-0000-000000000827",
+ "id": "00000000-0000-0000-0000-000000000840",
"views": {
"allTaskTargets": {
- "id": "00000000-0000-0000-0000-000000000826",
+ "id": "00000000-0000-0000-0000-000000000839",
"viewFieldGroups": {},
"viewFields": {
"id": {
- "id": "00000000-0000-0000-0000-000000000821",
+ "id": "00000000-0000-0000-0000-000000000834",
},
"targetCompany": {
- "id": "00000000-0000-0000-0000-000000000824",
+ "id": "00000000-0000-0000-0000-000000000837",
},
"targetOpportunity": {
- "id": "00000000-0000-0000-0000-000000000825",
+ "id": "00000000-0000-0000-0000-000000000838",
},
"targetPerson": {
- "id": "00000000-0000-0000-0000-000000000823",
+ "id": "00000000-0000-0000-0000-000000000836",
},
"task": {
- "id": "00000000-0000-0000-0000-000000000822",
+ "id": "00000000-0000-0000-0000-000000000835",
},
},
"viewGroups": {},
@@ -3277,131 +3319,131 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object
"timelineActivity": {
"fields": {
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000830",
+ "id": "00000000-0000-0000-0000-000000000843",
},
"createdBy": {
- "id": "00000000-0000-0000-0000-000000000833",
+ "id": "00000000-0000-0000-0000-000000000846",
},
"deletedAt": {
- "id": "00000000-0000-0000-0000-000000000832",
+ "id": "00000000-0000-0000-0000-000000000845",
},
"happensAt": {
- "id": "00000000-0000-0000-0000-000000000839",
+ "id": "00000000-0000-0000-0000-000000000852",
},
"id": {
- "id": "00000000-0000-0000-0000-000000000829",
+ "id": "00000000-0000-0000-0000-000000000842",
},
"linkedObjectMetadataId": {
- "id": "00000000-0000-0000-0000-000000000855",
+ "id": "00000000-0000-0000-0000-000000000868",
},
"linkedRecordCachedName": {
- "id": "00000000-0000-0000-0000-000000000853",
+ "id": "00000000-0000-0000-0000-000000000866",
},
"linkedRecordId": {
- "id": "00000000-0000-0000-0000-000000000854",
+ "id": "00000000-0000-0000-0000-000000000867",
},
"position": {
- "id": "00000000-0000-0000-0000-000000000835",
+ "id": "00000000-0000-0000-0000-000000000848",
},
"properties": {
- "id": "00000000-0000-0000-0000-000000000840",
+ "id": "00000000-0000-0000-0000-000000000853",
},
"searchVector": {
- "id": "00000000-0000-0000-0000-000000000836",
+ "id": "00000000-0000-0000-0000-000000000849",
},
"target": {
- "id": "00000000-0000-0000-0000-000000000828",
+ "id": "00000000-0000-0000-0000-000000000841",
},
"targetCompany": {
- "id": "00000000-0000-0000-0000-000000000843",
+ "id": "00000000-0000-0000-0000-000000000856",
},
"targetDashboard": {
- "id": "00000000-0000-0000-0000-000000000850",
+ "id": "00000000-0000-0000-0000-000000000863",
},
"targetMessageCampaign": {
- "id": "00000000-0000-0000-0000-000000000852",
+ "id": "00000000-0000-0000-0000-000000000865",
},
"targetMessageList": {
- "id": "00000000-0000-0000-0000-000000000851",
+ "id": "00000000-0000-0000-0000-000000000864",
},
"targetNote": {
- "id": "00000000-0000-0000-0000-000000000846",
+ "id": "00000000-0000-0000-0000-000000000859",
},
"targetOpportunity": {
- "id": "00000000-0000-0000-0000-000000000844",
+ "id": "00000000-0000-0000-0000-000000000857",
},
"targetPerson": {
- "id": "00000000-0000-0000-0000-000000000842",
+ "id": "00000000-0000-0000-0000-000000000855",
},
"targetTask": {
- "id": "00000000-0000-0000-0000-000000000845",
+ "id": "00000000-0000-0000-0000-000000000858",
},
"targetWorkflow": {
- "id": "00000000-0000-0000-0000-000000000847",
+ "id": "00000000-0000-0000-0000-000000000860",
},
"targetWorkflowRun": {
- "id": "00000000-0000-0000-0000-000000000849",
+ "id": "00000000-0000-0000-0000-000000000862",
},
"targetWorkflowVersion": {
- "id": "00000000-0000-0000-0000-000000000848",
+ "id": "00000000-0000-0000-0000-000000000861",
},
"timelineActivityTypeId": {
- "id": "00000000-0000-0000-0000-000000000837",
+ "id": "00000000-0000-0000-0000-000000000850",
},
"timelineActivityTypeSnapshot": {
- "id": "00000000-0000-0000-0000-000000000838",
+ "id": "00000000-0000-0000-0000-000000000851",
},
"updatedAt": {
- "id": "00000000-0000-0000-0000-000000000831",
+ "id": "00000000-0000-0000-0000-000000000844",
},
"updatedBy": {
- "id": "00000000-0000-0000-0000-000000000834",
+ "id": "00000000-0000-0000-0000-000000000847",
},
"workspaceMember": {
- "id": "00000000-0000-0000-0000-000000000841",
+ "id": "00000000-0000-0000-0000-000000000854",
},
},
- "id": "00000000-0000-0000-0000-000000000869",
+ "id": "00000000-0000-0000-0000-000000000882",
"views": {
"allTimelineActivities": {
- "id": "00000000-0000-0000-0000-000000000868",
+ "id": "00000000-0000-0000-0000-000000000881",
"viewFieldGroups": {},
"viewFields": {
"happensAt": {
- "id": "00000000-0000-0000-0000-000000000857",
+ "id": "00000000-0000-0000-0000-000000000870",
},
"linkedRecordCachedName": {
- "id": "00000000-0000-0000-0000-000000000856",
+ "id": "00000000-0000-0000-0000-000000000869",
},
"targetCompany": {
- "id": "00000000-0000-0000-0000-000000000860",
+ "id": "00000000-0000-0000-0000-000000000873",
},
"targetDashboard": {
- "id": "00000000-0000-0000-0000-000000000867",
+ "id": "00000000-0000-0000-0000-000000000880",
},
"targetNote": {
- "id": "00000000-0000-0000-0000-000000000863",
+ "id": "00000000-0000-0000-0000-000000000876",
},
"targetOpportunity": {
- "id": "00000000-0000-0000-0000-000000000861",
+ "id": "00000000-0000-0000-0000-000000000874",
},
"targetPerson": {
- "id": "00000000-0000-0000-0000-000000000859",
+ "id": "00000000-0000-0000-0000-000000000872",
},
"targetTask": {
- "id": "00000000-0000-0000-0000-000000000862",
+ "id": "00000000-0000-0000-0000-000000000875",
},
"targetWorkflow": {
- "id": "00000000-0000-0000-0000-000000000864",
+ "id": "00000000-0000-0000-0000-000000000877",
},
"targetWorkflowRun": {
- "id": "00000000-0000-0000-0000-000000000866",
+ "id": "00000000-0000-0000-0000-000000000879",
},
"targetWorkflowVersion": {
- "id": "00000000-0000-0000-0000-000000000865",
+ "id": "00000000-0000-0000-0000-000000000878",
},
"workspaceMember": {
- "id": "00000000-0000-0000-0000-000000000858",
+ "id": "00000000-0000-0000-0000-000000000871",
},
},
"viewGroups": {},
@@ -3411,80 +3453,80 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object
"workflow": {
"fields": {
"attachments": {
- "id": "00000000-0000-0000-0000-000000000886",
+ "id": "00000000-0000-0000-0000-000000000899",
},
"automatedTriggers": {
- "id": "00000000-0000-0000-0000-000000000884",
+ "id": "00000000-0000-0000-0000-000000000897",
},
"coreWorkflowId": {
- "id": "00000000-0000-0000-0000-000000000880",
+ "id": "00000000-0000-0000-0000-000000000893",
},
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000871",
+ "id": "00000000-0000-0000-0000-000000000884",
},
"createdBy": {
- "id": "00000000-0000-0000-0000-000000000874",
+ "id": "00000000-0000-0000-0000-000000000887",
},
"deletedAt": {
- "id": "00000000-0000-0000-0000-000000000873",
+ "id": "00000000-0000-0000-0000-000000000886",
},
"id": {
- "id": "00000000-0000-0000-0000-000000000870",
+ "id": "00000000-0000-0000-0000-000000000883",
},
"lastPublishedVersionId": {
- "id": "00000000-0000-0000-0000-000000000879",
+ "id": "00000000-0000-0000-0000-000000000892",
},
"name": {
- "id": "00000000-0000-0000-0000-000000000878",
+ "id": "00000000-0000-0000-0000-000000000891",
},
"position": {
- "id": "00000000-0000-0000-0000-000000000876",
+ "id": "00000000-0000-0000-0000-000000000889",
},
"runs": {
- "id": "00000000-0000-0000-0000-000000000883",
+ "id": "00000000-0000-0000-0000-000000000896",
},
"searchVector": {
- "id": "00000000-0000-0000-0000-000000000877",
+ "id": "00000000-0000-0000-0000-000000000890",
},
"statuses": {
- "id": "00000000-0000-0000-0000-000000000881",
+ "id": "00000000-0000-0000-0000-000000000894",
},
"timelineActivities": {
- "id": "00000000-0000-0000-0000-000000000885",
+ "id": "00000000-0000-0000-0000-000000000898",
},
"updatedAt": {
- "id": "00000000-0000-0000-0000-000000000872",
+ "id": "00000000-0000-0000-0000-000000000885",
},
"updatedBy": {
- "id": "00000000-0000-0000-0000-000000000875",
+ "id": "00000000-0000-0000-0000-000000000888",
},
"versions": {
- "id": "00000000-0000-0000-0000-000000000882",
+ "id": "00000000-0000-0000-0000-000000000895",
},
},
- "id": "00000000-0000-0000-0000-000000000894",
+ "id": "00000000-0000-0000-0000-000000000907",
"views": {
"allWorkflows": {
- "id": "00000000-0000-0000-0000-000000000893",
+ "id": "00000000-0000-0000-0000-000000000906",
"viewFieldGroups": {},
"viewFields": {
"createdBy": {
- "id": "00000000-0000-0000-0000-000000000890",
+ "id": "00000000-0000-0000-0000-000000000903",
},
"name": {
- "id": "00000000-0000-0000-0000-000000000887",
+ "id": "00000000-0000-0000-0000-000000000900",
},
"runs": {
- "id": "00000000-0000-0000-0000-000000000892",
+ "id": "00000000-0000-0000-0000-000000000905",
},
"statuses": {
- "id": "00000000-0000-0000-0000-000000000888",
+ "id": "00000000-0000-0000-0000-000000000901",
},
"updatedAt": {
- "id": "00000000-0000-0000-0000-000000000889",
+ "id": "00000000-0000-0000-0000-000000000902",
},
"versions": {
- "id": "00000000-0000-0000-0000-000000000891",
+ "id": "00000000-0000-0000-0000-000000000904",
},
},
"viewGroups": {},
@@ -3494,79 +3536,79 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object
"workflowAutomatedTrigger": {
"fields": {
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000896",
+ "id": "00000000-0000-0000-0000-000000000909",
},
"createdBy": {
- "id": "00000000-0000-0000-0000-000000000899",
+ "id": "00000000-0000-0000-0000-000000000912",
},
"deletedAt": {
- "id": "00000000-0000-0000-0000-000000000898",
+ "id": "00000000-0000-0000-0000-000000000911",
},
"id": {
- "id": "00000000-0000-0000-0000-000000000895",
+ "id": "00000000-0000-0000-0000-000000000908",
},
"position": {
- "id": "00000000-0000-0000-0000-000000000901",
+ "id": "00000000-0000-0000-0000-000000000914",
},
"searchVector": {
- "id": "00000000-0000-0000-0000-000000000902",
+ "id": "00000000-0000-0000-0000-000000000915",
},
"settings": {
- "id": "00000000-0000-0000-0000-000000000904",
+ "id": "00000000-0000-0000-0000-000000000917",
},
"type": {
- "id": "00000000-0000-0000-0000-000000000903",
+ "id": "00000000-0000-0000-0000-000000000916",
},
"updatedAt": {
- "id": "00000000-0000-0000-0000-000000000897",
+ "id": "00000000-0000-0000-0000-000000000910",
},
"updatedBy": {
- "id": "00000000-0000-0000-0000-000000000900",
+ "id": "00000000-0000-0000-0000-000000000913",
},
"workflow": {
- "id": "00000000-0000-0000-0000-000000000905",
+ "id": "00000000-0000-0000-0000-000000000918",
},
},
- "id": "00000000-0000-0000-0000-000000000917",
+ "id": "00000000-0000-0000-0000-000000000930",
"views": {
"allWorkflowAutomatedTriggers": {
- "id": "00000000-0000-0000-0000-000000000909",
+ "id": "00000000-0000-0000-0000-000000000922",
"viewFieldGroups": {},
"viewFields": {
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000908",
+ "id": "00000000-0000-0000-0000-000000000921",
},
"type": {
- "id": "00000000-0000-0000-0000-000000000906",
+ "id": "00000000-0000-0000-0000-000000000919",
},
"workflow": {
- "id": "00000000-0000-0000-0000-000000000907",
+ "id": "00000000-0000-0000-0000-000000000920",
},
},
"viewGroups": {},
},
"workflowAutomatedTriggerRecordPageFields": {
- "id": "00000000-0000-0000-0000-000000000916",
+ "id": "00000000-0000-0000-0000-000000000929",
"viewFieldGroups": {
"general": {
- "id": "00000000-0000-0000-0000-000000000914",
+ "id": "00000000-0000-0000-0000-000000000927",
},
"system": {
- "id": "00000000-0000-0000-0000-000000000915",
+ "id": "00000000-0000-0000-0000-000000000928",
},
},
"viewFields": {
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000912",
+ "id": "00000000-0000-0000-0000-000000000925",
},
"createdBy": {
- "id": "00000000-0000-0000-0000-000000000913",
+ "id": "00000000-0000-0000-0000-000000000926",
},
"type": {
- "id": "00000000-0000-0000-0000-000000000910",
+ "id": "00000000-0000-0000-0000-000000000923",
},
"workflow": {
- "id": "00000000-0000-0000-0000-000000000911",
+ "id": "00000000-0000-0000-0000-000000000924",
},
},
"viewGroups": {},
@@ -3576,130 +3618,130 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object
"workflowRun": {
"fields": {
"coreWorkflowId": {
- "id": "00000000-0000-0000-0000-000000000935",
+ "id": "00000000-0000-0000-0000-000000000948",
},
"coreWorkflowVersionId": {
- "id": "00000000-0000-0000-0000-000000000936",
+ "id": "00000000-0000-0000-0000-000000000949",
},
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000919",
+ "id": "00000000-0000-0000-0000-000000000932",
},
"createdBy": {
- "id": "00000000-0000-0000-0000-000000000922",
+ "id": "00000000-0000-0000-0000-000000000935",
},
"deletedAt": {
- "id": "00000000-0000-0000-0000-000000000921",
+ "id": "00000000-0000-0000-0000-000000000934",
},
"endedAt": {
- "id": "00000000-0000-0000-0000-000000000931",
+ "id": "00000000-0000-0000-0000-000000000944",
},
"enqueuedAt": {
- "id": "00000000-0000-0000-0000-000000000929",
+ "id": "00000000-0000-0000-0000-000000000942",
},
"id": {
- "id": "00000000-0000-0000-0000-000000000918",
+ "id": "00000000-0000-0000-0000-000000000931",
},
"name": {
- "id": "00000000-0000-0000-0000-000000000926",
+ "id": "00000000-0000-0000-0000-000000000939",
},
"position": {
- "id": "00000000-0000-0000-0000-000000000924",
+ "id": "00000000-0000-0000-0000-000000000937",
},
"searchVector": {
- "id": "00000000-0000-0000-0000-000000000925",
+ "id": "00000000-0000-0000-0000-000000000938",
},
"startedAt": {
- "id": "00000000-0000-0000-0000-000000000930",
+ "id": "00000000-0000-0000-0000-000000000943",
},
"state": {
- "id": "00000000-0000-0000-0000-000000000933",
+ "id": "00000000-0000-0000-0000-000000000946",
},
"status": {
- "id": "00000000-0000-0000-0000-000000000932",
+ "id": "00000000-0000-0000-0000-000000000945",
},
"stepLogs": {
- "id": "00000000-0000-0000-0000-000000000934",
+ "id": "00000000-0000-0000-0000-000000000947",
},
"timelineActivities": {
- "id": "00000000-0000-0000-0000-000000000937",
+ "id": "00000000-0000-0000-0000-000000000950",
},
"updatedAt": {
- "id": "00000000-0000-0000-0000-000000000920",
+ "id": "00000000-0000-0000-0000-000000000933",
},
"updatedBy": {
- "id": "00000000-0000-0000-0000-000000000923",
+ "id": "00000000-0000-0000-0000-000000000936",
},
"workflow": {
- "id": "00000000-0000-0000-0000-000000000928",
+ "id": "00000000-0000-0000-0000-000000000941",
},
"workflowVersion": {
- "id": "00000000-0000-0000-0000-000000000927",
+ "id": "00000000-0000-0000-0000-000000000940",
},
},
- "id": "00000000-0000-0000-0000-000000000957",
+ "id": "00000000-0000-0000-0000-000000000970",
"views": {
"allWorkflowRuns": {
- "id": "00000000-0000-0000-0000-000000000941",
+ "id": "00000000-0000-0000-0000-000000000954",
"viewFieldGroups": {},
"viewFields": {
"name": {
- "id": "00000000-0000-0000-0000-000000000938",
+ "id": "00000000-0000-0000-0000-000000000951",
},
"status": {
- "id": "00000000-0000-0000-0000-000000000940",
+ "id": "00000000-0000-0000-0000-000000000953",
},
"workflow": {
- "id": "00000000-0000-0000-0000-000000000939",
+ "id": "00000000-0000-0000-0000-000000000952",
},
},
"viewGroups": {},
},
"workflowRunRecordPageFields": {
- "id": "00000000-0000-0000-0000-000000000956",
+ "id": "00000000-0000-0000-0000-000000000969",
"viewFieldGroups": {
"general": {
- "id": "00000000-0000-0000-0000-000000000954",
+ "id": "00000000-0000-0000-0000-000000000967",
},
"system": {
- "id": "00000000-0000-0000-0000-000000000955",
+ "id": "00000000-0000-0000-0000-000000000968",
},
},
"viewFields": {
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000947",
+ "id": "00000000-0000-0000-0000-000000000960",
},
"createdBy": {
- "id": "00000000-0000-0000-0000-000000000948",
+ "id": "00000000-0000-0000-0000-000000000961",
},
"endedAt": {
- "id": "00000000-0000-0000-0000-000000000946",
+ "id": "00000000-0000-0000-0000-000000000959",
},
"enqueuedAt": {
- "id": "00000000-0000-0000-0000-000000000949",
+ "id": "00000000-0000-0000-0000-000000000962",
},
"startedAt": {
- "id": "00000000-0000-0000-0000-000000000945",
+ "id": "00000000-0000-0000-0000-000000000958",
},
"state": {
- "id": "00000000-0000-0000-0000-000000000950",
+ "id": "00000000-0000-0000-0000-000000000963",
},
"status": {
- "id": "00000000-0000-0000-0000-000000000942",
+ "id": "00000000-0000-0000-0000-000000000955",
},
"timelineActivities": {
- "id": "00000000-0000-0000-0000-000000000953",
+ "id": "00000000-0000-0000-0000-000000000966",
},
"updatedAt": {
- "id": "00000000-0000-0000-0000-000000000951",
+ "id": "00000000-0000-0000-0000-000000000964",
},
"updatedBy": {
- "id": "00000000-0000-0000-0000-000000000952",
+ "id": "00000000-0000-0000-0000-000000000965",
},
"workflow": {
- "id": "00000000-0000-0000-0000-000000000943",
+ "id": "00000000-0000-0000-0000-000000000956",
},
"workflowVersion": {
- "id": "00000000-0000-0000-0000-000000000944",
+ "id": "00000000-0000-0000-0000-000000000957",
},
},
"viewGroups": {},
@@ -3709,118 +3751,118 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object
"workflowVersion": {
"fields": {
"coreWorkflowVersionId": {
- "id": "00000000-0000-0000-0000-000000000972",
+ "id": "00000000-0000-0000-0000-000000000985",
},
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000959",
+ "id": "00000000-0000-0000-0000-000000000972",
},
"createdBy": {
- "id": "00000000-0000-0000-0000-000000000962",
+ "id": "00000000-0000-0000-0000-000000000975",
},
"deletedAt": {
- "id": "00000000-0000-0000-0000-000000000961",
+ "id": "00000000-0000-0000-0000-000000000974",
},
"id": {
- "id": "00000000-0000-0000-0000-000000000958",
+ "id": "00000000-0000-0000-0000-000000000971",
},
"name": {
- "id": "00000000-0000-0000-0000-000000000966",
+ "id": "00000000-0000-0000-0000-000000000979",
},
"position": {
- "id": "00000000-0000-0000-0000-000000000964",
+ "id": "00000000-0000-0000-0000-000000000977",
},
"runs": {
- "id": "00000000-0000-0000-0000-000000000970",
+ "id": "00000000-0000-0000-0000-000000000983",
},
"searchVector": {
- "id": "00000000-0000-0000-0000-000000000965",
+ "id": "00000000-0000-0000-0000-000000000978",
},
"status": {
- "id": "00000000-0000-0000-0000-000000000969",
+ "id": "00000000-0000-0000-0000-000000000982",
},
"steps": {
- "id": "00000000-0000-0000-0000-000000000971",
+ "id": "00000000-0000-0000-0000-000000000984",
},
"timelineActivities": {
- "id": "00000000-0000-0000-0000-000000000973",
+ "id": "00000000-0000-0000-0000-000000000986",
},
"trigger": {
- "id": "00000000-0000-0000-0000-000000000968",
+ "id": "00000000-0000-0000-0000-000000000981",
},
"updatedAt": {
- "id": "00000000-0000-0000-0000-000000000960",
+ "id": "00000000-0000-0000-0000-000000000973",
},
"updatedBy": {
- "id": "00000000-0000-0000-0000-000000000963",
+ "id": "00000000-0000-0000-0000-000000000976",
},
"workflow": {
- "id": "00000000-0000-0000-0000-000000000967",
+ "id": "00000000-0000-0000-0000-000000000980",
},
},
- "id": "00000000-0000-0000-0000-000000000993",
+ "id": "00000000-0000-0000-0000-000000001006",
"views": {
"allWorkflowVersions": {
- "id": "00000000-0000-0000-0000-000000000979",
+ "id": "00000000-0000-0000-0000-000000000992",
"viewFieldGroups": {},
"viewFields": {
"name": {
- "id": "00000000-0000-0000-0000-000000000974",
+ "id": "00000000-0000-0000-0000-000000000987",
},
"runs": {
- "id": "00000000-0000-0000-0000-000000000978",
+ "id": "00000000-0000-0000-0000-000000000991",
},
"status": {
- "id": "00000000-0000-0000-0000-000000000976",
+ "id": "00000000-0000-0000-0000-000000000989",
},
"updatedAt": {
- "id": "00000000-0000-0000-0000-000000000977",
+ "id": "00000000-0000-0000-0000-000000000990",
},
"workflow": {
- "id": "00000000-0000-0000-0000-000000000975",
+ "id": "00000000-0000-0000-0000-000000000988",
},
},
"viewGroups": {},
},
"workflowVersionRecordPageFields": {
- "id": "00000000-0000-0000-0000-000000000992",
+ "id": "00000000-0000-0000-0000-000000001005",
"viewFieldGroups": {
"general": {
- "id": "00000000-0000-0000-0000-000000000990",
+ "id": "00000000-0000-0000-0000-000000001003",
},
"system": {
- "id": "00000000-0000-0000-0000-000000000991",
+ "id": "00000000-0000-0000-0000-000000001004",
},
},
"viewFields": {
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000983",
+ "id": "00000000-0000-0000-0000-000000000996",
},
"createdBy": {
- "id": "00000000-0000-0000-0000-000000000985",
+ "id": "00000000-0000-0000-0000-000000000998",
},
"runs": {
- "id": "00000000-0000-0000-0000-000000000988",
+ "id": "00000000-0000-0000-0000-000000001001",
},
"status": {
- "id": "00000000-0000-0000-0000-000000000980",
+ "id": "00000000-0000-0000-0000-000000000993",
},
"steps": {
- "id": "00000000-0000-0000-0000-000000000984",
+ "id": "00000000-0000-0000-0000-000000000997",
},
"timelineActivities": {
- "id": "00000000-0000-0000-0000-000000000989",
+ "id": "00000000-0000-0000-0000-000000001002",
},
"trigger": {
- "id": "00000000-0000-0000-0000-000000000982",
+ "id": "00000000-0000-0000-0000-000000000995",
},
"updatedAt": {
- "id": "00000000-0000-0000-0000-000000000986",
+ "id": "00000000-0000-0000-0000-000000000999",
},
"updatedBy": {
- "id": "00000000-0000-0000-0000-000000000987",
+ "id": "00000000-0000-0000-0000-000000001000",
},
"workflow": {
- "id": "00000000-0000-0000-0000-000000000981",
+ "id": "00000000-0000-0000-0000-000000000994",
},
},
"viewGroups": {},
@@ -3830,163 +3872,163 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object
"workspaceMember": {
"fields": {
"accountOwnerForCompanies": {
- "id": "00000000-0000-0000-0000-000000001013",
+ "id": "00000000-0000-0000-0000-000000001026",
},
"agentChatThreadParticipants": {
- "id": "00000000-0000-0000-0000-000000001020",
+ "id": "00000000-0000-0000-0000-000000001033",
},
"agentChatThreads": {
- "id": "00000000-0000-0000-0000-000000001019",
+ "id": "00000000-0000-0000-0000-000000001032",
},
"agentMessageReactions": {
- "id": "00000000-0000-0000-0000-000000001021",
+ "id": "00000000-0000-0000-0000-000000001034",
},
"agentMessages": {
- "id": "00000000-0000-0000-0000-000000001018",
+ "id": "00000000-0000-0000-0000-000000001031",
},
"assignedAgentChatThreads": {
- "id": "00000000-0000-0000-0000-000000001022",
+ "id": "00000000-0000-0000-0000-000000001035",
},
"assignedTasks": {
- "id": "00000000-0000-0000-0000-000000001011",
+ "id": "00000000-0000-0000-0000-000000001024",
},
"avatarUrl": {
- "id": "00000000-0000-0000-0000-000000001007",
+ "id": "00000000-0000-0000-0000-000000001020",
},
"blocklist": {
- "id": "00000000-0000-0000-0000-000000001015",
+ "id": "00000000-0000-0000-0000-000000001028",
},
"calendarEventParticipants": {
- "id": "00000000-0000-0000-0000-000000001016",
+ "id": "00000000-0000-0000-0000-000000001029",
},
"calendarStartDay": {
- "id": "00000000-0000-0000-0000-000000001026",
+ "id": "00000000-0000-0000-0000-000000001039",
},
"colorScheme": {
- "id": "00000000-0000-0000-0000-000000001003",
+ "id": "00000000-0000-0000-0000-000000001016",
},
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000995",
+ "id": "00000000-0000-0000-0000-000000001008",
},
"createdBy": {
- "id": "00000000-0000-0000-0000-000000000998",
+ "id": "00000000-0000-0000-0000-000000001011",
},
"dateFormat": {
- "id": "00000000-0000-0000-0000-000000001024",
+ "id": "00000000-0000-0000-0000-000000001037",
},
"deletedAt": {
- "id": "00000000-0000-0000-0000-000000000997",
+ "id": "00000000-0000-0000-0000-000000001010",
},
"id": {
- "id": "00000000-0000-0000-0000-000000000994",
+ "id": "00000000-0000-0000-0000-000000001007",
},
"jobTitle": {
- "id": "00000000-0000-0000-0000-000000001009",
+ "id": "00000000-0000-0000-0000-000000001022",
},
"locale": {
- "id": "00000000-0000-0000-0000-000000001006",
+ "id": "00000000-0000-0000-0000-000000001019",
},
"messageParticipants": {
- "id": "00000000-0000-0000-0000-000000001014",
+ "id": "00000000-0000-0000-0000-000000001027",
},
"name": {
- "id": "00000000-0000-0000-0000-000000001002",
+ "id": "00000000-0000-0000-0000-000000001015",
},
"numberFormat": {
- "id": "00000000-0000-0000-0000-000000001027",
+ "id": "00000000-0000-0000-0000-000000001040",
},
"openRecordIn": {
- "id": "00000000-0000-0000-0000-000000001005",
+ "id": "00000000-0000-0000-0000-000000001018",
},
"ownedOpportunities": {
- "id": "00000000-0000-0000-0000-000000001012",
+ "id": "00000000-0000-0000-0000-000000001025",
},
"position": {
- "id": "00000000-0000-0000-0000-000000001000",
+ "id": "00000000-0000-0000-0000-000000001013",
},
"searchVector": {
- "id": "00000000-0000-0000-0000-000000001001",
+ "id": "00000000-0000-0000-0000-000000001014",
},
"timeFormat": {
- "id": "00000000-0000-0000-0000-000000001025",
+ "id": "00000000-0000-0000-0000-000000001038",
},
"timeZone": {
- "id": "00000000-0000-0000-0000-000000001023",
+ "id": "00000000-0000-0000-0000-000000001036",
},
"timelineActivities": {
- "id": "00000000-0000-0000-0000-000000001017",
+ "id": "00000000-0000-0000-0000-000000001030",
},
"uiScale": {
- "id": "00000000-0000-0000-0000-000000001004",
+ "id": "00000000-0000-0000-0000-000000001017",
},
"updatedAt": {
- "id": "00000000-0000-0000-0000-000000000996",
+ "id": "00000000-0000-0000-0000-000000001009",
},
"updatedBy": {
- "id": "00000000-0000-0000-0000-000000000999",
+ "id": "00000000-0000-0000-0000-000000001012",
},
"userEmail": {
- "id": "00000000-0000-0000-0000-000000001008",
+ "id": "00000000-0000-0000-0000-000000001021",
},
"userId": {
- "id": "00000000-0000-0000-0000-000000001010",
+ "id": "00000000-0000-0000-0000-000000001023",
},
},
- "id": "00000000-0000-0000-0000-000000001044",
+ "id": "00000000-0000-0000-0000-000000001057",
"views": {
"allWorkspaceMembers": {
- "id": "00000000-0000-0000-0000-000000001043",
+ "id": "00000000-0000-0000-0000-000000001056",
"viewFieldGroups": {},
"viewFields": {
"assignedTasks": {
- "id": "00000000-0000-0000-0000-000000001042",
+ "id": "00000000-0000-0000-0000-000000001055",
},
"createdAt": {
- "id": "00000000-0000-0000-0000-000000001040",
+ "id": "00000000-0000-0000-0000-000000001053",
},
"name": {
- "id": "00000000-0000-0000-0000-000000001039",
+ "id": "00000000-0000-0000-0000-000000001052",
},
"ownedOpportunities": {
- "id": "00000000-0000-0000-0000-000000001041",
+ "id": "00000000-0000-0000-0000-000000001054",
},
},
"viewGroups": {},
},
"workspaceMemberRecordPageFields": {
- "id": "00000000-0000-0000-0000-000000001038",
+ "id": "00000000-0000-0000-0000-000000001051",
"viewFieldGroups": {
"general": {
- "id": "00000000-0000-0000-0000-000000001035",
+ "id": "00000000-0000-0000-0000-000000001048",
},
"relations": {
- "id": "00000000-0000-0000-0000-000000001037",
+ "id": "00000000-0000-0000-0000-000000001050",
},
"system": {
- "id": "00000000-0000-0000-0000-000000001036",
+ "id": "00000000-0000-0000-0000-000000001049",
},
},
"viewFields": {
"accountOwnerForCompanies": {
- "id": "00000000-0000-0000-0000-000000001033",
+ "id": "00000000-0000-0000-0000-000000001046",
},
"assignedTasks": {
- "id": "00000000-0000-0000-0000-000000001032",
+ "id": "00000000-0000-0000-0000-000000001045",
},
"createdAt": {
- "id": "00000000-0000-0000-0000-000000001030",
+ "id": "00000000-0000-0000-0000-000000001043",
},
"jobTitle": {
- "id": "00000000-0000-0000-0000-000000001029",
+ "id": "00000000-0000-0000-0000-000000001042",
},
"ownedOpportunities": {
- "id": "00000000-0000-0000-0000-000000001034",
+ "id": "00000000-0000-0000-0000-000000001047",
},
"updatedAt": {
- "id": "00000000-0000-0000-0000-000000001031",
+ "id": "00000000-0000-0000-0000-000000001044",
},
"userEmail": {
- "id": "00000000-0000-0000-0000-000000001028",
+ "id": "00000000-0000-0000-0000-000000001041",
},
},
"viewGroups": {},
diff --git a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/__tests__/standard-object-writability.spec.ts b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/__tests__/standard-object-writability.spec.ts
index dc86fad7b4c..be4ec66367c 100644
--- a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/__tests__/standard-object-writability.spec.ts
+++ b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/__tests__/standard-object-writability.spec.ts
@@ -10,6 +10,7 @@ const NOW = '2024-01-01T00:00:00.000Z';
// Only the platform writes these (sync bookkeeping, campaign sending state, trigger registrations).
// timelineActivity stays OPEN because merging records reparents its rows under the caller
const SYSTEM_WRITABILITY_STANDARD_OBJECT_NAMES = [
+ 'accessGroup',
'agentChatThreadParticipant',
'agentMessage',
'agentMessagePart',
diff --git a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/build-standard-flat-field-metadata-maps.util.ts b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/build-standard-flat-field-metadata-maps.util.ts
index eab3b9a328c..22d33e1efc3 100644
--- a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/build-standard-flat-field-metadata-maps.util.ts
+++ b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/build-standard-flat-field-metadata-maps.util.ts
@@ -36,6 +36,7 @@ import { buildNoteStandardFlatFieldMetadatas } from 'src/engine/workspace-manage
import { buildNoteTargetStandardFlatFieldMetadatas } from 'src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/compute-note-target-standard-flat-field-metadata.util';
import { buildOpportunityStandardFlatFieldMetadatas } from 'src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/compute-opportunity-standard-flat-field-metadata.util';
import { buildPersonStandardFlatFieldMetadatas } from 'src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/compute-person-standard-flat-field-metadata.util';
+import { buildAccessGroupStandardFlatFieldMetadatas } from 'src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/compute-access-group-standard-flat-field-metadata.util';
import { buildRecordShareStandardFlatFieldMetadatas } from 'src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/compute-record-share-standard-flat-field-metadata.util';
import { buildShortLinkStandardFlatFieldMetadatas } from 'src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/compute-short-link-standard-flat-field-metadata.util';
import { buildTaskStandardFlatFieldMetadatas } from 'src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/compute-task-standard-flat-field-metadata.util';
@@ -53,6 +54,7 @@ type StandardFieldBuilder<P extends AllStandardObjectName> = (
) => Record<string, FlatFieldMetadata>;
const STANDARD_FLAT_FIELD_METADATA_BUILDERS_BY_OBJECT_NAME = {
+ accessGroup: buildAccessGroupStandardFlatFieldMetadatas,
campaignDelivery: buildCampaignDeliveryStandardFlatFieldMetadatas,
messageSuppression: buildMessageSuppressionStandardFlatFieldMetadatas,
agentMessagePart: buildAgentMessagePartStandardFlatFieldMetadatas,
diff --git a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/compute-access-group-standard-flat-field-metadata.util.ts b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/compute-access-group-standard-flat-field-metadata.util.ts
new file mode 100644
index 00000000000..fd1302bee0d
--- /dev/null
+++ b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/compute-access-group-standard-flat-field-metadata.util.ts
@@ -0,0 +1,333 @@
+import { msg } from '@lingui/core/macro';
+import { i18nLabel } from 'src/engine/workspace-manager/twenty-standard-application/utils/i18n-label.util';
+import { DateDisplayFormat, FieldMetadataType } from 'twenty-shared/types';
+
+import { type FlatFieldMetadata } from 'src/engine/metadata-modules/flat-field-metadata/types/flat-field-metadata.type';
+import { type AllStandardObjectFieldName } from 'src/engine/workspace-manager/twenty-standard-application/types/all-standard-object-field-name.type';
+import {
+ type CreateStandardFieldArgs,
+ createStandardFieldFlatMetadata,
+} from 'src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/create-standard-field-flat-metadata.util';
+
+export const buildAccessGroupStandardFlatFieldMetadatas = ({
+ now,
+ objectName,
+ workspaceId,
+ standardObjectMetadataRelatedEntityIds,
+ dependencyFlatEntityMaps,
+ twentyStandardApplicationId,
+}: Omit<
+ CreateStandardFieldArgs<'accessGroup', FieldMetadataType>,
+ 'context'
+>): Record<AllStandardObjectFieldName<'accessGroup'>, FlatFieldMetadata> => ({
+ id: createStandardFieldFlatMetadata({
+ objectName,
+ workspaceId,
+ context: {
+ fieldName: 'id',
+ type: FieldMetadataType.UUID,
+ label: i18nLabel(msg({ message: `ID`, context: 'fieldMetadata.label' })),
+ description: i18nLabel(
+ msg({ message: `ID`, context: 'fieldMetadata.description' }),
+ ),
+ icon: 'Icon123',
+ isSystem: true,
+ isNullable: false,
+ isUIEditable: false,
+ defaultValue: 'uuid',
+ },
+ standardObjectMetadataRelatedEntityIds,
+ dependencyFlatEntityMaps,
+ twentyStandardApplicationId,
+ now,
+ }),
+ createdAt: createStandardFieldFlatMetadata({
+ objectName,
+ workspaceId,
+ context: {
+ fieldName: 'createdAt',
+ type: FieldMetadataType.DATE_TIME,
+ label: i18nLabel(
+ msg({ message: `Creation date`, context: 'fieldMetadata.label' }),
+ ),
+ description: i18nLabel(
+ msg({ message: `Creation date`, context: 'fieldMetadata.description' }),
+ ),
+ icon: 'IconCalendar',
+ isSystem: true,
+ isNullable: false,
+ isUIEditable: false,
+ defaultValue: 'now',
+ settings: { displayFormat: DateDisplayFormat.RELATIVE },
+ },
+ standardObjectMetadataRelatedEntityIds,
+ dependencyFlatEntityMaps,
+ twentyStandardApplicationId,
+ now,
+ }),
+ updatedAt: createStandardFieldFlatMetadata({
+ objectName,
+ workspaceId,
+ context: {
+ fieldName: 'updatedAt',
+ type: FieldMetadataType.DATE_TIME,
+ label: i18nLabel(
+ msg({ message: `Last update`, context: 'fieldMetadata.label' }),
+ ),
+ description: i18nLabel(
+ msg({
+ message: `Last time the record was changed`,
+ context: 'fieldMetadata.description',
+ }),
+ ),
+ icon: 'IconCalendarClock',
+ isSystem: true,
+ isNullable: false,
+ isUIEditable: false,
+ defaultValue: 'now',
+ settings: { displayFormat: DateDisplayFormat.RELATIVE },
+ },
+ standardObjectMetadataRelatedEntityIds,
+ dependencyFlatEntityMaps,
+ twentyStandardApplicationId,
+ now,
+ }),
+ deletedAt: createStandardFieldFlatMetadata({
+ objectName,
+ workspaceId,
+ context: {
+ fieldName: 'deletedAt',
+ type: FieldMetadataType.DATE_TIME,
+ label: i18nLabel(
+ msg({ message: `Deleted at`, context: 'fieldMetadata.label' }),
+ ),
+ description: i18nLabel(
+ msg({
+ message: `Date when the record was deleted`,
+ context: 'fieldMetadata.description',
+ }),
+ ),
+ icon: 'IconCalendarMinus',
+ isSystem: true,
+ isNullable: true,
+ isUIEditable: false,
+ settings: { displayFormat: DateDisplayFormat.RELATIVE },
+ },
+ standardObjectMetadataRelatedEntityIds,
+ dependencyFlatEntityMaps,
+ twentyStandardApplicationId,
+ now,
+ }),
+ roleId: createStandardFieldFlatMetadata({
+ objectName,
+ workspaceId,
+ context: {
+ fieldName: 'roleId',
+ type: FieldMetadataType.UUID,
+ label: i18nLabel(
+ msg({ message: `Role ID`, context: 'fieldMetadata.label' }),
+ ),
+ description: i18nLabel(
+ msg({
+ message: `Role whose members can belong to the group`,
+ context: 'fieldMetadata.description',
+ }),
+ ),
+ icon: 'IconLock',
+ isSystem: true,
+ isNullable: false,
+ isUIEditable: false,
+ },
+ standardObjectMetadataRelatedEntityIds,
+ dependencyFlatEntityMaps,
+ twentyStandardApplicationId,
+ now,
+ }),
+ rowLevelPermissionPredicateGroupId: createStandardFieldFlatMetadata({
+ objectName,
+ workspaceId,
+ context: {
+ fieldName: 'rowLevelPermissionPredicateGroupId',
+ type: FieldMetadataType.UUID,
+ label: i18nLabel(
+ msg({
+ message: `Row level permission predicate group ID`,
+ context: 'fieldMetadata.label',
+ }),
+ ),
+ description: i18nLabel(
+ msg({
+ message: `Conditional grant the group evaluates, empty for whole-object grants`,
+ context: 'fieldMetadata.description',
+ }),
+ ),
+ icon: 'IconFilter',
+ isSystem: true,
+ isNullable: true,
+ isUIEditable: false,
+ },
+ standardObjectMetadataRelatedEntityIds,
+ dependencyFlatEntityMaps,
+ twentyStandardApplicationId,
+ now,
+ }),
+ memberFieldValues: createStandardFieldFlatMetadata({
+ objectName,
+ workspaceId,
+ context: {
+ fieldName: 'memberFieldValues',
+ type: FieldMetadataType.RAW_JSON,
+ label: i18nLabel(
+ msg({ message: `Member field values`, context: 'fieldMetadata.label' }),
+ ),
+ description: i18nLabel(
+ msg({
+ message: `Values of the member fields the grant reads, shared by every member of the group`,
+ context: 'fieldMetadata.description',
+ }),
+ ),
+ icon: 'IconCode',
+ isSystem: true,
+ isNullable: true,
+ isUIEditable: false,
+ },
+ standardObjectMetadataRelatedEntityIds,
+ dependencyFlatEntityMaps,
+ twentyStandardApplicationId,
+ now,
+ }),
+ groupHash: createStandardFieldFlatMetadata({
+ objectName,
+ workspaceId,
+ context: {
+ fieldName: 'groupHash',
+ type: FieldMetadataType.TEXT,
+ label: i18nLabel(
+ msg({ message: `Group hash`, context: 'fieldMetadata.label' }),
+ ),
+ description: i18nLabel(
+ msg({
+ message: `Hash of the role, grant and member field values, unique per group`,
+ context: 'fieldMetadata.description',
+ }),
+ ),
+ icon: 'IconAbc',
+ isSystem: true,
+ isNullable: false,
+ isUIEditable: false,
+ },
+ standardObjectMetadataRelatedEntityIds,
+ dependencyFlatEntityMaps,
+ twentyStandardApplicationId,
+ now,
+ }),
+ createdBy: createStandardFieldFlatMetadata({
+ objectName,
+ workspaceId,
+ context: {
+ fieldName: 'createdBy',
+ type: FieldMetadataType.ACTOR,
+ label: i18nLabel(
+ msg({ message: `Created by`, context: 'fieldMetadata.label' }),
+ ),
+ description: i18nLabel(
+ msg({
+ message: `The creator of the record`,
+ context: 'fieldMetadata.description',
+ }),
+ ),
+ icon: 'IconCreativeCommonsSa',
+ isSystem: true,
+ isUIEditable: false,
+ isNullable: false,
+ defaultValue: {
+ source: "'MANUAL'",
+ name: "'System'",
+ workspaceMemberId: null,
+ },
+ },
+ standardObjectMetadataRelatedEntityIds,
+ dependencyFlatEntityMaps,
+ twentyStandardApplicationId,
+ now,
+ }),
+ updatedBy: createStandardFieldFlatMetadata({
+ objectName,
+ workspaceId,
+ context: {
+ fieldName: 'updatedBy',
+ type: FieldMetadataType.ACTOR,
+ label: i18nLabel(
+ msg({ message: `Updated by`, context: 'fieldMetadata.label' }),
+ ),
+ description: i18nLabel(
+ msg({
+ message: `The workspace member who last updated the record`,
+ context: 'fieldMetadata.description',
+ }),
+ ),
+ icon: 'IconUserCircle',
+ isSystem: true,
+ isUIEditable: false,
+ isNullable: false,
+ defaultValue: {
+ source: "'MANUAL'",
+ name: "'System'",
+ workspaceMemberId: null,
+ },
+ },
+ standardObjectMetadataRelatedEntityIds,
+ dependencyFlatEntityMaps,
+ twentyStandardApplicationId,
+ now,
+ }),
+ position: createStandardFieldFlatMetadata({
+ objectName,
+ workspaceId,
+ context: {
+ fieldName: 'position',
+ type: FieldMetadataType.POSITION,
+ label: i18nLabel(
+ msg({ message: `Position`, context: 'fieldMetadata.label' }),
+ ),
+ description: i18nLabel(
+ msg({
+ message: `Access group position`,
+ context: 'fieldMetadata.description',
+ }),
+ ),
+ icon: 'IconHierarchy2',
+ isSystem: true,
+ isNullable: false,
+ defaultValue: 0,
+ },
+ standardObjectMetadataRelatedEntityIds,
+ dependencyFlatEntityMaps,
+ twentyStandardApplicationId,
+ now,
+ }),
+ searchVector: createStandardFieldFlatMetadata({
+ objectName,
+ workspaceId,
+ context: {
+ fieldName: 'searchVector',
+ type: FieldMetadataType.TS_VECTOR,
+ label: i18nLabel(
+ msg({ message: `Search vector`, context: 'fieldMetadata.label' }),
+ ),
+ description: i18nLabel(
+ msg({
+ message: `Field used for full-text search`,
+ context: 'fieldMetadata.description',
+ }),
+ ),
+ icon: 'IconUser',
+ isSystem: true,
+ isNullable: true,
+ },
+ standardObjectMetadataRelatedEntityIds,
+ dependencyFlatEntityMaps,
+ twentyStandardApplicationId,
+ now,
+ }),
+});
diff --git a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/index/build-standard-flat-index-metadata-maps.util.ts b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/index/build-standard-flat-index-metadata-maps.util.ts
index 1177d522ad0..f01ac734197 100644
--- a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/index/build-standard-flat-index-metadata-maps.util.ts
+++ b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/index/build-standard-flat-index-metadata-maps.util.ts
@@ -33,6 +33,7 @@ import { buildNoteStandardFlatIndexMetadatas } from 'src/engine/workspace-manage
import { buildNoteTargetStandardFlatIndexMetadatas } from 'src/engine/workspace-manager/twenty-standard-application/utils/index/compute-note-target-standard-flat-index-metadata.util';
import { buildOpportunityStandardFlatIndexMetadatas } from 'src/engine/workspace-manager/twenty-standard-application/utils/index/compute-opportunity-standard-flat-index-metadata.util';
import { buildPersonStandardFlatIndexMetadatas } from 'src/engine/workspace-manager/twenty-standard-application/utils/index/compute-person-standard-flat-index-metadata.util';
+import { buildAccessGroupStandardFlatIndexMetadatas } from 'src/engine/workspace-manager/twenty-standard-application/utils/index/compute-access-group-standard-flat-index-metadata.util';
import { buildRecordShareStandardFlatIndexMetadatas } from 'src/engine/workspace-manager/twenty-standard-application/utils/index/compute-record-share-standard-flat-index-metadata.util';
import { buildShortLinkStandardFlatIndexMetadatas } from 'src/engine/workspace-manager/twenty-standard-application/utils/index/compute-short-link-standard-flat-index-metadata.util';
import { buildTaskStandardFlatIndexMetadatas } from 'src/engine/workspace-manager/twenty-standard-application/utils/index/compute-task-standard-flat-index-metadata.util';
@@ -50,6 +51,7 @@ type StandardIndexBuilder<P extends AllStandardObjectName> = (
) => Record<string, FlatIndexMetadata>;
const STANDARD_FLAT_INDEX_METADATA_BUILDERS_BY_OBJECT_NAME = {
+ accessGroup: buildAccessGroupStandardFlatIndexMetadatas,
campaignDelivery: buildCampaignDeliveryStandardFlatIndexMetadatas,
messageSuppression: buildMessageSuppressionStandardFlatIndexMetadatas,
agentMessagePart: buildAgentMessagePartStandardFlatIndexMetadatas,
diff --git a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/index/compute-access-group-standard-flat-index-metadata.util.ts b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/index/compute-access-group-standard-flat-index-metadata.util.ts
new file mode 100644
index 00000000000..ceca09ab732
--- /dev/null
+++ b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/index/compute-access-group-standard-flat-index-metadata.util.ts
@@ -0,0 +1,44 @@
+import { type FlatIndexMetadata } from 'src/engine/metadata-modules/flat-index-metadata/types/flat-index-metadata.type';
+import { type AllStandardObjectIndexName } from 'src/engine/workspace-manager/twenty-standard-application/types/all-standard-object-index-name.type';
+import {
+ type CreateStandardIndexArgs,
+ createStandardIndexFlatMetadata,
+} from 'src/engine/workspace-manager/twenty-standard-application/utils/index/create-standard-index-flat-metadata.util';
+
+export const buildAccessGroupStandardFlatIndexMetadatas = ({
+ now,
+ objectName,
+ workspaceId,
+ standardObjectMetadataRelatedEntityIds,
+ dependencyFlatEntityMaps,
+ twentyStandardApplicationId,
+}: Omit<CreateStandardIndexArgs<'accessGroup'>, 'context'>): Record<
+ AllStandardObjectIndexName<'accessGroup'>,
+ FlatIndexMetadata
+> => ({
+ roleIdIndex: createStandardIndexFlatMetadata({
+ objectName,
+ workspaceId,
+ context: {
+ indexName: 'roleIdIndex',
+ relatedFieldNames: ['roleId'],
+ },
+ standardObjectMetadataRelatedEntityIds,
+ dependencyFlatEntityMaps,
+ twentyStandardApplicationId,
+ now,
+ }),
+ groupHashUniqueIndex: createStandardIndexFlatMetadata({
+ objectName,
+ workspaceId,
+ context: {
+ indexName: 'groupHashUniqueIndex',
+ relatedFieldNames: ['groupHash'],
+ isUnique: true,
+ },
+ standardObjectMetadataRelatedEntityIds,
+ dependencyFlatEntityMaps,
+ twentyStandardApplicationId,
+ now,
+ }),
+});
diff --git a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/object-metadata/create-standard-flat-object-metadata.util.ts b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/object-metadata/create-standard-flat-object-metadata.util.ts
index b482d3675ee..6948f16c8b7 100644
--- a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/object-metadata/create-standard-flat-object-metadata.util.ts
+++ b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/object-metadata/create-standard-flat-object-metadata.util.ts
@@ -1374,6 +1374,55 @@ export const STANDARD_FLAT_OBJECT_METADATA_BUILDERS_BY_OBJECT_NAME = {
twentyStandardApplicationId,
now,
}),
+ accessGroup: ({
+ now,
+ workspaceId,
+ standardObjectMetadataRelatedEntityIds,
+ twentyStandardApplicationId,
+ dependencyFlatEntityMaps,
+ }: Omit<CreateStandardObjectArgs<'accessGroup'>, 'context' | 'objectName'>) =>
+ createStandardObjectFlatMetadata({
+ objectName: 'accessGroup',
+ dependencyFlatEntityMaps,
+ context: {
+ universalIdentifier: STANDARD_OBJECTS.accessGroup.universalIdentifier,
+ nameSingular: 'accessGroup',
+ namePlural: 'accessGroups',
+ labelSingular: i18nLabel(
+ msg({
+ message: `Access group`,
+ context: 'objectMetadata.labelSingular',
+ }),
+ ),
+ labelPlural: i18nLabel(
+ msg({
+ message: `Access groups`,
+ context: 'objectMetadata.labelPlural',
+ }),
+ ),
+ description: i18nLabel(
+ msg({
+ message: `Members of a role who receive the same evaluated grant`,
+ context: 'objectMetadata.description',
+ }),
+ ),
+ icon: 'IconLock',
+ isSystem: true,
+ isSearchable: false,
+ isAuditLogged: false,
+ isUIEditable: false,
+ isUICreatable: false,
+ writability: MetadataWritability.SYSTEM,
+ readability: MetadataReadability.SYSTEM,
+ disabledObjectPermissionActions:
+ PLATFORM_MANAGED_DISABLED_OBJECT_PERMISSION_ACTIONS,
+ labelIdentifierFieldMetadataName: 'id',
+ },
+ workspaceId,
+ standardObjectMetadataRelatedEntityIds,
+ twentyStandardApplicationId,
+ now,
+ }),
recordShare: ({
now,
workspaceId,
diff --git a/packages/twenty-server/test/integration/upgrade/suites/2-55-workspace-command-1793384492383-sync-access-group-object.integration-spec.ts b/packages/twenty-server/test/integration/upgrade/suites/2-55-workspace-command-1793384492383-sync-access-group-object.integration-spec.ts
new file mode 100644
index 00000000000..63647c8aa16
--- /dev/null
+++ b/packages/twenty-server/test/integration/upgrade/suites/2-55-workspace-command-1793384492383-sync-access-group-object.integration-spec.ts
@@ -0,0 +1,173 @@
+import { randomUUID } from 'node:crypto';
+
+import { TWENTY_STANDARD_APPLICATION_UNIVERSAL_IDENTIFIER } from 'twenty-shared/application';
+import { STANDARD_OBJECTS } from 'twenty-shared/metadata';
+import { isDefined } from 'twenty-shared/utils';
+
+import { getAppProviderByClassName } from 'test/integration/utils/get-app-provider-by-class-name.util';
+
+import { type SyncAccessGroupObjectCommand } from 'src/database/commands/upgrade-version-command/2-55/2-55-workspace-command-1793384492383-sync-access-group-object.command';
+import { type WorkspaceCacheService } from 'src/engine/workspace-cache/services/workspace-cache.service';
+import { getWorkspaceSchemaName } from 'src/engine/workspace-datasource/utils/get-workspace-schema-name.util';
+import { SEED_APPLE_WORKSPACE_ID } from 'src/engine/workspace-manager/dev-seeder/core/constants/seeder-workspaces.constant';
+import { type WorkspaceMigrationValidateBuildAndRunService } from 'src/engine/workspace-manager/workspace-migration/services/workspace-migration-validate-build-and-run-service';
+
+const SCHEMA = getWorkspaceSchemaName(SEED_APPLE_WORKSPACE_ID);
+const ACCESS_GROUP = STANDARD_OBJECTS.accessGroup;
+
+describe('2-55 workspace command - sync access group object (integration)', () => {
+ let command: SyncAccessGroupObjectCommand;
+ let workspaceCacheService: WorkspaceCacheService;
+
+ const runOnWorkspace = (options: { dryRun?: boolean } = {}) =>
+ command.runOnWorkspace({
+ workspaceId: SEED_APPLE_WORKSPACE_ID,
+ options,
+ index: 0,
+ total: 1,
+ dataSource: global.testDataSource,
+ });
+
+ const findAccessGroupStorage = async () => {
+ const { flatObjectMetadataMaps, flatFieldMetadataMaps, flatIndexMaps } =
+ await workspaceCacheService.getOrRecompute(SEED_APPLE_WORKSPACE_ID, [
+ 'flatObjectMetadataMaps',
+ 'flatFieldMetadataMaps',
+ 'flatIndexMaps',
+ ]);
+ const tables: { table_name: string }[] = await global.testDataSource.query(
+ `SELECT table_name FROM information_schema.tables
+ WHERE table_schema = $1 AND table_name = 'accessGroup'`,
+ [SCHEMA],
+ );
+
+ return {
+ flatObjectMetadata:
+ flatObjectMetadataMaps.byUniversalIdentifier[
+ ACCESS_GROUP.universalIdentifier
+ ],
+ flatFieldMetadatas: Object.values(ACCESS_GROUP.fields)
+ .map(
+ ({ universalIdentifier }) =>
+ flatFieldMetadataMaps.byUniversalIdentifier[universalIdentifier],
+ )
+ .filter(isDefined),
+ flatIndexMetadatas: Object.values(ACCESS_GROUP.indexes)
+ .map(
+ ({ universalIdentifier }) =>
+ flatIndexMaps.byUniversalIdentifier[universalIdentifier],
+ )
+ .filter(isDefined),
+ hasTable: tables.length === 1,
+ };
+ };
+
+ const insertAccessGroup = ({
+ roleId,
+ groupHash,
+ }: {
+ roleId: string;
+ groupHash: string;
+ }) =>
+ global.testDataSource.query(
+ `INSERT INTO "${SCHEMA}"."accessGroup" ("roleId", "groupHash")
+ VALUES ($1, $2)`,
+ [roleId, groupHash],
+ );
+
+ beforeAll(async () => {
+ command = getAppProviderByClassName<SyncAccessGroupObjectCommand>(
+ 'SyncAccessGroupObjectCommand',
+ );
+ workspaceCacheService = getAppProviderByClassName<WorkspaceCacheService>(
+ 'WorkspaceCacheService',
+ );
+
+ const { flatObjectMetadata, flatFieldMetadatas, flatIndexMetadatas } =
+ await findAccessGroupStorage();
+
+ const result =
+ await getAppProviderByClassName<WorkspaceMigrationValidateBuildAndRunService>(
+ 'WorkspaceMigrationValidateBuildAndRunService',
+ ).validateBuildAndRunLegacyWorkspaceMigration({
+ workspaceId: SEED_APPLE_WORKSPACE_ID,
+ isSystemBuild: true,
+ applicationUniversalIdentifier:
+ TWENTY_STANDARD_APPLICATION_UNIVERSAL_IDENTIFIER,
+ allFlatEntityOperationByMetadataName: {
+ objectMetadata: {
+ flatEntityToCreate: [],
+ flatEntityToDelete: [flatObjectMetadata].filter(isDefined),
+ flatEntityToUpdate: [],
+ },
+ fieldMetadata: {
+ flatEntityToCreate: [],
+ flatEntityToDelete: flatFieldMetadatas,
+ flatEntityToUpdate: [],
+ },
+ index: {
+ flatEntityToCreate: [],
+ flatEntityToDelete: flatIndexMetadatas,
+ flatEntityToUpdate: [],
+ },
+ },
+ });
+
+ expect(result.status).toBe('success');
+ });
+
+ afterAll(async () => {
+ await runOnWorkspace();
+ });
+
+ it('leaves the object absent on a dry run', async () => {
+ await runOnWorkspace({ dryRun: true });
+
+ expect(await findAccessGroupStorage()).toMatchObject({
+ flatObjectMetadata: undefined,
+ flatFieldMetadatas: [],
+ flatIndexMetadatas: [],
+ hasTable: false,
+ });
+ });
+
+ it('creates the object, its fields, indexes and table once', async () => {
+ await runOnWorkspace();
+ await runOnWorkspace();
+
+ const storage = await findAccessGroupStorage();
+
+ expect(storage.flatObjectMetadata).toMatchObject({
+ nameSingular: 'accessGroup',
+ isSystem: true,
+ });
+ expect(storage.flatFieldMetadatas).toHaveLength(
+ Object.keys(ACCESS_GROUP.fields).length,
+ );
+ expect(storage.flatIndexMetadatas).toHaveLength(
+ Object.keys(ACCESS_GROUP.indexes).length,
+ );
+ expect(storage.hasTable).toBe(true);
+ });
+
+ it('refuses a second group with the same group hash', async () => {
+ const roleId = randomUUID();
+ const groupHash = `${roleId}:${randomUUID()}`;
+
+ try {
+ await insertAccessGroup({ roleId, groupHash });
+ await insertAccessGroup({
+ roleId,
+ groupHash: `${roleId}:whole-object`,
+ });
+ await expect(insertAccessGroup({ roleId, groupHash })).rejects.toThrow(
+ /duplicate key/,
+ );
+ } finally {
+ await global.testDataSource.query(
+ `DELETE FROM "${SCHEMA}"."accessGroup" WHERE "roleId" = $1`,
+ [roleId],
+ );
+ }
+ });
+});
diff --git a/packages/twenty-shared/src/metadata/__tests__/__snapshots__/standardObjectUniversalIdentifiers.test.ts.snap b/packages/twenty-shared/src/metadata/__tests__/__snapshots__/standardObjectUniversalIdentifiers.test.ts.snap
index 2df4ba88ce8..d280989102e 100644
--- a/packages/twenty-shared/src/metadata/__tests__/__snapshots__/standardObjectUniversalIdentifiers.test.ts.snap
+++ b/packages/twenty-shared/src/metadata/__tests__/__snapshots__/standardObjectUniversalIdentifiers.test.ts.snap
@@ -2,6 +2,56 @@
exports[`STANDARD_OBJECTS universal identifiers should never change without an explicit snapshot update 1`] = `
{
+ "accessGroup": {
+ "fields": {
+ "createdAt": {
+ "universalIdentifier": "33aeb537-bd63-5f25-8623-d0e62867de62",
+ },
+ "createdBy": {
+ "universalIdentifier": "25371b89-ffee-5d25-a2d9-48d877189573",
+ },
+ "deletedAt": {
+ "universalIdentifier": "16080650-3c69-5b30-bea7-8f684bcee608",
+ },
+ "groupHash": {
+ "universalIdentifier": "04687cce-1268-4774-b47e-04076a152630",
+ },
+ "id": {
+ "universalIdentifier": "24bab7ca-6503-5243-8d11-8c35f5cb8855",
+ },
+ "memberFieldValues": {
+ "universalIdentifier": "a0d519f8-cc6b-4bb5-b107-89213d683705",
+ },
+ "position": {
+ "universalIdentifier": "0e58d739-4e5d-53b2-b472-1f747198202e",
+ },
+ "roleId": {
+ "universalIdentifier": "0f8c81b0-6d46-4593-97cb-97216de930ff",
+ },
+ "rowLevelPermissionPredicateGroupId": {
+ "universalIdentifier": "03f12114-2b40-4dc0-9963-6c2e059bc4b3",
+ },
+ "searchVector": {
+ "universalIdentifier": "a6e1fe3d-d28c-55dd-9416-2e5c5984f186",
+ },
+ "updatedAt": {
+ "universalIdentifier": "4ee4a2f8-a42c-5b14-917f-a9ff57d4a40f",
+ },
+ "updatedBy": {
+ "universalIdentifier": "63f9ebe7-c3d5-53b2-b6eb-e4c527ee7c20",
+ },
+ },
+ "indexes": {
+ "groupHashUniqueIndex": {
+ "universalIdentifier": "dcb0d254-43ae-442e-9223-8ac052eddb28",
+ },
+ "roleIdIndex": {
+ "universalIdentifier": "933f2eee-0856-46fd-b144-ffd4bad7e9c8",
+ },
+ },
+ "universalIdentifier": "47f4ed44-4312-467f-b6f5-787f91037a1d",
+ "views": {},
+ },
"agentChatThread": {
"fields": {
"activeStreamId": {
diff --git a/packages/twenty-shared/src/metadata/constants/standard-object-fields.constant.ts b/packages/twenty-shared/src/metadata/constants/standard-object-fields.constant.ts
index f3802519ff1..7f124591372 100644
--- a/packages/twenty-shared/src/metadata/constants/standard-object-fields.constant.ts
+++ b/packages/twenty-shared/src/metadata/constants/standard-object-fields.constant.ts
@@ -1371,6 +1371,23 @@ export const STANDARD_OBJECT_FIELDS = {
universalIdentifier: '8b8d1be0-4c94-4413-a2c9-c7ede205a81d',
},
},
+ accessGroup: {
+ ...buildStandardObjectSystemFields(
+ STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.accessGroup,
+ ),
+ roleId: {
+ universalIdentifier: '0f8c81b0-6d46-4593-97cb-97216de930ff',
+ },
+ rowLevelPermissionPredicateGroupId: {
+ universalIdentifier: '03f12114-2b40-4dc0-9963-6c2e059bc4b3',
+ },
+ memberFieldValues: {
+ universalIdentifier: 'a0d519f8-cc6b-4bb5-b107-89213d683705',
+ },
+ groupHash: {
+ universalIdentifier: '04687cce-1268-4774-b47e-04076a152630',
+ },
+ },
recordShare: {
...buildStandardObjectSystemFields(
STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.recordShare,
diff --git a/packages/twenty-shared/src/metadata/constants/standard-object-universal-identifiers.constant.ts b/packages/twenty-shared/src/metadata/constants/standard-object-universal-identifiers.constant.ts
index 3a72fc89980..2b800e44543 100644
--- a/packages/twenty-shared/src/metadata/constants/standard-object-universal-identifiers.constant.ts
+++ b/packages/twenty-shared/src/metadata/constants/standard-object-universal-identifiers.constant.ts
@@ -21,6 +21,7 @@ export const STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS = {
taskTarget: '20202020-5a9a-44e8-95df-771cd06d0fb1',
person: '20202020-e674-48e5-a542-72570eee7213',
recordShare: 'fecdb92c-d150-4544-81f8-f1158d18a7a2',
+ accessGroup: '47f4ed44-4312-467f-b6f5-787f91037a1d',
company: '20202020-b374-4779-a561-80086cb2e17f',
opportunity: '20202020-9549-49dd-b2b2-883999db8938',
note: '20202020-0b00-45cd-b6f6-6cd806fc6804',
diff --git a/packages/twenty-shared/src/metadata/constants/standard-object.constant.ts b/packages/twenty-shared/src/metadata/constants/standard-object.constant.ts
index b16c2b882b6..80d5fc458f6 100644
--- a/packages/twenty-shared/src/metadata/constants/standard-object.constant.ts
+++ b/packages/twenty-shared/src/metadata/constants/standard-object.constant.ts
@@ -1031,6 +1031,19 @@ export const STANDARD_OBJECTS = {
},
},
},
+ accessGroup: {
+ universalIdentifier: STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.accessGroup,
+ fields: STANDARD_OBJECT_FIELDS.accessGroup,
+ indexes: {
+ roleIdIndex: {
+ universalIdentifier: '933f2eee-0856-46fd-b144-ffd4bad7e9c8',
+ },
+ groupHashUniqueIndex: {
+ universalIdentifier: 'dcb0d254-43ae-442e-9223-8ac052eddb28',
+ },
+ },
+ views: {},
+ },
recordShare: {
universalIdentifier: STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.recordShare,
fields: STANDARD_OBJECT_FIELDS.recordShare,