Deprecate messageChannel messageFolder calendarChannel standard objects (#20836)

# Introduction

Removing old standard objects `messageChannel` and `messageFolder` and
`calendarChannel`

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Paul Rastoin
2026-05-22 15:40:53 +02:00
committed by GitHub
parent 8f24cda586
commit 76e144e85a
55 changed files with 1070 additions and 6966 deletions
@@ -4,14 +4,12 @@ export enum CoreObjectNamePlural {
ApiKey = 'apiKeys',
Attachment = 'attachments',
Blocklist = 'blocklists',
CalendarChannel = 'calendarChannels',
CalendarEvent = 'calendarEvents',
Comment = 'comments',
Company = 'companies',
Dashboard = 'dashboards',
TimelineActivity = 'timelineActivities',
Message = 'messages',
MessageChannel = 'messageChannels',
MessageParticipant = 'messageParticipants',
MessageThread = 'messageThreads',
Note = 'notes',
@@ -104,18 +104,6 @@ export const mockedMinimalMetadata: MinimalMetadata =
"isSystem": true,
"isRemote": false
},
{
"id": "06ac365e-28d1-4966-8b15-30f268468a19",
"nameSingular": "messageFolder",
"namePlural": "messageFolders",
"labelSingular": "Message Folder",
"labelPlural": "Message Folders",
"icon": "IconFolder",
"isCustom": false,
"isActive": true,
"isSystem": true,
"isRemote": false
},
{
"id": "61d7672d-5c4f-42e1-812e-99eb0a2565de",
"nameSingular": "workflowRun",
@@ -296,30 +284,6 @@ export const mockedMinimalMetadata: MinimalMetadata =
"isSystem": false,
"isRemote": false
},
{
"id": "ce1549f6-1cb8-4f47-ba55-16d5a399a235",
"nameSingular": "calendarChannel",
"namePlural": "calendarChannels",
"labelSingular": "Calendar Channel",
"labelPlural": "Calendar Channels",
"icon": "IconCalendar",
"isCustom": false,
"isActive": true,
"isSystem": true,
"isRemote": false
},
{
"id": "c48ce4de-a73c-4b94-ba79-123559a8b299",
"nameSingular": "messageChannel",
"namePlural": "messageChannels",
"labelSingular": "Message Channel",
"labelPlural": "Message Channels",
"icon": "IconMessage",
"isCustom": false,
"isActive": true,
"isSystem": true,
"isRemote": false
},
{
"id": "89c57180-083a-47b6-bfb7-ec51b3a87eae",
"nameSingular": "noteTarget",
@@ -526,12 +490,6 @@ export const mockedMinimalMetadata: MinimalMetadata =
"key": "INDEX",
"objectMetadataId": "057951b6-46e0-4ae9-956a-b3b72f2cf800"
},
{
"id": "0641fc4f-b4ba-4074-a6e2-2d8d7826064e",
"type": "TABLE",
"key": "INDEX",
"objectMetadataId": "ce1549f6-1cb8-4f47-ba55-16d5a399a235"
},
{
"id": "cccea524-558f-49c0-8657-c07bc3610c23",
"type": "TABLE",
@@ -562,12 +520,6 @@ export const mockedMinimalMetadata: MinimalMetadata =
"key": "INDEX",
"objectMetadataId": "4397cb61-4bcc-49f8-b024-739b74ed9928"
},
{
"id": "e7ac6796-abf6-4a97-a758-91fa3518cf4c",
"type": "TABLE",
"key": "INDEX",
"objectMetadataId": "06ac365e-28d1-4966-8b15-30f268468a19"
},
{
"id": "a144d5ab-3195-4409-95f5-5aee8c0d3bbe",
"type": "TABLE",
@@ -586,12 +538,6 @@ export const mockedMinimalMetadata: MinimalMetadata =
"key": "INDEX",
"objectMetadataId": "7db07e5a-4476-4a4f-ba75-6de6597689aa"
},
{
"id": "022dba8d-2c8e-40e7-b767-0234e71ad705",
"type": "TABLE",
"key": "INDEX",
"objectMetadataId": "c48ce4de-a73c-4b94-ba79-123559a8b299"
},
{
"id": "b2e63752-f7e4-4d38-ae6e-063e6766a02d",
"type": "TABLE",
@@ -1,6 +1,7 @@
import { Module } from '@nestjs/common';
import { WorkspaceIteratorModule } from 'src/database/commands/command-runners/workspace-iterator.module';
import { DropChannelStandardObjectsCommand } from 'src/database/commands/upgrade-version-command/2-8/2-8-workspace-command-1798000050000-drop-channel-standard-objects.command';
import { BackfillRelationJoinColumnIndexesCommand } from 'src/database/commands/upgrade-version-command/2-8/2-8-workspace-command-1798100000000-backfill-relation-join-column-indexes.command';
import { ApplicationModule } from 'src/engine/core-modules/application/application.module';
import { WorkspaceSchemaManagerModule } from 'src/engine/twenty-orm/workspace-schema-manager/workspace-schema-manager.module';
@@ -15,6 +16,9 @@ import { WorkspaceMigrationModule } from 'src/engine/workspace-manager/workspace
WorkspaceMigrationModule,
WorkspaceSchemaManagerModule,
],
providers: [BackfillRelationJoinColumnIndexesCommand],
providers: [
DropChannelStandardObjectsCommand,
BackfillRelationJoinColumnIndexesCommand,
],
})
export class V2_8_UpgradeVersionCommandModule {}
@@ -0,0 +1,119 @@
import { Command } from 'nest-commander';
import { ActiveOrSuspendedWorkspaceCommandRunner } from 'src/database/commands/command-runners/active-or-suspended-workspace.command-runner';
import { WorkspaceIteratorService } from 'src/database/commands/command-runners/workspace-iterator.service';
import { type RunOnWorkspaceArgs } from 'src/database/commands/command-runners/workspace.command-runner';
import { ApplicationService } from 'src/engine/core-modules/application/application.service';
import { RegisteredWorkspaceCommand } from 'src/engine/core-modules/upgrade/decorators/registered-workspace-command.decorator';
import { findFlatEntityByUniversalIdentifier } from 'src/engine/metadata-modules/flat-entity/utils/find-flat-entity-by-universal-identifier.util';
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 { WorkspaceMigrationValidateBuildAndRunService } from 'src/engine/workspace-manager/workspace-migration/services/workspace-migration-validate-build-and-run-service';
const CALENDAR_CHANNEL_OBJECT_UNIVERSAL_IDENTIFIER =
'20202020-e8f2-40e1-a39c-c0e0039c5034';
const MESSAGE_CHANNEL_OBJECT_UNIVERSAL_IDENTIFIER =
'20202020-fe8c-40bc-a681-b80b771449b7';
const MESSAGE_FOLDER_OBJECT_UNIVERSAL_IDENTIFIER =
'20202020-4955-4fd9-8e59-2dbd373f2a46';
const OBJECT_UNIVERSAL_IDENTIFIERS = [
CALENDAR_CHANNEL_OBJECT_UNIVERSAL_IDENTIFIER,
MESSAGE_CHANNEL_OBJECT_UNIVERSAL_IDENTIFIER,
MESSAGE_FOLDER_OBJECT_UNIVERSAL_IDENTIFIER,
];
@RegisteredWorkspaceCommand('2.8.0', 1798000050000)
@Command({
name: 'upgrade:2-8:drop-channel-standard-objects',
description:
'Drop calendarChannel, messageChannel, messageFolder standard objects from workspace schemas (moved to core metadata)',
})
export class DropChannelStandardObjectsCommand extends ActiveOrSuspendedWorkspaceCommandRunner {
constructor(
protected readonly workspaceIteratorService: WorkspaceIteratorService,
private readonly applicationService: ApplicationService,
private readonly workspaceMigrationValidateBuildAndRunService: WorkspaceMigrationValidateBuildAndRunService,
private readonly workspaceCacheService: WorkspaceCacheService,
) {
super(workspaceIteratorService);
}
override async runOnWorkspace({
workspaceId,
options,
}: RunOnWorkspaceArgs): Promise<void> {
const isDryRun = options.dryRun ?? false;
this.logger.log(
`${isDryRun ? '[DRY RUN] ' : ''}Starting channel standard objects removal for workspace ${workspaceId}`,
);
const { flatObjectMetadataMaps } =
await this.workspaceCacheService.getOrRecompute(workspaceId, [
'flatObjectMetadataMaps',
]);
const objectsToDelete = OBJECT_UNIVERSAL_IDENTIFIERS.map(
(universalIdentifier) =>
findFlatEntityByUniversalIdentifier<FlatObjectMetadata>({
flatEntityMaps: flatObjectMetadataMaps,
universalIdentifier,
}),
).filter((object): object is FlatObjectMetadata => object !== undefined);
if (objectsToDelete.length === 0) {
this.logger.log(
`Channel standard objects already absent for workspace ${workspaceId}`,
);
return;
}
if (isDryRun) {
this.logger.log(
`[DRY RUN] Would delete ${objectsToDelete.length} channel standard objects for workspace ${workspaceId}`,
);
return;
}
const { twentyStandardFlatApplication } =
await this.applicationService.findWorkspaceTwentyStandardAndCustomApplicationOrThrow(
{ workspaceId },
);
const validateAndBuildResult =
await this.workspaceMigrationValidateBuildAndRunService.validateBuildAndRunWorkspaceMigration(
{
isSystemBuild: true,
allFlatEntityOperationByMetadataName: {
objectMetadata: {
flatEntityToCreate: [],
flatEntityToDelete: objectsToDelete,
flatEntityToUpdate: [],
},
},
workspaceId,
applicationUniversalIdentifier:
twentyStandardFlatApplication.universalIdentifier,
},
);
if (validateAndBuildResult.status === 'fail') {
this.logger.error(
`Failed to delete channel standard objects:\n${JSON.stringify(validateAndBuildResult, null, 2)}`,
);
throw new Error(
`Failed to delete channel standard objects for workspace ${workspaceId}`,
);
}
this.logger.log(
`Deleted ${objectsToDelete.length} channel standard objects for workspace ${workspaceId}`,
);
}
}
@@ -1,10 +1,8 @@
import { Injectable, Logger } from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
import { STANDARD_OBJECTS } from 'twenty-shared/metadata';
import { Repository } from 'typeorm';
import { DatabaseEventAction } from 'src/engine/api/graphql/graphql-query-runner/enums/database-event-action';
import { AppOAuthRevokeService } from 'src/engine/core-modules/application/connection-provider/refresh/services/app-oauth-revoke.service';
import { CalendarChannelEntity } from 'src/engine/metadata-modules/calendar-channel/entities/calendar-channel.entity';
import {
@@ -12,12 +10,7 @@ import {
ConnectedAccountExceptionCode,
} from 'src/engine/metadata-modules/connected-account/connected-account.exception';
import { ConnectedAccountEntity } from 'src/engine/metadata-modules/connected-account/entities/connected-account.entity';
import { WorkspaceManyOrAllFlatEntityMapsCacheService } from 'src/engine/metadata-modules/flat-entity/services/workspace-many-or-all-flat-entity-maps-cache.service';
import { findFlatEntityByUniversalIdentifierOrThrow } from 'src/engine/metadata-modules/flat-entity/utils/find-flat-entity-by-universal-identifier-or-throw.util';
import { MessageChannelEntity } from 'src/engine/metadata-modules/message-channel/entities/message-channel.entity';
import { GlobalWorkspaceOrmManager } from 'src/engine/twenty-orm/global-workspace-datasource/global-workspace-orm.manager';
import { buildSystemAuthContext } from 'src/engine/twenty-orm/utils/build-system-auth-context.util';
import { WorkspaceEventEmitter } from 'src/engine/workspace-event-emitter/workspace-event-emitter';
@Injectable()
export class ConnectedAccountMetadataService {
@@ -30,9 +23,6 @@ export class ConnectedAccountMetadataService {
private readonly calendarChannelRepository: Repository<CalendarChannelEntity>,
@InjectRepository(MessageChannelEntity)
private readonly messageChannelRepository: Repository<MessageChannelEntity>,
private readonly globalWorkspaceOrmManager: GlobalWorkspaceOrmManager,
private readonly workspaceEventEmitter: WorkspaceEventEmitter,
private readonly workspaceManyOrAllFlatEntityMapsCacheService: WorkspaceManyOrAllFlatEntityMapsCacheService,
private readonly appOAuthRevokeService: AppOAuthRevokeService,
) {}
@@ -158,93 +148,22 @@ export class ConnectedAccountMetadataService {
where: { id, workspaceId },
});
const authContext = buildSystemAuthContext(workspaceId);
const [messageChannels, calendarChannels] = await Promise.all([
this.globalWorkspaceOrmManager.executeInWorkspaceContext(
async () =>
this.messageChannelRepository.find({
where: { connectedAccountId: id, workspaceId },
}),
authContext,
),
this.globalWorkspaceOrmManager.executeInWorkspaceContext(
async () =>
this.calendarChannelRepository.find({
where: { connectedAccountId: id, workspaceId },
}),
authContext,
),
const [messageChannelCount, calendarChannelCount] = await Promise.all([
this.messageChannelRepository.count({
where: { connectedAccountId: id, workspaceId },
}),
this.calendarChannelRepository.count({
where: { connectedAccountId: id, workspaceId },
}),
]);
this.logger.log(
`WorkspaceId: ${workspaceId} Deleting connected account ${id} with ${messageChannels.length} message channel(s) and ${calendarChannels.length} calendar channel(s)`,
`WorkspaceId: ${workspaceId} Deleting connected account ${id} with ${messageChannelCount} message channel(s) and ${calendarChannelCount} calendar channel(s)`,
);
// Best-effort revocation against the provider's revokeEndpoint (no-op
// for non-app providers and for app providers without a revokeEndpoint
// declared). We don't want a slow or failing provider to block the
// local disconnect, so any error is swallowed inside the service.
await this.appOAuthRevokeService.revokeIfApp(connectedAccount);
await this.globalWorkspaceOrmManager.executeInWorkspaceContext(async () => {
await this.repository.delete({
id,
workspaceId,
});
}, authContext);
const { flatObjectMetadataMaps } =
await this.workspaceManyOrAllFlatEntityMapsCacheService.getOrRecomputeManyOrAllFlatEntityMaps(
{
workspaceId,
flatMapsKeys: ['flatObjectMetadataMaps'],
},
);
if (messageChannels.length > 0) {
const flatMessageChannelMetadata =
findFlatEntityByUniversalIdentifierOrThrow({
flatEntityMaps: flatObjectMetadataMaps,
universalIdentifier:
STANDARD_OBJECTS.messageChannel.universalIdentifier,
});
this.workspaceEventEmitter.emitDatabaseBatchEvent({
objectMetadataNameSingular: 'messageChannel',
action: DatabaseEventAction.DESTROYED,
objectMetadata: flatMessageChannelMetadata,
events: messageChannels.map((messageChannel) => ({
recordId: messageChannel.id,
properties: {
before: messageChannel,
},
})),
workspaceId,
});
}
if (calendarChannels.length > 0) {
const flatCalendarChannelMetadata =
findFlatEntityByUniversalIdentifierOrThrow({
flatEntityMaps: flatObjectMetadataMaps,
universalIdentifier:
STANDARD_OBJECTS.calendarChannel.universalIdentifier,
});
this.workspaceEventEmitter.emitDatabaseBatchEvent({
objectMetadataNameSingular: 'calendarChannel',
action: DatabaseEventAction.DESTROYED,
objectMetadata: flatCalendarChannelMetadata,
events: calendarChannels.map((calendarChannel) => ({
recordId: calendarChannel.id,
properties: {
before: calendarChannel,
},
})),
workspaceId,
});
}
await this.repository.delete({ id, workspaceId });
return connectedAccount;
}
@@ -1,3 +1,5 @@
import { registerEnumType } from '@nestjs/graphql';
import {
Column,
CreateDateColumn,
@@ -14,6 +16,10 @@ import { MessageFolderPendingSyncAction } from 'twenty-shared/types';
import { MessageChannelEntity } from 'src/engine/metadata-modules/message-channel/entities/message-channel.entity';
import { WorkspaceRelatedEntity } from 'src/engine/workspace-manager/types/workspace-related-entity';
registerEnumType(MessageFolderPendingSyncAction, {
name: 'MessageFolderPendingSyncAction',
});
@Entity({ name: 'messageFolder', schema: 'core' })
export class MessageFolderEntity extends WorkspaceRelatedEntity {
@PrimaryGeneratedColumn('uuid')
@@ -0,0 +1,8 @@
export const CALENDAR_CHANNEL_DATA_SEED_IDS = {
TIM: '20202020-a40f-4faf-bb9f-c6f9945b8203',
JONY: '20202020-a40f-4faf-bb9f-c6f9945b8204',
PHIL: '20202020-a40f-4faf-bb9f-c6f9945b8205',
JANE: '20202020-a40f-4faf-bb9f-c6f9945b8208',
COMPANY_MAIN: '20202020-a40f-4faf-bb9f-c6f9945b8206',
TEAM_CALENDAR: '20202020-a40f-4faf-bb9f-c6f9945b8207',
} as const;
@@ -0,0 +1,8 @@
export const MESSAGE_CHANNEL_DATA_SEED_IDS = {
TIM: '20202020-9b80-4c2c-a597-383db48de1d6',
JONY: '20202020-5ffe-4b32-814a-983d5e4911cd',
PHIL: '20202020-e2f1-49b5-85d2-5d3a3386990c',
JANE: '20202020-8c4d-4e71-a672-2e6a8c9f1b3d',
SUPPORT: '20202020-e2f1-49b5-85d2-5d3a3386990d',
SALES: '20202020-e2f1-49b5-85d2-5d3a3386990e',
} as const;
@@ -0,0 +1,7 @@
export const MESSAGE_FOLDER_DATA_SEED_IDS = {
TIM_INBOX: '20202020-f1a2-4b3c-8d4e-5f6a7b8c9d0e',
TIM_SENT: '20202020-f1a2-4b3c-8d4e-5f6a7b8c9d1e',
JONY_INBOX: '20202020-f1a2-4b3c-8d4e-5f6a7b8c9d2e',
JANE_INBOX: '20202020-f1a2-4b3c-8d4e-5f6a7b8c9d3e',
JANE_SENT: '20202020-f1a2-4b3c-8d4e-5f6a7b8c9d4e',
} as const;
@@ -13,10 +13,10 @@ import {
SEED_YCOMBINATOR_WORKSPACE_ID,
} from 'src/engine/workspace-manager/dev-seeder/core/constants/seeder-workspaces.constant';
import { USER_WORKSPACE_DATA_SEED_IDS } from 'src/engine/workspace-manager/dev-seeder/core/utils/seed-user-workspaces.util';
import { CALENDAR_CHANNEL_DATA_SEED_IDS } from 'src/engine/workspace-manager/dev-seeder/data/constants/calendar-channel-data-seeds.constant';
import { CALENDAR_CHANNEL_DATA_SEED_IDS } from 'src/engine/workspace-manager/dev-seeder/core/constants/calendar-channel-seed-ids.constant';
import { MESSAGE_CHANNEL_DATA_SEED_IDS } from 'src/engine/workspace-manager/dev-seeder/core/constants/message-channel-seed-ids.constant';
import { MESSAGE_FOLDER_DATA_SEED_IDS } from 'src/engine/workspace-manager/dev-seeder/core/constants/message-folder-seed-ids.constant';
import { CONNECTED_ACCOUNT_DATA_SEED_IDS } from 'src/engine/workspace-manager/dev-seeder/data/constants/connected-account-data-seeds.constant';
import { MESSAGE_CHANNEL_DATA_SEED_IDS } from 'src/engine/workspace-manager/dev-seeder/data/constants/message-channel-data-seeds.constant';
import { MESSAGE_FOLDER_DATA_SEED_IDS } from 'src/engine/workspace-manager/dev-seeder/data/constants/message-folder-data-seeds.constant';
type SeedMetadataEntitiesArgs = {
queryRunner: QueryRunner;
@@ -40,7 +40,7 @@ const YC_MESSAGE_CHANNEL_IDS = {
JANE: '30303030-8c4d-4e71-a672-2e6a8c9f1b3d',
SUPPORT: '30303030-e2f1-49b5-85d2-5d3a3386990d',
SALES: '30303030-e2f1-49b5-85d2-5d3a3386990e',
};
} as const;
const YC_CALENDAR_CHANNEL_IDS = {
TIM: '30303030-a40f-4faf-bb9f-c6f9945b8203',
@@ -49,7 +49,7 @@ const YC_CALENDAR_CHANNEL_IDS = {
JANE: '30303030-a40f-4faf-bb9f-c6f9945b8208',
COMPANY_MAIN: '30303030-a40f-4faf-bb9f-c6f9945b8206',
TEAM_CALENDAR: '30303030-a40f-4faf-bb9f-c6f9945b8207',
};
} as const;
const YC_MESSAGE_FOLDER_IDS = {
TIM_INBOX: '30303030-1234-4567-8901-abcdef012345',
@@ -57,22 +57,9 @@ const YC_MESSAGE_FOLDER_IDS = {
JONY_INBOX: '30303030-1234-4567-8901-abcdef012346',
JANE_INBOX: '30303030-1234-4567-8901-abcdef012347',
JANE_SENT: '30303030-1234-4567-8901-abcdef012348',
};
} as const;
type WorkspaceSeedIds = {
userWorkspaceIds: {
TIM: string;
JONY: string;
PHIL: string;
JANE: string;
};
connectedAccountIds: typeof CONNECTED_ACCOUNT_DATA_SEED_IDS;
messageChannelIds: typeof MESSAGE_CHANNEL_DATA_SEED_IDS;
calendarChannelIds: typeof CALENDAR_CHANNEL_DATA_SEED_IDS;
messageFolderIds: typeof MESSAGE_FOLDER_DATA_SEED_IDS;
};
const getSeedIds = (workspaceId: string): WorkspaceSeedIds => {
const getSeedIds = (workspaceId: string) => {
if (workspaceId === SEED_YCOMBINATOR_WORKSPACE_ID) {
return {
userWorkspaceIds: {
@@ -1,78 +0,0 @@
import { CalendarChannelVisibility } from 'twenty-shared/types';
type CalendarChannelDataSeed = {
id: string;
handle: string;
visibility: CalendarChannelVisibility;
isContactAutoCreationEnabled: boolean;
isSyncEnabled: boolean;
};
export const CALENDAR_CHANNEL_DATA_SEED_COLUMNS: (keyof CalendarChannelDataSeed)[] =
[
'id',
'handle',
'visibility',
'isContactAutoCreationEnabled',
'isSyncEnabled',
];
const GENERATE_CALENDAR_CHANNEL_IDS = (): Record<string, string> => {
const CHANNEL_IDS: Record<string, string> = {};
CHANNEL_IDS['TIM'] = '20202020-a40f-4faf-bb9f-c6f9945b8203';
CHANNEL_IDS['JONY'] = '20202020-a40f-4faf-bb9f-c6f9945b8204';
CHANNEL_IDS['PHIL'] = '20202020-a40f-4faf-bb9f-c6f9945b8205';
CHANNEL_IDS['JANE'] = '20202020-a40f-4faf-bb9f-c6f9945b8208';
CHANNEL_IDS['COMPANY_MAIN'] = '20202020-a40f-4faf-bb9f-c6f9945b8206';
CHANNEL_IDS['TEAM_CALENDAR'] = '20202020-a40f-4faf-bb9f-c6f9945b8207';
return CHANNEL_IDS;
};
export const CALENDAR_CHANNEL_DATA_SEED_IDS = GENERATE_CALENDAR_CHANNEL_IDS();
export const CALENDAR_CHANNEL_DATA_SEEDS: CalendarChannelDataSeed[] = [
{
id: CALENDAR_CHANNEL_DATA_SEED_IDS.TIM,
handle: 'tim@apple.dev',
visibility: CalendarChannelVisibility.METADATA,
isContactAutoCreationEnabled: true,
isSyncEnabled: false,
},
{
id: CALENDAR_CHANNEL_DATA_SEED_IDS.JONY,
handle: 'jony@apple.dev',
visibility: CalendarChannelVisibility.SHARE_EVERYTHING,
isContactAutoCreationEnabled: true,
isSyncEnabled: false,
},
{
id: CALENDAR_CHANNEL_DATA_SEED_IDS.PHIL,
handle: 'phil@apple.dev',
visibility: CalendarChannelVisibility.METADATA,
isContactAutoCreationEnabled: true,
isSyncEnabled: false,
},
{
id: CALENDAR_CHANNEL_DATA_SEED_IDS.JANE,
handle: 'jane.austen@apple.dev',
visibility: CalendarChannelVisibility.SHARE_EVERYTHING,
isContactAutoCreationEnabled: true,
isSyncEnabled: false,
},
{
id: CALENDAR_CHANNEL_DATA_SEED_IDS.COMPANY_MAIN,
handle: 'company-main@apple.dev',
visibility: CalendarChannelVisibility.SHARE_EVERYTHING,
isContactAutoCreationEnabled: true,
isSyncEnabled: false,
},
{
id: CALENDAR_CHANNEL_DATA_SEED_IDS.TEAM_CALENDAR,
handle: 'team-calendar@apple.dev',
visibility: CalendarChannelVisibility.SHARE_EVERYTHING,
isContactAutoCreationEnabled: true,
isSyncEnabled: false,
},
];
@@ -1,4 +1,4 @@
import { CALENDAR_CHANNEL_DATA_SEED_IDS } from 'src/engine/workspace-manager/dev-seeder/data/constants/calendar-channel-data-seeds.constant';
import { CALENDAR_CHANNEL_DATA_SEED_IDS } from 'src/engine/workspace-manager/dev-seeder/core/constants/calendar-channel-seed-ids.constant';
import { CALENDAR_EVENT_DATA_SEED_IDS } from 'src/engine/workspace-manager/dev-seeder/data/constants/calendar-event-data-seeds.constant';
type CalendarChannelEventAssociationDataSeed = {
@@ -1,122 +0,0 @@
import {
MessageChannelSyncStage,
MessageChannelType,
MessageChannelVisibility,
} from 'twenty-shared/types';
type MessageChannelDataSeed = {
id: string;
createdAt: Date;
updatedAt: Date;
deletedAt: Date | null;
isContactAutoCreationEnabled: boolean;
type: MessageChannelType;
handle: string;
isSyncEnabled: boolean;
visibility: MessageChannelVisibility;
syncStage: MessageChannelSyncStage;
};
export const MESSAGE_CHANNEL_DATA_SEED_COLUMNS: (keyof MessageChannelDataSeed)[] =
[
'id',
'createdAt',
'updatedAt',
'deletedAt',
'isContactAutoCreationEnabled',
'type',
'handle',
'isSyncEnabled',
'visibility',
'syncStage',
];
const GENERATE_MESSAGE_CHANNEL_IDS = (): Record<string, string> => {
const CHANNEL_IDS: Record<string, string> = {};
CHANNEL_IDS['TIM'] = '20202020-9b80-4c2c-a597-383db48de1d6';
CHANNEL_IDS['JONY'] = '20202020-5ffe-4b32-814a-983d5e4911cd';
CHANNEL_IDS['PHIL'] = '20202020-e2f1-49b5-85d2-5d3a3386990c';
CHANNEL_IDS['JANE'] = '20202020-8c4d-4e71-a672-2e6a8c9f1b3d';
CHANNEL_IDS['SUPPORT'] = '20202020-e2f1-49b5-85d2-5d3a3386990d';
CHANNEL_IDS['SALES'] = '20202020-e2f1-49b5-85d2-5d3a3386990e';
return CHANNEL_IDS;
};
export const MESSAGE_CHANNEL_DATA_SEED_IDS = GENERATE_MESSAGE_CHANNEL_IDS();
export const MESSAGE_CHANNEL_DATA_SEEDS: MessageChannelDataSeed[] = [
{
id: MESSAGE_CHANNEL_DATA_SEED_IDS.TIM,
createdAt: new Date(),
updatedAt: new Date(),
deletedAt: null,
isContactAutoCreationEnabled: true,
type: MessageChannelType.EMAIL,
handle: 'tim@apple.dev',
isSyncEnabled: false,
visibility: MessageChannelVisibility.SHARE_EVERYTHING,
syncStage: MessageChannelSyncStage.MESSAGE_LIST_FETCH_PENDING,
},
{
id: MESSAGE_CHANNEL_DATA_SEED_IDS.JONY,
createdAt: new Date(),
updatedAt: new Date(),
deletedAt: null,
isContactAutoCreationEnabled: true,
type: MessageChannelType.EMAIL,
handle: 'jony.ive@apple.dev',
isSyncEnabled: false,
visibility: MessageChannelVisibility.SHARE_EVERYTHING,
syncStage: MessageChannelSyncStage.MESSAGE_LIST_FETCH_PENDING,
},
{
id: MESSAGE_CHANNEL_DATA_SEED_IDS.PHIL,
createdAt: new Date(),
updatedAt: new Date(),
deletedAt: null,
isContactAutoCreationEnabled: true,
type: MessageChannelType.EMAIL,
handle: 'phil.schiler@apple.dev',
isSyncEnabled: false,
visibility: MessageChannelVisibility.SHARE_EVERYTHING,
syncStage: MessageChannelSyncStage.MESSAGE_LIST_FETCH_PENDING,
},
{
id: MESSAGE_CHANNEL_DATA_SEED_IDS.JANE,
createdAt: new Date(),
updatedAt: new Date(),
deletedAt: null,
isContactAutoCreationEnabled: true,
type: MessageChannelType.EMAIL,
handle: 'jane.austen@apple.dev',
isSyncEnabled: false,
visibility: MessageChannelVisibility.SHARE_EVERYTHING,
syncStage: MessageChannelSyncStage.MESSAGE_LIST_FETCH_PENDING,
},
{
id: MESSAGE_CHANNEL_DATA_SEED_IDS.SUPPORT,
createdAt: new Date(),
updatedAt: new Date(),
deletedAt: null,
isContactAutoCreationEnabled: true,
type: MessageChannelType.EMAIL,
handle: 'support@apple.dev',
isSyncEnabled: false,
visibility: MessageChannelVisibility.SHARE_EVERYTHING,
syncStage: MessageChannelSyncStage.MESSAGE_LIST_FETCH_PENDING,
},
{
id: MESSAGE_CHANNEL_DATA_SEED_IDS.SALES,
createdAt: new Date(),
updatedAt: new Date(),
deletedAt: null,
isContactAutoCreationEnabled: true,
type: MessageChannelType.EMAIL,
handle: 'sales@apple.dev',
isSyncEnabled: false,
visibility: MessageChannelVisibility.SHARE_EVERYTHING,
syncStage: MessageChannelSyncStage.MESSAGE_LIST_FETCH_PENDING,
},
];
@@ -1,4 +1,4 @@
import { MESSAGE_CHANNEL_DATA_SEED_IDS } from 'src/engine/workspace-manager/dev-seeder/data/constants/message-channel-data-seeds.constant';
import { MESSAGE_CHANNEL_DATA_SEED_IDS } from 'src/engine/workspace-manager/dev-seeder/core/constants/message-channel-seed-ids.constant';
import { MESSAGE_DATA_SEED_IDS } from 'src/engine/workspace-manager/dev-seeder/data/constants/message-data-seeds.constant';
import { MessageDirection } from 'src/modules/messaging/common/enums/message-direction.enum';
@@ -1,94 +0,0 @@
import { MessageFolderPendingSyncAction } from 'twenty-shared/types';
import { MESSAGE_CHANNEL_DATA_SEED_IDS } from 'src/engine/workspace-manager/dev-seeder/data/constants/message-channel-data-seeds.constant';
type MessageFolderDataSeed = {
id: string;
createdAt: Date;
updatedAt: Date;
deletedAt: Date | null;
name: string;
isSynced: boolean;
isSentFolder: boolean;
messageChannelId: string;
pendingSyncAction: MessageFolderPendingSyncAction;
};
export const MESSAGE_FOLDER_DATA_SEED_COLUMNS: (keyof MessageFolderDataSeed)[] =
[
'id',
'createdAt',
'updatedAt',
'deletedAt',
'name',
'isSynced',
'isSentFolder',
'messageChannelId',
'pendingSyncAction',
];
export const MESSAGE_FOLDER_DATA_SEED_IDS = {
TIM_INBOX: '20202020-f1a2-4b3c-8d4e-5f6a7b8c9d0e',
TIM_SENT: '20202020-f1a2-4b3c-8d4e-5f6a7b8c9d1e',
JONY_INBOX: '20202020-f1a2-4b3c-8d4e-5f6a7b8c9d2e',
JANE_INBOX: '20202020-f1a2-4b3c-8d4e-5f6a7b8c9d3e',
JANE_SENT: '20202020-f1a2-4b3c-8d4e-5f6a7b8c9d4e',
};
export const MESSAGE_FOLDER_DATA_SEEDS: MessageFolderDataSeed[] = [
{
id: MESSAGE_FOLDER_DATA_SEED_IDS.TIM_INBOX,
createdAt: new Date(),
updatedAt: new Date(),
deletedAt: null,
name: 'INBOX',
isSynced: true,
isSentFolder: false,
messageChannelId: MESSAGE_CHANNEL_DATA_SEED_IDS.TIM,
pendingSyncAction: MessageFolderPendingSyncAction.NONE,
},
{
id: MESSAGE_FOLDER_DATA_SEED_IDS.TIM_SENT,
createdAt: new Date(),
updatedAt: new Date(),
deletedAt: null,
name: 'Sent',
isSynced: true,
isSentFolder: true,
messageChannelId: MESSAGE_CHANNEL_DATA_SEED_IDS.TIM,
pendingSyncAction: MessageFolderPendingSyncAction.NONE,
},
{
id: MESSAGE_FOLDER_DATA_SEED_IDS.JONY_INBOX,
createdAt: new Date(),
updatedAt: new Date(),
deletedAt: null,
name: 'INBOX',
isSynced: true,
isSentFolder: false,
messageChannelId: MESSAGE_CHANNEL_DATA_SEED_IDS.JONY,
pendingSyncAction: MessageFolderPendingSyncAction.NONE,
},
{
id: MESSAGE_FOLDER_DATA_SEED_IDS.JANE_INBOX,
createdAt: new Date(),
updatedAt: new Date(),
deletedAt: null,
name: 'INBOX',
isSynced: true,
isSentFolder: false,
messageChannelId: MESSAGE_CHANNEL_DATA_SEED_IDS.JANE,
pendingSyncAction: MessageFolderPendingSyncAction.NONE,
},
{
id: MESSAGE_FOLDER_DATA_SEED_IDS.JANE_SENT,
createdAt: new Date(),
updatedAt: new Date(),
deletedAt: null,
name: 'Sent',
isSynced: true,
isSentFolder: true,
messageChannelId: MESSAGE_CHANNEL_DATA_SEED_IDS.JANE,
pendingSyncAction: MessageFolderPendingSyncAction.NONE,
},
];
@@ -45,10 +45,6 @@ import {
EMPLOYMENT_HISTORY_DATA_SEED_COLUMNS,
EMPLOYMENT_HISTORY_DATA_SEEDS,
} from 'src/engine/workspace-manager/dev-seeder/data/constants/employment-history-data-seeds.constant';
import {
MESSAGE_CHANNEL_DATA_SEED_COLUMNS,
MESSAGE_CHANNEL_DATA_SEEDS,
} from 'src/engine/workspace-manager/dev-seeder/data/constants/message-channel-data-seeds.constant';
import {
MESSAGE_CHANNEL_MESSAGE_ASSOCIATION_DATA_SEED_COLUMNS,
MESSAGE_CHANNEL_MESSAGE_ASSOCIATION_DATA_SEEDS,
@@ -173,11 +169,6 @@ const getRecordSeedsBatches = (
pgColumns: PET_DATA_SEED_COLUMNS,
recordSeeds: PET_DATA_SEEDS,
},
{
tableName: 'messageChannel',
pgColumns: MESSAGE_CHANNEL_DATA_SEED_COLUMNS,
recordSeeds: MESSAGE_CHANNEL_DATA_SEEDS,
},
];
// Batch 4: Depends on person/company/messageChannel or independent
@@ -1,14 +1,11 @@
import {
STANDARD_BLOCKLIST_PAGE_LAYOUT_CONFIG,
STANDARD_CALENDAR_CHANNEL_EVENT_ASSOCIATION_PAGE_LAYOUT_CONFIG,
STANDARD_CALENDAR_CHANNEL_PAGE_LAYOUT_CONFIG,
STANDARD_CALENDAR_EVENT_PARTICIPANT_PAGE_LAYOUT_CONFIG,
STANDARD_COMPANY_PAGE_LAYOUT_CONFIG,
STANDARD_DASHBOARD_PAGE_LAYOUT_CONFIG,
STANDARD_MESSAGE_CHANNEL_MESSAGE_ASSOCIATION_MESSAGE_FOLDER_PAGE_LAYOUT_CONFIG,
STANDARD_MESSAGE_CHANNEL_MESSAGE_ASSOCIATION_PAGE_LAYOUT_CONFIG,
STANDARD_MESSAGE_CHANNEL_PAGE_LAYOUT_CONFIG,
STANDARD_MESSAGE_FOLDER_PAGE_LAYOUT_CONFIG,
STANDARD_MESSAGE_PARTICIPANT_PAGE_LAYOUT_CONFIG,
STANDARD_MESSAGE_THREAD_PAGE_LAYOUT_CONFIG,
STANDARD_NOTE_PAGE_LAYOUT_CONFIG,
@@ -25,18 +22,15 @@ import { type StandardRecordPageLayouts } from 'src/engine/workspace-manager/twe
export const STANDARD_PAGE_LAYOUTS = {
myFirstDashboard: STANDARD_DASHBOARD_PAGE_LAYOUT_CONFIG,
blocklistRecordPage: STANDARD_BLOCKLIST_PAGE_LAYOUT_CONFIG,
calendarChannelRecordPage: STANDARD_CALENDAR_CHANNEL_PAGE_LAYOUT_CONFIG,
calendarChannelEventAssociationRecordPage:
STANDARD_CALENDAR_CHANNEL_EVENT_ASSOCIATION_PAGE_LAYOUT_CONFIG,
calendarEventParticipantRecordPage:
STANDARD_CALENDAR_EVENT_PARTICIPANT_PAGE_LAYOUT_CONFIG,
companyRecordPage: STANDARD_COMPANY_PAGE_LAYOUT_CONFIG,
messageChannelRecordPage: STANDARD_MESSAGE_CHANNEL_PAGE_LAYOUT_CONFIG,
messageChannelMessageAssociationRecordPage:
STANDARD_MESSAGE_CHANNEL_MESSAGE_ASSOCIATION_PAGE_LAYOUT_CONFIG,
messageChannelMessageAssociationMessageFolderRecordPage:
STANDARD_MESSAGE_CHANNEL_MESSAGE_ASSOCIATION_MESSAGE_FOLDER_PAGE_LAYOUT_CONFIG,
messageFolderRecordPage: STANDARD_MESSAGE_FOLDER_PAGE_LAYOUT_CONFIG,
messageParticipantRecordPage: STANDARD_MESSAGE_PARTICIPANT_PAGE_LAYOUT_CONFIG,
messageThreadRecordPage: STANDARD_MESSAGE_THREAD_PAGE_LAYOUT_CONFIG,
noteRecordPage: STANDARD_NOTE_PAGE_LAYOUT_CONFIG,
@@ -24,27 +24,6 @@ exports[`getStandardPageLayoutMetadataRelatedEntityIds should return standard pa
},
},
"calendarChannelEventAssociationRecordPage": {
"id": "00000000-0000-0000-0000-000000000021",
"tabs": {
"home": {
"id": "00000000-0000-0000-0000-000000000022",
"widgets": {
"fields": {
"id": "00000000-0000-0000-0000-000000000023",
},
},
},
"timeline": {
"id": "00000000-0000-0000-0000-000000000024",
"widgets": {
"timeline": {
"id": "00000000-0000-0000-0000-000000000025",
},
},
},
},
},
"calendarChannelRecordPage": {
"id": "00000000-0000-0000-0000-000000000016",
"tabs": {
"home": {
@@ -66,136 +45,94 @@ exports[`getStandardPageLayoutMetadataRelatedEntityIds should return standard pa
},
},
"calendarEventParticipantRecordPage": {
"id": "00000000-0000-0000-0000-000000000026",
"id": "00000000-0000-0000-0000-000000000021",
"tabs": {
"home": {
"id": "00000000-0000-0000-0000-000000000027",
"id": "00000000-0000-0000-0000-000000000022",
"widgets": {
"fields": {
"id": "00000000-0000-0000-0000-000000000028",
"id": "00000000-0000-0000-0000-000000000023",
},
},
},
"timeline": {
"id": "00000000-0000-0000-0000-000000000029",
"id": "00000000-0000-0000-0000-000000000024",
"widgets": {
"timeline": {
"id": "00000000-0000-0000-0000-000000000030",
"id": "00000000-0000-0000-0000-000000000025",
},
},
},
},
},
"companyRecordPage": {
"id": "00000000-0000-0000-0000-000000000031",
"id": "00000000-0000-0000-0000-000000000026",
"tabs": {
"calendar": {
"id": "00000000-0000-0000-0000-000000000046",
"id": "00000000-0000-0000-0000-000000000041",
"widgets": {
"calendar": {
"id": "00000000-0000-0000-0000-000000000047",
"id": "00000000-0000-0000-0000-000000000042",
},
},
},
"emails": {
"id": "00000000-0000-0000-0000-000000000044",
"id": "00000000-0000-0000-0000-000000000039",
"widgets": {
"emails": {
"id": "00000000-0000-0000-0000-000000000045",
"id": "00000000-0000-0000-0000-000000000040",
},
},
},
"files": {
"id": "00000000-0000-0000-0000-000000000042",
"id": "00000000-0000-0000-0000-000000000037",
"widgets": {
"files": {
"id": "00000000-0000-0000-0000-000000000043",
"id": "00000000-0000-0000-0000-000000000038",
},
},
},
"home": {
"id": "00000000-0000-0000-0000-000000000032",
"id": "00000000-0000-0000-0000-000000000027",
"widgets": {
"fields": {
"id": "00000000-0000-0000-0000-000000000033",
"id": "00000000-0000-0000-0000-000000000028",
},
"opportunities": {
"id": "00000000-0000-0000-0000-000000000035",
"id": "00000000-0000-0000-0000-000000000030",
},
"people": {
"id": "00000000-0000-0000-0000-000000000034",
"id": "00000000-0000-0000-0000-000000000029",
},
},
},
"notes": {
"id": "00000000-0000-0000-0000-000000000040",
"id": "00000000-0000-0000-0000-000000000035",
"widgets": {
"notes": {
"id": "00000000-0000-0000-0000-000000000041",
"id": "00000000-0000-0000-0000-000000000036",
},
},
},
"tasks": {
"id": "00000000-0000-0000-0000-000000000038",
"id": "00000000-0000-0000-0000-000000000033",
"widgets": {
"tasks": {
"id": "00000000-0000-0000-0000-000000000039",
"id": "00000000-0000-0000-0000-000000000034",
},
},
},
"timeline": {
"id": "00000000-0000-0000-0000-000000000036",
"id": "00000000-0000-0000-0000-000000000031",
"widgets": {
"timeline": {
"id": "00000000-0000-0000-0000-000000000037",
"id": "00000000-0000-0000-0000-000000000032",
},
},
},
},
},
"messageChannelMessageAssociationMessageFolderRecordPage": {
"id": "00000000-0000-0000-0000-000000000058",
"tabs": {
"home": {
"id": "00000000-0000-0000-0000-000000000059",
"widgets": {
"fields": {
"id": "00000000-0000-0000-0000-000000000060",
},
},
},
"timeline": {
"id": "00000000-0000-0000-0000-000000000061",
"widgets": {
"timeline": {
"id": "00000000-0000-0000-0000-000000000062",
},
},
},
},
},
"messageChannelMessageAssociationRecordPage": {
"id": "00000000-0000-0000-0000-000000000053",
"tabs": {
"home": {
"id": "00000000-0000-0000-0000-000000000054",
"widgets": {
"fields": {
"id": "00000000-0000-0000-0000-000000000055",
},
},
},
"timeline": {
"id": "00000000-0000-0000-0000-000000000056",
"widgets": {
"timeline": {
"id": "00000000-0000-0000-0000-000000000057",
},
},
},
},
},
"messageChannelRecordPage": {
"id": "00000000-0000-0000-0000-000000000048",
"tabs": {
"home": {
@@ -216,56 +153,56 @@ exports[`getStandardPageLayoutMetadataRelatedEntityIds should return standard pa
},
},
},
"messageFolderRecordPage": {
"id": "00000000-0000-0000-0000-000000000063",
"messageChannelMessageAssociationRecordPage": {
"id": "00000000-0000-0000-0000-000000000043",
"tabs": {
"home": {
"id": "00000000-0000-0000-0000-000000000064",
"id": "00000000-0000-0000-0000-000000000044",
"widgets": {
"fields": {
"id": "00000000-0000-0000-0000-000000000065",
"id": "00000000-0000-0000-0000-000000000045",
},
},
},
"timeline": {
"id": "00000000-0000-0000-0000-000000000066",
"id": "00000000-0000-0000-0000-000000000046",
"widgets": {
"timeline": {
"id": "00000000-0000-0000-0000-000000000067",
"id": "00000000-0000-0000-0000-000000000047",
},
},
},
},
},
"messageParticipantRecordPage": {
"id": "00000000-0000-0000-0000-000000000068",
"id": "00000000-0000-0000-0000-000000000053",
"tabs": {
"home": {
"id": "00000000-0000-0000-0000-000000000069",
"id": "00000000-0000-0000-0000-000000000054",
"widgets": {
"fields": {
"id": "00000000-0000-0000-0000-000000000070",
"id": "00000000-0000-0000-0000-000000000055",
},
},
},
"timeline": {
"id": "00000000-0000-0000-0000-000000000071",
"id": "00000000-0000-0000-0000-000000000056",
"widgets": {
"timeline": {
"id": "00000000-0000-0000-0000-000000000072",
"id": "00000000-0000-0000-0000-000000000057",
},
},
},
},
},
"messageThreadRecordPage": {
"id": "00000000-0000-0000-0000-000000000073",
"id": "00000000-0000-0000-0000-000000000058",
"tabs": {
"home": {
"id": "00000000-0000-0000-0000-000000000074",
"id": "00000000-0000-0000-0000-000000000059",
"widgets": {
"emailThread": {
"id": "00000000-0000-0000-0000-000000000075",
"id": "00000000-0000-0000-0000-000000000060",
},
},
},
@@ -306,249 +243,273 @@ exports[`getStandardPageLayoutMetadataRelatedEntityIds should return standard pa
},
},
"noteRecordPage": {
"id": "00000000-0000-0000-0000-000000000076",
"id": "00000000-0000-0000-0000-000000000061",
"tabs": {
"files": {
"id": "00000000-0000-0000-0000-000000000084",
"id": "00000000-0000-0000-0000-000000000069",
"widgets": {
"files": {
"id": "00000000-0000-0000-0000-000000000085",
"id": "00000000-0000-0000-0000-000000000070",
},
},
},
"home": {
"id": "00000000-0000-0000-0000-000000000077",
"id": "00000000-0000-0000-0000-000000000062",
"widgets": {
"fields": {
"id": "00000000-0000-0000-0000-000000000078",
"id": "00000000-0000-0000-0000-000000000063",
},
"noteRichText": {
"id": "00000000-0000-0000-0000-000000000079",
"id": "00000000-0000-0000-0000-000000000064",
},
},
},
"note": {
"id": "00000000-0000-0000-0000-000000000080",
"id": "00000000-0000-0000-0000-000000000065",
"widgets": {
"noteRichText": {
"id": "00000000-0000-0000-0000-000000000081",
"id": "00000000-0000-0000-0000-000000000066",
},
},
},
"timeline": {
"id": "00000000-0000-0000-0000-000000000082",
"id": "00000000-0000-0000-0000-000000000067",
"widgets": {
"timeline": {
"id": "00000000-0000-0000-0000-000000000083",
"id": "00000000-0000-0000-0000-000000000068",
},
},
},
},
},
"opportunityRecordPage": {
"id": "00000000-0000-0000-0000-000000000086",
"id": "00000000-0000-0000-0000-000000000071",
"tabs": {
"calendar": {
"id": "00000000-0000-0000-0000-000000000102",
"id": "00000000-0000-0000-0000-000000000087",
"widgets": {
"calendar": {
"id": "00000000-0000-0000-0000-000000000103",
"id": "00000000-0000-0000-0000-000000000088",
},
},
},
"emails": {
"id": "00000000-0000-0000-0000-000000000100",
"id": "00000000-0000-0000-0000-000000000085",
"widgets": {
"emails": {
"id": "00000000-0000-0000-0000-000000000101",
"id": "00000000-0000-0000-0000-000000000086",
},
},
},
"files": {
"id": "00000000-0000-0000-0000-000000000098",
"id": "00000000-0000-0000-0000-000000000083",
"widgets": {
"files": {
"id": "00000000-0000-0000-0000-000000000099",
"id": "00000000-0000-0000-0000-000000000084",
},
},
},
"home": {
"id": "00000000-0000-0000-0000-000000000087",
"id": "00000000-0000-0000-0000-000000000072",
"widgets": {
"company": {
"id": "00000000-0000-0000-0000-000000000090",
"id": "00000000-0000-0000-0000-000000000075",
},
"fields": {
"id": "00000000-0000-0000-0000-000000000088",
"id": "00000000-0000-0000-0000-000000000073",
},
"owner": {
"id": "00000000-0000-0000-0000-000000000091",
"id": "00000000-0000-0000-0000-000000000076",
},
"pointOfContact": {
"id": "00000000-0000-0000-0000-000000000089",
"id": "00000000-0000-0000-0000-000000000074",
},
},
},
"notes": {
"id": "00000000-0000-0000-0000-000000000096",
"id": "00000000-0000-0000-0000-000000000081",
"widgets": {
"notes": {
"id": "00000000-0000-0000-0000-000000000097",
"id": "00000000-0000-0000-0000-000000000082",
},
},
},
"tasks": {
"id": "00000000-0000-0000-0000-000000000094",
"id": "00000000-0000-0000-0000-000000000079",
"widgets": {
"tasks": {
"id": "00000000-0000-0000-0000-000000000095",
"id": "00000000-0000-0000-0000-000000000080",
},
},
},
"timeline": {
"id": "00000000-0000-0000-0000-000000000092",
"id": "00000000-0000-0000-0000-000000000077",
"widgets": {
"timeline": {
"id": "00000000-0000-0000-0000-000000000093",
"id": "00000000-0000-0000-0000-000000000078",
},
},
},
},
},
"personRecordPage": {
"id": "00000000-0000-0000-0000-000000000104",
"id": "00000000-0000-0000-0000-000000000089",
"tabs": {
"calendar": {
"id": "00000000-0000-0000-0000-000000000119",
"id": "00000000-0000-0000-0000-000000000104",
"widgets": {
"calendar": {
"id": "00000000-0000-0000-0000-000000000120",
"id": "00000000-0000-0000-0000-000000000105",
},
},
},
"emails": {
"id": "00000000-0000-0000-0000-000000000117",
"id": "00000000-0000-0000-0000-000000000102",
"widgets": {
"emails": {
"id": "00000000-0000-0000-0000-000000000118",
"id": "00000000-0000-0000-0000-000000000103",
},
},
},
"files": {
"id": "00000000-0000-0000-0000-000000000115",
"id": "00000000-0000-0000-0000-000000000100",
"widgets": {
"files": {
"id": "00000000-0000-0000-0000-000000000116",
"id": "00000000-0000-0000-0000-000000000101",
},
},
},
"home": {
"id": "00000000-0000-0000-0000-000000000105",
"id": "00000000-0000-0000-0000-000000000090",
"widgets": {
"company": {
"id": "00000000-0000-0000-0000-000000000107",
"id": "00000000-0000-0000-0000-000000000092",
},
"fields": {
"id": "00000000-0000-0000-0000-000000000106",
"id": "00000000-0000-0000-0000-000000000091",
},
"pointOfContactForOpportunities": {
"id": "00000000-0000-0000-0000-000000000108",
"id": "00000000-0000-0000-0000-000000000093",
},
},
},
"notes": {
"id": "00000000-0000-0000-0000-000000000113",
"id": "00000000-0000-0000-0000-000000000098",
"widgets": {
"notes": {
"id": "00000000-0000-0000-0000-000000000114",
"id": "00000000-0000-0000-0000-000000000099",
},
},
},
"tasks": {
"id": "00000000-0000-0000-0000-000000000111",
"id": "00000000-0000-0000-0000-000000000096",
"widgets": {
"tasks": {
"id": "00000000-0000-0000-0000-000000000112",
"id": "00000000-0000-0000-0000-000000000097",
},
},
},
"timeline": {
"id": "00000000-0000-0000-0000-000000000109",
"id": "00000000-0000-0000-0000-000000000094",
"widgets": {
"timeline": {
"id": "00000000-0000-0000-0000-000000000110",
"id": "00000000-0000-0000-0000-000000000095",
},
},
},
},
},
"taskRecordPage": {
"id": "00000000-0000-0000-0000-000000000121",
"id": "00000000-0000-0000-0000-000000000106",
"tabs": {
"files": {
"id": "00000000-0000-0000-0000-000000000129",
"id": "00000000-0000-0000-0000-000000000114",
"widgets": {
"files": {
"id": "00000000-0000-0000-0000-000000000130",
"id": "00000000-0000-0000-0000-000000000115",
},
},
},
"home": {
"id": "00000000-0000-0000-0000-000000000122",
"id": "00000000-0000-0000-0000-000000000107",
"widgets": {
"fields": {
"id": "00000000-0000-0000-0000-000000000123",
"id": "00000000-0000-0000-0000-000000000108",
},
"taskRichText": {
"id": "00000000-0000-0000-0000-000000000124",
"id": "00000000-0000-0000-0000-000000000109",
},
},
},
"note": {
"id": "00000000-0000-0000-0000-000000000125",
"id": "00000000-0000-0000-0000-000000000110",
"widgets": {
"taskRichText": {
"id": "00000000-0000-0000-0000-000000000126",
"id": "00000000-0000-0000-0000-000000000111",
},
},
},
"timeline": {
"id": "00000000-0000-0000-0000-000000000127",
"id": "00000000-0000-0000-0000-000000000112",
"widgets": {
"timeline": {
"id": "00000000-0000-0000-0000-000000000128",
"id": "00000000-0000-0000-0000-000000000113",
},
},
},
},
},
"workflowAutomatedTriggerRecordPage": {
"id": "00000000-0000-0000-0000-000000000134",
"id": "00000000-0000-0000-0000-000000000119",
"tabs": {
"home": {
"id": "00000000-0000-0000-0000-000000000135",
"id": "00000000-0000-0000-0000-000000000120",
"widgets": {
"fields": {
"id": "00000000-0000-0000-0000-000000000136",
"id": "00000000-0000-0000-0000-000000000121",
},
},
},
"timeline": {
"id": "00000000-0000-0000-0000-000000000137",
"id": "00000000-0000-0000-0000-000000000122",
"widgets": {
"timeline": {
"id": "00000000-0000-0000-0000-000000000138",
"id": "00000000-0000-0000-0000-000000000123",
},
},
},
},
},
"workflowRecordPage": {
"id": "00000000-0000-0000-0000-000000000131",
"id": "00000000-0000-0000-0000-000000000116",
"tabs": {
"flow": {
"id": "00000000-0000-0000-0000-000000000132",
"id": "00000000-0000-0000-0000-000000000117",
"widgets": {
"workflow": {
"id": "00000000-0000-0000-0000-000000000118",
},
},
},
},
},
"workflowRunRecordPage": {
"id": "00000000-0000-0000-0000-000000000130",
"tabs": {
"flow": {
"id": "00000000-0000-0000-0000-000000000134",
"widgets": {
"workflowRun": {
"id": "00000000-0000-0000-0000-000000000135",
},
},
},
"home": {
"id": "00000000-0000-0000-0000-000000000131",
"widgets": {
"fields": {
"id": "00000000-0000-0000-0000-000000000132",
},
"workflow": {
"id": "00000000-0000-0000-0000-000000000133",
},
@@ -556,49 +517,25 @@ exports[`getStandardPageLayoutMetadataRelatedEntityIds should return standard pa
},
},
},
"workflowRunRecordPage": {
"id": "00000000-0000-0000-0000-000000000145",
"tabs": {
"flow": {
"id": "00000000-0000-0000-0000-000000000149",
"widgets": {
"workflowRun": {
"id": "00000000-0000-0000-0000-000000000150",
},
},
},
"home": {
"id": "00000000-0000-0000-0000-000000000146",
"widgets": {
"fields": {
"id": "00000000-0000-0000-0000-000000000147",
},
"workflow": {
"id": "00000000-0000-0000-0000-000000000148",
},
},
},
},
},
"workflowVersionRecordPage": {
"id": "00000000-0000-0000-0000-000000000139",
"id": "00000000-0000-0000-0000-000000000124",
"tabs": {
"flow": {
"id": "00000000-0000-0000-0000-000000000143",
"id": "00000000-0000-0000-0000-000000000128",
"widgets": {
"workflowVersion": {
"id": "00000000-0000-0000-0000-000000000144",
"id": "00000000-0000-0000-0000-000000000129",
},
},
},
"home": {
"id": "00000000-0000-0000-0000-000000000140",
"id": "00000000-0000-0000-0000-000000000125",
"widgets": {
"fields": {
"id": "00000000-0000-0000-0000-000000000141",
"id": "00000000-0000-0000-0000-000000000126",
},
"workflow": {
"id": "00000000-0000-0000-0000-000000000142",
"id": "00000000-0000-0000-0000-000000000127",
},
},
},
@@ -8,15 +8,12 @@ import { type AllStandardObjectName } from 'src/engine/workspace-manager/twenty-
import { buildAttachmentStandardFlatFieldMetadatas } from 'src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/compute-attachment-standard-flat-field-metadata.util';
import { buildBlocklistStandardFlatFieldMetadatas } from 'src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/compute-blocklist-standard-flat-field-metadata.util';
import { buildCalendarChannelEventAssociationStandardFlatFieldMetadatas } from 'src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/compute-calendar-channel-event-association-standard-flat-field-metadata.util';
import { buildCalendarChannelStandardFlatFieldMetadatas } from 'src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/compute-calendar-channel-standard-flat-field-metadata.util';
import { buildCalendarEventParticipantStandardFlatFieldMetadatas } from 'src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/compute-calendar-event-participant-standard-flat-field-metadata.util';
import { buildCalendarEventStandardFlatFieldMetadatas } from 'src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/compute-calendar-event-standard-flat-field-metadata.util';
import { buildCompanyStandardFlatFieldMetadatas } from 'src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/compute-company-standard-flat-field-metadata.util';
import { buildDashboardStandardFlatFieldMetadatas } from 'src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/compute-dashboard-standard-flat-field-metadata.util';
import { buildMessageChannelMessageAssociationMessageFolderStandardFlatFieldMetadatas } from 'src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/compute-message-channel-message-association-message-folder-standard-flat-field-metadata.util';
import { buildMessageChannelStandardFlatFieldMetadatas } from 'src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/compute-message-channel-standard-flat-field-metadata.util';
import { buildMessageChannelMessageAssociationStandardFlatFieldMetadatas } from 'src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/compute-message-channel-message-association-standard-flat-field-metadata.util';
import { buildMessageFolderStandardFlatFieldMetadatas } from 'src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/compute-message-folder-standard-flat-field-metadata.util';
import { buildMessageParticipantStandardFlatFieldMetadatas } from 'src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/compute-message-participant-standard-flat-field-metadata.util';
import { buildMessageStandardFlatFieldMetadatas } from 'src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/compute-message-standard-flat-field-metadata.util';
import { buildMessageThreadStandardFlatFieldMetadatas } from 'src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/compute-message-thread-standard-flat-field-metadata.util';
@@ -41,7 +38,6 @@ type StandardFieldBuilder<P extends AllStandardObjectName> = (
const STANDARD_FLAT_FIELD_METADATA_BUILDERS_BY_OBJECT_NAME = {
attachment: buildAttachmentStandardFlatFieldMetadatas,
blocklist: buildBlocklistStandardFlatFieldMetadatas,
calendarChannel: buildCalendarChannelStandardFlatFieldMetadatas,
calendarChannelEventAssociation:
buildCalendarChannelEventAssociationStandardFlatFieldMetadatas,
calendarEventParticipant:
@@ -50,12 +46,10 @@ const STANDARD_FLAT_FIELD_METADATA_BUILDERS_BY_OBJECT_NAME = {
company: buildCompanyStandardFlatFieldMetadatas,
dashboard: buildDashboardStandardFlatFieldMetadatas,
message: buildMessageStandardFlatFieldMetadatas,
messageChannel: buildMessageChannelStandardFlatFieldMetadatas,
messageChannelMessageAssociation:
buildMessageChannelMessageAssociationStandardFlatFieldMetadatas,
messageChannelMessageAssociationMessageFolder:
buildMessageChannelMessageAssociationMessageFolderStandardFlatFieldMetadatas,
messageFolder: buildMessageFolderStandardFlatFieldMetadatas,
messageParticipant: buildMessageParticipantStandardFlatFieldMetadatas,
messageThread: buildMessageThreadStandardFlatFieldMetadatas,
note: buildNoteStandardFlatFieldMetadatas,
@@ -1,533 +0,0 @@
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';
import { getTsVectorColumnExpressionFromFields } from 'src/engine/workspace-manager/utils/get-ts-vector-column-expression.util';
import { SEARCH_FIELDS_FOR_CALENDAR_CHANNEL } from 'src/modules/calendar/common/standard-objects/calendar-channel.workspace-entity';
export const buildCalendarChannelStandardFlatFieldMetadatas = ({
now,
objectName,
workspaceId,
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
}: Omit<
CreateStandardFieldArgs<'calendarChannel', FieldMetadataType>,
'context'
>): Record<
AllStandardObjectFieldName<'calendarChannel'>,
FlatFieldMetadata
> => ({
id: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'id',
type: FieldMetadataType.UUID,
label: i18nLabel(msg`Id`),
description: i18nLabel(msg`Id`),
icon: 'Icon123',
isSystem: true,
isNullable: false,
isUIReadOnly: true,
defaultValue: 'uuid',
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
createdAt: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'createdAt',
type: FieldMetadataType.DATE_TIME,
label: i18nLabel(msg`Creation date`),
description: i18nLabel(msg`Creation date`),
icon: 'IconCalendar',
isSystem: true,
isNullable: false,
isUIReadOnly: true,
defaultValue: 'now',
settings: { displayFormat: DateDisplayFormat.RELATIVE },
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
updatedAt: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'updatedAt',
type: FieldMetadataType.DATE_TIME,
label: i18nLabel(msg`Last update`),
description: i18nLabel(msg`Last time the record was changed`),
icon: 'IconCalendarClock',
isSystem: true,
isNullable: false,
isUIReadOnly: true,
defaultValue: 'now',
settings: { displayFormat: DateDisplayFormat.RELATIVE },
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
deletedAt: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'deletedAt',
type: FieldMetadataType.DATE_TIME,
label: i18nLabel(msg`Deleted at`),
description: i18nLabel(msg`Date when the record was deleted`),
icon: 'IconCalendarMinus',
isSystem: true,
isNullable: true,
isUIReadOnly: true,
settings: { displayFormat: DateDisplayFormat.RELATIVE },
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
createdBy: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'createdBy',
type: FieldMetadataType.ACTOR,
label: i18nLabel(msg`Created by`),
description: i18nLabel(msg`The creator of the record`),
icon: 'IconCreativeCommonsSa',
isSystem: true,
isUIReadOnly: true,
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`Updated by`),
description: i18nLabel(
msg`The workspace member who last updated the record`,
),
icon: 'IconUserCircle',
isSystem: true,
isUIReadOnly: true,
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`Position`),
description: i18nLabel(msg`Calendar channel record position`),
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`Search vector`),
description: i18nLabel(msg`Field used for full-text search`),
icon: 'IconUser',
isSystem: true,
isNullable: true,
settings: {
generatedType: 'STORED',
asExpression: getTsVectorColumnExpressionFromFields(
SEARCH_FIELDS_FOR_CALENDAR_CHANNEL,
),
},
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
handle: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'handle',
type: FieldMetadataType.TEXT,
label: i18nLabel(msg`Handle`),
description: i18nLabel(msg`Handle`),
icon: 'IconAt',
isNullable: true,
isUIReadOnly: true,
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
visibility: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'visibility',
type: FieldMetadataType.SELECT,
label: i18nLabel(msg`Visibility`),
description: i18nLabel(msg`Visibility`),
icon: 'IconEyeglass',
isNullable: false,
isUIReadOnly: true,
defaultValue: "'SHARE_EVERYTHING'",
options: [
{
id: '20202020-82a0-4859-b356-f5a1d6e3e53d',
value: 'METADATA',
label: i18nLabel(msg`Metadata`),
position: 0,
color: 'green',
},
{
id: '20202020-e5ec-4df5-ba3f-66ca2a79c283',
value: 'SHARE_EVERYTHING',
label: i18nLabel(msg`Share Everything`),
position: 1,
color: 'orange',
},
],
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
isContactAutoCreationEnabled: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'isContactAutoCreationEnabled',
type: FieldMetadataType.BOOLEAN,
label: i18nLabel(msg`Is Contact Auto Creation Enabled`),
description: i18nLabel(msg`Is Contact Auto Creation Enabled`),
icon: 'IconUserCircle',
isNullable: false,
isUIReadOnly: true,
defaultValue: true,
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
contactAutoCreationPolicy: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'contactAutoCreationPolicy',
type: FieldMetadataType.SELECT,
label: i18nLabel(msg`Contact auto creation policy`),
description: i18nLabel(
msg`Automatically create records for people you participated with in an event.`,
),
icon: 'IconUserCircle',
isNullable: false,
isUIReadOnly: true,
defaultValue: "'AS_PARTICIPANT_AND_ORGANIZER'",
options: [
{
id: '20202020-47c1-4af1-a8a6-540edeafc55e',
value: 'AS_PARTICIPANT_AND_ORGANIZER',
label: i18nLabel(msg`As Participant and Organizer`),
color: 'green',
position: 0,
},
{
id: '20202020-b3cc-4248-b0d1-c8d45c2418b3',
value: 'AS_PARTICIPANT',
label: i18nLabel(msg`As Participant`),
color: 'orange',
position: 1,
},
{
id: '20202020-84ef-4061-9c22-db596e237ddc',
value: 'AS_ORGANIZER',
label: i18nLabel(msg`As Organizer`),
color: 'blue',
position: 2,
},
{
id: '20202020-f170-491f-9597-0e5817e46c17',
value: 'NONE',
label: i18nLabel(msg`None`),
color: 'red',
position: 3,
},
],
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
isSyncEnabled: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'isSyncEnabled',
type: FieldMetadataType.BOOLEAN,
label: i18nLabel(msg`Is Sync Enabled`),
description: i18nLabel(msg`Is Sync Enabled`),
icon: 'IconRefresh',
isNullable: false,
isUIReadOnly: true,
defaultValue: true,
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
syncCursor: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'syncCursor',
type: FieldMetadataType.TEXT,
label: i18nLabel(msg`Sync Cursor`),
description: i18nLabel(
msg`Sync Cursor. Used for syncing events from the calendar provider`,
),
icon: 'IconReload',
isNullable: true,
isUIReadOnly: true,
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
syncStatus: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'syncStatus',
type: FieldMetadataType.SELECT,
label: i18nLabel(msg`Sync status`),
description: i18nLabel(msg`Sync status`),
icon: 'IconStatusChange',
isNullable: true,
isUIReadOnly: true,
options: [
{
id: '20202020-ebdc-4fc8-a5c1-4bc6a90fdc3c',
value: 'ONGOING',
label: i18nLabel(msg`Ongoing`),
position: 1,
color: 'yellow',
},
{
id: '20202020-7126-4c26-9940-f5807ed87266',
value: 'NOT_SYNCED',
label: i18nLabel(msg`Not Synced`),
position: 2,
color: 'blue',
},
{
id: '20202020-0302-4201-bf84-aaa26b7ca94e',
value: 'ACTIVE',
label: i18nLabel(msg`Active`),
position: 3,
color: 'green',
},
{
id: '20202020-6dbb-449d-96b0-092189010f42',
value: 'FAILED_INSUFFICIENT_PERMISSIONS',
label: i18nLabel(msg`Failed Insufficient Permissions`),
position: 4,
color: 'red',
},
{
id: '20202020-935c-4333-a614-f49ee2ec6aa7',
value: 'FAILED_UNKNOWN',
label: i18nLabel(msg`Failed Unknown`),
position: 5,
color: 'red',
},
],
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
syncStage: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'syncStage',
type: FieldMetadataType.SELECT,
label: i18nLabel(msg`Sync stage`),
description: i18nLabel(msg`Sync stage`),
icon: 'IconStatusChange',
isNullable: false,
isUIReadOnly: true,
defaultValue: "'PENDING_CONFIGURATION'",
options: [
{
id: '20202020-60c1-40a3-90ae-61d9ee1083c1',
value: 'CALENDAR_EVENT_LIST_FETCH_PENDING',
label: i18nLabel(msg`Calendar event list fetch pending`),
position: 0,
color: 'blue',
},
{
id: '20202020-8652-444a-b72e-d4b7112179ca',
value: 'CALENDAR_EVENT_LIST_FETCH_SCHEDULED',
label: i18nLabel(msg`Calendar event list fetch scheduled`),
position: 1,
color: 'green',
},
{
id: '20202020-e87c-4cfe-aefc-635ad34ef223',
value: 'CALENDAR_EVENT_LIST_FETCH_ONGOING',
label: i18nLabel(msg`Calendar event list fetch ongoing`),
position: 2,
color: 'orange',
},
{
id: '20202020-876f-449d-9f09-de5c369ff95f',
value: 'CALENDAR_EVENTS_IMPORT_PENDING',
label: i18nLabel(msg`Calendar events import pending`),
position: 3,
color: 'blue',
},
{
id: '20202020-3d2a-4acd-a0ed-197343b3bf60',
value: 'CALENDAR_EVENTS_IMPORT_SCHEDULED',
label: i18nLabel(msg`Calendar events import scheduled`),
position: 4,
color: 'green',
},
{
id: '20202020-e762-4152-bb20-29fdd49e1dff',
value: 'CALENDAR_EVENTS_IMPORT_ONGOING',
label: i18nLabel(msg`Calendar events import ongoing`),
position: 5,
color: 'orange',
},
{
id: '20202020-487c-464f-8caa-c6393b82b17c',
value: 'FAILED',
label: i18nLabel(msg`Failed`),
position: 6,
color: 'red',
},
{
id: '20202020-ba03-4221-b186-402662b68493',
value: 'PENDING_CONFIGURATION',
label: i18nLabel(msg`Pending configuration`),
position: 9,
color: 'gray',
},
],
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
syncStageStartedAt: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'syncStageStartedAt',
type: FieldMetadataType.DATE_TIME,
label: i18nLabel(msg`Sync stage started at`),
description: i18nLabel(msg`Sync stage started at`),
icon: 'IconHistory',
isNullable: true,
isUIReadOnly: true,
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
syncedAt: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'syncedAt',
type: FieldMetadataType.DATE_TIME,
label: i18nLabel(msg`Last sync date`),
description: i18nLabel(msg`Last sync date`),
icon: 'IconHistory',
isNullable: true,
isUIReadOnly: true,
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
throttleFailureCount: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'throttleFailureCount',
type: FieldMetadataType.NUMBER,
label: i18nLabel(msg`Throttle Failure Count`),
description: i18nLabel(msg`Throttle Failure Count`),
icon: 'IconX',
isNullable: false,
isUIReadOnly: true,
defaultValue: 0,
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
});
@@ -1,703 +0,0 @@
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';
import { getTsVectorColumnExpressionFromFields } from 'src/engine/workspace-manager/utils/get-ts-vector-column-expression.util';
import {
MessageChannelType,
SEARCH_FIELDS_FOR_MESSAGE_CHANNEL,
} from 'src/modules/messaging/common/standard-objects/message-channel.workspace-entity';
export const buildMessageChannelStandardFlatFieldMetadatas = ({
now,
objectName,
workspaceId,
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
}: Omit<
CreateStandardFieldArgs<'messageChannel', FieldMetadataType>,
'context'
>): Record<
AllStandardObjectFieldName<'messageChannel'>,
FlatFieldMetadata
> => ({
id: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'id',
type: FieldMetadataType.UUID,
label: i18nLabel(msg`Id`),
description: i18nLabel(msg`Id`),
icon: 'Icon123',
isSystem: true,
isNullable: false,
isUIReadOnly: true,
defaultValue: 'uuid',
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
createdAt: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'createdAt',
type: FieldMetadataType.DATE_TIME,
label: i18nLabel(msg`Creation date`),
description: i18nLabel(msg`Creation date`),
icon: 'IconCalendar',
isSystem: true,
isNullable: false,
isUIReadOnly: true,
defaultValue: 'now',
settings: { displayFormat: DateDisplayFormat.RELATIVE },
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
updatedAt: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'updatedAt',
type: FieldMetadataType.DATE_TIME,
label: i18nLabel(msg`Last update`),
description: i18nLabel(msg`Last time the record was changed`),
icon: 'IconCalendarClock',
isSystem: true,
isNullable: false,
isUIReadOnly: true,
defaultValue: 'now',
settings: { displayFormat: DateDisplayFormat.RELATIVE },
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
deletedAt: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'deletedAt',
type: FieldMetadataType.DATE_TIME,
label: i18nLabel(msg`Deleted at`),
description: i18nLabel(msg`Date when the record was deleted`),
icon: 'IconCalendarMinus',
isSystem: true,
isNullable: true,
isUIReadOnly: true,
settings: { displayFormat: DateDisplayFormat.RELATIVE },
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
createdBy: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'createdBy',
type: FieldMetadataType.ACTOR,
label: i18nLabel(msg`Created by`),
description: i18nLabel(msg`The creator of the record`),
icon: 'IconCreativeCommonsSa',
isSystem: true,
isUIReadOnly: true,
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`Updated by`),
description: i18nLabel(
msg`The workspace member who last updated the record`,
),
icon: 'IconUserCircle',
isSystem: true,
isUIReadOnly: true,
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`Position`),
description: i18nLabel(msg`Message Channel record position`),
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`Search vector`),
description: i18nLabel(msg`Field used for full-text search`),
icon: 'IconUser',
isSystem: true,
isNullable: true,
settings: {
generatedType: 'STORED',
asExpression: getTsVectorColumnExpressionFromFields(
SEARCH_FIELDS_FOR_MESSAGE_CHANNEL,
),
},
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
visibility: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'visibility',
type: FieldMetadataType.SELECT,
label: i18nLabel(msg`Visibility`),
description: i18nLabel(msg`Visibility`),
icon: 'IconEyeglass',
isNullable: false,
isUIReadOnly: true,
defaultValue: "'SHARE_EVERYTHING'",
options: [
{
id: '20202020-4548-4830-b3f8-221fd082ebc0',
value: 'METADATA',
label: i18nLabel(msg`Metadata`),
position: 0,
color: 'green',
},
{
id: '20202020-6a42-40a8-b81e-28b7e591c598',
value: 'SUBJECT',
label: i18nLabel(msg`Subject`),
position: 1,
color: 'blue',
},
{
id: '20202020-d520-4cba-8832-5bca315b64f3',
value: 'SHARE_EVERYTHING',
label: i18nLabel(msg`Share Everything`),
position: 2,
color: 'orange',
},
],
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
handle: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'handle',
type: FieldMetadataType.TEXT,
label: i18nLabel(msg`Handle`),
description: i18nLabel(msg`Handle`),
icon: 'IconAt',
isNullable: true,
isUIReadOnly: true,
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
type: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'type',
type: FieldMetadataType.SELECT,
label: i18nLabel(msg`Type`),
description: i18nLabel(msg`Channel Type`),
icon: 'IconMessage',
isNullable: false,
isUIReadOnly: true,
defaultValue: `'${MessageChannelType.EMAIL}'`,
options: [
{
id: '20202020-1628-4bc0-aae1-1a46c648cf90',
value: MessageChannelType.EMAIL,
label: i18nLabel(msg`Email`),
position: 0,
color: 'green',
},
{
id: '20202020-fb11-4da3-80fd-b291cda8deb1',
value: MessageChannelType.SMS,
label: i18nLabel(msg`SMS`),
position: 1,
color: 'blue',
},
{
id: '20202020-7f22-4e58-aa33-9c3e2c72ab10',
value: MessageChannelType.EMAIL_GROUP,
label: i18nLabel(msg`Email group`),
position: 2,
color: 'turquoise',
},
],
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
isContactAutoCreationEnabled: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'isContactAutoCreationEnabled',
type: FieldMetadataType.BOOLEAN,
label: i18nLabel(msg`Is Contact Auto Creation Enabled`),
description: i18nLabel(msg`Is Contact Auto Creation Enabled`),
icon: 'IconUserCircle',
isNullable: false,
isUIReadOnly: true,
defaultValue: true,
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
contactAutoCreationPolicy: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'contactAutoCreationPolicy',
type: FieldMetadataType.SELECT,
label: i18nLabel(msg`Contact auto creation policy`),
description: i18nLabel(
msg`Automatically create People records when receiving or sending emails`,
),
icon: 'IconUserCircle',
isNullable: false,
isUIReadOnly: true,
defaultValue: "'SENT'",
options: [
{
id: '20202020-1923-4ffd-907d-be8cc37ecee5',
value: 'SENT_AND_RECEIVED',
label: i18nLabel(msg`Sent and Received`),
position: 0,
color: 'green',
},
{
id: '20202020-8f6a-44d8-bdbb-90cf8b919467',
value: 'SENT',
label: i18nLabel(msg`Sent`),
position: 1,
color: 'blue',
},
{
id: '20202020-b43e-4bc4-840e-d903a69e2ffc',
value: 'NONE',
label: i18nLabel(msg`None`),
position: 2,
color: 'red',
},
],
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
messageFolderImportPolicy: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'messageFolderImportPolicy',
type: FieldMetadataType.SELECT,
label: i18nLabel(msg`Message folder import policy`),
description: i18nLabel(msg`Message folder import policy`),
icon: 'IconFolder',
isNullable: false,
isUIReadOnly: true,
defaultValue: "'ALL_FOLDERS'",
options: [
{
id: '20202020-140d-4326-978c-83ca0e9a4d8f',
value: 'ALL_FOLDERS',
label: i18nLabel(msg`All folders`),
position: 0,
color: 'green',
},
{
id: '20202020-513a-4b91-9033-5b74b404e2cb',
value: 'SELECTED_FOLDERS',
label: i18nLabel(msg`Selected folders`),
position: 1,
color: 'blue',
},
],
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
excludeNonProfessionalEmails: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'excludeNonProfessionalEmails',
type: FieldMetadataType.BOOLEAN,
label: i18nLabel(msg`Exclude non professional emails`),
description: i18nLabel(msg`Exclude non professional emails`),
icon: 'IconBriefcase',
isNullable: false,
isUIReadOnly: true,
defaultValue: true,
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
excludeGroupEmails: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'excludeGroupEmails',
type: FieldMetadataType.BOOLEAN,
label: i18nLabel(msg`Exclude group emails`),
description: i18nLabel(msg`Exclude group emails`),
icon: 'IconUsersGroup',
isNullable: false,
isUIReadOnly: true,
defaultValue: true,
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
pendingGroupEmailsAction: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'pendingGroupEmailsAction',
type: FieldMetadataType.SELECT,
label: i18nLabel(msg`Pending group emails action`),
description: i18nLabel(msg`Pending action for group emails`),
icon: 'IconUsersGroup',
isNullable: false,
isUIReadOnly: true,
defaultValue: "'NONE'",
options: [
{
id: '20202020-2ead-4bd1-aa5d-5005c7a956b4',
value: 'GROUP_EMAILS_DELETION',
label: i18nLabel(msg`Group emails deletion`),
position: 0,
color: 'red',
},
{
id: '20202020-155d-447d-a36e-6ecbb30fc37c',
value: 'GROUP_EMAILS_IMPORT',
label: i18nLabel(msg`Group emails import`),
position: 1,
color: 'green',
},
{
id: '20202020-fe98-4018-9f94-f878c22b8ece',
value: 'NONE',
label: i18nLabel(msg`None`),
position: 2,
color: 'blue',
},
],
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
isSyncEnabled: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'isSyncEnabled',
type: FieldMetadataType.BOOLEAN,
label: i18nLabel(msg`Is Sync Enabled`),
description: i18nLabel(msg`Is Sync Enabled`),
icon: 'IconRefresh',
isNullable: false,
isUIReadOnly: true,
defaultValue: true,
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
syncCursor: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'syncCursor',
type: FieldMetadataType.TEXT,
label: i18nLabel(msg`Last sync cursor`),
description: i18nLabel(msg`Last sync cursor`),
icon: 'IconHistory',
isNullable: true,
isUIReadOnly: true,
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
syncedAt: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'syncedAt',
type: FieldMetadataType.DATE_TIME,
label: i18nLabel(msg`Last sync date`),
description: i18nLabel(msg`Last sync date`),
icon: 'IconHistory',
isNullable: true,
isUIReadOnly: true,
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
syncStatus: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'syncStatus',
type: FieldMetadataType.SELECT,
label: i18nLabel(msg`Sync status`),
description: i18nLabel(msg`Sync status`),
icon: 'IconStatusChange',
isNullable: true,
isUIReadOnly: true,
options: [
{
id: '20202020-046b-4bc2-b085-bd69aaa8e577',
value: 'ONGOING',
label: i18nLabel(msg`Ongoing`),
position: 1,
color: 'yellow',
},
{
id: '20202020-09ec-4ea6-9a8a-bf48211b67e2',
value: 'NOT_SYNCED',
label: i18nLabel(msg`Not Synced`),
position: 2,
color: 'blue',
},
{
id: '20202020-2d1b-4d74-9689-9bd28fd3c3f9',
value: 'ACTIVE',
label: i18nLabel(msg`Active`),
position: 3,
color: 'green',
},
{
id: '20202020-0fb2-4a8b-9f9b-569144a45193',
value: 'FAILED_INSUFFICIENT_PERMISSIONS',
label: i18nLabel(msg`Failed Insufficient Permissions`),
position: 4,
color: 'red',
},
{
id: '20202020-bde3-415a-a8ac-55ced6014364',
value: 'FAILED_UNKNOWN',
label: i18nLabel(msg`Failed Unknown`),
position: 5,
color: 'red',
},
],
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
syncStage: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'syncStage',
type: FieldMetadataType.SELECT,
label: i18nLabel(msg`Sync stage`),
description: i18nLabel(msg`Sync stage`),
icon: 'IconStatusChange',
isNullable: false,
isUIReadOnly: true,
defaultValue: "'PENDING_CONFIGURATION'",
options: [
{
id: '20202020-1f62-4d79-a633-33a0e4fce9a6',
value: 'MESSAGE_LIST_FETCH_PENDING',
label: i18nLabel(msg`Messages list fetch pending`),
position: 0,
color: 'blue',
},
{
id: '20202020-d24f-4c3d-94a6-86c42e0f51d7',
value: 'MESSAGE_LIST_FETCH_SCHEDULED',
label: i18nLabel(msg`Messages list fetch scheduled`),
position: 1,
color: 'green',
},
{
id: '20202020-8751-408a-ae46-21a51b76be28',
value: 'MESSAGE_LIST_FETCH_ONGOING',
label: i18nLabel(msg`Messages list fetch ongoing`),
position: 2,
color: 'orange',
},
{
id: '20202020-1cfa-4a7d-a82d-93c8e29d0671',
value: 'MESSAGES_IMPORT_PENDING',
label: i18nLabel(msg`Messages import pending`),
position: 3,
color: 'blue',
},
{
id: '20202020-341e-4fbd-9dbf-30a70828ca69',
value: 'MESSAGES_IMPORT_SCHEDULED',
label: i18nLabel(msg`Messages import scheduled`),
position: 4,
color: 'green',
},
{
id: '20202020-e944-4594-ab81-fdbc53a85026',
value: 'MESSAGES_IMPORT_ONGOING',
label: i18nLabel(msg`Messages import ongoing`),
position: 5,
color: 'orange',
},
{
id: '20202020-f7c5-4756-9084-02f6a0b1a5f8',
value: 'FAILED',
label: i18nLabel(msg`Failed`),
position: 6,
color: 'red',
},
{
id: '20202020-0ede-4c75-84f1-29c8309829ec',
value: 'PENDING_CONFIGURATION',
label: i18nLabel(msg`Pending configuration`),
position: 7,
color: 'gray',
},
],
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
syncStageStartedAt: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'syncStageStartedAt',
type: FieldMetadataType.DATE_TIME,
label: i18nLabel(msg`Sync stage started at`),
description: i18nLabel(msg`Sync stage started at`),
icon: 'IconHistory',
isNullable: true,
isUIReadOnly: true,
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
throttleFailureCount: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'throttleFailureCount',
type: FieldMetadataType.NUMBER,
label: i18nLabel(msg`Throttle Failure Count`),
description: i18nLabel(msg`Throttle Failure Count`),
icon: 'IconX',
isNullable: false,
isUIReadOnly: true,
defaultValue: 0,
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
throttleRetryAfter: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'throttleRetryAfter',
type: FieldMetadataType.DATE_TIME,
label: i18nLabel(msg`Throttle Retry After`),
description: i18nLabel(msg`Throttle Retry After`),
icon: 'IconClock',
isNullable: true,
isUIReadOnly: true,
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
});
@@ -1,347 +0,0 @@
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';
import { getTsVectorColumnExpressionFromFields } from 'src/engine/workspace-manager/utils/get-ts-vector-column-expression.util';
import { SEARCH_FIELDS_FOR_MESSAGE_FOLDER } from 'src/modules/messaging/common/standard-objects/message-folder.workspace-entity';
export const buildMessageFolderStandardFlatFieldMetadatas = ({
now,
objectName,
workspaceId,
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
}: Omit<
CreateStandardFieldArgs<'messageFolder', FieldMetadataType>,
'context'
>): Record<AllStandardObjectFieldName<'messageFolder'>, FlatFieldMetadata> => ({
id: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'id',
type: FieldMetadataType.UUID,
label: i18nLabel(msg`Id`),
description: i18nLabel(msg`Id`),
icon: 'Icon123',
isSystem: true,
isNullable: false,
isUIReadOnly: true,
defaultValue: 'uuid',
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
createdAt: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'createdAt',
type: FieldMetadataType.DATE_TIME,
label: i18nLabel(msg`Creation date`),
description: i18nLabel(msg`Creation date`),
icon: 'IconCalendar',
isSystem: true,
isNullable: false,
isUIReadOnly: true,
defaultValue: 'now',
settings: { displayFormat: DateDisplayFormat.RELATIVE },
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
updatedAt: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'updatedAt',
type: FieldMetadataType.DATE_TIME,
label: i18nLabel(msg`Last update`),
description: i18nLabel(msg`Last time the record was changed`),
icon: 'IconCalendarClock',
isSystem: true,
isNullable: false,
isUIReadOnly: true,
defaultValue: 'now',
settings: { displayFormat: DateDisplayFormat.RELATIVE },
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
deletedAt: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'deletedAt',
type: FieldMetadataType.DATE_TIME,
label: i18nLabel(msg`Deleted at`),
description: i18nLabel(msg`Date when the record was deleted`),
icon: 'IconCalendarMinus',
isSystem: true,
isNullable: true,
isUIReadOnly: true,
settings: { displayFormat: DateDisplayFormat.RELATIVE },
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
createdBy: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'createdBy',
type: FieldMetadataType.ACTOR,
label: i18nLabel(msg`Created by`),
description: i18nLabel(msg`The creator of the record`),
icon: 'IconCreativeCommonsSa',
isSystem: true,
isUIReadOnly: true,
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`Updated by`),
description: i18nLabel(
msg`The workspace member who last updated the record`,
),
icon: 'IconUserCircle',
isSystem: true,
isUIReadOnly: true,
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`Position`),
description: i18nLabel(msg`Message Folder record position`),
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`Search vector`),
description: i18nLabel(msg`Field used for full-text search`),
icon: 'IconUser',
isSystem: true,
isNullable: true,
settings: {
generatedType: 'STORED',
asExpression: getTsVectorColumnExpressionFromFields(
SEARCH_FIELDS_FOR_MESSAGE_FOLDER,
),
},
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
name: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'name',
type: FieldMetadataType.TEXT,
label: i18nLabel(msg`Name`),
description: i18nLabel(msg`Folder name`),
icon: 'IconFolder',
isNullable: true,
isUIReadOnly: true,
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
syncCursor: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'syncCursor',
type: FieldMetadataType.TEXT,
label: i18nLabel(msg`Sync Cursor`),
description: i18nLabel(msg`Sync Cursor`),
icon: 'IconHash',
isNullable: true,
isUIReadOnly: true,
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
isSentFolder: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'isSentFolder',
type: FieldMetadataType.BOOLEAN,
label: i18nLabel(msg`Is Sent Folder`),
description: i18nLabel(msg`Is Sent Folder`),
icon: 'IconCheck',
isNullable: false,
isUIReadOnly: true,
defaultValue: false,
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
isSynced: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'isSynced',
type: FieldMetadataType.BOOLEAN,
label: i18nLabel(msg`Is Synced`),
description: i18nLabel(msg`Is Synced`),
icon: 'IconCheck',
isNullable: false,
isUIReadOnly: true,
defaultValue: false,
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
parentFolderId: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'parentFolderId',
type: FieldMetadataType.TEXT,
label: i18nLabel(msg`Parent Folder ID`),
description: i18nLabel(msg`Parent Folder ID`),
icon: 'IconFolder',
isNullable: true,
isUIReadOnly: true,
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
externalId: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'externalId',
type: FieldMetadataType.TEXT,
label: i18nLabel(msg`External ID`),
description: i18nLabel(msg`External ID`),
icon: 'IconHash',
isNullable: true,
isUIReadOnly: true,
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
pendingSyncAction: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'pendingSyncAction',
type: FieldMetadataType.SELECT,
label: i18nLabel(msg`Pending Sync Action`),
description: i18nLabel(msg`Pending action for folder sync`),
icon: 'IconReload',
isNullable: false,
isUIReadOnly: true,
defaultValue: "'NONE'",
options: [
{
id: '20202020-dc59-4dd3-92fe-f41c6491a588',
value: 'FOLDER_DELETION',
label: i18nLabel(msg`Folder deletion`),
position: 0,
color: 'red',
},
{
id: '20202020-aa29-41d3-872b-142174fe6595',
value: 'NONE',
label: i18nLabel(msg`None`),
position: 1,
color: 'blue',
},
],
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
messageChannelId: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'messageChannelId',
type: FieldMetadataType.UUID,
label: i18nLabel(msg`Message Channel`),
description: i18nLabel(msg`Message Channel`),
icon: 'IconMessage',
isNullable: false,
isUIReadOnly: true,
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
});
@@ -11,7 +11,6 @@ import { buildCompanyStandardFlatIndexMetadatas } from 'src/engine/workspace-man
import { buildDashboardStandardFlatIndexMetadatas } from 'src/engine/workspace-manager/twenty-standard-application/utils/index/compute-dashboard-standard-flat-index-metadata.util';
import { buildMessageChannelMessageAssociationMessageFolderStandardFlatIndexMetadatas } from 'src/engine/workspace-manager/twenty-standard-application/utils/index/compute-message-channel-message-association-message-folder-standard-flat-index-metadata.util';
import { buildMessageChannelMessageAssociationStandardFlatIndexMetadatas } from 'src/engine/workspace-manager/twenty-standard-application/utils/index/compute-message-channel-message-association-standard-flat-index-metadata.util';
import { buildMessageFolderStandardFlatIndexMetadatas } from 'src/engine/workspace-manager/twenty-standard-application/utils/index/compute-message-folder-standard-flat-index-metadata.util';
import { buildMessageParticipantStandardFlatIndexMetadatas } from 'src/engine/workspace-manager/twenty-standard-application/utils/index/compute-message-participant-standard-flat-index-metadata.util';
import { buildMessageStandardFlatIndexMetadatas } from 'src/engine/workspace-manager/twenty-standard-application/utils/index/compute-message-standard-flat-index-metadata.util';
import { buildNoteStandardFlatIndexMetadatas } from 'src/engine/workspace-manager/twenty-standard-application/utils/index/compute-note-standard-flat-index-metadata.util';
@@ -46,7 +45,6 @@ const STANDARD_FLAT_INDEX_METADATA_BUILDERS_BY_OBJECT_NAME = {
buildMessageChannelMessageAssociationStandardFlatIndexMetadatas,
messageChannelMessageAssociationMessageFolder:
buildMessageChannelMessageAssociationMessageFolderStandardFlatIndexMetadatas,
messageFolder: buildMessageFolderStandardFlatIndexMetadatas,
messageParticipant: buildMessageParticipantStandardFlatIndexMetadatas,
note: buildNoteStandardFlatIndexMetadatas,
noteTarget: buildNoteTargetStandardFlatIndexMetadatas,
@@ -1,31 +0,0 @@
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 buildMessageFolderStandardFlatIndexMetadatas = ({
now,
objectName,
workspaceId,
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
}: Omit<CreateStandardIndexArgs<'messageFolder'>, 'context'>): Record<
AllStandardObjectIndexName<'messageFolder'>,
FlatIndexMetadata
> => ({
messageChannelIdIndex: createStandardIndexFlatMetadata({
objectName,
workspaceId,
context: {
indexName: 'messageChannelIdIndex',
relatedFieldNames: ['messageChannelId'],
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
});
@@ -93,37 +93,6 @@ export const STANDARD_FLAT_OBJECT_METADATA_BUILDERS_BY_OBJECT_NAME = {
twentyStandardApplicationId,
now,
}),
calendarChannel: ({
now,
workspaceId,
standardObjectMetadataRelatedEntityIds,
twentyStandardApplicationId,
dependencyFlatEntityMaps,
}: Omit<
CreateStandardObjectArgs<'calendarChannel'>,
'context' | 'objectName'
>) =>
createStandardObjectFlatMetadata({
objectName: 'calendarChannel',
dependencyFlatEntityMaps,
context: {
universalIdentifier:
STANDARD_OBJECTS.calendarChannel.universalIdentifier,
nameSingular: 'calendarChannel',
namePlural: 'calendarChannels',
labelSingular: i18nLabel(msg`Calendar Channel`),
labelPlural: i18nLabel(msg`Calendar Channels`),
description: i18nLabel(msg`Calendar Channels`),
icon: 'IconCalendar',
isSystem: true,
isAuditLogged: false,
labelIdentifierFieldMetadataName: 'handle',
},
workspaceId,
standardObjectMetadataRelatedEntityIds,
twentyStandardApplicationId,
now,
}),
calendarEventParticipant: ({
now,
workspaceId,
@@ -271,67 +240,6 @@ export const STANDARD_FLAT_OBJECT_METADATA_BUILDERS_BY_OBJECT_NAME = {
twentyStandardApplicationId,
now,
}),
messageChannel: ({
now,
workspaceId,
standardObjectMetadataRelatedEntityIds,
twentyStandardApplicationId,
dependencyFlatEntityMaps,
}: Omit<
CreateStandardObjectArgs<'messageChannel'>,
'context' | 'objectName'
>) =>
createStandardObjectFlatMetadata({
objectName: 'messageChannel',
dependencyFlatEntityMaps,
context: {
universalIdentifier:
STANDARD_OBJECTS.messageChannel.universalIdentifier,
nameSingular: 'messageChannel',
namePlural: 'messageChannels',
labelSingular: i18nLabel(msg`Message Channel`),
labelPlural: i18nLabel(msg`Message Channels`),
description: i18nLabel(msg`Message Channels`),
icon: 'IconMessage',
isSystem: true,
isAuditLogged: false,
labelIdentifierFieldMetadataName: 'handle',
},
workspaceId,
standardObjectMetadataRelatedEntityIds,
twentyStandardApplicationId,
now,
}),
messageFolder: ({
now,
workspaceId,
standardObjectMetadataRelatedEntityIds,
twentyStandardApplicationId,
dependencyFlatEntityMaps,
}: Omit<
CreateStandardObjectArgs<'messageFolder'>,
'context' | 'objectName'
>) =>
createStandardObjectFlatMetadata({
objectName: 'messageFolder',
dependencyFlatEntityMaps,
context: {
universalIdentifier: STANDARD_OBJECTS.messageFolder.universalIdentifier,
nameSingular: 'messageFolder',
namePlural: 'messageFolders',
labelSingular: i18nLabel(msg`Message Folder`),
labelPlural: i18nLabel(msg`Message Folders`),
description: i18nLabel(msg`Message Folders`),
icon: 'IconFolder',
isSystem: true,
isAuditLogged: false,
labelIdentifierFieldMetadataName: 'id',
},
workspaceId,
standardObjectMetadataRelatedEntityIds,
twentyStandardApplicationId,
now,
}),
messageChannelMessageAssociationMessageFolder: ({
now,
workspaceId,
@@ -1,13 +1,10 @@
export { STANDARD_BLOCKLIST_PAGE_LAYOUT_CONFIG } from './standard-blocklist-page-layout.config';
export { STANDARD_CALENDAR_CHANNEL_EVENT_ASSOCIATION_PAGE_LAYOUT_CONFIG } from './standard-calendar-channel-event-association-page-layout.config';
export { STANDARD_CALENDAR_CHANNEL_PAGE_LAYOUT_CONFIG } from './standard-calendar-channel-page-layout.config';
export { STANDARD_CALENDAR_EVENT_PARTICIPANT_PAGE_LAYOUT_CONFIG } from './standard-calendar-event-participant-page-layout.config';
export { STANDARD_COMPANY_PAGE_LAYOUT_CONFIG } from './standard-company-page-layout.config';
export { STANDARD_DASHBOARD_PAGE_LAYOUT_CONFIG } from './standard-dashboard-page-layout.config';
export { STANDARD_MESSAGE_CHANNEL_MESSAGE_ASSOCIATION_MESSAGE_FOLDER_PAGE_LAYOUT_CONFIG } from './standard-message-channel-message-association-message-folder-page-layout.config';
export { STANDARD_MESSAGE_CHANNEL_MESSAGE_ASSOCIATION_PAGE_LAYOUT_CONFIG } from './standard-message-channel-message-association-page-layout.config';
export { STANDARD_MESSAGE_CHANNEL_PAGE_LAYOUT_CONFIG } from './standard-message-channel-page-layout.config';
export { STANDARD_MESSAGE_FOLDER_PAGE_LAYOUT_CONFIG } from './standard-message-folder-page-layout.config';
export { STANDARD_MESSAGE_PARTICIPANT_PAGE_LAYOUT_CONFIG } from './standard-message-participant-page-layout.config';
export { STANDARD_MESSAGE_THREAD_PAGE_LAYOUT_CONFIG } from './standard-message-thread-page-layout.config';
export { STANDARD_NOTE_PAGE_LAYOUT_CONFIG } from './standard-note-page-layout.config';
@@ -1,44 +0,0 @@
import { STANDARD_OBJECTS } from 'twenty-shared/metadata';
import { PageLayoutType } from 'src/engine/metadata-modules/page-layout/enums/page-layout-type.enum';
import {
TAB_PROPS,
WIDGET_PROPS,
} from 'src/engine/workspace-manager/twenty-standard-application/constants/standard-page-layout-tabs.template';
import {
type StandardPageLayoutConfig,
type StandardPageLayoutTabConfig,
} from 'src/engine/workspace-manager/twenty-standard-application/utils/page-layout-config/standard-page-layout-config.type';
const CALENDAR_CHANNEL_PAGE_TABS = {
home: {
universalIdentifier: '20202020-ab0a-400a-800a-ca1c4a0a0a01',
...TAB_PROPS.home,
widgets: {
fields: {
universalIdentifier: '20202020-ac0a-400a-800a-ca1c4a0a0a11',
...WIDGET_PROPS.fields,
},
},
},
timeline: {
universalIdentifier: '20202020-ab0a-400a-800a-ca1c4a0a0a02',
...TAB_PROPS.timeline,
widgets: {
timeline: {
universalIdentifier: '20202020-ac0a-400a-800a-ca1c4a0a0a21',
...WIDGET_PROPS.timeline,
},
},
},
} as const satisfies Record<string, StandardPageLayoutTabConfig>;
export const STANDARD_CALENDAR_CHANNEL_PAGE_LAYOUT_CONFIG = {
name: 'Default Calendar Channel Layout',
type: PageLayoutType.RECORD_PAGE,
objectUniversalIdentifier:
STANDARD_OBJECTS.calendarChannel.universalIdentifier,
universalIdentifier: '20202020-a10a-400a-800a-ca1c4a0a0001',
defaultTabUniversalIdentifier: null,
tabs: CALENDAR_CHANNEL_PAGE_TABS,
} as const satisfies StandardPageLayoutConfig;
@@ -1,44 +0,0 @@
import { STANDARD_OBJECTS } from 'twenty-shared/metadata';
import { PageLayoutType } from 'src/engine/metadata-modules/page-layout/enums/page-layout-type.enum';
import {
TAB_PROPS,
WIDGET_PROPS,
} from 'src/engine/workspace-manager/twenty-standard-application/constants/standard-page-layout-tabs.template';
import {
type StandardPageLayoutConfig,
type StandardPageLayoutTabConfig,
} from 'src/engine/workspace-manager/twenty-standard-application/utils/page-layout-config/standard-page-layout-config.type';
const MESSAGE_CHANNEL_PAGE_TABS = {
home: {
universalIdentifier: '20202020-ab10-4010-8010-a5c4a1101001',
...TAB_PROPS.home,
widgets: {
fields: {
universalIdentifier: '20202020-ac10-4010-8010-a5c4a1101011',
...WIDGET_PROPS.fields,
},
},
},
timeline: {
universalIdentifier: '20202020-ab10-4010-8010-a5c4a1101002',
...TAB_PROPS.timeline,
widgets: {
timeline: {
universalIdentifier: '20202020-ac10-4010-8010-a5c4a1101021',
...WIDGET_PROPS.timeline,
},
},
},
} as const satisfies Record<string, StandardPageLayoutTabConfig>;
export const STANDARD_MESSAGE_CHANNEL_PAGE_LAYOUT_CONFIG = {
name: 'Default Message Channel Layout',
type: PageLayoutType.RECORD_PAGE,
objectUniversalIdentifier:
STANDARD_OBJECTS.messageChannel.universalIdentifier,
universalIdentifier: '20202020-a110-4010-8010-a5c4a1100001',
defaultTabUniversalIdentifier: null,
tabs: MESSAGE_CHANNEL_PAGE_TABS,
} as const satisfies StandardPageLayoutConfig;
@@ -1,43 +0,0 @@
import { STANDARD_OBJECTS } from 'twenty-shared/metadata';
import { PageLayoutType } from 'src/engine/metadata-modules/page-layout/enums/page-layout-type.enum';
import {
TAB_PROPS,
WIDGET_PROPS,
} from 'src/engine/workspace-manager/twenty-standard-application/constants/standard-page-layout-tabs.template';
import {
type StandardPageLayoutConfig,
type StandardPageLayoutTabConfig,
} from 'src/engine/workspace-manager/twenty-standard-application/utils/page-layout-config/standard-page-layout-config.type';
const MESSAGE_FOLDER_PAGE_TABS = {
home: {
universalIdentifier: '20202020-ab13-4013-8013-a5efd1131301',
...TAB_PROPS.home,
widgets: {
fields: {
universalIdentifier: '20202020-ac13-4013-8013-a5efd1131311',
...WIDGET_PROPS.fields,
},
},
},
timeline: {
universalIdentifier: '20202020-ab13-4013-8013-a5efd1131302',
...TAB_PROPS.timeline,
widgets: {
timeline: {
universalIdentifier: '20202020-ac13-4013-8013-a5efd1131321',
...WIDGET_PROPS.timeline,
},
},
},
} as const satisfies Record<string, StandardPageLayoutTabConfig>;
export const STANDARD_MESSAGE_FOLDER_PAGE_LAYOUT_CONFIG = {
name: 'Default Message Folder Layout',
type: PageLayoutType.RECORD_PAGE,
objectUniversalIdentifier: STANDARD_OBJECTS.messageFolder.universalIdentifier,
universalIdentifier: '20202020-a113-4013-8013-a5efd1130001',
defaultTabUniversalIdentifier: null,
tabs: MESSAGE_FOLDER_PAGE_TABS,
} as const satisfies StandardPageLayoutConfig;
@@ -66,17 +66,14 @@ const RECORD_PAGE_FIELDS_VIEW_NAME_BY_OBJECT: Partial<
Record<AllStandardObjectName, string>
> = {
blocklist: 'blocklistRecordPageFields',
calendarChannel: 'calendarChannelRecordPageFields',
calendarChannelEventAssociation:
'calendarChannelEventAssociationRecordPageFields',
calendarEventParticipant: 'calendarEventParticipantRecordPageFields',
company: 'companyRecordPageFields',
messageChannel: 'messageChannelRecordPageFields',
messageChannelMessageAssociation:
'messageChannelMessageAssociationRecordPageFields',
messageChannelMessageAssociationMessageFolder:
'messageChannelMessageAssociationMessageFolderRecordPageFields',
messageFolder: 'messageFolderRecordPageFields',
messageParticipant: 'messageParticipantRecordPageFields',
note: 'noteRecordPageFields',
opportunity: 'opportunityRecordPageFields',
@@ -4,14 +4,11 @@ import { addFlatEntityToFlatEntityMapsOrThrow } from 'src/engine/metadata-module
import { type FlatViewFieldGroup } from 'src/engine/metadata-modules/flat-view-field-group/types/flat-view-field-group.type';
import { type AllStandardObjectName } from 'src/engine/workspace-manager/twenty-standard-application/types/all-standard-object-name.type';
import { computeStandardBlocklistViewFieldGroups } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field-group/compute-standard-blocklist-view-field-groups.util';
import { computeStandardCalendarChannelViewFieldGroups } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field-group/compute-standard-calendar-channel-view-field-groups.util';
import { computeStandardCalendarChannelEventAssociationViewFieldGroups } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field-group/compute-standard-calendar-channel-event-association-view-field-groups.util';
import { computeStandardCalendarEventParticipantViewFieldGroups } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field-group/compute-standard-calendar-event-participant-view-field-groups.util';
import { computeStandardCompanyViewFieldGroups } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field-group/compute-standard-company-view-field-groups.util';
import { computeStandardMessageChannelViewFieldGroups } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field-group/compute-standard-message-channel-view-field-groups.util';
import { computeStandardMessageChannelMessageAssociationViewFieldGroups } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field-group/compute-standard-message-channel-message-association-view-field-groups.util';
import { computeStandardMessageChannelMessageAssociationMessageFolderViewFieldGroups } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field-group/compute-standard-message-channel-message-association-message-folder-view-field-groups.util';
import { computeStandardMessageFolderViewFieldGroups } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field-group/compute-standard-message-folder-view-field-groups.util';
import { computeStandardMessageParticipantViewFieldGroups } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field-group/compute-standard-message-participant-view-field-groups.util';
import { computeStandardNoteViewFieldGroups } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field-group/compute-standard-note-view-field-groups.util';
import { computeStandardOpportunityViewFieldGroups } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field-group/compute-standard-opportunity-view-field-groups.util';
@@ -28,18 +25,15 @@ type StandardViewFieldGroupBuilder<P extends AllStandardObjectName> = (
const STANDARD_FLAT_VIEW_FIELD_GROUP_METADATA_BUILDERS_BY_OBJECT_NAME = {
blocklist: computeStandardBlocklistViewFieldGroups,
calendarChannel: computeStandardCalendarChannelViewFieldGroups,
calendarChannelEventAssociation:
computeStandardCalendarChannelEventAssociationViewFieldGroups,
calendarEventParticipant:
computeStandardCalendarEventParticipantViewFieldGroups,
company: computeStandardCompanyViewFieldGroups,
messageChannel: computeStandardMessageChannelViewFieldGroups,
messageChannelMessageAssociation:
computeStandardMessageChannelMessageAssociationViewFieldGroups,
messageChannelMessageAssociationMessageFolder:
computeStandardMessageChannelMessageAssociationMessageFolderViewFieldGroups,
messageFolder: computeStandardMessageFolderViewFieldGroups,
messageParticipant: computeStandardMessageParticipantViewFieldGroups,
note: computeStandardNoteViewFieldGroups,
opportunity: computeStandardOpportunityViewFieldGroups,
@@ -1,36 +0,0 @@
import { type FlatViewFieldGroup } from 'src/engine/metadata-modules/flat-view-field-group/types/flat-view-field-group.type';
import {
createStandardViewFieldGroupFlatMetadata,
type CreateStandardViewFieldGroupArgs,
} from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field-group/create-standard-view-field-group-flat-metadata.util';
export const computeStandardCalendarChannelViewFieldGroups = (
args: Omit<CreateStandardViewFieldGroupArgs<'calendarChannel'>, 'context'>,
): Record<string, FlatViewFieldGroup> => {
return {
calendarChannelRecordPageFieldsGeneral:
createStandardViewFieldGroupFlatMetadata({
...args,
objectName: 'calendarChannel',
context: {
viewName: 'calendarChannelRecordPageFields',
viewFieldGroupName: 'general',
name: 'General',
position: 0,
isVisible: true,
},
}),
calendarChannelRecordPageFieldsSystem:
createStandardViewFieldGroupFlatMetadata({
...args,
objectName: 'calendarChannel',
context: {
viewName: 'calendarChannelRecordPageFields',
viewFieldGroupName: 'system',
name: 'System',
position: 1,
isVisible: true,
},
}),
};
};
@@ -1,36 +0,0 @@
import { type FlatViewFieldGroup } from 'src/engine/metadata-modules/flat-view-field-group/types/flat-view-field-group.type';
import {
createStandardViewFieldGroupFlatMetadata,
type CreateStandardViewFieldGroupArgs,
} from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field-group/create-standard-view-field-group-flat-metadata.util';
export const computeStandardMessageChannelViewFieldGroups = (
args: Omit<CreateStandardViewFieldGroupArgs<'messageChannel'>, 'context'>,
): Record<string, FlatViewFieldGroup> => {
return {
messageChannelRecordPageFieldsGeneral:
createStandardViewFieldGroupFlatMetadata({
...args,
objectName: 'messageChannel',
context: {
viewName: 'messageChannelRecordPageFields',
viewFieldGroupName: 'general',
name: 'General',
position: 0,
isVisible: true,
},
}),
messageChannelRecordPageFieldsSystem:
createStandardViewFieldGroupFlatMetadata({
...args,
objectName: 'messageChannel',
context: {
viewName: 'messageChannelRecordPageFields',
viewFieldGroupName: 'system',
name: 'System',
position: 1,
isVisible: true,
},
}),
};
};
@@ -1,36 +0,0 @@
import { type FlatViewFieldGroup } from 'src/engine/metadata-modules/flat-view-field-group/types/flat-view-field-group.type';
import {
createStandardViewFieldGroupFlatMetadata,
type CreateStandardViewFieldGroupArgs,
} from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field-group/create-standard-view-field-group-flat-metadata.util';
export const computeStandardMessageFolderViewFieldGroups = (
args: Omit<CreateStandardViewFieldGroupArgs<'messageFolder'>, 'context'>,
): Record<string, FlatViewFieldGroup> => {
return {
messageFolderRecordPageFieldsGeneral:
createStandardViewFieldGroupFlatMetadata({
...args,
objectName: 'messageFolder',
context: {
viewName: 'messageFolderRecordPageFields',
viewFieldGroupName: 'general',
name: 'General',
position: 0,
isVisible: true,
},
}),
messageFolderRecordPageFieldsSystem:
createStandardViewFieldGroupFlatMetadata({
...args,
objectName: 'messageFolder',
context: {
viewName: 'messageFolderRecordPageFields',
viewFieldGroupName: 'system',
name: 'System',
position: 1,
isVisible: true,
},
}),
};
};
@@ -6,15 +6,12 @@ import { type AllStandardObjectName } from 'src/engine/workspace-manager/twenty-
import { computeStandardAttachmentViewFields } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-attachment-view-fields.util';
import { computeStandardBlocklistViewFields } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-blocklist-view-fields.util';
import { computeStandardCalendarChannelEventAssociationViewFields } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-calendar-channel-event-association-view-fields.util';
import { computeStandardCalendarChannelViewFields } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-calendar-channel-view-fields.util';
import { computeStandardCalendarEventParticipantViewFields } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-calendar-event-participant-view-fields.util';
import { computeStandardCalendarEventViewFields } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-calendar-event-view-fields.util';
import { computeStandardCompanyViewFields } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-company-view-fields.util';
import { computeStandardDashboardViewFields } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-dashboard-view-fields.util';
import { computeStandardMessageChannelMessageAssociationMessageFolderViewFields } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-message-channel-message-association-message-folder-view-fields.util';
import { computeStandardMessageChannelMessageAssociationViewFields } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-message-channel-message-association-view-fields.util';
import { computeStandardMessageChannelViewFields } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-message-channel-view-fields.util';
import { computeStandardMessageFolderViewFields } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-message-folder-view-fields.util';
import { computeStandardMessageParticipantViewFields } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-message-participant-view-fields.util';
import { computeStandardMessageThreadViewFields } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-message-thread-view-fields.util';
import { computeStandardMessageViewFields } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-message-view-fields.util';
@@ -39,7 +36,6 @@ type StandardViewFieldBuilder<P extends AllStandardObjectName> = (
const STANDARD_FLAT_VIEW_FIELD_METADATA_BUILDERS_BY_OBJECT_NAME = {
attachment: computeStandardAttachmentViewFields,
blocklist: computeStandardBlocklistViewFields,
calendarChannel: computeStandardCalendarChannelViewFields,
calendarChannelEventAssociation:
computeStandardCalendarChannelEventAssociationViewFields,
calendarEvent: computeStandardCalendarEventViewFields,
@@ -47,12 +43,10 @@ const STANDARD_FLAT_VIEW_FIELD_METADATA_BUILDERS_BY_OBJECT_NAME = {
company: computeStandardCompanyViewFields,
dashboard: computeStandardDashboardViewFields,
message: computeStandardMessageViewFields,
messageChannel: computeStandardMessageChannelViewFields,
messageChannelMessageAssociation:
computeStandardMessageChannelMessageAssociationViewFields,
messageChannelMessageAssociationMessageFolder:
computeStandardMessageChannelMessageAssociationMessageFolderViewFields,
messageFolder: computeStandardMessageFolderViewFields,
messageParticipant: computeStandardMessageParticipantViewFields,
messageThread: computeStandardMessageThreadViewFields,
note: computeStandardNoteViewFields,
@@ -1,143 +0,0 @@
import { type FlatViewField } from 'src/engine/metadata-modules/flat-view-field/types/flat-view-field.type';
import {
createStandardViewFieldFlatMetadata,
type CreateStandardViewFieldArgs,
} from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field/create-standard-view-field-flat-metadata.util';
export const computeStandardCalendarChannelViewFields = (
args: Omit<CreateStandardViewFieldArgs<'calendarChannel'>, 'context'>,
): Record<string, FlatViewField> => {
return {
allCalendarChannelsHandle: createStandardViewFieldFlatMetadata({
...args,
objectName: 'calendarChannel',
context: {
viewName: 'allCalendarChannels',
viewFieldName: 'handle',
fieldName: 'handle',
position: 0,
isVisible: true,
size: 150,
},
}),
allCalendarChannelsVisibility: createStandardViewFieldFlatMetadata({
...args,
objectName: 'calendarChannel',
context: {
viewName: 'allCalendarChannels',
viewFieldName: 'visibility',
fieldName: 'visibility',
position: 2,
isVisible: true,
size: 150,
},
}),
allCalendarChannelsIsSyncEnabled: createStandardViewFieldFlatMetadata({
...args,
objectName: 'calendarChannel',
context: {
viewName: 'allCalendarChannels',
viewFieldName: 'isSyncEnabled',
fieldName: 'isSyncEnabled',
position: 3,
isVisible: true,
size: 150,
},
}),
allCalendarChannelsSyncStatus: createStandardViewFieldFlatMetadata({
...args,
objectName: 'calendarChannel',
context: {
viewName: 'allCalendarChannels',
viewFieldName: 'syncStatus',
fieldName: 'syncStatus',
position: 4,
isVisible: true,
size: 150,
},
}),
allCalendarChannelsCreatedAt: createStandardViewFieldFlatMetadata({
...args,
objectName: 'calendarChannel',
context: {
viewName: 'allCalendarChannels',
viewFieldName: 'createdAt',
fieldName: 'createdAt',
position: 5,
isVisible: true,
size: 150,
},
}),
calendarChannelRecordPageFieldsVisibility:
createStandardViewFieldFlatMetadata({
...args,
objectName: 'calendarChannel',
context: {
viewName: 'calendarChannelRecordPageFields',
viewFieldName: 'visibility',
fieldName: 'visibility',
position: 2,
isVisible: true,
size: 150,
viewFieldGroupName: 'general',
},
}),
calendarChannelRecordPageFieldsIsSyncEnabled:
createStandardViewFieldFlatMetadata({
...args,
objectName: 'calendarChannel',
context: {
viewName: 'calendarChannelRecordPageFields',
viewFieldName: 'isSyncEnabled',
fieldName: 'isSyncEnabled',
position: 3,
isVisible: true,
size: 150,
viewFieldGroupName: 'general',
},
}),
calendarChannelRecordPageFieldsSyncStatus:
createStandardViewFieldFlatMetadata({
...args,
objectName: 'calendarChannel',
context: {
viewName: 'calendarChannelRecordPageFields',
viewFieldName: 'syncStatus',
fieldName: 'syncStatus',
position: 4,
isVisible: true,
size: 150,
viewFieldGroupName: 'general',
},
}),
calendarChannelRecordPageFieldsCreatedAt:
createStandardViewFieldFlatMetadata({
...args,
objectName: 'calendarChannel',
context: {
viewName: 'calendarChannelRecordPageFields',
viewFieldName: 'createdAt',
fieldName: 'createdAt',
position: 0,
isVisible: true,
size: 150,
viewFieldGroupName: 'system',
},
}),
calendarChannelRecordPageFieldsCreatedBy:
createStandardViewFieldFlatMetadata({
...args,
objectName: 'calendarChannel',
context: {
viewName: 'calendarChannelRecordPageFields',
viewFieldName: 'createdBy',
fieldName: 'createdBy',
position: 1,
isVisible: true,
size: 150,
viewFieldGroupName: 'system',
},
}),
};
};
@@ -1,168 +0,0 @@
import { type FlatViewField } from 'src/engine/metadata-modules/flat-view-field/types/flat-view-field.type';
import {
createStandardViewFieldFlatMetadata,
type CreateStandardViewFieldArgs,
} from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field/create-standard-view-field-flat-metadata.util';
export const computeStandardMessageChannelViewFields = (
args: Omit<CreateStandardViewFieldArgs<'messageChannel'>, 'context'>,
): Record<string, FlatViewField> => {
return {
allMessageChannelsHandle: createStandardViewFieldFlatMetadata({
...args,
objectName: 'messageChannel',
context: {
viewName: 'allMessageChannels',
viewFieldName: 'handle',
fieldName: 'handle',
position: 0,
isVisible: true,
size: 150,
},
}),
allMessageChannelsType: createStandardViewFieldFlatMetadata({
...args,
objectName: 'messageChannel',
context: {
viewName: 'allMessageChannels',
viewFieldName: 'type',
fieldName: 'type',
position: 2,
isVisible: true,
size: 150,
},
}),
allMessageChannelsVisibility: createStandardViewFieldFlatMetadata({
...args,
objectName: 'messageChannel',
context: {
viewName: 'allMessageChannels',
viewFieldName: 'visibility',
fieldName: 'visibility',
position: 3,
isVisible: true,
size: 150,
},
}),
allMessageChannelsIsSyncEnabled: createStandardViewFieldFlatMetadata({
...args,
objectName: 'messageChannel',
context: {
viewName: 'allMessageChannels',
viewFieldName: 'isSyncEnabled',
fieldName: 'isSyncEnabled',
position: 4,
isVisible: true,
size: 150,
},
}),
allMessageChannelsSyncStatus: createStandardViewFieldFlatMetadata({
...args,
objectName: 'messageChannel',
context: {
viewName: 'allMessageChannels',
viewFieldName: 'syncStatus',
fieldName: 'syncStatus',
position: 5,
isVisible: true,
size: 150,
},
}),
allMessageChannelsCreatedAt: createStandardViewFieldFlatMetadata({
...args,
objectName: 'messageChannel',
context: {
viewName: 'allMessageChannels',
viewFieldName: 'createdAt',
fieldName: 'createdAt',
position: 6,
isVisible: true,
size: 150,
},
}),
messageChannelRecordPageFieldsType: createStandardViewFieldFlatMetadata({
...args,
objectName: 'messageChannel',
context: {
viewName: 'messageChannelRecordPageFields',
viewFieldName: 'type',
fieldName: 'type',
position: 2,
isVisible: true,
size: 150,
viewFieldGroupName: 'general',
},
}),
messageChannelRecordPageFieldsVisibility:
createStandardViewFieldFlatMetadata({
...args,
objectName: 'messageChannel',
context: {
viewName: 'messageChannelRecordPageFields',
viewFieldName: 'visibility',
fieldName: 'visibility',
position: 3,
isVisible: true,
size: 150,
viewFieldGroupName: 'general',
},
}),
messageChannelRecordPageFieldsIsSyncEnabled:
createStandardViewFieldFlatMetadata({
...args,
objectName: 'messageChannel',
context: {
viewName: 'messageChannelRecordPageFields',
viewFieldName: 'isSyncEnabled',
fieldName: 'isSyncEnabled',
position: 4,
isVisible: true,
size: 150,
viewFieldGroupName: 'general',
},
}),
messageChannelRecordPageFieldsSyncStatus:
createStandardViewFieldFlatMetadata({
...args,
objectName: 'messageChannel',
context: {
viewName: 'messageChannelRecordPageFields',
viewFieldName: 'syncStatus',
fieldName: 'syncStatus',
position: 5,
isVisible: true,
size: 150,
viewFieldGroupName: 'general',
},
}),
messageChannelRecordPageFieldsCreatedAt:
createStandardViewFieldFlatMetadata({
...args,
objectName: 'messageChannel',
context: {
viewName: 'messageChannelRecordPageFields',
viewFieldName: 'createdAt',
fieldName: 'createdAt',
position: 0,
isVisible: true,
size: 150,
viewFieldGroupName: 'system',
},
}),
messageChannelRecordPageFieldsCreatedBy:
createStandardViewFieldFlatMetadata({
...args,
objectName: 'messageChannel',
context: {
viewName: 'messageChannelRecordPageFields',
viewFieldName: 'createdBy',
fieldName: 'createdBy',
position: 1,
isVisible: true,
size: 150,
viewFieldGroupName: 'system',
},
}),
};
};
@@ -1,144 +0,0 @@
import { type FlatViewField } from 'src/engine/metadata-modules/flat-view-field/types/flat-view-field.type';
import {
createStandardViewFieldFlatMetadata,
type CreateStandardViewFieldArgs,
} from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field/create-standard-view-field-flat-metadata.util';
export const computeStandardMessageFolderViewFields = (
args: Omit<CreateStandardViewFieldArgs<'messageFolder'>, 'context'>,
): Record<string, FlatViewField> => {
return {
allMessageFoldersName: createStandardViewFieldFlatMetadata({
...args,
objectName: 'messageFolder',
context: {
viewName: 'allMessageFolders',
viewFieldName: 'name',
fieldName: 'name',
position: 0,
isVisible: true,
size: 150,
},
}),
allMessageFoldersMessageChannel: createStandardViewFieldFlatMetadata({
...args,
objectName: 'messageFolder',
context: {
viewName: 'allMessageFolders',
viewFieldName: 'messageChannelId',
fieldName: 'messageChannelId',
position: 1,
isVisible: true,
size: 150,
},
}),
allMessageFoldersIsSentFolder: createStandardViewFieldFlatMetadata({
...args,
objectName: 'messageFolder',
context: {
viewName: 'allMessageFolders',
viewFieldName: 'isSentFolder',
fieldName: 'isSentFolder',
position: 2,
isVisible: true,
size: 150,
},
}),
allMessageFoldersIsSynced: createStandardViewFieldFlatMetadata({
...args,
objectName: 'messageFolder',
context: {
viewName: 'allMessageFolders',
viewFieldName: 'isSynced',
fieldName: 'isSynced',
position: 3,
isVisible: true,
size: 150,
},
}),
allMessageFoldersCreatedAt: createStandardViewFieldFlatMetadata({
...args,
objectName: 'messageFolder',
context: {
viewName: 'allMessageFolders',
viewFieldName: 'createdAt',
fieldName: 'createdAt',
position: 4,
isVisible: true,
size: 150,
},
}),
messageFolderRecordPageFieldsMessageChannel:
createStandardViewFieldFlatMetadata({
...args,
objectName: 'messageFolder',
context: {
viewName: 'messageFolderRecordPageFields',
viewFieldName: 'messageChannelId',
fieldName: 'messageChannelId',
position: 1,
isVisible: true,
size: 150,
viewFieldGroupName: 'general',
},
}),
messageFolderRecordPageFieldsIsSentFolder:
createStandardViewFieldFlatMetadata({
...args,
objectName: 'messageFolder',
context: {
viewName: 'messageFolderRecordPageFields',
viewFieldName: 'isSentFolder',
fieldName: 'isSentFolder',
position: 2,
isVisible: true,
size: 150,
viewFieldGroupName: 'general',
},
}),
messageFolderRecordPageFieldsIsSynced: createStandardViewFieldFlatMetadata({
...args,
objectName: 'messageFolder',
context: {
viewName: 'messageFolderRecordPageFields',
viewFieldName: 'isSynced',
fieldName: 'isSynced',
position: 3,
isVisible: true,
size: 150,
viewFieldGroupName: 'general',
},
}),
messageFolderRecordPageFieldsCreatedAt: createStandardViewFieldFlatMetadata(
{
...args,
objectName: 'messageFolder',
context: {
viewName: 'messageFolderRecordPageFields',
viewFieldName: 'createdAt',
fieldName: 'createdAt',
position: 0,
isVisible: true,
size: 150,
viewFieldGroupName: 'system',
},
},
),
messageFolderRecordPageFieldsCreatedBy: createStandardViewFieldFlatMetadata(
{
...args,
objectName: 'messageFolder',
context: {
viewName: 'messageFolderRecordPageFields',
viewFieldName: 'createdBy',
fieldName: 'createdBy',
position: 1,
isVisible: true,
size: 150,
viewFieldGroupName: 'system',
},
},
),
};
};
@@ -5,7 +5,6 @@ import { type FlatView } from 'src/engine/metadata-modules/flat-view/types/flat-
import { type AllStandardObjectName } from 'src/engine/workspace-manager/twenty-standard-application/types/all-standard-object-name.type';
import { computeStandardAttachmentViews } from 'src/engine/workspace-manager/twenty-standard-application/utils/view/compute-standard-attachment-views.util';
import { computeStandardBlocklistViews } from 'src/engine/workspace-manager/twenty-standard-application/utils/view/compute-standard-blocklist-views.util';
import { computeStandardCalendarChannelViews } from 'src/engine/workspace-manager/twenty-standard-application/utils/view/compute-standard-calendar-channel-views.util';
import { computeStandardCalendarChannelEventAssociationViews } from 'src/engine/workspace-manager/twenty-standard-application/utils/view/compute-standard-calendar-channel-event-association-views.util';
import { computeStandardCalendarEventParticipantViews } from 'src/engine/workspace-manager/twenty-standard-application/utils/view/compute-standard-calendar-event-participant-views.util';
import { computeStandardCalendarEventViews } from 'src/engine/workspace-manager/twenty-standard-application/utils/view/compute-standard-calendar-event-views.util';
@@ -13,8 +12,6 @@ import { computeStandardCompanyViews } from 'src/engine/workspace-manager/twenty
import { computeStandardDashboardViews } from 'src/engine/workspace-manager/twenty-standard-application/utils/view/compute-standard-dashboard-views.util';
import { computeStandardMessageChannelMessageAssociationMessageFolderViews } from 'src/engine/workspace-manager/twenty-standard-application/utils/view/compute-standard-message-channel-message-association-message-folder-views.util';
import { computeStandardMessageChannelMessageAssociationViews } from 'src/engine/workspace-manager/twenty-standard-application/utils/view/compute-standard-message-channel-message-association-views.util';
import { computeStandardMessageChannelViews } from 'src/engine/workspace-manager/twenty-standard-application/utils/view/compute-standard-message-channel-views.util';
import { computeStandardMessageFolderViews } from 'src/engine/workspace-manager/twenty-standard-application/utils/view/compute-standard-message-folder-views.util';
import { computeStandardMessageParticipantViews } from 'src/engine/workspace-manager/twenty-standard-application/utils/view/compute-standard-message-participant-views.util';
import { computeStandardMessageThreadViews } from 'src/engine/workspace-manager/twenty-standard-application/utils/view/compute-standard-message-thread-views.util';
import { computeStandardMessageViews } from 'src/engine/workspace-manager/twenty-standard-application/utils/view/compute-standard-message-views.util';
@@ -39,7 +36,6 @@ type StandardViewBuilder<P extends AllStandardObjectName> = (
const STANDARD_FLAT_VIEW_METADATA_BUILDERS_BY_OBJECT_NAME = {
attachment: computeStandardAttachmentViews,
blocklist: computeStandardBlocklistViews,
calendarChannel: computeStandardCalendarChannelViews,
calendarChannelEventAssociation:
computeStandardCalendarChannelEventAssociationViews,
calendarEvent: computeStandardCalendarEventViews,
@@ -47,12 +43,10 @@ const STANDARD_FLAT_VIEW_METADATA_BUILDERS_BY_OBJECT_NAME = {
company: computeStandardCompanyViews,
dashboard: computeStandardDashboardViews,
message: computeStandardMessageViews,
messageChannel: computeStandardMessageChannelViews,
messageChannelMessageAssociation:
computeStandardMessageChannelMessageAssociationViews,
messageChannelMessageAssociationMessageFolder:
computeStandardMessageChannelMessageAssociationMessageFolderViews,
messageFolder: computeStandardMessageFolderViews,
messageParticipant: computeStandardMessageParticipantViews,
messageThread: computeStandardMessageThreadViews,
note: computeStandardNoteViews,
@@ -1,38 +0,0 @@
import { ViewType, ViewKey } from 'twenty-shared/types';
import { type FlatView } from 'src/engine/metadata-modules/flat-view/types/flat-view.type';
import {
createStandardViewFlatMetadata,
type CreateStandardViewArgs,
} from 'src/engine/workspace-manager/twenty-standard-application/utils/view/create-standard-view-flat-metadata.util';
export const computeStandardCalendarChannelViews = (
args: Omit<CreateStandardViewArgs<'calendarChannel'>, 'context'>,
): Record<string, FlatView> => {
return {
allCalendarChannels: createStandardViewFlatMetadata({
...args,
objectName: 'calendarChannel',
context: {
viewName: 'allCalendarChannels',
name: 'All {objectLabelPlural}',
type: ViewType.TABLE,
key: ViewKey.INDEX,
position: 0,
icon: 'IconList',
},
}),
calendarChannelRecordPageFields: createStandardViewFlatMetadata({
...args,
objectName: 'calendarChannel',
context: {
viewName: 'calendarChannelRecordPageFields',
name: 'Calendar Channel Record Page Fields',
type: ViewType.FIELDS_WIDGET,
key: null,
position: 0,
icon: 'IconList',
},
}),
};
};
@@ -1,38 +0,0 @@
import { ViewType, ViewKey } from 'twenty-shared/types';
import { type FlatView } from 'src/engine/metadata-modules/flat-view/types/flat-view.type';
import {
createStandardViewFlatMetadata,
type CreateStandardViewArgs,
} from 'src/engine/workspace-manager/twenty-standard-application/utils/view/create-standard-view-flat-metadata.util';
export const computeStandardMessageChannelViews = (
args: Omit<CreateStandardViewArgs<'messageChannel'>, 'context'>,
): Record<string, FlatView> => {
return {
allMessageChannels: createStandardViewFlatMetadata({
...args,
objectName: 'messageChannel',
context: {
viewName: 'allMessageChannels',
name: 'All {objectLabelPlural}',
type: ViewType.TABLE,
key: ViewKey.INDEX,
position: 0,
icon: 'IconList',
},
}),
messageChannelRecordPageFields: createStandardViewFlatMetadata({
...args,
objectName: 'messageChannel',
context: {
viewName: 'messageChannelRecordPageFields',
name: 'Message Channel Record Page Fields',
type: ViewType.FIELDS_WIDGET,
key: null,
position: 0,
icon: 'IconList',
},
}),
};
};
@@ -1,38 +0,0 @@
import { ViewType, ViewKey } from 'twenty-shared/types';
import { type FlatView } from 'src/engine/metadata-modules/flat-view/types/flat-view.type';
import {
createStandardViewFlatMetadata,
type CreateStandardViewArgs,
} from 'src/engine/workspace-manager/twenty-standard-application/utils/view/create-standard-view-flat-metadata.util';
export const computeStandardMessageFolderViews = (
args: Omit<CreateStandardViewArgs<'messageFolder'>, 'context'>,
): Record<string, FlatView> => {
return {
allMessageFolders: createStandardViewFlatMetadata({
...args,
objectName: 'messageFolder',
context: {
viewName: 'allMessageFolders',
name: 'All {objectLabelPlural}',
type: ViewType.TABLE,
key: ViewKey.INDEX,
position: 0,
icon: 'IconList',
},
}),
messageFolderRecordPageFields: createStandardViewFlatMetadata({
...args,
objectName: 'messageFolder',
context: {
viewName: 'messageFolderRecordPageFields',
name: 'Message Folder Record Page Fields',
type: ViewType.FIELDS_WIDGET,
key: null,
position: 0,
icon: 'IconList',
},
}),
};
};
@@ -6,7 +6,6 @@ export const STANDARD_OBJECT_ICONS = {
blocklist: 'IconForbid2',
behavioralEvent: 'IconTimelineEvent',
calendarChannelEventAssociation: 'IconCalendar',
calendarChannel: 'IconCalendar',
calendarEventParticipant: 'IconCalendar',
calendarEvent: 'IconCalendar',
comment: 'IconMessageCircle',
@@ -14,8 +13,6 @@ export const STANDARD_OBJECT_ICONS = {
dashboard: 'IconLayoutDashboard',
auditLog: 'IconTimelineEvent',
messageChannelMessageAssociation: 'IconMessage',
messageChannel: 'IconMessage',
messageFolder: 'IconFolder',
messageParticipant: 'IconUserCircle',
messageThread: 'IconMessage',
messageThreadSubscriber: 'IconPerson',
@@ -10,7 +10,7 @@ export const safeParseEmailAddresses = (header: string): EmailAddress[] => {
address: parsed.address,
name: parsed.name ?? '',
}));
} catch (error) {
} catch {
return [];
}
};
@@ -1,77 +0,0 @@
import request from 'supertest';
const client = request(`http://localhost:${APP_PORT}`);
describe('calendarChannelsResolver (e2e)', () => {
it('should find many calendarChannels', () => {
const queryData = {
query: `
query calendarChannels {
calendarChannels {
edges {
node {
handle
syncStatus
syncStage
visibility
isContactAutoCreationEnabled
contactAutoCreationPolicy
isSyncEnabled
syncCursor
syncedAt
syncStageStartedAt
throttleFailureCount
id
createdAt
updatedAt
deletedAt
connectedAccountId
}
}
}
}
`,
};
return client
.post('/graphql')
.set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`)
.send(queryData)
.expect(200)
.expect((res) => {
expect(res.body.data).toBeDefined();
expect(res.body.errors).toBeUndefined();
})
.expect((res) => {
const data = res.body.data.calendarChannels;
expect(data).toBeDefined();
expect(Array.isArray(data.edges)).toBe(true);
const edges = data.edges;
if (edges.length > 0) {
const calendarChannels = edges[0].node;
expect(calendarChannels).toHaveProperty('handle');
expect(calendarChannels).toHaveProperty('syncStatus');
expect(calendarChannels).toHaveProperty('syncStage');
expect(calendarChannels).toHaveProperty('visibility');
expect(calendarChannels).toHaveProperty(
'isContactAutoCreationEnabled',
);
expect(calendarChannels).toHaveProperty('contactAutoCreationPolicy');
expect(calendarChannels).toHaveProperty('isSyncEnabled');
expect(calendarChannels).toHaveProperty('syncCursor');
expect(calendarChannels).toHaveProperty('syncedAt');
expect(calendarChannels).toHaveProperty('syncStageStartedAt');
expect(calendarChannels).toHaveProperty('throttleFailureCount');
expect(calendarChannels).toHaveProperty('id');
expect(calendarChannels).toHaveProperty('createdAt');
expect(calendarChannels).toHaveProperty('updatedAt');
expect(calendarChannels).toHaveProperty('deletedAt');
expect(calendarChannels).toHaveProperty('connectedAccountId');
}
});
});
});
@@ -1,85 +0,0 @@
import request from 'supertest';
const client = request(`http://localhost:${APP_PORT}`);
describe('messageChannelsResolver (e2e)', () => {
it('should find many messageChannels', () => {
const queryData = {
query: `
query messageChannels {
messageChannels {
edges {
node {
visibility
handle
type
isContactAutoCreationEnabled
contactAutoCreationPolicy
excludeNonProfessionalEmails
excludeGroupEmails
isSyncEnabled
syncCursor
syncedAt
syncStatus
syncStage
syncStageStartedAt
throttleFailureCount
id
createdAt
updatedAt
deletedAt
connectedAccountId
}
}
}
}
`,
};
return client
.post('/graphql')
.set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`)
.send(queryData)
.expect(200)
.expect((res) => {
expect(res.body.data).toBeDefined();
expect(res.body.errors).toBeUndefined();
})
.expect((res) => {
const data = res.body.data.messageChannels;
expect(data).toBeDefined();
expect(Array.isArray(data.edges)).toBe(true);
const edges = data.edges;
if (edges.length > 0) {
const messageChannels = edges[0].node;
expect(messageChannels).toHaveProperty('visibility');
expect(messageChannels).toHaveProperty('handle');
expect(messageChannels).toHaveProperty('type');
expect(messageChannels).toHaveProperty(
'isContactAutoCreationEnabled',
);
expect(messageChannels).toHaveProperty('contactAutoCreationPolicy');
expect(messageChannels).toHaveProperty(
'excludeNonProfessionalEmails',
);
expect(messageChannels).toHaveProperty('excludeGroupEmails');
expect(messageChannels).toHaveProperty('isSyncEnabled');
expect(messageChannels).toHaveProperty('syncCursor');
expect(messageChannels).toHaveProperty('syncedAt');
expect(messageChannels).toHaveProperty('syncStatus');
expect(messageChannels).toHaveProperty('syncStage');
expect(messageChannels).toHaveProperty('syncStageStartedAt');
expect(messageChannels).toHaveProperty('throttleFailureCount');
expect(messageChannels).toHaveProperty('id');
expect(messageChannels).toHaveProperty('createdAt');
expect(messageChannels).toHaveProperty('updatedAt');
expect(messageChannels).toHaveProperty('deletedAt');
expect(messageChannels).toHaveProperty('connectedAccountId');
}
});
});
});
@@ -1,3 +1,3 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
exports[`Query Complexity should fail to execute a query with too many root resolvers 1`] = `"Query too complex - Too many root resolvers requested: 22 - Maximum allowed root resolvers: 20"`;
exports[`Query Complexity should fail to execute a query with too many root resolvers 1`] = `"Query too complex - Too many root resolvers requested: 23 - Maximum allowed root resolvers: 20"`;
@@ -79,13 +79,6 @@ export const TOO_MANY_ROOT_RESOLVERS_QUERY_GQL_FIELDS = gql`
}
}
}
calendarChannels {
edges {
node {
id
}
}
}
calendarChannelEventAssociations {
edges {
node {
@@ -100,13 +93,6 @@ export const TOO_MANY_ROOT_RESOLVERS_QUERY_GQL_FIELDS = gql`
}
}
}
messageChannels {
edges {
node {
id
}
}
}
messageChannelMessageAssociations {
edges {
node {
@@ -156,5 +142,26 @@ export const TOO_MANY_ROOT_RESOLVERS_QUERY_GQL_FIELDS = gql`
}
}
}
messages {
edges {
node {
id
}
}
}
messageParticipants {
edges {
node {
id
}
}
}
workspaceMembers {
edges {
node {
id
}
}
}
}
`;
@@ -1,7 +1,7 @@
import { gql } from 'graphql-tag';
import { makeMetadataAPIRequest } from 'test/integration/metadata/suites/utils/make-metadata-api-request.util';
import { CALENDAR_CHANNEL_DATA_SEED_IDS } from 'src/engine/workspace-manager/dev-seeder/data/constants/calendar-channel-data-seeds.constant';
import { CALENDAR_CHANNEL_DATA_SEED_IDS } from 'src/engine/workspace-manager/dev-seeder/core/constants/calendar-channel-seed-ids.constant';
import { CONNECTED_ACCOUNT_DATA_SEED_IDS } from 'src/engine/workspace-manager/dev-seeder/data/constants/connected-account-data-seeds.constant';
describe('calendarChannelResolver (e2e)', () => {
@@ -2,7 +2,7 @@ import { gql } from 'graphql-tag';
import { makeMetadataAPIRequest } from 'test/integration/metadata/suites/utils/make-metadata-api-request.util';
import { CONNECTED_ACCOUNT_DATA_SEED_IDS } from 'src/engine/workspace-manager/dev-seeder/data/constants/connected-account-data-seeds.constant';
import { MESSAGE_CHANNEL_DATA_SEED_IDS } from 'src/engine/workspace-manager/dev-seeder/data/constants/message-channel-data-seeds.constant';
import { MESSAGE_CHANNEL_DATA_SEED_IDS } from 'src/engine/workspace-manager/dev-seeder/core/constants/message-channel-seed-ids.constant';
describe('messageChannelResolver (e2e)', () => {
describe('myMessageChannels', () => {
@@ -1,8 +1,8 @@
import { gql } from 'graphql-tag';
import { makeMetadataAPIRequest } from 'test/integration/metadata/suites/utils/make-metadata-api-request.util';
import { MESSAGE_CHANNEL_DATA_SEED_IDS } from 'src/engine/workspace-manager/dev-seeder/data/constants/message-channel-data-seeds.constant';
import { MESSAGE_FOLDER_DATA_SEED_IDS } from 'src/engine/workspace-manager/dev-seeder/data/constants/message-folder-data-seeds.constant';
import { MESSAGE_CHANNEL_DATA_SEED_IDS } from 'src/engine/workspace-manager/dev-seeder/core/constants/message-channel-seed-ids.constant';
import { MESSAGE_FOLDER_DATA_SEED_IDS } from 'src/engine/workspace-manager/dev-seeder/core/constants/message-folder-seed-ids.constant';
describe('messageFolderResolver (e2e)', () => {
describe('myMessageFolders', () => {
@@ -9,14 +9,11 @@ export const OBJECTS_WITH_CHANNEL_VISIBILITY_CONSTRAINTS = [
'blocklist',
'message',
'messageThread',
'messageChannel',
'messageParticipant',
'messageFolder',
'messageChannelMessageAssociation',
'messageChannelMessageAssociationMessageFolder',
'messageThreadSubscriber',
'calendarEvent',
'calendarChannel',
'calendarChannelEventAssociation',
'calendarEventParticipant',
] as const;
@@ -297,117 +297,6 @@ export const STANDARD_OBJECTS = {
},
},
},
calendarChannel: {
universalIdentifier: '20202020-e8f2-40e1-a39c-c0e0039c5034',
fields: {
id: { universalIdentifier: '20202020-c02a-4031-8a31-1a2f3b4c5d6e' },
createdAt: {
universalIdentifier: '20202020-c02b-4032-9b32-2b3f4c5d6e7f',
},
updatedAt: {
universalIdentifier: '20202020-c02c-4033-8c33-3c4f5d6e7f8a',
},
deletedAt: {
universalIdentifier: '20202020-c02d-4034-9d34-4d5f6e7f8a9b',
},
handle: {
universalIdentifier: '20202020-1d08-420a-9aa7-22e0f298232d',
},
visibility: {
universalIdentifier: '20202020-1b07-4796-9f01-d626bab7ca4d',
},
isContactAutoCreationEnabled: {
universalIdentifier: '20202020-50fb-404b-ba28-369911a3793a',
},
contactAutoCreationPolicy: {
universalIdentifier: '20202020-b55d-447d-b4df-226319058775',
},
isSyncEnabled: {
universalIdentifier: '20202020-fe19-4818-8854-21f7b1b43395',
},
syncCursor: {
universalIdentifier: '20202020-bac2-4852-a5cb-7a7898992b70',
},
throttleFailureCount: {
universalIdentifier: '20202020-525c-4b76-b9bd-0dd57fd11d61',
},
syncStatus: {
universalIdentifier: '20202020-7116-41da-8b4b-035975c4eb6a',
},
syncStage: {
universalIdentifier: '20202020-6246-42e6-b5cd-003bd921782c',
},
syncStageStartedAt: {
universalIdentifier: '20202020-a934-46f1-a8e7-9568b1e3a53e',
},
syncedAt: {
universalIdentifier: '20202020-2ff5-4f70-953a-3d0d36357576',
},
createdBy: {
universalIdentifier: '664db1a0-76f4-4429-8452-f8e250ab7545',
},
updatedBy: {
universalIdentifier: '6a397eab-3700-4b08-9eb9-d16b61876193',
},
position: {
universalIdentifier: '566609c9-1c8b-4899-91bb-0af140a89004',
},
searchVector: {
universalIdentifier: 'bc9a982c-c314-49d6-818a-2661ce7e918f',
},
},
indexes: {},
views: {
allCalendarChannels: {
universalIdentifier: '2d11659c-68ae-4ff2-882f-f1cccde372d0',
viewFields: {
handle: {
universalIdentifier: 'dc7ea888-79d6-4b8c-acdd-a72abe8e6326',
},
visibility: {
universalIdentifier: 'a308409d-ee09-4588-b3b2-31b71bced64d',
},
isSyncEnabled: {
universalIdentifier: '120065b8-bcba-4088-b3a8-8ae66def4219',
},
syncStatus: {
universalIdentifier: 'ee3bafb8-6374-44f3-b328-c705c16220ac',
},
createdAt: {
universalIdentifier: 'b2ef299a-b996-4f44-8c75-fad854d7df7f',
},
},
},
calendarChannelRecordPageFields: {
universalIdentifier: '74813eac-7b7e-4483-9d2c-6e14cdc2eeee',
viewFieldGroups: {
general: {
universalIdentifier: 'e015afb4-bb6b-44ab-8077-01196c70bd1b',
},
system: {
universalIdentifier: 'a7e61a73-68b3-46a2-8624-54a4f0a81710',
},
},
viewFields: {
visibility: {
universalIdentifier: '2d9f8c64-12be-4bb1-b0d4-977d89853498',
},
isSyncEnabled: {
universalIdentifier: '819312c0-3441-42a2-a638-8800e353b72f',
},
syncStatus: {
universalIdentifier: 'b95949f7-e4f7-4708-bfd5-6ec66d772465',
},
createdAt: {
universalIdentifier: '8c0e4a82-9846-46b2-988b-8b651395fc52',
},
createdBy: {
universalIdentifier: '35af4126-06bd-43a1-88cb-b1e2a170ccd2',
},
},
},
},
},
calendarEventParticipant: {
universalIdentifier: '20202020-a1c3-47a6-9732-27e5b1e8436d',
fields: {
@@ -1074,243 +963,6 @@ export const STANDARD_OBJECTS = {
},
},
},
messageChannel: {
universalIdentifier: '20202020-fe8c-40bc-a681-b80b771449b7',
fields: {
id: { universalIdentifier: '20202020-b02a-40c1-8ac1-9eafbacbdced' },
createdAt: {
universalIdentifier: '20202020-b02b-40c2-9bc2-afbacbdcedfe',
},
updatedAt: {
universalIdentifier: '20202020-b02c-40c3-8cc3-bacbdcedfefa',
},
deletedAt: {
universalIdentifier: '20202020-b02d-40c4-9dc4-cbdcedfefaab',
},
visibility: {
universalIdentifier: '20202020-6a6b-4532-9767-cbc61b469453',
},
handle: {
universalIdentifier: '20202020-2c96-43c3-93e3-ed6b1acb69bc',
},
type: { universalIdentifier: '20202020-ae95-42d9-a3f1-797a2ea22122' },
isContactAutoCreationEnabled: {
universalIdentifier: '20202020-fabd-4f14-b7c6-3310f6d132c6',
},
contactAutoCreationPolicy: {
universalIdentifier: '20202020-fc0e-4ba6-b259-a66ca89cfa38',
},
excludeNonProfessionalEmails: {
universalIdentifier: '20202020-1df5-445d-b4f3-2413ad178431',
},
excludeGroupEmails: {
universalIdentifier: '20202020-45a0-4be4-9164-5820a6a109fb',
},
messageFolderImportPolicy: {
universalIdentifier: '20202020-cc39-4432-9fe8-ec8ab8bbed95',
},
pendingGroupEmailsAction: {
universalIdentifier: '20202020-17c5-4e9f-bc50-af46a89fdd42',
},
isSyncEnabled: {
universalIdentifier: '20202020-d9a6-48e9-990b-b97fdf22e8dd',
},
syncCursor: {
universalIdentifier: '20202020-79d1-41cf-b738-bcf5ed61e256',
},
syncedAt: {
universalIdentifier: '20202020-263d-4c6b-ad51-137ada56f7d4',
},
syncStatus: {
universalIdentifier: '20202020-56a1-4f7e-9880-a8493bb899cc',
},
syncStage: {
universalIdentifier: '20202020-7979-4b08-89fe-99cb5e698767',
},
syncStageStartedAt: {
universalIdentifier: '20202020-8c61-4a42-ae63-73c1c3c52e06',
},
throttleFailureCount: {
universalIdentifier: '20202020-0291-42be-9ad0-d578a51684ab',
},
throttleRetryAfter: {
universalIdentifier: '20202020-a1e3-4d7f-b5c2-9f8e6d4c3b2a',
},
createdBy: {
universalIdentifier: 'b7de8fcc-a7c6-4122-b3fa-1fcf8f30931c',
},
updatedBy: {
universalIdentifier: '88bb6ff1-b8a1-4313-95d4-7879acca0b93',
},
position: {
universalIdentifier: 'bc8a36af-8b9c-4548-a0da-c90e899e7243',
},
searchVector: {
universalIdentifier: '5e84794c-6f14-4bdf-81a6-76ee11cda51f',
},
},
indexes: {},
views: {
allMessageChannels: {
universalIdentifier: '95f57f8e-eaac-46f7-b364-4ef8208f165f',
viewFields: {
handle: {
universalIdentifier: 'f71a30b0-ee4a-4d36-847a-d0c99134fbb8',
},
type: {
universalIdentifier: 'fa480cec-938c-4216-95fe-ba4335e20a41',
},
visibility: {
universalIdentifier: '2c43e4f6-7024-47a0-a91a-7d491b1fac84',
},
isSyncEnabled: {
universalIdentifier: '69884c47-0c2e-4988-bbc1-23242993634e',
},
syncStatus: {
universalIdentifier: '6189c285-d390-4fd9-ae7a-ca011d8ad98f',
},
createdAt: {
universalIdentifier: '45044b65-b17b-468d-a23d-075733c6b631',
},
},
},
messageChannelRecordPageFields: {
universalIdentifier: '1350eb34-7ef0-4b25-8a3e-23b4a959c3a2',
viewFieldGroups: {
general: {
universalIdentifier: '96113215-6bf2-476c-ae69-c70274257913',
},
system: {
universalIdentifier: '2f08a624-e1a7-4f79-b5f7-1a8e92f4c07e',
},
},
viewFields: {
type: {
universalIdentifier: '280b9097-0bcf-4389-9ee7-fa89990d1369',
},
visibility: {
universalIdentifier: '8dd39475-f109-4117-bce4-9e183382b475',
},
isSyncEnabled: {
universalIdentifier: '5136d071-3b11-48cd-b7be-4910bd6264f9',
},
syncStatus: {
universalIdentifier: '76db0713-06d3-4133-9144-9d0300a2824e',
},
createdAt: {
universalIdentifier: '8636c740-3282-4a6b-99f6-f3f48e59b0af',
},
createdBy: {
universalIdentifier: 'cdf294ce-4c52-4987-a301-8219fa81ab2e',
},
},
},
},
},
messageFolder: {
universalIdentifier: '20202020-4955-4fd9-8e59-2dbd373f2a46',
fields: {
id: { universalIdentifier: '20202020-b03a-40d1-8ad1-dcedfefaabbc' },
createdAt: {
universalIdentifier: '20202020-b03b-40d2-9bd2-edfefaabbccd',
},
updatedAt: {
universalIdentifier: '20202020-b03c-40d3-8cd3-fefaabbccdde',
},
deletedAt: {
universalIdentifier: '20202020-b03d-40d4-9dd4-faabbccddeef',
},
name: { universalIdentifier: '20202020-7cf8-40bc-a681-b80b771449b7' },
parentFolderId: {
universalIdentifier: '20202020-e45d-49de-a4aa-587bbf9601f3',
},
messageChannelId: {
universalIdentifier: '20202020-c9f8-43db-a3e7-7f2e8b5d9c1a',
},
syncCursor: {
universalIdentifier: '20202020-98cd-49ed-8dfc-cb5796400e64',
},
isSentFolder: {
universalIdentifier: '20202020-2af5-4a25-b2de-3c9386da941b',
},
isSynced: {
universalIdentifier: '20202020-764f-4e09-8f95-cd46b6bfe3c4',
},
externalId: {
universalIdentifier: '20202020-f3a8-4d2b-9c7e-1b5f9a8e4c6d',
},
pendingSyncAction: {
universalIdentifier: '20202020-4f97-4c79-9517-16387fe237f7',
},
createdBy: {
universalIdentifier: 'bfe19f84-b640-4ce3-b771-4e7bf18bad14',
},
updatedBy: {
universalIdentifier: '7ec7eea8-8715-4656-a602-3cb4256aaca1',
},
position: {
universalIdentifier: '5317d4f4-12c5-469d-8e47-0f3b2ffc95b4',
},
searchVector: {
universalIdentifier: '5f2d3937-bafd-4d71-b4cb-b34037efd2e1',
},
},
indexes: {
messageChannelIdIndex: {
universalIdentifier: '6217f2a5-28ac-4b88-8a2a-45eee4580e57',
},
},
views: {
allMessageFolders: {
universalIdentifier: '6774ebf5-a300-4bcc-8f22-f5e7c58bfccf',
viewFields: {
name: {
universalIdentifier: '72b2d56f-5245-4cb6-933c-3d5031de0778',
},
messageChannelId: {
universalIdentifier: '121abdf0-c89f-4313-b156-e8a3c0cb77ec',
},
isSentFolder: {
universalIdentifier: 'e884a006-e166-434d-82aa-247052165e4d',
},
isSynced: {
universalIdentifier: 'd7e705f4-c2be-4f4e-bcc3-1cdc9e07990b',
},
createdAt: {
universalIdentifier: 'afd4f595-c1a7-4afd-b0fd-b2f0b59203c6',
},
},
},
messageFolderRecordPageFields: {
universalIdentifier: '82dc204f-a48d-4985-9259-a79b3a1b230f',
viewFieldGroups: {
general: {
universalIdentifier: 'c55a9366-bb2c-4ae7-8345-115c790f56b1',
},
system: {
universalIdentifier: '51b6af5e-9f76-4fb2-811b-6193761d7702',
},
},
viewFields: {
messageChannelId: {
universalIdentifier: '2fb6ff09-bed5-4b31-af0f-7fa3df5612da',
},
isSentFolder: {
universalIdentifier: 'ec8a2e3e-0736-41f5-8c8b-d36778d52a94',
},
isSynced: {
universalIdentifier: 'a68f286c-5d13-4794-9354-e282913930f5',
},
createdAt: {
universalIdentifier: '8b63749b-922d-4164-b0f4-65d716b3d75d',
},
createdBy: {
universalIdentifier: '2a93e132-3c92-4b94-acf0-076e4af75df2',
},
},
},
},
},
messageParticipant: {
universalIdentifier: '20202020-a433-4456-aa2d-fd9cb26b774a',
fields: {