Deprecate and backfill delete ConnectedAccount twenty standard object (#20752)

# Introduction
Following connected account permissions refactor and encryption
Removing the old workspace schema twenty standard application
connectedAccount objects and related standard fields and index

- a lot of deadcode
- instance command backfill cleaning the connected account object from
workspaces
This commit is contained in:
Paul Rastoin
2026-05-21 13:42:09 +02:00
committed by GitHub
parent f1b2be041a
commit 9b9c97a049
46 changed files with 1424 additions and 3864 deletions
@@ -8,7 +8,6 @@ export enum CoreObjectNamePlural {
CalendarEvent = 'calendarEvents',
Comment = 'comments',
Company = 'companies',
ConnectedAccount = 'connectedAccounts',
Dashboard = 'dashboards',
TimelineActivity = 'timelineActivities',
Message = 'messages',
@@ -13,9 +13,30 @@ import { WorkflowStepActionDrawerDecorator } from '~/testing/decorators/Workflow
import { WorkflowStepDecorator } from '~/testing/decorators/WorkflowStepDecorator';
import { WorkspaceDecorator } from '~/testing/decorators/WorkspaceDecorator';
import { graphqlMocks } from '~/testing/graphqlMocks';
import { mockedConnectedAccountRecords } from '~/testing/mock-data/generated/data/connectedAccounts/mock-connectedAccounts-data';
import { getWorkflowNodeIdMock } from '~/testing/mock-data/workflow';
const MOCK_CONNECTED_ACCOUNT_ID = '20202020-9ac0-4390-9a1a-ab4d2c4e1bb7';
const mockedConnectedAccounts = [
{
id: MOCK_CONNECTED_ACCOUNT_ID,
handle: 'tim@apple.dev',
provider: 'google',
authFailedAt: null,
scopes: ['email', 'calendar'],
handleAliases: '',
lastSignedInAt: null,
userWorkspaceId: '20202020-0687-4c41-b707-ed1bfca972a7',
connectionProviderId: null,
name: 'Tim Apple',
visibility: 'SHARE_EVERYTHING',
lastCredentialsRefreshedAt: null,
connectionParameters: null,
createdAt: '2026-02-27T01:17:25.392Z',
updatedAt: '2026-02-27T01:17:25.392Z',
},
];
const DEFAULT_SEND_EMAIL_ACTION: WorkflowSendEmailAction = {
id: getWorkflowNodeIdMock(),
name: 'Send Email',
@@ -53,7 +74,7 @@ const CONFIGURED_SEND_EMAIL_ACTION: WorkflowSendEmailAction = {
valid: true,
settings: {
input: {
connectedAccountId: mockedConnectedAccountRecords[0].id as string,
connectedAccountId: MOCK_CONNECTED_ACCOUNT_ID,
recipients: {
to: 'test@twenty.com',
cc: '',
@@ -113,21 +134,24 @@ const meta: Meta<typeof WorkflowEditActionEmailBase> = {
msw: {
handlers: [
...graphqlMocks.handlers,
graphql.query('FindManyConnectedAccounts', () => {
graphql.query('MyConnectedAccounts', () => {
return HttpResponse.json({
data: {
connectedAccounts: {
edges: mockedConnectedAccountRecords.map((record) => ({
node: record,
cursor: record.id,
})),
pageInfo: {
hasNextPage: false,
hasPreviousPage: false,
startCursor: null,
endCursor: null,
},
},
myConnectedAccounts: mockedConnectedAccounts,
},
});
}),
graphql.query('MyMessageChannels', () => {
return HttpResponse.json({
data: {
myMessageChannels: [],
},
});
}),
graphql.query('MyCalendarChannels', () => {
return HttpResponse.json({
data: {
myCalendarChannels: [],
},
});
}),
@@ -32,109 +32,69 @@ export const TwoConnectedAccounts: Story = {
msw: {
handlers: [
...graphqlMocks.handlers,
graphql.query('FindManyConnectedAccounts', () => {
graphql.query('MyConnectedAccounts', () => {
return HttpResponse.json({
data: {
connectedAccounts: {
__typename: 'ConnectedAccountConnection',
totalCount: 1,
pageInfo: {
__typename: 'PageInfo',
hasNextPage: false,
startCursor: '',
endCursor: '',
myConnectedAccounts: [
{
id: '20202020-954c-4d76-9a87-e5f072d4b7ef',
handle: 'test.test@gmail.com',
provider: 'google',
authFailedAt: null,
scopes: ['calendar'],
handleAliases: '',
lastSignedInAt: null,
userWorkspaceId: '20202020-03f2-4d83-b0d5-2ec2bcee72d4',
connectionProviderId: null,
name: 'Test User',
visibility: 'SHARE_EVERYTHING',
lastCredentialsRefreshedAt: null,
connectionParameters: null,
createdAt: '2024-07-03T20:03:35.064Z',
updatedAt: '2024-07-03T20:03:35.064Z',
},
edges: [
{
__typename: 'ConnectedAccountEdge',
cursor: '',
node: {
__typename: 'ConnectedAccount',
accessToken: '',
refreshToken: '',
updatedAt: '2024-07-03T20:03:35.064Z',
createdAt: '2024-07-03T20:03:35.064Z',
id: '20202020-954c-4d76-9a87-e5f072d4b7ef',
provider: 'google',
accountOwnerId: '20202020-03f2-4d83-b0d5-2ec2bcee72d4',
lastSyncHistoryId: '',
handleAliases: '',
handle: 'test.test@gmail.com',
authFailedAt: null,
},
},
],
},
],
},
});
}),
graphql.query('FindManyCalendarChannels', () => {
graphql.query('MyCalendarChannels', () => {
return HttpResponse.json({
data: {
calendarChannels: {
__typename: 'CalendarChannelConnection',
totalCount: 2,
pageInfo: {
__typename: 'PageInfo',
hasNextPage: false,
startCursor: '',
endCursor: '',
myCalendarChannels: [
{
id: '20202020-ef5a-4822-9e08-ce6e6a4dcb6f',
handle: 'test.test@gmail.com',
connectedAccountId: '20202020-954c-4d76-9a87-e5f072d4b7ef',
isSyncEnabled: true,
syncStage: 'CALENDAR_EVENT_LIST_FETCH_PENDING',
syncStatus: 'COMPLETED',
visibility: 'SHARE_EVERYTHING',
contactAutoCreationPolicy: 'SENT',
isContactAutoCreationEnabled: true,
createdAt: '2024-07-03T20:03:11.903Z',
updatedAt: '2024-07-03T20:03:11.903Z',
},
edges: [
{
__typename: 'CalendarChannelEdge',
cursor: '',
node: {
__typename: 'CalendarChannel',
handle: 'test.test@gmail.com',
excludeNonProfessionalEmails: true,
syncStageStartedAt: null,
id: '20202020-ef5a-4822-9e08-ce6e6a4dcb6f',
updatedAt: '2024-07-03T20:03:11.903Z',
createdAt: '2024-07-03T20:03:11.903Z',
connectedAccountId:
'20202020-954c-4d76-9a87-e5f072d4b7ef',
contactAutoCreationPolicy: 'SENT',
syncStage: 'CALENDAR_EVENT_LIST_FETCH_PENDING',
type: 'email',
isContactAutoCreationEnabled: true,
syncCursor: '1562764',
excludeGroupEmails: true,
throttleFailureCount: 0,
isSyncEnabled: true,
visibility: 'SHARE_EVERYTHING',
syncStatus: 'COMPLETED',
syncedAt: '2024-07-04T16:25:04.960Z',
},
},
{
__typename: 'CalendarChannelEdge',
cursor: '',
node: {
__typename: 'CalendarChannel',
handle: 'test.test2@gmail.com',
excludeNonProfessionalEmails: true,
syncStageStartedAt: null,
id: '20202020-ef5a-4822-9e08-ce6e6a4dcb6a',
updatedAt: '2024-07-03T20:03:11.903Z',
createdAt: '2024-07-03T20:03:11.903Z',
connectedAccountId:
'20202020-954c-4d76-9a87-e5f072d4b7ef',
contactAutoCreationPolicy: 'SENT',
syncStage: 'PARTIAL_CALENDAR_EVENT_LIST_FETCH_PENDING',
type: 'email',
isContactAutoCreationEnabled: true,
syncCursor: '1562764',
excludeGroupEmails: true,
throttleFailureCount: 0,
isSyncEnabled: true,
visibility: 'SHARE_EVERYTHING',
syncStatus: 'COMPLETED',
syncedAt: '2024-07-04T16:25:04.960Z',
},
},
],
},
{
id: '20202020-ef5a-4822-9e08-ce6e6a4dcb6a',
handle: 'test.test2@gmail.com',
connectedAccountId: '20202020-954c-4d76-9a87-e5f072d4b7ef',
isSyncEnabled: true,
syncStage: 'PARTIAL_CALENDAR_EVENT_LIST_FETCH_PENDING',
syncStatus: 'COMPLETED',
visibility: 'SHARE_EVERYTHING',
contactAutoCreationPolicy: 'SENT',
isContactAutoCreationEnabled: true,
createdAt: '2024-07-03T20:03:11.903Z',
updatedAt: '2024-07-03T20:03:11.903Z',
},
],
},
});
}),
graphql.query('MyMessageChannels', () => {
return HttpResponse.json({
data: {
myMessageChannels: [],
},
});
}),
@@ -33,109 +33,75 @@ export const TwoConnectedAccounts: Story = {
msw: {
handlers: [
...graphqlMocks.handlers,
graphql.query('FindManyConnectedAccounts', () => {
graphql.query('MyConnectedAccounts', () => {
return HttpResponse.json({
data: {
connectedAccounts: {
__typename: 'ConnectedAccountConnection',
totalCount: 1,
pageInfo: {
__typename: 'PageInfo',
hasNextPage: false,
startCursor: '',
endCursor: '',
myConnectedAccounts: [
{
id: '20202020-954c-4d76-9a87-e5f072d4b7ef',
handle: 'test.test@gmail.com',
provider: 'google',
authFailedAt: null,
scopes: ['email'],
handleAliases: '',
lastSignedInAt: null,
userWorkspaceId: '20202020-03f2-4d83-b0d5-2ec2bcee72d4',
connectionProviderId: null,
name: 'Test User',
visibility: 'SHARE_EVERYTHING',
lastCredentialsRefreshedAt: null,
connectionParameters: null,
createdAt: '2024-07-03T20:03:35.064Z',
updatedAt: '2024-07-03T20:03:35.064Z',
},
edges: [
{
__typename: 'ConnectedAccountEdge',
cursor: '',
node: {
__typename: 'ConnectedAccount',
accessToken: '',
refreshToken: '',
updatedAt: '2024-07-03T20:03:35.064Z',
createdAt: '2024-07-03T20:03:35.064Z',
id: '20202020-954c-4d76-9a87-e5f072d4b7ef',
provider: 'google',
accountOwnerId: '20202020-03f2-4d83-b0d5-2ec2bcee72d4',
lastSyncHistoryId: '',
handleAliases: '',
handle: 'test.test@gmail.com',
authFailedAt: null,
},
},
],
},
],
},
});
}),
graphql.query('FindManyMessageChannels', () => {
graphql.query('MyMessageChannels', () => {
return HttpResponse.json({
data: {
messageChannels: {
__typename: 'MessageChannelConnection',
totalCount: 2,
pageInfo: {
__typename: 'PageInfo',
hasNextPage: false,
startCursor: '',
endCursor: '',
myMessageChannels: [
{
id: '20202020-ef5a-4822-9e08-ce6e6a4dcb6f',
handle: 'test.test@gmail.com',
connectedAccountId: '20202020-954c-4d76-9a87-e5f072d4b7ef',
type: 'email',
isSyncEnabled: true,
syncStage: 'MESSAGE_LIST_FETCH_PENDING',
syncStatus: 'COMPLETED',
visibility: 'SHARE_EVERYTHING',
contactAutoCreationPolicy: 'SENT',
isContactAutoCreationEnabled: true,
excludeNonProfessionalEmails: true,
excludeGroupEmails: true,
createdAt: '2024-07-03T20:03:11.903Z',
updatedAt: '2024-07-03T20:03:11.903Z',
},
edges: [
{
__typename: 'MessageChannelEdge',
cursor: '',
node: {
__typename: 'MessageChannel',
handle: 'test.test@gmail.com',
excludeNonProfessionalEmails: true,
syncStageStartedAt: null,
id: '20202020-ef5a-4822-9e08-ce6e6a4dcb6f',
updatedAt: '2024-07-03T20:03:11.903Z',
createdAt: '2024-07-03T20:03:11.903Z',
connectedAccountId:
'20202020-954c-4d76-9a87-e5f072d4b7ef',
contactAutoCreationPolicy: 'SENT',
syncStage: 'MESSAGE_LIST_FETCH_PENDING',
type: 'email',
isContactAutoCreationEnabled: true,
syncCursor: '1562764',
excludeGroupEmails: true,
throttleFailureCount: 0,
isSyncEnabled: true,
visibility: 'SHARE_EVERYTHING',
syncStatus: 'COMPLETED',
syncedAt: '2024-07-04T16:25:04.960Z',
},
},
{
__typename: 'MessageChannelEdge',
cursor: '',
node: {
__typename: 'MessageChannel',
handle: 'test.test2@gmail.com',
excludeNonProfessionalEmails: true,
syncStageStartedAt: null,
id: '20202020-ef5a-4822-9e08-ce6e6a4dcb6a',
updatedAt: '2024-07-03T20:03:11.903Z',
createdAt: '2024-07-03T20:03:11.903Z',
connectedAccountId:
'20202020-954c-4d76-9a87-e5f072d4b7ef',
contactAutoCreationPolicy: 'SENT',
syncStage: 'MESSAGE_LIST_FETCH_PENDING',
type: 'email',
isContactAutoCreationEnabled: true,
syncCursor: '1562764',
excludeGroupEmails: true,
throttleFailureCount: 0,
isSyncEnabled: true,
visibility: 'SHARE_EVERYTHING',
syncStatus: 'COMPLETED',
syncedAt: '2024-07-04T16:25:04.960Z',
},
},
],
},
{
id: '20202020-ef5a-4822-9e08-ce6e6a4dcb6a',
handle: 'test.test2@gmail.com',
connectedAccountId: '20202020-954c-4d76-9a87-e5f072d4b7ef',
type: 'email',
isSyncEnabled: true,
syncStage: 'MESSAGE_LIST_FETCH_PENDING',
syncStatus: 'COMPLETED',
visibility: 'SHARE_EVERYTHING',
contactAutoCreationPolicy: 'SENT',
isContactAutoCreationEnabled: true,
excludeNonProfessionalEmails: true,
excludeGroupEmails: true,
createdAt: '2024-07-03T20:03:11.903Z',
updatedAt: '2024-07-03T20:03:11.903Z',
},
],
},
});
}),
graphql.query('MyCalendarChannels', () => {
return HttpResponse.json({
data: {
myCalendarChannels: [],
},
});
}),
@@ -1,246 +0,0 @@
/* oxlint-disable */
// @ts-nocheck
import { type ObjectRecord } from '@/object-record/types/ObjectRecord';
// This file was automatically generated — do not edit manually.
// prettier-ignore
export const mockedConnectedAccountRecords: ObjectRecord[] =
[
{
"__typename": "ConnectedAccount",
"accessToken": "exampleAccessToken",
"accountOwner": {
"__typename": "WorkspaceMember",
"id": "20202020-77d5-4cb6-b60a-f4a835a85d61",
"name": {
"__typename": "FullName",
"firstName": "Jony",
"lastName": "Ive"
}
},
"accountOwnerId": "20202020-77d5-4cb6-b60a-f4a835a85d61",
"authFailedAt": null,
"calendarChannels": {
"__typename": "CalendarChannelConnection",
"edges": [
{
"__typename": "CalendarChannelEdge",
"node": {
"__typename": "CalendarChannel",
"handle": "jony@apple.dev",
"id": "20202020-a40f-4faf-bb9f-c6f9945b8204"
}
}
]
},
"connectionParameters": null,
"createdAt": "2026-02-27T01:17:25.392Z",
"createdBy": {
"__typename": "Actor",
"source": "MANUAL",
"workspaceMemberId": null,
"name": "System",
"context": null
},
"deletedAt": null,
"handle": "jony.ive@apple.dev",
"handleAliases": "",
"id": "20202020-0cc8-4d60-a3a4-803245698908",
"lastCredentialsRefreshedAt": null,
"lastSyncHistoryId": "exampleLastSyncHistory",
"messageChannels": {
"__typename": "MessageChannelConnection",
"edges": [
{
"__typename": "MessageChannelEdge",
"node": {
"__typename": "MessageChannel",
"handle": "jony.ive@apple.dev",
"id": "20202020-5ffe-4b32-814a-983d5e4911cd"
}
}
]
},
"position": 0,
"provider": "google",
"refreshToken": "exampleRefreshToken",
"scopes": [],
"updatedAt": "2026-02-27T01:17:25.392Z",
"updatedBy": {
"__typename": "Actor",
"source": "MANUAL",
"workspaceMemberId": null,
"name": "System",
"context": null
}
},
{
"__typename": "ConnectedAccount",
"accessToken": "exampleAccessToken",
"accountOwner": {
"__typename": "WorkspaceMember",
"id": "20202020-0687-4c41-b707-ed1bfca972a7",
"name": {
"__typename": "FullName",
"firstName": "Tim",
"lastName": "Apple"
}
},
"accountOwnerId": "20202020-0687-4c41-b707-ed1bfca972a7",
"authFailedAt": null,
"calendarChannels": {
"__typename": "CalendarChannelConnection",
"edges": [
{
"__typename": "CalendarChannelEdge",
"node": {
"__typename": "CalendarChannel",
"handle": "tim@apple.dev",
"id": "20202020-a40f-4faf-bb9f-c6f9945b8203"
}
},
{
"__typename": "CalendarChannelEdge",
"node": {
"__typename": "CalendarChannel",
"handle": "company-main@apple.dev",
"id": "20202020-a40f-4faf-bb9f-c6f9945b8206"
}
},
{
"__typename": "CalendarChannelEdge",
"node": {
"__typename": "CalendarChannel",
"handle": "team-calendar@apple.dev",
"id": "20202020-a40f-4faf-bb9f-c6f9945b8207"
}
}
]
},
"connectionParameters": null,
"createdAt": "2026-02-27T01:17:25.392Z",
"createdBy": {
"__typename": "Actor",
"source": "MANUAL",
"workspaceMemberId": null,
"name": "System",
"context": null
},
"deletedAt": null,
"handle": "tim@apple.dev",
"handleAliases": "",
"id": "20202020-9ac0-4390-9a1a-ab4d2c4e1bb7",
"lastCredentialsRefreshedAt": null,
"lastSyncHistoryId": "exampleLastSyncHistory",
"messageChannels": {
"__typename": "MessageChannelConnection",
"edges": [
{
"__typename": "MessageChannelEdge",
"node": {
"__typename": "MessageChannel",
"handle": "tim@apple.dev",
"id": "20202020-9b80-4c2c-a597-383db48de1d6"
}
},
{
"__typename": "MessageChannelEdge",
"node": {
"__typename": "MessageChannel",
"handle": "support@apple.dev",
"id": "20202020-e2f1-49b5-85d2-5d3a3386990d"
}
},
{
"__typename": "MessageChannelEdge",
"node": {
"__typename": "MessageChannel",
"handle": "sales@apple.dev",
"id": "20202020-e2f1-49b5-85d2-5d3a3386990e"
}
}
]
},
"position": 0,
"provider": "google",
"refreshToken": "exampleRefreshToken",
"scopes": [],
"updatedAt": "2026-02-27T01:17:25.392Z",
"updatedBy": {
"__typename": "Actor",
"source": "MANUAL",
"workspaceMemberId": null,
"name": "System",
"context": null
}
},
{
"__typename": "ConnectedAccount",
"accessToken": "exampleAccessToken",
"accountOwner": {
"__typename": "WorkspaceMember",
"id": "20202020-1553-45c6-a028-5a9064cce07f",
"name": {
"__typename": "FullName",
"firstName": "Phil",
"lastName": "Schiler"
}
},
"accountOwnerId": "20202020-1553-45c6-a028-5a9064cce07f",
"authFailedAt": null,
"calendarChannels": {
"__typename": "CalendarChannelConnection",
"edges": [
{
"__typename": "CalendarChannelEdge",
"node": {
"__typename": "CalendarChannel",
"handle": "phil@apple.dev",
"id": "20202020-a40f-4faf-bb9f-c6f9945b8205"
}
}
]
},
"connectionParameters": null,
"createdAt": "2026-02-27T01:17:25.392Z",
"createdBy": {
"__typename": "Actor",
"source": "MANUAL",
"workspaceMemberId": null,
"name": "System",
"context": null
},
"deletedAt": null,
"handle": "phil.schiler@apple.dev",
"handleAliases": "",
"id": "20202020-cafc-4323-908d-e5b42ad69fdf",
"lastCredentialsRefreshedAt": null,
"lastSyncHistoryId": "exampleLastSyncHistory",
"messageChannels": {
"__typename": "MessageChannelConnection",
"edges": [
{
"__typename": "MessageChannelEdge",
"node": {
"__typename": "MessageChannel",
"handle": "phil.schiler@apple.dev",
"id": "20202020-e2f1-49b5-85d2-5d3a3386990c"
}
}
]
},
"position": 0,
"provider": "google",
"refreshToken": "exampleRefreshToken",
"scopes": [],
"updatedAt": "2026-02-27T01:17:25.392Z",
"updatedBy": {
"__typename": "Actor",
"source": "MANUAL",
"workspaceMemberId": null,
"name": "System",
"context": null
}
}
];
@@ -4300,19 +4300,6 @@ export const mockedWorkspaceMemberRecords: ObjectRecord[] =
},
"calendarStartDay": 7,
"colorScheme": "Light",
"connectedAccounts": {
"__typename": "ConnectedAccountConnection",
"edges": [
{
"__typename": "ConnectedAccountEdge",
"node": {
"__typename": "ConnectedAccount",
"handle": "tim@apple.dev",
"id": "20202020-9ac0-4390-9a1a-ab4d2c4e1bb7"
}
}
]
},
"createdAt": "2026-02-27T01:17:29.464Z",
"createdBy": {
"__typename": "Actor",
@@ -18603,19 +18590,6 @@ export const mockedWorkspaceMemberRecords: ObjectRecord[] =
},
"calendarStartDay": 7,
"colorScheme": "Light",
"connectedAccounts": {
"__typename": "ConnectedAccountConnection",
"edges": [
{
"__typename": "ConnectedAccountEdge",
"node": {
"__typename": "ConnectedAccount",
"handle": "phil.schiler@apple.dev",
"id": "20202020-cafc-4323-908d-e5b42ad69fdf"
}
}
]
},
"createdAt": "2026-02-27T01:17:29.464Z",
"createdBy": {
"__typename": "Actor",
@@ -18690,10 +18664,6 @@ export const mockedWorkspaceMemberRecords: ObjectRecord[] =
},
"calendarStartDay": 7,
"colorScheme": "Light",
"connectedAccounts": {
"__typename": "ConnectedAccountConnection",
"edges": []
},
"createdAt": "2026-02-27T01:17:29.464Z",
"createdBy": {
"__typename": "Actor",
@@ -23450,19 +23420,6 @@ export const mockedWorkspaceMemberRecords: ObjectRecord[] =
},
"calendarStartDay": 7,
"colorScheme": "Light",
"connectedAccounts": {
"__typename": "ConnectedAccountConnection",
"edges": [
{
"__typename": "ConnectedAccountEdge",
"node": {
"__typename": "ConnectedAccount",
"handle": "jony.ive@apple.dev",
"id": "20202020-0cc8-4d60-a3a4-803245698908"
}
}
]
},
"createdAt": "2026-02-27T01:17:29.464Z",
"createdBy": {
"__typename": "Actor",
@@ -23528,10 +23485,6 @@ export const mockedWorkspaceMemberRecords: ObjectRecord[] =
},
"calendarStartDay": 7,
"colorScheme": "System",
"connectedAccounts": {
"__typename": "ConnectedAccountConnection",
"edges": []
},
"createdAt": "2026-02-27T01:17:29.464Z",
"createdBy": {
"__typename": "Actor",
@@ -23614,10 +23567,6 @@ export const mockedWorkspaceMemberRecords: ObjectRecord[] =
},
"calendarStartDay": 7,
"colorScheme": "System",
"connectedAccounts": {
"__typename": "ConnectedAccountConnection",
"edges": []
},
"createdAt": "2026-02-27T01:17:29.464Z",
"createdBy": {
"__typename": "Actor",
@@ -23692,10 +23641,6 @@ export const mockedWorkspaceMemberRecords: ObjectRecord[] =
},
"calendarStartDay": 7,
"colorScheme": "Dark",
"connectedAccounts": {
"__typename": "ConnectedAccountConnection",
"edges": []
},
"createdAt": "2026-02-27T01:17:29.464Z",
"createdBy": {
"__typename": "Actor",
@@ -23770,10 +23715,6 @@ export const mockedWorkspaceMemberRecords: ObjectRecord[] =
},
"calendarStartDay": 7,
"colorScheme": "Dark",
"connectedAccounts": {
"__typename": "ConnectedAccountConnection",
"edges": []
},
"createdAt": "2026-02-27T01:17:29.464Z",
"createdBy": {
"__typename": "Actor",
@@ -23839,10 +23780,6 @@ export const mockedWorkspaceMemberRecords: ObjectRecord[] =
},
"calendarStartDay": 7,
"colorScheme": "Light",
"connectedAccounts": {
"__typename": "ConnectedAccountConnection",
"edges": []
},
"createdAt": "2026-02-27T01:17:29.464Z",
"createdBy": {
"__typename": "Actor",
@@ -23908,10 +23845,6 @@ export const mockedWorkspaceMemberRecords: ObjectRecord[] =
},
"calendarStartDay": 7,
"colorScheme": "Dark",
"connectedAccounts": {
"__typename": "ConnectedAccountConnection",
"edges": []
},
"createdAt": "2026-02-27T01:17:29.464Z",
"createdBy": {
"__typename": "Actor",
@@ -200,18 +200,6 @@ export const mockedMinimalMetadata: MinimalMetadata =
"isSystem": false,
"isRemote": false
},
{
"id": "adbffcd0-bb69-408a-bbd1-1ee7264689d5",
"nameSingular": "connectedAccount",
"namePlural": "connectedAccounts",
"labelSingular": "Connected Account",
"labelPlural": "Connected Accounts",
"icon": "IconAt",
"isCustom": false,
"isActive": true,
"isSystem": true,
"isRemote": false
},
{
"id": "3d3605e7-f61c-4abe-9886-a485b4450bf9",
"nameSingular": "messageChannelMessageAssociationMessageFolder",
@@ -3091,61 +3091,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery =
"applicationId": "dd6a5463-023d-4a10-855f-a4abaf32c1ec",
"relation": null,
"morphRelations": null
},
{
"__typename": "Field",
"id": "5d7b0dea-da5e-4d91-9386-51736d9376f7",
"universalIdentifier": "20202020-95b1-4f44-82dc-61b042ae2414",
"type": "RELATION",
"name": "connectedAccount",
"label": "Connected Account",
"description": "Connected Account",
"icon": "IconUserCircle",
"isCustom": false,
"isActive": true,
"isSystem": false,
"isUIReadOnly": true,
"isNullable": false,
"isUnique": false,
"createdAt": "2026-04-10T08:55:56.200Z",
"updatedAt": "2026-04-10T08:55:56.200Z",
"defaultValue": null,
"options": null,
"settings": {
"onDelete": "CASCADE",
"relationType": "MANY_TO_ONE",
"joinColumnName": "connectedAccountId"
},
"isLabelSyncedWithName": false,
"morphId": null,
"applicationId": "dd6a5463-023d-4a10-855f-a4abaf32c1ec",
"relation": {
"__typename": "Relation",
"type": "MANY_TO_ONE",
"sourceObjectMetadata": {
"__typename": "Object",
"id": "ce1549f6-1cb8-4f47-ba55-16d5a399a235",
"nameSingular": "calendarChannel",
"namePlural": "calendarChannels"
},
"targetObjectMetadata": {
"__typename": "Object",
"id": "adbffcd0-bb69-408a-bbd1-1ee7264689d5",
"nameSingular": "connectedAccount",
"namePlural": "connectedAccounts"
},
"sourceFieldMetadata": {
"__typename": "Field",
"id": "5d7b0dea-da5e-4d91-9386-51736d9376f7",
"name": "connectedAccount"
},
"targetFieldMetadata": {
"__typename": "Field",
"id": "5a7fc72b-3fd9-4421-8268-6505c54fa6ad",
"name": "calendarChannels"
}
},
"morphRelations": null
}
],
"indexMetadataList": [
@@ -4443,61 +4388,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery =
"applicationId": "dd6a5463-023d-4a10-855f-a4abaf32c1ec",
"relation": null,
"morphRelations": null
},
{
"__typename": "Field",
"id": "a15ef99d-5f07-4849-81f4-2cfa1adfbb36",
"universalIdentifier": "20202020-49a2-44a4-b470-282c0440d15d",
"type": "RELATION",
"name": "connectedAccount",
"label": "Connected Account",
"description": "Connected Account",
"icon": "IconUserCircle",
"isCustom": false,
"isActive": true,
"isSystem": false,
"isUIReadOnly": true,
"isNullable": false,
"isUnique": false,
"createdAt": "2026-04-10T08:55:56.200Z",
"updatedAt": "2026-04-10T08:55:56.200Z",
"defaultValue": null,
"options": null,
"settings": {
"onDelete": "CASCADE",
"relationType": "MANY_TO_ONE",
"joinColumnName": "connectedAccountId"
},
"isLabelSyncedWithName": false,
"morphId": null,
"applicationId": "dd6a5463-023d-4a10-855f-a4abaf32c1ec",
"relation": {
"__typename": "Relation",
"type": "MANY_TO_ONE",
"sourceObjectMetadata": {
"__typename": "Object",
"id": "c48ce4de-a73c-4b94-ba79-123559a8b299",
"nameSingular": "messageChannel",
"namePlural": "messageChannels"
},
"targetObjectMetadata": {
"__typename": "Object",
"id": "adbffcd0-bb69-408a-bbd1-1ee7264689d5",
"nameSingular": "connectedAccount",
"namePlural": "connectedAccounts"
},
"sourceFieldMetadata": {
"__typename": "Field",
"id": "a15ef99d-5f07-4849-81f4-2cfa1adfbb36",
"name": "connectedAccount"
},
"targetFieldMetadata": {
"__typename": "Field",
"id": "96054ea4-4d5e-4d0d-aa35-1b304e1529ba",
"name": "messageChannels"
}
},
"morphRelations": null
}
],
"indexMetadataList": [
@@ -5598,705 +5488,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery =
]
}
},
{
"__typename": "ObjectEdge",
"node": {
"__typename": "Object",
"id": "adbffcd0-bb69-408a-bbd1-1ee7264689d5",
"universalIdentifier": "20202020-977e-46b2-890b-c3002ddfd5c5",
"nameSingular": "connectedAccount",
"namePlural": "connectedAccounts",
"isCustom": false,
"isRemote": false,
"isActive": true,
"isSystem": true,
"isUIReadOnly": false,
"createdAt": "2026-04-10T08:55:56.200Z",
"updatedAt": "2026-04-10T08:55:56.200Z",
"labelIdentifierFieldMetadataId": "85f2cac1-498d-4edd-99fc-3b75c0a74acd",
"imageIdentifierFieldMetadataId": null,
"applicationId": "dd6a5463-023d-4a10-855f-a4abaf32c1ec",
"shortcut": null,
"isLabelSyncedWithName": false,
"isSearchable": false,
"duplicateCriteria": null,
"labelSingular": "Connected Account",
"labelPlural": "Connected Accounts",
"description": "A connected account",
"icon": "IconAt",
"fieldsList": [
{
"__typename": "Field",
"id": "b057c123-ebb0-4295-88b1-db1a4b7deba1",
"universalIdentifier": "20202020-c06a-4071-8a71-5c6d7e8f9aab",
"type": "UUID",
"name": "id",
"label": "Id",
"description": "Id",
"icon": "Icon123",
"isCustom": false,
"isActive": true,
"isSystem": true,
"isUIReadOnly": true,
"isNullable": false,
"isUnique": false,
"createdAt": "2026-04-10T08:55:56.200Z",
"updatedAt": "2026-04-10T08:55:56.200Z",
"defaultValue": "uuid",
"options": null,
"settings": null,
"isLabelSyncedWithName": false,
"morphId": null,
"applicationId": "dd6a5463-023d-4a10-855f-a4abaf32c1ec",
"relation": null,
"morphRelations": null
},
{
"__typename": "Field",
"id": "384b095a-baf6-44ad-8aa8-5688b17a9d12",
"universalIdentifier": "20202020-c06b-4072-9b72-6d7e8f9aabbc",
"type": "DATE_TIME",
"name": "createdAt",
"label": "Creation date",
"description": "Creation date",
"icon": "IconCalendar",
"isCustom": false,
"isActive": true,
"isSystem": true,
"isUIReadOnly": true,
"isNullable": false,
"isUnique": false,
"createdAt": "2026-04-10T08:55:56.200Z",
"updatedAt": "2026-04-10T08:55:56.200Z",
"defaultValue": "now",
"options": null,
"settings": {
"displayFormat": "RELATIVE"
},
"isLabelSyncedWithName": false,
"morphId": null,
"applicationId": "dd6a5463-023d-4a10-855f-a4abaf32c1ec",
"relation": null,
"morphRelations": null
},
{
"__typename": "Field",
"id": "1a40209a-d8f3-44dc-96b8-df09e5f5e500",
"universalIdentifier": "20202020-c06c-4073-8c73-7e8f9aabbccd",
"type": "DATE_TIME",
"name": "updatedAt",
"label": "Last update",
"description": "Last time the record was changed",
"icon": "IconCalendarClock",
"isCustom": false,
"isActive": true,
"isSystem": true,
"isUIReadOnly": true,
"isNullable": false,
"isUnique": false,
"createdAt": "2026-04-10T08:55:56.200Z",
"updatedAt": "2026-04-10T08:55:56.200Z",
"defaultValue": "now",
"options": null,
"settings": {
"displayFormat": "RELATIVE"
},
"isLabelSyncedWithName": false,
"morphId": null,
"applicationId": "dd6a5463-023d-4a10-855f-a4abaf32c1ec",
"relation": null,
"morphRelations": null
},
{
"__typename": "Field",
"id": "a11e0a22-9c0a-4ad6-a31e-2c0d67a74fa4",
"universalIdentifier": "20202020-c06d-4074-9d74-8f9aabbccdde",
"type": "DATE_TIME",
"name": "deletedAt",
"label": "Deleted at",
"description": "Date when the record was deleted",
"icon": "IconCalendarMinus",
"isCustom": false,
"isActive": true,
"isSystem": true,
"isUIReadOnly": true,
"isNullable": true,
"isUnique": false,
"createdAt": "2026-04-10T08:55:56.200Z",
"updatedAt": "2026-04-10T08:55:56.200Z",
"defaultValue": null,
"options": null,
"settings": {
"displayFormat": "RELATIVE"
},
"isLabelSyncedWithName": false,
"morphId": null,
"applicationId": "dd6a5463-023d-4a10-855f-a4abaf32c1ec",
"relation": null,
"morphRelations": null
},
{
"__typename": "Field",
"id": "bd57a595-0d74-42a9-8b17-5617028dda6a",
"universalIdentifier": "e09c2463-9ca6-4004-97ce-6039e3161a5d",
"type": "ACTOR",
"name": "createdBy",
"label": "Created by",
"description": "The creator of the record",
"icon": "IconCreativeCommonsSa",
"isCustom": false,
"isActive": true,
"isSystem": true,
"isUIReadOnly": true,
"isNullable": false,
"isUnique": false,
"createdAt": "2026-04-10T08:55:56.200Z",
"updatedAt": "2026-04-10T08:55:56.200Z",
"defaultValue": {
"name": "'System'",
"source": "'MANUAL'",
"workspaceMemberId": null
},
"options": null,
"settings": null,
"isLabelSyncedWithName": false,
"morphId": null,
"applicationId": "dd6a5463-023d-4a10-855f-a4abaf32c1ec",
"relation": null,
"morphRelations": null
},
{
"__typename": "Field",
"id": "26b03bc9-e9fc-4ce6-979b-c04ed9265034",
"universalIdentifier": "0a84c0e1-f9fc-47d5-8ac9-58538e50a9f9",
"type": "ACTOR",
"name": "updatedBy",
"label": "Updated by",
"description": "The workspace member who last updated the record",
"icon": "IconUserCircle",
"isCustom": false,
"isActive": true,
"isSystem": true,
"isUIReadOnly": true,
"isNullable": false,
"isUnique": false,
"createdAt": "2026-04-10T08:55:56.200Z",
"updatedAt": "2026-04-10T08:55:56.200Z",
"defaultValue": {
"name": "'System'",
"source": "'MANUAL'",
"workspaceMemberId": null
},
"options": null,
"settings": null,
"isLabelSyncedWithName": false,
"morphId": null,
"applicationId": "dd6a5463-023d-4a10-855f-a4abaf32c1ec",
"relation": null,
"morphRelations": null
},
{
"__typename": "Field",
"id": "8d75cd81-e67b-4b27-b32a-29bee6a79898",
"universalIdentifier": "66b7bc3e-c99e-42b6-82e6-6f43142c0f2f",
"type": "POSITION",
"name": "position",
"label": "Position",
"description": "Connected account record position",
"icon": "IconHierarchy2",
"isCustom": false,
"isActive": true,
"isSystem": true,
"isUIReadOnly": false,
"isNullable": false,
"isUnique": false,
"createdAt": "2026-04-10T08:55:56.200Z",
"updatedAt": "2026-04-10T08:55:56.200Z",
"defaultValue": 0,
"options": null,
"settings": null,
"isLabelSyncedWithName": false,
"morphId": null,
"applicationId": "dd6a5463-023d-4a10-855f-a4abaf32c1ec",
"relation": null,
"morphRelations": null
},
{
"__typename": "Field",
"id": "7de5c016-253a-4938-b6dc-f5ed9c684a3e",
"universalIdentifier": "140767fe-0aa4-4573-a0bd-67cb657c9452",
"type": "TS_VECTOR",
"name": "searchVector",
"label": "Search vector",
"description": "Field used for full-text search",
"icon": "IconUser",
"isCustom": false,
"isActive": true,
"isSystem": true,
"isUIReadOnly": false,
"isNullable": true,
"isUnique": false,
"createdAt": "2026-04-10T08:55:56.200Z",
"updatedAt": "2026-04-10T08:55:56.200Z",
"defaultValue": null,
"options": null,
"settings": {
"asExpression": "to_tsvector('simple', COALESCE(public.unaccent_immutable(\"handle\"), ''))",
"generatedType": "STORED"
},
"isLabelSyncedWithName": false,
"morphId": null,
"applicationId": "dd6a5463-023d-4a10-855f-a4abaf32c1ec",
"relation": null,
"morphRelations": null
},
{
"__typename": "Field",
"id": "85f2cac1-498d-4edd-99fc-3b75c0a74acd",
"universalIdentifier": "20202020-c804-4a50-bb05-b3a9e24f1dec",
"type": "TEXT",
"name": "handle",
"label": "handle",
"description": "The account handle (email, username, phone number, etc.)",
"icon": "IconMail",
"isCustom": false,
"isActive": true,
"isSystem": false,
"isUIReadOnly": true,
"isNullable": true,
"isUnique": false,
"createdAt": "2026-04-10T08:55:56.200Z",
"updatedAt": "2026-04-10T08:55:56.200Z",
"defaultValue": null,
"options": null,
"settings": null,
"isLabelSyncedWithName": false,
"morphId": null,
"applicationId": "dd6a5463-023d-4a10-855f-a4abaf32c1ec",
"relation": null,
"morphRelations": null
},
{
"__typename": "Field",
"id": "bb3d6543-a93c-4690-b67d-bc59176d15fd",
"universalIdentifier": "20202020-ebb0-4516-befc-a9e95935efd5",
"type": "TEXT",
"name": "provider",
"label": "provider",
"description": "The account provider",
"icon": "IconSettings",
"isCustom": false,
"isActive": true,
"isSystem": false,
"isUIReadOnly": true,
"isNullable": false,
"isUnique": false,
"createdAt": "2026-04-10T08:55:56.200Z",
"updatedAt": "2026-04-10T08:55:56.200Z",
"defaultValue": "'google'",
"options": null,
"settings": null,
"isLabelSyncedWithName": false,
"morphId": null,
"applicationId": "dd6a5463-023d-4a10-855f-a4abaf32c1ec",
"relation": null,
"morphRelations": null
},
{
"__typename": "Field",
"id": "4f199f06-3419-4344-bc43-158305d0e4fa",
"universalIdentifier": "20202020-707b-4a0a-8753-2ad42efe1e29",
"type": "TEXT",
"name": "accessToken",
"label": "Access Token",
"description": "Messaging provider access token",
"icon": "IconKey",
"isCustom": false,
"isActive": true,
"isSystem": false,
"isUIReadOnly": true,
"isNullable": true,
"isUnique": false,
"createdAt": "2026-04-10T08:55:56.200Z",
"updatedAt": "2026-04-10T08:55:56.200Z",
"defaultValue": null,
"options": null,
"settings": null,
"isLabelSyncedWithName": false,
"morphId": null,
"applicationId": "dd6a5463-023d-4a10-855f-a4abaf32c1ec",
"relation": null,
"morphRelations": null
},
{
"__typename": "Field",
"id": "7b70fc5b-0a84-4962-af03-aa692ef0f64f",
"universalIdentifier": "20202020-532d-48bd-80a5-c4be6e7f6e49",
"type": "TEXT",
"name": "refreshToken",
"label": "Refresh Token",
"description": "Messaging provider refresh token",
"icon": "IconKey",
"isCustom": false,
"isActive": true,
"isSystem": false,
"isUIReadOnly": true,
"isNullable": true,
"isUnique": false,
"createdAt": "2026-04-10T08:55:56.200Z",
"updatedAt": "2026-04-10T08:55:56.200Z",
"defaultValue": null,
"options": null,
"settings": null,
"isLabelSyncedWithName": false,
"morphId": null,
"applicationId": "dd6a5463-023d-4a10-855f-a4abaf32c1ec",
"relation": null,
"morphRelations": null
},
{
"__typename": "Field",
"id": "6259a7fe-dbb7-4aed-996f-b3bcc1f1b293",
"universalIdentifier": "20202020-115c-4a87-b50f-ac4367a971b9",
"type": "TEXT",
"name": "lastSyncHistoryId",
"label": "Last sync history ID",
"description": "Last sync history ID",
"icon": "IconHistory",
"isCustom": false,
"isActive": true,
"isSystem": false,
"isUIReadOnly": true,
"isNullable": true,
"isUnique": false,
"createdAt": "2026-04-10T08:55:56.200Z",
"updatedAt": "2026-04-10T08:55:56.200Z",
"defaultValue": null,
"options": null,
"settings": null,
"isLabelSyncedWithName": false,
"morphId": null,
"applicationId": "dd6a5463-023d-4a10-855f-a4abaf32c1ec",
"relation": null,
"morphRelations": null
},
{
"__typename": "Field",
"id": "c1be085b-57ff-4845-b5ee-3360bc610ff5",
"universalIdentifier": "20202020-d268-4c6b-baff-400d402b430a",
"type": "DATE_TIME",
"name": "authFailedAt",
"label": "Auth failed at",
"description": "Auth failed at",
"icon": "IconX",
"isCustom": false,
"isActive": true,
"isSystem": false,
"isUIReadOnly": true,
"isNullable": true,
"isUnique": false,
"createdAt": "2026-04-10T08:55:56.200Z",
"updatedAt": "2026-04-10T08:55:56.200Z",
"defaultValue": null,
"options": null,
"settings": null,
"isLabelSyncedWithName": false,
"morphId": null,
"applicationId": "dd6a5463-023d-4a10-855f-a4abaf32c1ec",
"relation": null,
"morphRelations": null
},
{
"__typename": "Field",
"id": "dc21efad-d0da-4b72-a0c6-a1d34755d6b3",
"universalIdentifier": "20202020-aa5e-4e85-903b-fdf90a941941",
"type": "DATE_TIME",
"name": "lastCredentialsRefreshedAt",
"label": "Last credentials refreshed at",
"description": "Last credentials refreshed at",
"icon": "IconHistory",
"isCustom": false,
"isActive": true,
"isSystem": false,
"isUIReadOnly": true,
"isNullable": true,
"isUnique": false,
"createdAt": "2026-04-10T08:55:56.200Z",
"updatedAt": "2026-04-10T08:55:56.200Z",
"defaultValue": null,
"options": null,
"settings": null,
"isLabelSyncedWithName": false,
"morphId": null,
"applicationId": "dd6a5463-023d-4a10-855f-a4abaf32c1ec",
"relation": null,
"morphRelations": null
},
{
"__typename": "Field",
"id": "f866d30b-e706-4f0b-a2c5-0deac1dea5d5",
"universalIdentifier": "20202020-8a3d-46be-814f-6228af16c47b",
"type": "TEXT",
"name": "handleAliases",
"label": "Handle Aliases",
"description": "Handle Aliases",
"icon": "IconMail",
"isCustom": false,
"isActive": true,
"isSystem": false,
"isUIReadOnly": true,
"isNullable": true,
"isUnique": false,
"createdAt": "2026-04-10T08:55:56.200Z",
"updatedAt": "2026-04-10T08:55:56.200Z",
"defaultValue": null,
"options": null,
"settings": null,
"isLabelSyncedWithName": false,
"morphId": null,
"applicationId": "dd6a5463-023d-4a10-855f-a4abaf32c1ec",
"relation": null,
"morphRelations": null
},
{
"__typename": "Field",
"id": "7d717cb1-0aef-43cf-8b60-aa5ac8042e93",
"universalIdentifier": "20202020-8a3d-46be-814f-6228af16c47c",
"type": "ARRAY",
"name": "scopes",
"label": "Scopes",
"description": "Scopes",
"icon": "IconSettings",
"isCustom": false,
"isActive": true,
"isSystem": false,
"isUIReadOnly": true,
"isNullable": true,
"isUnique": false,
"createdAt": "2026-04-10T08:55:56.200Z",
"updatedAt": "2026-04-10T08:55:56.200Z",
"defaultValue": null,
"options": null,
"settings": null,
"isLabelSyncedWithName": false,
"morphId": null,
"applicationId": "dd6a5463-023d-4a10-855f-a4abaf32c1ec",
"relation": null,
"morphRelations": null
},
{
"__typename": "Field",
"id": "530bac3f-fbc2-4b8a-a98f-48ce5b85b165",
"universalIdentifier": "20202020-a1b2-46be-814f-6228af16c481",
"type": "RAW_JSON",
"name": "connectionParameters",
"label": "Custom Connection Parameters",
"description": "JSON object containing custom connection parameters",
"icon": "IconSettings",
"isCustom": false,
"isActive": true,
"isSystem": false,
"isUIReadOnly": true,
"isNullable": true,
"isUnique": false,
"createdAt": "2026-04-10T08:55:56.200Z",
"updatedAt": "2026-04-10T08:55:56.200Z",
"defaultValue": null,
"options": null,
"settings": null,
"isLabelSyncedWithName": false,
"morphId": null,
"applicationId": "dd6a5463-023d-4a10-855f-a4abaf32c1ec",
"relation": null,
"morphRelations": null
},
{
"__typename": "Field",
"id": "5a7fc72b-3fd9-4421-8268-6505c54fa6ad",
"universalIdentifier": "20202020-af4a-47bb-99ec-51911c1d3977",
"type": "RELATION",
"name": "calendarChannels",
"label": "Calendar Channels",
"description": "Calendar Channels",
"icon": "IconCalendar",
"isCustom": false,
"isActive": true,
"isSystem": false,
"isUIReadOnly": true,
"isNullable": false,
"isUnique": false,
"createdAt": "2026-04-10T08:55:56.200Z",
"updatedAt": "2026-04-10T08:55:56.200Z",
"defaultValue": null,
"options": null,
"settings": {
"relationType": "ONE_TO_MANY"
},
"isLabelSyncedWithName": false,
"morphId": null,
"applicationId": "dd6a5463-023d-4a10-855f-a4abaf32c1ec",
"relation": {
"__typename": "Relation",
"type": "ONE_TO_MANY",
"sourceObjectMetadata": {
"__typename": "Object",
"id": "adbffcd0-bb69-408a-bbd1-1ee7264689d5",
"nameSingular": "connectedAccount",
"namePlural": "connectedAccounts"
},
"targetObjectMetadata": {
"__typename": "Object",
"id": "ce1549f6-1cb8-4f47-ba55-16d5a399a235",
"nameSingular": "calendarChannel",
"namePlural": "calendarChannels"
},
"sourceFieldMetadata": {
"__typename": "Field",
"id": "5a7fc72b-3fd9-4421-8268-6505c54fa6ad",
"name": "calendarChannels"
},
"targetFieldMetadata": {
"__typename": "Field",
"id": "5d7b0dea-da5e-4d91-9386-51736d9376f7",
"name": "connectedAccount"
}
},
"morphRelations": null
},
{
"__typename": "Field",
"id": "79c19070-8786-4d4f-83cd-d20699bce82d",
"universalIdentifier": "20202020-3517-4896-afac-b1d0aa362af6",
"type": "RELATION",
"name": "accountOwner",
"label": "Account Owner",
"description": "Account Owner",
"icon": "IconUserCircle",
"isCustom": false,
"isActive": true,
"isSystem": false,
"isUIReadOnly": true,
"isNullable": false,
"isUnique": false,
"createdAt": "2026-04-10T08:55:56.200Z",
"updatedAt": "2026-04-10T08:55:56.200Z",
"defaultValue": null,
"options": null,
"settings": {
"onDelete": "CASCADE",
"relationType": "MANY_TO_ONE",
"joinColumnName": "accountOwnerId"
},
"isLabelSyncedWithName": false,
"morphId": null,
"applicationId": "dd6a5463-023d-4a10-855f-a4abaf32c1ec",
"relation": {
"__typename": "Relation",
"type": "MANY_TO_ONE",
"sourceObjectMetadata": {
"__typename": "Object",
"id": "adbffcd0-bb69-408a-bbd1-1ee7264689d5",
"nameSingular": "connectedAccount",
"namePlural": "connectedAccounts"
},
"targetObjectMetadata": {
"__typename": "Object",
"id": "5fd99bf8-8a88-4bed-aa6c-8ff34e43b0d0",
"nameSingular": "workspaceMember",
"namePlural": "workspaceMembers"
},
"sourceFieldMetadata": {
"__typename": "Field",
"id": "79c19070-8786-4d4f-83cd-d20699bce82d",
"name": "accountOwner"
},
"targetFieldMetadata": {
"__typename": "Field",
"id": "ae633a94-b92c-44d0-b1bd-993a5d18b5f9",
"name": "connectedAccounts"
}
},
"morphRelations": null
},
{
"__typename": "Field",
"id": "96054ea4-4d5e-4d0d-aa35-1b304e1529ba",
"universalIdentifier": "20202020-24f7-4362-8468-042204d1e445",
"type": "RELATION",
"name": "messageChannels",
"label": "Message Channels",
"description": "Message Channels",
"icon": "IconMessage",
"isCustom": false,
"isActive": true,
"isSystem": false,
"isUIReadOnly": true,
"isNullable": false,
"isUnique": false,
"createdAt": "2026-04-10T08:55:56.200Z",
"updatedAt": "2026-04-10T08:55:56.200Z",
"defaultValue": null,
"options": null,
"settings": {
"relationType": "ONE_TO_MANY"
},
"isLabelSyncedWithName": false,
"morphId": null,
"applicationId": "dd6a5463-023d-4a10-855f-a4abaf32c1ec",
"relation": {
"__typename": "Relation",
"type": "ONE_TO_MANY",
"sourceObjectMetadata": {
"__typename": "Object",
"id": "adbffcd0-bb69-408a-bbd1-1ee7264689d5",
"nameSingular": "connectedAccount",
"namePlural": "connectedAccounts"
},
"targetObjectMetadata": {
"__typename": "Object",
"id": "c48ce4de-a73c-4b94-ba79-123559a8b299",
"nameSingular": "messageChannel",
"namePlural": "messageChannels"
},
"sourceFieldMetadata": {
"__typename": "Field",
"id": "96054ea4-4d5e-4d0d-aa35-1b304e1529ba",
"name": "messageChannels"
},
"targetFieldMetadata": {
"__typename": "Field",
"id": "a15ef99d-5f07-4849-81f4-2cfa1adfbb36",
"name": "connectedAccount"
}
},
"morphRelations": null
}
],
"indexMetadataList": [
{
"__typename": "Index",
"id": "6b5f340c-5e91-4eb6-9bed-b5cce44a820b",
"createdAt": "2026-04-10T08:55:56.200Z",
"updatedAt": "2026-04-10T08:55:56.200Z",
"name": "IDX_3c8bbe54bd34f40dfe2d05ac964",
"indexWhereClause": null,
"indexType": "BTREE",
"isUnique": false,
"isCustom": false,
"indexFieldMetadataList": [
{
"__typename": "IndexField",
"id": "29dea5aa-81b8-46b2-8c3b-9deddd35c999",
"fieldMetadataId": "79c19070-8786-4d4f-83cd-d20699bce82d",
"createdAt": "2026-04-10T08:55:56.597Z",
"updatedAt": "2026-04-10T08:55:56.597Z",
"order": 0
}
]
}
]
}
},
{
"__typename": "ObjectEdge",
"node": {
@@ -13656,59 +12847,6 @@ export const mockedStandardObjectMetadataQueryResult: ObjectMetadataItemsQuery =
},
"morphRelations": null
},
{
"__typename": "Field",
"id": "ae633a94-b92c-44d0-b1bd-993a5d18b5f9",
"universalIdentifier": "20202020-e322-4bde-a525-727079b4a100",
"type": "RELATION",
"name": "connectedAccounts",
"label": "Connected accounts",
"description": "Connected accounts",
"icon": "IconAt",
"isCustom": false,
"isActive": true,
"isSystem": false,
"isUIReadOnly": true,
"isNullable": false,
"isUnique": false,
"createdAt": "2026-04-10T08:55:56.200Z",
"updatedAt": "2026-04-10T08:55:56.200Z",
"defaultValue": null,
"options": null,
"settings": {
"relationType": "ONE_TO_MANY"
},
"isLabelSyncedWithName": false,
"morphId": null,
"applicationId": "dd6a5463-023d-4a10-855f-a4abaf32c1ec",
"relation": {
"__typename": "Relation",
"type": "ONE_TO_MANY",
"sourceObjectMetadata": {
"__typename": "Object",
"id": "5fd99bf8-8a88-4bed-aa6c-8ff34e43b0d0",
"nameSingular": "workspaceMember",
"namePlural": "workspaceMembers"
},
"targetObjectMetadata": {
"__typename": "Object",
"id": "adbffcd0-bb69-408a-bbd1-1ee7264689d5",
"nameSingular": "connectedAccount",
"namePlural": "connectedAccounts"
},
"sourceFieldMetadata": {
"__typename": "Field",
"id": "ae633a94-b92c-44d0-b1bd-993a5d18b5f9",
"name": "connectedAccounts"
},
"targetFieldMetadata": {
"__typename": "Field",
"id": "79c19070-8786-4d4f-83cd-d20699bce82d",
"name": "accountOwner"
}
},
"morphRelations": null
},
{
"__typename": "Field",
"id": "eb111691-d6b2-459f-a3c6-6099f0bf82a3",
@@ -3,7 +3,7 @@ import { InjectRepository } from '@nestjs/typeorm';
import { isNonEmptyString } from '@sniptt/guards';
import { Command } from 'nest-commander';
import { type FeatureFlagKey } from 'twenty-shared/types';
import { Repository } from 'typeorm';
import { type DeepPartial, Repository } from 'typeorm';
import { ActiveOrSuspendedWorkspaceCommandRunner } from 'src/database/commands/command-runners/active-or-suspended-workspace.command-runner';
import { type RunOnWorkspaceArgs } from 'src/database/commands/command-runners/workspace.command-runner';
@@ -16,10 +16,26 @@ import { ConnectedAccountEntity } from 'src/engine/metadata-modules/connected-ac
import { MessageChannelEntity } from 'src/engine/metadata-modules/message-channel/entities/message-channel.entity';
import { MessageFolderEntity } from 'src/engine/metadata-modules/message-folder/entities/message-folder.entity';
import { GlobalWorkspaceOrmManager } from 'src/engine/twenty-orm/global-workspace-datasource/global-workspace-orm.manager';
import { type ConnectedAccountWorkspaceEntity } from 'src/modules/connected-account/standard-objects/connected-account.workspace-entity';
import { type MessageFolderWorkspaceEntity } from 'src/modules/messaging/common/standard-objects/message-folder.workspace-entity';
import { type WorkspaceMemberWorkspaceEntity } from 'src/modules/workspace-member/standard-objects/workspace-member.workspace-entity';
type LegacyConnectedAccountWorkspaceEntity = {
id: string;
createdAt: Date;
updatedAt: Date;
handle: string | null;
provider: string;
accessToken: string | null;
refreshToken: string | null;
lastSyncHistoryId: string | null;
lastCredentialsRefreshedAt: Date | null;
authFailedAt: Date | null;
accountOwnerId: string;
handleAliases: string | null;
scopes: string[] | null;
connectionParameters: Record<string, unknown> | null;
};
@RegisteredWorkspaceCommand('1.21.0', 1775500012000)
@Command({
name: 'upgrade:1-21:migrate-messaging-infrastructure-to-metadata',
@@ -65,7 +81,7 @@ export class MigrateMessagingInfrastructureToMetadataCommand extends ActiveOrSus
const isDryRun = options.dryRun ?? false;
const connectedAccountWorkspaceRepository =
await this.twentyORMGlobalManager.getRepository<ConnectedAccountWorkspaceEntity>(
await this.twentyORMGlobalManager.getRepository<LegacyConnectedAccountWorkspaceEntity>(
workspaceId,
'connectedAccount',
);
@@ -203,7 +219,9 @@ export class MigrateMessagingInfrastructureToMetadataCommand extends ActiveOrSus
});
if (coreConnectedAccounts.length > 0) {
await this.connectedAccountRepository.save(coreConnectedAccounts);
await this.connectedAccountRepository.save(
coreConnectedAccounts as DeepPartial<ConnectedAccountEntity>[],
);
this.logger.log(
`Migrated ${coreConnectedAccounts.length} connected accounts for workspace ${workspaceId}`,
);
@@ -1,8 +1,9 @@
import { Module } from '@nestjs/common';
import { WorkspaceIteratorModule } from 'src/database/commands/command-runners/workspace-iterator.module';
import { DropFavoriteObjectsCommand } from 'src/database/commands/upgrade-version-command/2-7/2-7-workspace-command-1798000030000-drop-favorite-objects.command';
import { SyncCommandMenuItemAvailabilityExpressionsCommand } from 'src/database/commands/upgrade-version-command/2-7/2-7-workspace-command-1798000020000-sync-command-menu-item-availability-expressions.command';
import { DropFavoriteObjectsCommand } from 'src/database/commands/upgrade-version-command/2-7/2-7-workspace-command-1798000030000-drop-favorite-objects.command';
import { DropConnectedAccountStandardObjectCommand } from 'src/database/commands/upgrade-version-command/2-7/2-7-workspace-command-1798000040000-drop-connected-account-standard-object.command';
import { ApplicationModule } from 'src/engine/core-modules/application/application.module';
import { ObjectMetadataModule } from 'src/engine/metadata-modules/object-metadata/object-metadata.module';
import { WorkspaceCacheModule } from 'src/engine/workspace-cache/workspace-cache.module';
@@ -19,6 +20,7 @@ import { WorkspaceMigrationModule } from 'src/engine/workspace-manager/workspace
providers: [
DropFavoriteObjectsCommand,
SyncCommandMenuItemAvailabilityExpressionsCommand,
DropConnectedAccountStandardObjectCommand,
],
})
export class V2_7_UpgradeVersionCommandModule {}
@@ -0,0 +1,144 @@
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 FlatFieldMetadata } from 'src/engine/metadata-modules/flat-field-metadata/types/flat-field-metadata.type';
import { type FlatObjectMetadata } from 'src/engine/metadata-modules/flat-object-metadata/types/flat-object-metadata.type';
import { 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 CONNECTED_ACCOUNT_OBJECT_UNIVERSAL_IDENTIFIER =
'20202020-977e-46b2-890b-c3002ddfd5c5';
const WORKSPACE_MEMBER_CONNECTED_ACCOUNTS_FIELD_UNIVERSAL_IDENTIFIER =
'20202020-e322-4bde-a525-727079b4a100';
const MESSAGE_CHANNEL_CONNECTED_ACCOUNT_FIELD_UNIVERSAL_IDENTIFIER =
'20202020-49a2-44a4-b470-282c0440d15d';
const CALENDAR_CHANNEL_CONNECTED_ACCOUNT_FIELD_UNIVERSAL_IDENTIFIER =
'20202020-95b1-4f44-82dc-61b042ae2414';
@RegisteredWorkspaceCommand('2.7.0', 1798000040000)
@Command({
name: 'upgrade:2-7:drop-connected-account-standard-object',
description:
'Drop the connectedAccount standard object from workspace schemas (moved to core metadata)',
})
export class DropConnectedAccountStandardObjectCommand 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 connectedAccount standard object removal for workspace ${workspaceId}`,
);
const { flatObjectMetadataMaps, flatFieldMetadataMaps } =
await this.workspaceCacheService.getOrRecompute(workspaceId, [
'flatObjectMetadataMaps',
'flatFieldMetadataMaps',
]);
const connectedAccountObjectMetadata =
findFlatEntityByUniversalIdentifier<FlatObjectMetadata>({
flatEntityMaps: flatObjectMetadataMaps,
universalIdentifier: CONNECTED_ACCOUNT_OBJECT_UNIVERSAL_IDENTIFIER,
});
const relationFieldsToDelete = [
WORKSPACE_MEMBER_CONNECTED_ACCOUNTS_FIELD_UNIVERSAL_IDENTIFIER,
MESSAGE_CHANNEL_CONNECTED_ACCOUNT_FIELD_UNIVERSAL_IDENTIFIER,
CALENDAR_CHANNEL_CONNECTED_ACCOUNT_FIELD_UNIVERSAL_IDENTIFIER,
]
.map((universalIdentifier) =>
findFlatEntityByUniversalIdentifier<FlatFieldMetadata>({
flatEntityMaps: flatFieldMetadataMaps,
universalIdentifier,
}),
)
.filter((field): field is FlatFieldMetadata => field !== undefined);
if (
!connectedAccountObjectMetadata &&
relationFieldsToDelete.length === 0
) {
this.logger.log(
`connectedAccount standard object already absent for workspace ${workspaceId}`,
);
return;
}
if (isDryRun) {
this.logger.log(
`[DRY RUN] Would delete connectedAccount standard object and ${relationFieldsToDelete.length} relation fields for workspace ${workspaceId}`,
);
return;
}
const { twentyStandardFlatApplication } =
await this.applicationService.findWorkspaceTwentyStandardAndCustomApplicationOrThrow(
{ workspaceId },
);
const validateAndBuildResult =
await this.workspaceMigrationValidateBuildAndRunService.validateBuildAndRunWorkspaceMigration(
{
allFlatEntityOperationByMetadataName: {
...(connectedAccountObjectMetadata
? {
objectMetadata: {
flatEntityToCreate: [],
flatEntityToDelete: [connectedAccountObjectMetadata],
flatEntityToUpdate: [],
},
}
: {}),
...(relationFieldsToDelete.length > 0
? {
fieldMetadata: {
flatEntityToCreate: [],
flatEntityToDelete: relationFieldsToDelete,
flatEntityToUpdate: [],
},
}
: {}),
},
workspaceId,
applicationUniversalIdentifier:
twentyStandardFlatApplication.universalIdentifier,
},
);
if (validateAndBuildResult.status === 'fail') {
this.logger.error(
`Failed to delete connectedAccount standard object:\n${JSON.stringify(validateAndBuildResult, null, 2)}`,
);
throw new Error(
`Failed to delete connectedAccount standard object for workspace ${workspaceId}`,
);
}
this.logger.log(
`Deleted connectedAccount standard object and relation fields for workspace ${workspaceId}`,
);
}
}
@@ -1,9 +1,7 @@
import { CalendarChannelVisibility } from 'twenty-shared/types';
import { CONNECTED_ACCOUNT_DATA_SEED_IDS } from 'src/engine/workspace-manager/dev-seeder/data/constants/connected-account-data-seeds.constant';
type CalendarChannelDataSeed = {
id: string;
connectedAccountId: string;
handle: string;
visibility: CalendarChannelVisibility;
isContactAutoCreationEnabled: boolean;
@@ -13,7 +11,6 @@ type CalendarChannelDataSeed = {
export const CALENDAR_CHANNEL_DATA_SEED_COLUMNS: (keyof CalendarChannelDataSeed)[] =
[
'id',
'connectedAccountId',
'handle',
'visibility',
'isContactAutoCreationEnabled',
@@ -38,7 +35,6 @@ 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,
connectedAccountId: CONNECTED_ACCOUNT_DATA_SEED_IDS.TIM,
handle: 'tim@apple.dev',
visibility: CalendarChannelVisibility.METADATA,
isContactAutoCreationEnabled: true,
@@ -46,7 +42,6 @@ export const CALENDAR_CHANNEL_DATA_SEEDS: CalendarChannelDataSeed[] = [
},
{
id: CALENDAR_CHANNEL_DATA_SEED_IDS.JONY,
connectedAccountId: CONNECTED_ACCOUNT_DATA_SEED_IDS.JONY,
handle: 'jony@apple.dev',
visibility: CalendarChannelVisibility.SHARE_EVERYTHING,
isContactAutoCreationEnabled: true,
@@ -54,7 +49,6 @@ export const CALENDAR_CHANNEL_DATA_SEEDS: CalendarChannelDataSeed[] = [
},
{
id: CALENDAR_CHANNEL_DATA_SEED_IDS.PHIL,
connectedAccountId: CONNECTED_ACCOUNT_DATA_SEED_IDS.PHIL,
handle: 'phil@apple.dev',
visibility: CalendarChannelVisibility.METADATA,
isContactAutoCreationEnabled: true,
@@ -62,7 +56,6 @@ export const CALENDAR_CHANNEL_DATA_SEEDS: CalendarChannelDataSeed[] = [
},
{
id: CALENDAR_CHANNEL_DATA_SEED_IDS.JANE,
connectedAccountId: CONNECTED_ACCOUNT_DATA_SEED_IDS.JANE,
handle: 'jane.austen@apple.dev',
visibility: CalendarChannelVisibility.SHARE_EVERYTHING,
isContactAutoCreationEnabled: true,
@@ -70,7 +63,6 @@ export const CALENDAR_CHANNEL_DATA_SEEDS: CalendarChannelDataSeed[] = [
},
{
id: CALENDAR_CHANNEL_DATA_SEED_IDS.COMPANY_MAIN,
connectedAccountId: CONNECTED_ACCOUNT_DATA_SEED_IDS.TIM,
handle: 'company-main@apple.dev',
visibility: CalendarChannelVisibility.SHARE_EVERYTHING,
isContactAutoCreationEnabled: true,
@@ -78,7 +70,6 @@ export const CALENDAR_CHANNEL_DATA_SEEDS: CalendarChannelDataSeed[] = [
},
{
id: CALENDAR_CHANNEL_DATA_SEED_IDS.TEAM_CALENDAR,
connectedAccountId: CONNECTED_ACCOUNT_DATA_SEED_IDS.TIM,
handle: 'team-calendar@apple.dev',
visibility: CalendarChannelVisibility.SHARE_EVERYTHING,
isContactAutoCreationEnabled: true,
@@ -3,7 +3,6 @@ import {
MessageChannelType,
MessageChannelVisibility,
} from 'twenty-shared/types';
import { CONNECTED_ACCOUNT_DATA_SEED_IDS } from 'src/engine/workspace-manager/dev-seeder/data/constants/connected-account-data-seeds.constant';
type MessageChannelDataSeed = {
id: string;
@@ -12,7 +11,6 @@ type MessageChannelDataSeed = {
deletedAt: Date | null;
isContactAutoCreationEnabled: boolean;
type: MessageChannelType;
connectedAccountId: string;
handle: string;
isSyncEnabled: boolean;
visibility: MessageChannelVisibility;
@@ -27,7 +25,6 @@ export const MESSAGE_CHANNEL_DATA_SEED_COLUMNS: (keyof MessageChannelDataSeed)[]
'deletedAt',
'isContactAutoCreationEnabled',
'type',
'connectedAccountId',
'handle',
'isSyncEnabled',
'visibility',
@@ -57,7 +54,6 @@ export const MESSAGE_CHANNEL_DATA_SEEDS: MessageChannelDataSeed[] = [
deletedAt: null,
isContactAutoCreationEnabled: true,
type: MessageChannelType.EMAIL,
connectedAccountId: CONNECTED_ACCOUNT_DATA_SEED_IDS.TIM,
handle: 'tim@apple.dev',
isSyncEnabled: false,
visibility: MessageChannelVisibility.SHARE_EVERYTHING,
@@ -70,7 +66,6 @@ export const MESSAGE_CHANNEL_DATA_SEEDS: MessageChannelDataSeed[] = [
deletedAt: null,
isContactAutoCreationEnabled: true,
type: MessageChannelType.EMAIL,
connectedAccountId: CONNECTED_ACCOUNT_DATA_SEED_IDS.JONY,
handle: 'jony.ive@apple.dev',
isSyncEnabled: false,
visibility: MessageChannelVisibility.SHARE_EVERYTHING,
@@ -83,7 +78,6 @@ export const MESSAGE_CHANNEL_DATA_SEEDS: MessageChannelDataSeed[] = [
deletedAt: null,
isContactAutoCreationEnabled: true,
type: MessageChannelType.EMAIL,
connectedAccountId: CONNECTED_ACCOUNT_DATA_SEED_IDS.PHIL,
handle: 'phil.schiler@apple.dev',
isSyncEnabled: false,
visibility: MessageChannelVisibility.SHARE_EVERYTHING,
@@ -96,7 +90,6 @@ export const MESSAGE_CHANNEL_DATA_SEEDS: MessageChannelDataSeed[] = [
deletedAt: null,
isContactAutoCreationEnabled: true,
type: MessageChannelType.EMAIL,
connectedAccountId: CONNECTED_ACCOUNT_DATA_SEED_IDS.JANE,
handle: 'jane.austen@apple.dev',
isSyncEnabled: false,
visibility: MessageChannelVisibility.SHARE_EVERYTHING,
@@ -109,7 +102,6 @@ export const MESSAGE_CHANNEL_DATA_SEEDS: MessageChannelDataSeed[] = [
deletedAt: null,
isContactAutoCreationEnabled: true,
type: MessageChannelType.EMAIL,
connectedAccountId: CONNECTED_ACCOUNT_DATA_SEED_IDS.TIM, // Use TIM's connected account for shared inbox
handle: 'support@apple.dev',
isSyncEnabled: false,
visibility: MessageChannelVisibility.SHARE_EVERYTHING,
@@ -122,7 +114,6 @@ export const MESSAGE_CHANNEL_DATA_SEEDS: MessageChannelDataSeed[] = [
deletedAt: null,
isContactAutoCreationEnabled: true,
type: MessageChannelType.EMAIL,
connectedAccountId: CONNECTED_ACCOUNT_DATA_SEED_IDS.TIM, // Use TIM's connected account for shared inbox
handle: 'sales@apple.dev',
isSyncEnabled: false,
visibility: MessageChannelVisibility.SHARE_EVERYTHING,
@@ -37,10 +37,6 @@ import {
COMPANY_DATA_SEED_COLUMNS,
COMPANY_DATA_SEEDS,
} from 'src/engine/workspace-manager/dev-seeder/data/constants/company-data-seeds.constant';
import {
CONNECTED_ACCOUNT_DATA_SEED_COLUMNS,
CONNECTED_ACCOUNT_DATA_SEEDS,
} from 'src/engine/workspace-manager/dev-seeder/data/constants/connected-account-data-seeds.constant';
import {
DASHBOARD_DATA_SEED_COLUMNS,
getDashboardDataSeeds,
@@ -163,14 +159,9 @@ const getRecordSeedsBatches = (
pgColumns: DASHBOARD_DATA_SEED_COLUMNS,
recordSeeds: getDashboardDataSeeds(workspaceId),
},
{
tableName: 'connectedAccount',
pgColumns: CONNECTED_ACCOUNT_DATA_SEED_COLUMNS,
recordSeeds: CONNECTED_ACCOUNT_DATA_SEEDS,
},
];
// Batch 3: Depends on company, connectedAccount
// Batch 3: Depends on company
const batch3: RecordSeedConfig[] = [
{
tableName: 'person',
@@ -4,7 +4,6 @@ import {
STANDARD_CALENDAR_CHANNEL_PAGE_LAYOUT_CONFIG,
STANDARD_CALENDAR_EVENT_PARTICIPANT_PAGE_LAYOUT_CONFIG,
STANDARD_COMPANY_PAGE_LAYOUT_CONFIG,
STANDARD_CONNECTED_ACCOUNT_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,
@@ -32,7 +31,6 @@ export const STANDARD_PAGE_LAYOUTS = {
calendarEventParticipantRecordPage:
STANDARD_CALENDAR_EVENT_PARTICIPANT_PAGE_LAYOUT_CONFIG,
companyRecordPage: STANDARD_COMPANY_PAGE_LAYOUT_CONFIG,
connectedAccountRecordPage: STANDARD_CONNECTED_ACCOUNT_PAGE_LAYOUT_CONFIG,
messageChannelRecordPage: STANDARD_MESSAGE_CHANNEL_PAGE_LAYOUT_CONFIG,
messageChannelMessageAssociationRecordPage:
STANDARD_MESSAGE_CHANNEL_MESSAGE_ASSOCIATION_PAGE_LAYOUT_CONFIG,
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`getStandardPageLayoutMetadataRelatedEntityIds should return standard page layout metadata related entity ids 1`] = `
{
@@ -153,49 +153,7 @@ exports[`getStandardPageLayoutMetadataRelatedEntityIds should return standard pa
},
},
},
"connectedAccountRecordPage": {
"id": "00000000-0000-0000-0000-000000000048",
"tabs": {
"home": {
"id": "00000000-0000-0000-0000-000000000049",
"widgets": {
"fields": {
"id": "00000000-0000-0000-0000-000000000050",
},
},
},
"timeline": {
"id": "00000000-0000-0000-0000-000000000051",
"widgets": {
"timeline": {
"id": "00000000-0000-0000-0000-000000000052",
},
},
},
},
},
"messageChannelMessageAssociationMessageFolderRecordPage": {
"id": "00000000-0000-0000-0000-000000000063",
"tabs": {
"home": {
"id": "00000000-0000-0000-0000-000000000064",
"widgets": {
"fields": {
"id": "00000000-0000-0000-0000-000000000065",
},
},
},
"timeline": {
"id": "00000000-0000-0000-0000-000000000066",
"widgets": {
"timeline": {
"id": "00000000-0000-0000-0000-000000000067",
},
},
},
},
},
"messageChannelMessageAssociationRecordPage": {
"id": "00000000-0000-0000-0000-000000000058",
"tabs": {
"home": {
@@ -216,7 +174,7 @@ exports[`getStandardPageLayoutMetadataRelatedEntityIds should return standard pa
},
},
},
"messageChannelRecordPage": {
"messageChannelMessageAssociationRecordPage": {
"id": "00000000-0000-0000-0000-000000000053",
"tabs": {
"home": {
@@ -237,7 +195,49 @@ exports[`getStandardPageLayoutMetadataRelatedEntityIds should return standard pa
},
},
},
"messageChannelRecordPage": {
"id": "00000000-0000-0000-0000-000000000048",
"tabs": {
"home": {
"id": "00000000-0000-0000-0000-000000000049",
"widgets": {
"fields": {
"id": "00000000-0000-0000-0000-000000000050",
},
},
},
"timeline": {
"id": "00000000-0000-0000-0000-000000000051",
"widgets": {
"timeline": {
"id": "00000000-0000-0000-0000-000000000052",
},
},
},
},
},
"messageFolderRecordPage": {
"id": "00000000-0000-0000-0000-000000000063",
"tabs": {
"home": {
"id": "00000000-0000-0000-0000-000000000064",
"widgets": {
"fields": {
"id": "00000000-0000-0000-0000-000000000065",
},
},
},
"timeline": {
"id": "00000000-0000-0000-0000-000000000066",
"widgets": {
"timeline": {
"id": "00000000-0000-0000-0000-000000000067",
},
},
},
},
},
"messageParticipantRecordPage": {
"id": "00000000-0000-0000-0000-000000000068",
"tabs": {
"home": {
@@ -258,35 +258,14 @@ exports[`getStandardPageLayoutMetadataRelatedEntityIds should return standard pa
},
},
},
"messageParticipantRecordPage": {
"messageThreadRecordPage": {
"id": "00000000-0000-0000-0000-000000000073",
"tabs": {
"home": {
"id": "00000000-0000-0000-0000-000000000074",
"widgets": {
"fields": {
"id": "00000000-0000-0000-0000-000000000075",
},
},
},
"timeline": {
"id": "00000000-0000-0000-0000-000000000076",
"widgets": {
"timeline": {
"id": "00000000-0000-0000-0000-000000000077",
},
},
},
},
},
"messageThreadRecordPage": {
"id": "00000000-0000-0000-0000-000000000078",
"tabs": {
"home": {
"id": "00000000-0000-0000-0000-000000000079",
"widgets": {
"emailThread": {
"id": "00000000-0000-0000-0000-000000000080",
"id": "00000000-0000-0000-0000-000000000075",
},
},
},
@@ -327,299 +306,299 @@ exports[`getStandardPageLayoutMetadataRelatedEntityIds should return standard pa
},
},
"noteRecordPage": {
"id": "00000000-0000-0000-0000-000000000081",
"id": "00000000-0000-0000-0000-000000000076",
"tabs": {
"files": {
"id": "00000000-0000-0000-0000-000000000089",
"id": "00000000-0000-0000-0000-000000000084",
"widgets": {
"files": {
"id": "00000000-0000-0000-0000-000000000090",
"id": "00000000-0000-0000-0000-000000000085",
},
},
},
"home": {
"id": "00000000-0000-0000-0000-000000000082",
"id": "00000000-0000-0000-0000-000000000077",
"widgets": {
"fields": {
"id": "00000000-0000-0000-0000-000000000083",
"id": "00000000-0000-0000-0000-000000000078",
},
"noteRichText": {
"id": "00000000-0000-0000-0000-000000000084",
"id": "00000000-0000-0000-0000-000000000079",
},
},
},
"note": {
"id": "00000000-0000-0000-0000-000000000085",
"id": "00000000-0000-0000-0000-000000000080",
"widgets": {
"noteRichText": {
"id": "00000000-0000-0000-0000-000000000086",
"id": "00000000-0000-0000-0000-000000000081",
},
},
},
"timeline": {
"id": "00000000-0000-0000-0000-000000000087",
"id": "00000000-0000-0000-0000-000000000082",
"widgets": {
"timeline": {
"id": "00000000-0000-0000-0000-000000000088",
"id": "00000000-0000-0000-0000-000000000083",
},
},
},
},
},
"opportunityRecordPage": {
"id": "00000000-0000-0000-0000-000000000091",
"id": "00000000-0000-0000-0000-000000000086",
"tabs": {
"calendar": {
"id": "00000000-0000-0000-0000-000000000107",
"id": "00000000-0000-0000-0000-000000000102",
"widgets": {
"calendar": {
"id": "00000000-0000-0000-0000-000000000108",
"id": "00000000-0000-0000-0000-000000000103",
},
},
},
"emails": {
"id": "00000000-0000-0000-0000-000000000105",
"id": "00000000-0000-0000-0000-000000000100",
"widgets": {
"emails": {
"id": "00000000-0000-0000-0000-000000000106",
"id": "00000000-0000-0000-0000-000000000101",
},
},
},
"files": {
"id": "00000000-0000-0000-0000-000000000103",
"id": "00000000-0000-0000-0000-000000000098",
"widgets": {
"files": {
"id": "00000000-0000-0000-0000-000000000104",
"id": "00000000-0000-0000-0000-000000000099",
},
},
},
"home": {
"id": "00000000-0000-0000-0000-000000000092",
"id": "00000000-0000-0000-0000-000000000087",
"widgets": {
"company": {
"id": "00000000-0000-0000-0000-000000000095",
"id": "00000000-0000-0000-0000-000000000090",
},
"fields": {
"id": "00000000-0000-0000-0000-000000000093",
"id": "00000000-0000-0000-0000-000000000088",
},
"owner": {
"id": "00000000-0000-0000-0000-000000000096",
"id": "00000000-0000-0000-0000-000000000091",
},
"pointOfContact": {
"id": "00000000-0000-0000-0000-000000000094",
"id": "00000000-0000-0000-0000-000000000089",
},
},
},
"notes": {
"id": "00000000-0000-0000-0000-000000000101",
"id": "00000000-0000-0000-0000-000000000096",
"widgets": {
"notes": {
"id": "00000000-0000-0000-0000-000000000102",
"id": "00000000-0000-0000-0000-000000000097",
},
},
},
"tasks": {
"id": "00000000-0000-0000-0000-000000000099",
"id": "00000000-0000-0000-0000-000000000094",
"widgets": {
"tasks": {
"id": "00000000-0000-0000-0000-000000000100",
"id": "00000000-0000-0000-0000-000000000095",
},
},
},
"timeline": {
"id": "00000000-0000-0000-0000-000000000097",
"id": "00000000-0000-0000-0000-000000000092",
"widgets": {
"timeline": {
"id": "00000000-0000-0000-0000-000000000098",
"id": "00000000-0000-0000-0000-000000000093",
},
},
},
},
},
"personRecordPage": {
"id": "00000000-0000-0000-0000-000000000109",
"id": "00000000-0000-0000-0000-000000000104",
"tabs": {
"calendar": {
"id": "00000000-0000-0000-0000-000000000124",
"id": "00000000-0000-0000-0000-000000000119",
"widgets": {
"calendar": {
"id": "00000000-0000-0000-0000-000000000125",
"id": "00000000-0000-0000-0000-000000000120",
},
},
},
"emails": {
"id": "00000000-0000-0000-0000-000000000122",
"id": "00000000-0000-0000-0000-000000000117",
"widgets": {
"emails": {
"id": "00000000-0000-0000-0000-000000000123",
"id": "00000000-0000-0000-0000-000000000118",
},
},
},
"files": {
"id": "00000000-0000-0000-0000-000000000120",
"id": "00000000-0000-0000-0000-000000000115",
"widgets": {
"files": {
"id": "00000000-0000-0000-0000-000000000121",
"id": "00000000-0000-0000-0000-000000000116",
},
},
},
"home": {
"id": "00000000-0000-0000-0000-000000000110",
"id": "00000000-0000-0000-0000-000000000105",
"widgets": {
"company": {
"id": "00000000-0000-0000-0000-000000000112",
"id": "00000000-0000-0000-0000-000000000107",
},
"fields": {
"id": "00000000-0000-0000-0000-000000000111",
"id": "00000000-0000-0000-0000-000000000106",
},
"pointOfContactForOpportunities": {
"id": "00000000-0000-0000-0000-000000000113",
"id": "00000000-0000-0000-0000-000000000108",
},
},
},
"notes": {
"id": "00000000-0000-0000-0000-000000000118",
"id": "00000000-0000-0000-0000-000000000113",
"widgets": {
"notes": {
"id": "00000000-0000-0000-0000-000000000119",
"id": "00000000-0000-0000-0000-000000000114",
},
},
},
"tasks": {
"id": "00000000-0000-0000-0000-000000000116",
"id": "00000000-0000-0000-0000-000000000111",
"widgets": {
"tasks": {
"id": "00000000-0000-0000-0000-000000000117",
"id": "00000000-0000-0000-0000-000000000112",
},
},
},
"timeline": {
"id": "00000000-0000-0000-0000-000000000114",
"id": "00000000-0000-0000-0000-000000000109",
"widgets": {
"timeline": {
"id": "00000000-0000-0000-0000-000000000115",
"id": "00000000-0000-0000-0000-000000000110",
},
},
},
},
},
"taskRecordPage": {
"id": "00000000-0000-0000-0000-000000000126",
"id": "00000000-0000-0000-0000-000000000121",
"tabs": {
"files": {
"id": "00000000-0000-0000-0000-000000000134",
"id": "00000000-0000-0000-0000-000000000129",
"widgets": {
"files": {
"id": "00000000-0000-0000-0000-000000000135",
"id": "00000000-0000-0000-0000-000000000130",
},
},
},
"home": {
"id": "00000000-0000-0000-0000-000000000127",
"id": "00000000-0000-0000-0000-000000000122",
"widgets": {
"fields": {
"id": "00000000-0000-0000-0000-000000000128",
"id": "00000000-0000-0000-0000-000000000123",
},
"taskRichText": {
"id": "00000000-0000-0000-0000-000000000129",
"id": "00000000-0000-0000-0000-000000000124",
},
},
},
"note": {
"id": "00000000-0000-0000-0000-000000000130",
"id": "00000000-0000-0000-0000-000000000125",
"widgets": {
"taskRichText": {
"id": "00000000-0000-0000-0000-000000000131",
"id": "00000000-0000-0000-0000-000000000126",
},
},
},
"timeline": {
"id": "00000000-0000-0000-0000-000000000132",
"id": "00000000-0000-0000-0000-000000000127",
"widgets": {
"timeline": {
"id": "00000000-0000-0000-0000-000000000133",
"id": "00000000-0000-0000-0000-000000000128",
},
},
},
},
},
"workflowAutomatedTriggerRecordPage": {
"id": "00000000-0000-0000-0000-000000000139",
"id": "00000000-0000-0000-0000-000000000134",
"tabs": {
"home": {
"id": "00000000-0000-0000-0000-000000000140",
"id": "00000000-0000-0000-0000-000000000135",
"widgets": {
"fields": {
"id": "00000000-0000-0000-0000-000000000141",
"id": "00000000-0000-0000-0000-000000000136",
},
},
},
"timeline": {
"id": "00000000-0000-0000-0000-000000000142",
"widgets": {
"timeline": {
"id": "00000000-0000-0000-0000-000000000143",
},
},
},
},
},
"workflowRecordPage": {
"id": "00000000-0000-0000-0000-000000000136",
"tabs": {
"flow": {
"id": "00000000-0000-0000-0000-000000000137",
"widgets": {
"workflow": {
"timeline": {
"id": "00000000-0000-0000-0000-000000000138",
},
},
},
},
},
"workflowRunRecordPage": {
"id": "00000000-0000-0000-0000-000000000150",
"workflowRecordPage": {
"id": "00000000-0000-0000-0000-000000000131",
"tabs": {
"flow": {
"id": "00000000-0000-0000-0000-000000000154",
"id": "00000000-0000-0000-0000-000000000132",
"widgets": {
"workflow": {
"id": "00000000-0000-0000-0000-000000000133",
},
},
},
},
},
"workflowRunRecordPage": {
"id": "00000000-0000-0000-0000-000000000145",
"tabs": {
"flow": {
"id": "00000000-0000-0000-0000-000000000149",
"widgets": {
"workflowRun": {
"id": "00000000-0000-0000-0000-000000000155",
"id": "00000000-0000-0000-0000-000000000150",
},
},
},
"home": {
"id": "00000000-0000-0000-0000-000000000151",
"id": "00000000-0000-0000-0000-000000000146",
"widgets": {
"fields": {
"id": "00000000-0000-0000-0000-000000000152",
"id": "00000000-0000-0000-0000-000000000147",
},
"workflow": {
"id": "00000000-0000-0000-0000-000000000153",
"id": "00000000-0000-0000-0000-000000000148",
},
},
},
},
},
"workflowVersionRecordPage": {
"id": "00000000-0000-0000-0000-000000000144",
"id": "00000000-0000-0000-0000-000000000139",
"tabs": {
"flow": {
"id": "00000000-0000-0000-0000-000000000148",
"id": "00000000-0000-0000-0000-000000000143",
"widgets": {
"workflowVersion": {
"id": "00000000-0000-0000-0000-000000000149",
"id": "00000000-0000-0000-0000-000000000144",
},
},
},
"home": {
"id": "00000000-0000-0000-0000-000000000145",
"id": "00000000-0000-0000-0000-000000000140",
"widgets": {
"fields": {
"id": "00000000-0000-0000-0000-000000000146",
"id": "00000000-0000-0000-0000-000000000141",
},
"workflow": {
"id": "00000000-0000-0000-0000-000000000147",
"id": "00000000-0000-0000-0000-000000000142",
},
},
},
@@ -12,7 +12,6 @@ import { buildCalendarChannelStandardFlatFieldMetadatas } from 'src/engine/works
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 { buildConnectedAccountStandardFlatFieldMetadatas } from 'src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/compute-connected-account-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';
@@ -49,7 +48,6 @@ const STANDARD_FLAT_FIELD_METADATA_BUILDERS_BY_OBJECT_NAME = {
buildCalendarEventParticipantStandardFlatFieldMetadatas,
calendarEvent: buildCalendarEventStandardFlatFieldMetadatas,
company: buildCompanyStandardFlatFieldMetadatas,
connectedAccount: buildConnectedAccountStandardFlatFieldMetadatas,
dashboard: buildDashboardStandardFlatFieldMetadatas,
message: buildMessageStandardFlatFieldMetadatas,
messageChannel: buildMessageChannelStandardFlatFieldMetadatas,
@@ -1,11 +1,6 @@
import { msg } from '@lingui/core/macro';
import { i18nLabel } from 'src/engine/workspace-manager/twenty-standard-application/utils/i18n-label.util';
import {
DateDisplayFormat,
FieldMetadataType,
RelationOnDeleteAction,
RelationType,
} from 'twenty-shared/types';
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';
@@ -13,7 +8,6 @@ import {
type CreateStandardFieldArgs,
createStandardFieldFlatMetadata,
} from 'src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/create-standard-field-flat-metadata.util';
import { createStandardRelationFieldFlatMetadata } from 'src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/create-standard-relation-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';
@@ -536,29 +530,4 @@ export const buildCalendarChannelStandardFlatFieldMetadatas = ({
twentyStandardApplicationId,
now,
}),
connectedAccount: createStandardRelationFieldFlatMetadata({
objectName,
workspaceId,
context: {
type: FieldMetadataType.RELATION,
morphId: null,
fieldName: 'connectedAccount',
label: i18nLabel(msg`Connected Account`),
description: i18nLabel(msg`Connected Account`),
icon: 'IconUserCircle',
isNullable: false,
isUIReadOnly: true,
targetObjectName: 'connectedAccount',
targetFieldName: 'calendarChannels',
settings: {
relationType: RelationType.MANY_TO_ONE,
onDelete: RelationOnDeleteAction.CASCADE,
joinColumnName: 'connectedAccountId',
},
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
});
@@ -1,447 +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,
RelationOnDeleteAction,
RelationType,
} 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 { createStandardRelationFieldFlatMetadata } from 'src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/create-standard-relation-field-flat-metadata.util';
import { getTsVectorColumnExpressionFromFields } from 'src/engine/workspace-manager/utils/get-ts-vector-column-expression.util';
import { SEARCH_FIELDS_FOR_CONNECTED_ACCOUNT } from 'src/modules/connected-account/standard-objects/connected-account.workspace-entity';
export const buildConnectedAccountStandardFlatFieldMetadatas = ({
now,
objectName,
workspaceId,
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
}: Omit<
CreateStandardFieldArgs<'connectedAccount', FieldMetadataType>,
'context'
>): Record<
AllStandardObjectFieldName<'connectedAccount'>,
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`Connected account 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_CONNECTED_ACCOUNT,
),
},
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
handle: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'handle',
type: FieldMetadataType.TEXT,
label: i18nLabel(msg`handle`),
description: i18nLabel(
msg`The account handle (email, username, phone number, etc.)`,
),
icon: 'IconMail',
isNullable: true,
isUIReadOnly: true,
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
provider: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'provider',
type: FieldMetadataType.TEXT,
label: i18nLabel(msg`provider`),
description: i18nLabel(msg`The account provider`),
icon: 'IconSettings',
isNullable: false,
isUIReadOnly: true,
defaultValue: "'google'",
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
accessToken: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'accessToken',
type: FieldMetadataType.TEXT,
label: i18nLabel(msg`Access Token`),
description: i18nLabel(msg`Messaging provider access token`),
icon: 'IconKey',
isNullable: true,
isUIReadOnly: true,
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
refreshToken: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'refreshToken',
type: FieldMetadataType.TEXT,
label: i18nLabel(msg`Refresh Token`),
description: i18nLabel(msg`Messaging provider refresh token`),
icon: 'IconKey',
isNullable: true,
isUIReadOnly: true,
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
lastSyncHistoryId: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'lastSyncHistoryId',
type: FieldMetadataType.TEXT,
label: i18nLabel(msg`Last sync history ID`),
description: i18nLabel(msg`Last sync history ID`),
icon: 'IconHistory',
isNullable: true,
isUIReadOnly: true,
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
authFailedAt: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'authFailedAt',
type: FieldMetadataType.DATE_TIME,
label: i18nLabel(msg`Auth failed at`),
description: i18nLabel(msg`Auth failed at`),
icon: 'IconX',
isNullable: true,
isUIReadOnly: true,
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
lastCredentialsRefreshedAt: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'lastCredentialsRefreshedAt',
type: FieldMetadataType.DATE_TIME,
label: i18nLabel(msg`Last credentials refreshed at`),
description: i18nLabel(msg`Last credentials refreshed at`),
icon: 'IconHistory',
isNullable: true,
isUIReadOnly: true,
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
handleAliases: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'handleAliases',
type: FieldMetadataType.TEXT,
label: i18nLabel(msg`Handle Aliases`),
description: i18nLabel(msg`Handle Aliases`),
icon: 'IconMail',
isNullable: true,
isUIReadOnly: true,
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
scopes: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'scopes',
type: FieldMetadataType.ARRAY,
label: i18nLabel(msg`Scopes`),
description: i18nLabel(msg`Scopes`),
icon: 'IconSettings',
isNullable: true,
isUIReadOnly: true,
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
connectionParameters: createStandardFieldFlatMetadata({
objectName,
workspaceId,
context: {
fieldName: 'connectionParameters',
type: FieldMetadataType.RAW_JSON,
label: i18nLabel(msg`Custom Connection Parameters`),
description: i18nLabel(
msg`JSON object containing custom connection parameters`,
),
icon: 'IconSettings',
isNullable: true,
isUIReadOnly: true,
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
accountOwner: createStandardRelationFieldFlatMetadata({
objectName,
workspaceId,
context: {
type: FieldMetadataType.RELATION,
morphId: null,
fieldName: 'accountOwner',
label: i18nLabel(msg`Account Owner`),
description: i18nLabel(msg`Account Owner`),
icon: 'IconUserCircle',
isNullable: false,
isUIReadOnly: true,
targetObjectName: 'workspaceMember',
targetFieldName: 'connectedAccounts',
settings: {
relationType: RelationType.MANY_TO_ONE,
onDelete: RelationOnDeleteAction.CASCADE,
joinColumnName: 'accountOwnerId',
},
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
messageChannels: createStandardRelationFieldFlatMetadata({
objectName,
workspaceId,
context: {
type: FieldMetadataType.RELATION,
morphId: null,
fieldName: 'messageChannels',
label: i18nLabel(msg`Message Channels`),
description: i18nLabel(msg`Message Channels`),
icon: 'IconMessage',
isNullable: false,
isUIReadOnly: true,
targetObjectName: 'messageChannel',
targetFieldName: 'connectedAccount',
settings: {
relationType: RelationType.ONE_TO_MANY,
},
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
calendarChannels: createStandardRelationFieldFlatMetadata({
objectName,
workspaceId,
context: {
type: FieldMetadataType.RELATION,
morphId: null,
fieldName: 'calendarChannels',
label: i18nLabel(msg`Calendar Channels`),
description: i18nLabel(msg`Calendar Channels`),
icon: 'IconCalendar',
isNullable: false,
isUIReadOnly: true,
targetObjectName: 'calendarChannel',
targetFieldName: 'connectedAccount',
settings: {
relationType: RelationType.ONE_TO_MANY,
},
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
});
@@ -1,11 +1,6 @@
import { msg } from '@lingui/core/macro';
import { i18nLabel } from 'src/engine/workspace-manager/twenty-standard-application/utils/i18n-label.util';
import {
DateDisplayFormat,
FieldMetadataType,
RelationOnDeleteAction,
RelationType,
} from 'twenty-shared/types';
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';
@@ -13,7 +8,6 @@ import {
type CreateStandardFieldArgs,
createStandardFieldFlatMetadata,
} from 'src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/create-standard-field-flat-metadata.util';
import { createStandardRelationFieldFlatMetadata } from 'src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/create-standard-relation-field-flat-metadata.util';
import { getTsVectorColumnExpressionFromFields } from 'src/engine/workspace-manager/utils/get-ts-vector-column-expression.util';
import {
MessageChannelType,
@@ -706,29 +700,4 @@ export const buildMessageChannelStandardFlatFieldMetadatas = ({
twentyStandardApplicationId,
now,
}),
connectedAccount: createStandardRelationFieldFlatMetadata({
objectName,
workspaceId,
context: {
type: FieldMetadataType.RELATION,
morphId: null,
fieldName: 'connectedAccount',
label: i18nLabel(msg`Connected Account`),
description: i18nLabel(msg`Connected Account`),
icon: 'IconUserCircle',
isNullable: false,
isUIReadOnly: true,
targetObjectName: 'connectedAccount',
targetFieldName: 'messageChannels',
settings: {
relationType: RelationType.MANY_TO_ONE,
onDelete: RelationOnDeleteAction.CASCADE,
joinColumnName: 'connectedAccountId',
},
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
});
@@ -499,29 +499,6 @@ export const buildWorkspaceMemberStandardFlatFieldMetadatas = ({
twentyStandardApplicationId,
now,
}),
connectedAccounts: createStandardRelationFieldFlatMetadata({
objectName,
workspaceId,
context: {
type: FieldMetadataType.RELATION,
morphId: null,
fieldName: 'connectedAccounts',
label: i18nLabel(msg`Connected accounts`),
description: i18nLabel(msg`Connected accounts`),
icon: 'IconAt',
isNullable: false,
isUIReadOnly: true,
targetObjectName: 'connectedAccount',
targetFieldName: 'accountOwner',
settings: {
relationType: RelationType.ONE_TO_MANY,
},
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
messageParticipants: createStandardRelationFieldFlatMetadata({
objectName,
workspaceId,
@@ -6,14 +6,11 @@ import { type AllStandardObjectName } from 'src/engine/workspace-manager/twenty-
import { buildAttachmentStandardFlatIndexMetadatas } from 'src/engine/workspace-manager/twenty-standard-application/utils/index/compute-attachment-standard-flat-index-metadata.util';
import { buildBlocklistStandardFlatIndexMetadatas } from 'src/engine/workspace-manager/twenty-standard-application/utils/index/compute-blocklist-standard-flat-index-metadata.util';
import { buildCalendarChannelEventAssociationStandardFlatIndexMetadatas } from 'src/engine/workspace-manager/twenty-standard-application/utils/index/compute-calendar-channel-event-association-standard-flat-index-metadata.util';
import { buildCalendarChannelStandardFlatIndexMetadatas } from 'src/engine/workspace-manager/twenty-standard-application/utils/index/compute-calendar-channel-standard-flat-index-metadata.util';
import { buildCalendarEventParticipantStandardFlatIndexMetadatas } from 'src/engine/workspace-manager/twenty-standard-application/utils/index/compute-calendar-event-participant-standard-flat-index-metadata.util';
import { buildCompanyStandardFlatIndexMetadatas } from 'src/engine/workspace-manager/twenty-standard-application/utils/index/compute-company-standard-flat-index-metadata.util';
import { buildConnectedAccountStandardFlatIndexMetadatas } from 'src/engine/workspace-manager/twenty-standard-application/utils/index/compute-connected-account-standard-flat-index-metadata.util';
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 { buildMessageChannelStandardFlatIndexMetadatas } from 'src/engine/workspace-manager/twenty-standard-application/utils/index/compute-message-channel-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';
@@ -40,14 +37,11 @@ const STANDARD_FLAT_INDEX_METADATA_BUILDERS_BY_OBJECT_NAME = {
blocklist: buildBlocklistStandardFlatIndexMetadatas,
calendarChannelEventAssociation:
buildCalendarChannelEventAssociationStandardFlatIndexMetadatas,
calendarChannel: buildCalendarChannelStandardFlatIndexMetadatas,
calendarEventParticipant:
buildCalendarEventParticipantStandardFlatIndexMetadatas,
company: buildCompanyStandardFlatIndexMetadatas,
connectedAccount: buildConnectedAccountStandardFlatIndexMetadatas,
dashboard: buildDashboardStandardFlatIndexMetadatas,
message: buildMessageStandardFlatIndexMetadatas,
messageChannel: buildMessageChannelStandardFlatIndexMetadatas,
messageChannelMessageAssociation:
buildMessageChannelMessageAssociationStandardFlatIndexMetadatas,
messageChannelMessageAssociationMessageFolder:
@@ -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 buildCalendarChannelStandardFlatIndexMetadatas = ({
now,
objectName,
workspaceId,
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
}: Omit<CreateStandardIndexArgs<'calendarChannel'>, 'context'>): Record<
AllStandardObjectIndexName<'calendarChannel'>,
FlatIndexMetadata
> => ({
connectedAccountIdIndex: createStandardIndexFlatMetadata({
objectName,
workspaceId,
context: {
indexName: 'connectedAccountIdIndex',
relatedFieldNames: ['connectedAccount'],
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
});
@@ -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 buildConnectedAccountStandardFlatIndexMetadatas = ({
now,
objectName,
workspaceId,
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
}: Omit<CreateStandardIndexArgs<'connectedAccount'>, 'context'>): Record<
AllStandardObjectIndexName<'connectedAccount'>,
FlatIndexMetadata
> => ({
accountOwnerIdIndex: createStandardIndexFlatMetadata({
objectName,
workspaceId,
context: {
indexName: 'accountOwnerIdIndex',
relatedFieldNames: ['accountOwner'],
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
});
@@ -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 buildMessageChannelStandardFlatIndexMetadatas = ({
now,
objectName,
workspaceId,
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
}: Omit<CreateStandardIndexArgs<'messageChannel'>, 'context'>): Record<
AllStandardObjectIndexName<'messageChannel'>,
FlatIndexMetadata
> => ({
connectedAccountIdIndex: createStandardIndexFlatMetadata({
objectName,
workspaceId,
context: {
indexName: 'connectedAccountIdIndex',
relatedFieldNames: ['connectedAccount'],
},
standardObjectMetadataRelatedEntityIds,
dependencyFlatEntityMaps,
twentyStandardApplicationId,
now,
}),
});
@@ -213,36 +213,6 @@ export const STANDARD_FLAT_OBJECT_METADATA_BUILDERS_BY_OBJECT_NAME = {
twentyStandardApplicationId,
now,
}),
connectedAccount: ({
now,
workspaceId,
standardObjectMetadataRelatedEntityIds,
twentyStandardApplicationId,
dependencyFlatEntityMaps,
}: Omit<
CreateStandardObjectArgs<'connectedAccount'>,
'context' | 'objectName'
>) =>
createStandardObjectFlatMetadata({
objectName: 'connectedAccount',
dependencyFlatEntityMaps,
context: {
universalIdentifier:
STANDARD_OBJECTS.connectedAccount.universalIdentifier,
nameSingular: 'connectedAccount',
namePlural: 'connectedAccounts',
labelSingular: i18nLabel(msg`Connected Account`),
labelPlural: i18nLabel(msg`Connected Accounts`),
description: i18nLabel(msg`A connected account`),
icon: 'IconAt',
isSystem: true,
labelIdentifierFieldMetadataName: 'handle',
},
workspaceId,
standardObjectMetadataRelatedEntityIds,
twentyStandardApplicationId,
now,
}),
dashboard: ({
now,
workspaceId,
@@ -3,7 +3,6 @@ export { STANDARD_CALENDAR_CHANNEL_EVENT_ASSOCIATION_PAGE_LAYOUT_CONFIG } from '
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_CONNECTED_ACCOUNT_PAGE_LAYOUT_CONFIG } from './standard-connected-account-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';
@@ -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 CONNECTED_ACCOUNT_PAGE_TABS = {
home: {
universalIdentifier: '20202020-ab0d-400d-800d-c0aec10d0d01',
...TAB_PROPS.home,
widgets: {
fields: {
universalIdentifier: '20202020-ac0d-400d-800d-c0aec10d0d11',
...WIDGET_PROPS.fields,
},
},
},
timeline: {
universalIdentifier: '20202020-ab0d-400d-800d-c0aec10d0d02',
...TAB_PROPS.timeline,
widgets: {
timeline: {
universalIdentifier: '20202020-ac0d-400d-800d-c0aec10d0d21',
...WIDGET_PROPS.timeline,
},
},
},
} as const satisfies Record<string, StandardPageLayoutTabConfig>;
export const STANDARD_CONNECTED_ACCOUNT_PAGE_LAYOUT_CONFIG = {
name: 'Default Connected Account Layout',
type: PageLayoutType.RECORD_PAGE,
objectUniversalIdentifier:
STANDARD_OBJECTS.connectedAccount.universalIdentifier,
universalIdentifier: '20202020-a10d-400d-800d-c0aec10d0001',
defaultTabUniversalIdentifier: null,
tabs: CONNECTED_ACCOUNT_PAGE_TABS,
} as const satisfies StandardPageLayoutConfig;
@@ -71,7 +71,6 @@ const RECORD_PAGE_FIELDS_VIEW_NAME_BY_OBJECT: Partial<
'calendarChannelEventAssociationRecordPageFields',
calendarEventParticipant: 'calendarEventParticipantRecordPageFields',
company: 'companyRecordPageFields',
connectedAccount: 'connectedAccountRecordPageFields',
messageChannel: 'messageChannelRecordPageFields',
messageChannelMessageAssociation:
'messageChannelMessageAssociationRecordPageFields',
@@ -8,7 +8,6 @@ import { computeStandardCalendarChannelViewFieldGroups } from 'src/engine/worksp
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 { computeStandardConnectedAccountViewFieldGroups } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field-group/compute-standard-connected-account-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';
@@ -35,7 +34,6 @@ const STANDARD_FLAT_VIEW_FIELD_GROUP_METADATA_BUILDERS_BY_OBJECT_NAME = {
calendarEventParticipant:
computeStandardCalendarEventParticipantViewFieldGroups,
company: computeStandardCompanyViewFieldGroups,
connectedAccount: computeStandardConnectedAccountViewFieldGroups,
messageChannel: computeStandardMessageChannelViewFieldGroups,
messageChannelMessageAssociation:
computeStandardMessageChannelMessageAssociationViewFieldGroups,
@@ -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 computeStandardConnectedAccountViewFieldGroups = (
args: Omit<CreateStandardViewFieldGroupArgs<'connectedAccount'>, 'context'>,
): Record<string, FlatViewFieldGroup> => {
return {
connectedAccountRecordPageFieldsGeneral:
createStandardViewFieldGroupFlatMetadata({
...args,
objectName: 'connectedAccount',
context: {
viewName: 'connectedAccountRecordPageFields',
viewFieldGroupName: 'general',
name: 'General',
position: 0,
isVisible: true,
},
}),
connectedAccountRecordPageFieldsSystem:
createStandardViewFieldGroupFlatMetadata({
...args,
objectName: 'connectedAccount',
context: {
viewName: 'connectedAccountRecordPageFields',
viewFieldGroupName: 'system',
name: 'System',
position: 1,
isVisible: true,
},
}),
};
};
@@ -10,7 +10,6 @@ import { computeStandardCalendarChannelViewFields } from 'src/engine/workspace-m
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 { computeStandardConnectedAccountViewFields } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-connected-account-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';
@@ -46,7 +45,6 @@ const STANDARD_FLAT_VIEW_FIELD_METADATA_BUILDERS_BY_OBJECT_NAME = {
calendarEvent: computeStandardCalendarEventViewFields,
calendarEventParticipant: computeStandardCalendarEventParticipantViewFields,
company: computeStandardCompanyViewFields,
connectedAccount: computeStandardConnectedAccountViewFields,
dashboard: computeStandardDashboardViewFields,
message: computeStandardMessageViewFields,
messageChannel: computeStandardMessageChannelViewFields,
@@ -20,18 +20,6 @@ export const computeStandardCalendarChannelViewFields = (
size: 150,
},
}),
allCalendarChannelsConnectedAccount: createStandardViewFieldFlatMetadata({
...args,
objectName: 'calendarChannel',
context: {
viewName: 'allCalendarChannels',
viewFieldName: 'connectedAccount',
fieldName: 'connectedAccount',
position: 1,
isVisible: true,
size: 150,
},
}),
allCalendarChannelsVisibility: createStandardViewFieldFlatMetadata({
...args,
objectName: 'calendarChannel',
@@ -81,20 +69,6 @@ export const computeStandardCalendarChannelViewFields = (
},
}),
calendarChannelRecordPageFieldsConnectedAccount:
createStandardViewFieldFlatMetadata({
...args,
objectName: 'calendarChannel',
context: {
viewName: 'calendarChannelRecordPageFields',
viewFieldName: 'connectedAccount',
fieldName: 'connectedAccount',
position: 1,
isVisible: true,
size: 150,
viewFieldGroupName: 'general',
},
}),
calendarChannelRecordPageFieldsVisibility:
createStandardViewFieldFlatMetadata({
...args,
@@ -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 computeStandardConnectedAccountViewFields = (
args: Omit<CreateStandardViewFieldArgs<'connectedAccount'>, 'context'>,
): Record<string, FlatViewField> => {
return {
allConnectedAccountsHandle: createStandardViewFieldFlatMetadata({
...args,
objectName: 'connectedAccount',
context: {
viewName: 'allConnectedAccounts',
viewFieldName: 'handle',
fieldName: 'handle',
position: 0,
isVisible: true,
size: 150,
},
}),
allConnectedAccountsProvider: createStandardViewFieldFlatMetadata({
...args,
objectName: 'connectedAccount',
context: {
viewName: 'allConnectedAccounts',
viewFieldName: 'provider',
fieldName: 'provider',
position: 1,
isVisible: true,
size: 150,
},
}),
allConnectedAccountsAccountOwner: createStandardViewFieldFlatMetadata({
...args,
objectName: 'connectedAccount',
context: {
viewName: 'allConnectedAccounts',
viewFieldName: 'accountOwner',
fieldName: 'accountOwner',
position: 2,
isVisible: true,
size: 150,
},
}),
allConnectedAccountsAuthFailedAt: createStandardViewFieldFlatMetadata({
...args,
objectName: 'connectedAccount',
context: {
viewName: 'allConnectedAccounts',
viewFieldName: 'authFailedAt',
fieldName: 'authFailedAt',
position: 3,
isVisible: true,
size: 150,
},
}),
allConnectedAccountsCreatedAt: createStandardViewFieldFlatMetadata({
...args,
objectName: 'connectedAccount',
context: {
viewName: 'allConnectedAccounts',
viewFieldName: 'createdAt',
fieldName: 'createdAt',
position: 4,
isVisible: true,
size: 150,
},
}),
connectedAccountRecordPageFieldsProvider:
createStandardViewFieldFlatMetadata({
...args,
objectName: 'connectedAccount',
context: {
viewName: 'connectedAccountRecordPageFields',
viewFieldName: 'provider',
fieldName: 'provider',
position: 1,
isVisible: true,
size: 150,
viewFieldGroupName: 'general',
},
}),
connectedAccountRecordPageFieldsAccountOwner:
createStandardViewFieldFlatMetadata({
...args,
objectName: 'connectedAccount',
context: {
viewName: 'connectedAccountRecordPageFields',
viewFieldName: 'accountOwner',
fieldName: 'accountOwner',
position: 2,
isVisible: true,
size: 150,
viewFieldGroupName: 'general',
},
}),
connectedAccountRecordPageFieldsAuthFailedAt:
createStandardViewFieldFlatMetadata({
...args,
objectName: 'connectedAccount',
context: {
viewName: 'connectedAccountRecordPageFields',
viewFieldName: 'authFailedAt',
fieldName: 'authFailedAt',
position: 3,
isVisible: true,
size: 150,
viewFieldGroupName: 'general',
},
}),
connectedAccountRecordPageFieldsCreatedAt:
createStandardViewFieldFlatMetadata({
...args,
objectName: 'connectedAccount',
context: {
viewName: 'connectedAccountRecordPageFields',
viewFieldName: 'createdAt',
fieldName: 'createdAt',
position: 0,
isVisible: true,
size: 150,
viewFieldGroupName: 'system',
},
}),
connectedAccountRecordPageFieldsCreatedBy:
createStandardViewFieldFlatMetadata({
...args,
objectName: 'connectedAccount',
context: {
viewName: 'connectedAccountRecordPageFields',
viewFieldName: 'createdBy',
fieldName: 'createdBy',
position: 1,
isVisible: true,
size: 150,
viewFieldGroupName: 'system',
},
}),
};
};
@@ -20,18 +20,6 @@ export const computeStandardMessageChannelViewFields = (
size: 150,
},
}),
allMessageChannelsConnectedAccount: createStandardViewFieldFlatMetadata({
...args,
objectName: 'messageChannel',
context: {
viewName: 'allMessageChannels',
viewFieldName: 'connectedAccount',
fieldName: 'connectedAccount',
position: 1,
isVisible: true,
size: 150,
},
}),
allMessageChannelsType: createStandardViewFieldFlatMetadata({
...args,
objectName: 'messageChannel',
@@ -93,20 +81,6 @@ export const computeStandardMessageChannelViewFields = (
},
}),
messageChannelRecordPageFieldsConnectedAccount:
createStandardViewFieldFlatMetadata({
...args,
objectName: 'messageChannel',
context: {
viewName: 'messageChannelRecordPageFields',
viewFieldName: 'connectedAccount',
fieldName: 'connectedAccount',
position: 1,
isVisible: true,
size: 150,
viewFieldGroupName: 'general',
},
}),
messageChannelRecordPageFieldsType: createStandardViewFieldFlatMetadata({
...args,
objectName: 'messageChannel',
@@ -10,7 +10,6 @@ import { computeStandardCalendarChannelEventAssociationViews } from 'src/engine/
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';
import { computeStandardCompanyViews } from 'src/engine/workspace-manager/twenty-standard-application/utils/view/compute-standard-company-views.util';
import { computeStandardConnectedAccountViews } from 'src/engine/workspace-manager/twenty-standard-application/utils/view/compute-standard-connected-account-views.util';
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';
@@ -46,7 +45,6 @@ const STANDARD_FLAT_VIEW_METADATA_BUILDERS_BY_OBJECT_NAME = {
calendarEvent: computeStandardCalendarEventViews,
calendarEventParticipant: computeStandardCalendarEventParticipantViews,
company: computeStandardCompanyViews,
connectedAccount: computeStandardConnectedAccountViews,
dashboard: computeStandardDashboardViews,
message: computeStandardMessageViews,
messageChannel: computeStandardMessageChannelViews,
@@ -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 computeStandardConnectedAccountViews = (
args: Omit<CreateStandardViewArgs<'connectedAccount'>, 'context'>,
): Record<string, FlatView> => {
return {
allConnectedAccounts: createStandardViewFlatMetadata({
...args,
objectName: 'connectedAccount',
context: {
viewName: 'allConnectedAccounts',
name: 'All {objectLabelPlural}',
type: ViewType.TABLE,
key: ViewKey.INDEX,
position: 0,
icon: 'IconList',
},
}),
connectedAccountRecordPageFields: createStandardViewFlatMetadata({
...args,
objectName: 'connectedAccount',
context: {
viewName: 'connectedAccountRecordPageFields',
name: 'Connected Account Record Page Fields',
type: ViewType.FIELDS_WIDGET,
key: null,
position: 0,
icon: 'IconList',
},
}),
};
};
@@ -11,7 +11,6 @@ export const STANDARD_OBJECT_ICONS = {
calendarEvent: 'IconCalendar',
comment: 'IconMessageCircle',
company: 'IconBuildingSkyscraper',
connectedAccount: 'IconAt',
dashboard: 'IconLayoutDashboard',
auditLog: 'IconTimelineEvent',
messageChannelMessageAssociation: 'IconMessage',
@@ -12,7 +12,6 @@ import { BaseWorkspaceEntity } from 'src/engine/twenty-orm/base.workspace-entity
import { type FieldTypeAndNameMetadata } from 'src/engine/workspace-manager/utils/get-ts-vector-column-expression.util';
import { type EntityRelation } from 'src/engine/workspace-manager/workspace-migration/types/entity-relation.interface';
import { type CalendarChannelEventAssociationWorkspaceEntity } from 'src/modules/calendar/common/standard-objects/calendar-channel-event-association.workspace-entity';
import { type ConnectedAccountWorkspaceEntity } from 'src/modules/connected-account/standard-objects/connected-account.workspace-entity';
export {
CalendarChannelContactAutoCreationPolicy,
@@ -55,7 +54,6 @@ export class CalendarChannelWorkspaceEntity extends BaseWorkspaceEntity {
syncedAt: string | null;
syncStageStartedAt: string | null;
throttleFailureCount: number;
connectedAccount: EntityRelation<ConnectedAccountWorkspaceEntity>;
connectedAccountId: string;
calendarChannelEventAssociations: EntityRelation<
CalendarChannelEventAssociationWorkspaceEntity[]
@@ -1,31 +0,0 @@
import {
type ConnectedAccountProvider,
FieldMetadataType,
} from 'twenty-shared/types';
import { type ImapSmtpCaldavParams } from 'src/engine/core-modules/imap-smtp-caldav-connection/types/imap-smtp-caldav-connection.type';
import { BaseWorkspaceEntity } from 'src/engine/twenty-orm/base.workspace-entity';
import { type FieldTypeAndNameMetadata } from 'src/engine/workspace-manager/utils/get-ts-vector-column-expression.util';
import { type EntityRelation } from 'src/engine/workspace-manager/workspace-migration/types/entity-relation.interface';
import { type WorkspaceMemberWorkspaceEntity } from 'src/modules/workspace-member/standard-objects/workspace-member.workspace-entity';
const HANDLE_FIELD_NAME = 'handle';
export const SEARCH_FIELDS_FOR_CONNECTED_ACCOUNT: FieldTypeAndNameMetadata[] = [
{ name: HANDLE_FIELD_NAME, type: FieldMetadataType.TEXT },
];
export class ConnectedAccountWorkspaceEntity extends BaseWorkspaceEntity {
handle: string | null;
provider: ConnectedAccountProvider;
accessToken: string | null;
refreshToken: string | null;
lastCredentialsRefreshedAt: Date | null;
lastSyncHistoryId: string | null;
authFailedAt: Date | null;
handleAliases: string[] | null;
scopes: string[] | null;
connectionParameters: ImapSmtpCaldavParams | null;
accountOwner: EntityRelation<WorkspaceMemberWorkspaceEntity>;
accountOwnerId: string;
}
@@ -14,7 +14,6 @@ import {
import { BaseWorkspaceEntity } from 'src/engine/twenty-orm/base.workspace-entity';
import { type FieldTypeAndNameMetadata } from 'src/engine/workspace-manager/utils/get-ts-vector-column-expression.util';
import { type EntityRelation } from 'src/engine/workspace-manager/workspace-migration/types/entity-relation.interface';
import { type ConnectedAccountWorkspaceEntity } from 'src/modules/connected-account/standard-objects/connected-account.workspace-entity';
import { type MessageChannelMessageAssociationWorkspaceEntity } from 'src/modules/messaging/common/standard-objects/message-channel-message-association.workspace-entity';
import { type MessageFolderWorkspaceEntity } from 'src/modules/messaging/common/standard-objects/message-folder.workspace-entity';
@@ -80,7 +79,6 @@ export class MessageChannelWorkspaceEntity extends BaseWorkspaceEntity {
syncStageStartedAt: string | null;
throttleFailureCount: number;
throttleRetryAfter: string | null;
connectedAccount: EntityRelation<ConnectedAccountWorkspaceEntity>;
connectedAccountId: string;
messageChannelMessageAssociations: EntityRelation<
MessageChannelMessageAssociationWorkspaceEntity[]
@@ -10,7 +10,6 @@ import { type AttachmentWorkspaceEntity } from 'src/modules/attachment/standard-
import { type BlocklistWorkspaceEntity } from 'src/modules/blocklist/standard-objects/blocklist.workspace-entity';
import { type CalendarEventParticipantWorkspaceEntity } from 'src/modules/calendar/common/standard-objects/calendar-event-participant.workspace-entity';
import { type CompanyWorkspaceEntity } from 'src/modules/company/standard-objects/company.workspace-entity';
import { type ConnectedAccountWorkspaceEntity } from 'src/modules/connected-account/standard-objects/connected-account.workspace-entity';
import { type MessageParticipantWorkspaceEntity } from 'src/modules/messaging/common/standard-objects/message-participant.workspace-entity';
import { type OpportunityWorkspaceEntity } from 'src/modules/opportunity/standard-objects/opportunity.workspace-entity';
import { type TaskWorkspaceEntity } from 'src/modules/task/standard-objects/task.workspace-entity';
@@ -76,7 +75,6 @@ export class WorkspaceMemberWorkspaceEntity extends BaseWorkspaceEntity {
assignedTasks: Relation<TaskWorkspaceEntity[]>;
accountOwnerForCompanies: Relation<CompanyWorkspaceEntity[]>;
authoredAttachments: Relation<AttachmentWorkspaceEntity[]>;
connectedAccounts: Relation<ConnectedAccountWorkspaceEntity[]>;
messageParticipants: Relation<MessageParticipantWorkspaceEntity[]>;
blocklist: Relation<BlocklistWorkspaceEntity[]>;
calendarEventParticipants: Relation<
@@ -7,7 +7,6 @@
// this list can be removed.
export const OBJECTS_WITH_CHANNEL_VISIBILITY_CONSTRAINTS = [
'blocklist',
'connectedAccount',
'message',
'messageThread',
'messageChannel',
@@ -310,9 +310,6 @@ export const STANDARD_OBJECTS = {
deletedAt: {
universalIdentifier: '20202020-c02d-4034-9d34-4d5f6e7f8a9b',
},
connectedAccount: {
universalIdentifier: '20202020-95b1-4f44-82dc-61b042ae2414',
},
handle: {
universalIdentifier: '20202020-1d08-420a-9aa7-22e0f298232d',
},
@@ -359,11 +356,7 @@ export const STANDARD_OBJECTS = {
universalIdentifier: 'bc9a982c-c314-49d6-818a-2661ce7e918f',
},
},
indexes: {
connectedAccountIdIndex: {
universalIdentifier: '58b4d9e3-0a25-4c7f-9d6e-2b3c4a5f6d70',
},
},
indexes: {},
views: {
allCalendarChannels: {
universalIdentifier: '2d11659c-68ae-4ff2-882f-f1cccde372d0',
@@ -371,9 +364,6 @@ export const STANDARD_OBJECTS = {
handle: {
universalIdentifier: 'dc7ea888-79d6-4b8c-acdd-a72abe8e6326',
},
connectedAccount: {
universalIdentifier: '0fff693f-2149-4fdb-a85c-52f2d89322f2',
},
visibility: {
universalIdentifier: 'a308409d-ee09-4588-b3b2-31b71bced64d',
},
@@ -399,9 +389,6 @@ export const STANDARD_OBJECTS = {
},
},
viewFields: {
connectedAccount: {
universalIdentifier: 'bdb40f41-f9ba-4b59-a8cf-878c23701ab3',
},
visibility: {
universalIdentifier: '2d9f8c64-12be-4bb1-b0d4-977d89853498',
},
@@ -827,127 +814,6 @@ export const STANDARD_OBJECTS = {
},
},
},
connectedAccount: {
universalIdentifier: '20202020-977e-46b2-890b-c3002ddfd5c5',
fields: {
id: { universalIdentifier: '20202020-c06a-4071-8a71-5c6d7e8f9aab' },
createdAt: {
universalIdentifier: '20202020-c06b-4072-9b72-6d7e8f9aabbc',
},
updatedAt: {
universalIdentifier: '20202020-c06c-4073-8c73-7e8f9aabbccd',
},
deletedAt: {
universalIdentifier: '20202020-c06d-4074-9d74-8f9aabbccdde',
},
handle: {
universalIdentifier: '20202020-c804-4a50-bb05-b3a9e24f1dec',
},
provider: {
universalIdentifier: '20202020-ebb0-4516-befc-a9e95935efd5',
},
accessToken: {
universalIdentifier: '20202020-707b-4a0a-8753-2ad42efe1e29',
},
refreshToken: {
universalIdentifier: '20202020-532d-48bd-80a5-c4be6e7f6e49',
},
accountOwner: {
universalIdentifier: '20202020-3517-4896-afac-b1d0aa362af6',
},
lastSyncHistoryId: {
universalIdentifier: '20202020-115c-4a87-b50f-ac4367a971b9',
},
authFailedAt: {
universalIdentifier: '20202020-d268-4c6b-baff-400d402b430a',
},
lastCredentialsRefreshedAt: {
universalIdentifier: '20202020-aa5e-4e85-903b-fdf90a941941',
},
messageChannels: {
universalIdentifier: '20202020-24f7-4362-8468-042204d1e445',
},
calendarChannels: {
universalIdentifier: '20202020-af4a-47bb-99ec-51911c1d3977',
},
handleAliases: {
universalIdentifier: '20202020-8a3d-46be-814f-6228af16c47b',
},
scopes: {
universalIdentifier: '20202020-8a3d-46be-814f-6228af16c47c',
},
connectionParameters: {
universalIdentifier: '20202020-a1b2-46be-814f-6228af16c481',
},
createdBy: {
universalIdentifier: 'e09c2463-9ca6-4004-97ce-6039e3161a5d',
},
updatedBy: {
universalIdentifier: '0a84c0e1-f9fc-47d5-8ac9-58538e50a9f9',
},
position: {
universalIdentifier: '66b7bc3e-c99e-42b6-82e6-6f43142c0f2f',
},
searchVector: {
universalIdentifier: '140767fe-0aa4-4573-a0bd-67cb657c9452',
},
},
indexes: {
accountOwnerIdIndex: {
universalIdentifier: '8e7ca28e-6002-4304-9dcc-0a8da93ca198',
},
},
views: {
allConnectedAccounts: {
universalIdentifier: '0f47f1d8-63bf-443a-a29a-319ff4543abb',
viewFields: {
handle: {
universalIdentifier: '84515ac3-6154-4860-8b29-10316ba3b6fb',
},
provider: {
universalIdentifier: 'dde13525-685c-4476-adba-6d4fd3c92672',
},
accountOwner: {
universalIdentifier: '7b5b84e1-8441-4c8c-a113-4fc184b24ba8',
},
authFailedAt: {
universalIdentifier: '66c8d3d4-3505-46a4-85ec-8bad314aa257',
},
createdAt: {
universalIdentifier: '8ff5aa14-69d3-4294-b266-d141d7e12dae',
},
},
},
connectedAccountRecordPageFields: {
universalIdentifier: '1cc895ca-fe99-44bc-bc1e-19c935ef2595',
viewFieldGroups: {
general: {
universalIdentifier: '428a9949-71f4-4ebf-9160-1da43f1113ff',
},
system: {
universalIdentifier: 'ce9f7f72-583e-4415-a82f-e1f4b2cc8e2f',
},
},
viewFields: {
provider: {
universalIdentifier: '83171d2a-0d11-42b1-991d-8d4346b02cff',
},
accountOwner: {
universalIdentifier: '399a5e57-abab-42b1-b3f6-029a33d62e30',
},
authFailedAt: {
universalIdentifier: 'ad52cc4e-fd75-4b11-8915-c8a7c96ce500',
},
createdAt: {
universalIdentifier: 'eda84724-d30e-406d-9858-016dcd46ac49',
},
createdBy: {
universalIdentifier: '1335696e-31cf-4a5e-aabf-89b45dd80b33',
},
},
},
},
},
dashboard: {
universalIdentifier: '20202020-3840-4b6d-9425-0c5188b05ca8',
fields: {
@@ -1227,9 +1093,6 @@ export const STANDARD_OBJECTS = {
handle: {
universalIdentifier: '20202020-2c96-43c3-93e3-ed6b1acb69bc',
},
connectedAccount: {
universalIdentifier: '20202020-49a2-44a4-b470-282c0440d15d',
},
type: { universalIdentifier: '20202020-ae95-42d9-a3f1-797a2ea22122' },
isContactAutoCreationEnabled: {
universalIdentifier: '20202020-fabd-4f14-b7c6-3310f6d132c6',
@@ -1286,11 +1149,7 @@ export const STANDARD_OBJECTS = {
universalIdentifier: '5e84794c-6f14-4bdf-81a6-76ee11cda51f',
},
},
indexes: {
connectedAccountIdIndex: {
universalIdentifier: 'ab09a386-4dcc-41f7-8dc6-a6071e9c64b7',
},
},
indexes: {},
views: {
allMessageChannels: {
universalIdentifier: '95f57f8e-eaac-46f7-b364-4ef8208f165f',
@@ -1298,9 +1157,6 @@ export const STANDARD_OBJECTS = {
handle: {
universalIdentifier: 'f71a30b0-ee4a-4d36-847a-d0c99134fbb8',
},
connectedAccount: {
universalIdentifier: '0128fd40-7958-4cc5-9c73-7ddb7820d3ec',
},
type: {
universalIdentifier: 'fa480cec-938c-4216-95fe-ba4335e20a41',
},
@@ -1329,9 +1185,6 @@ export const STANDARD_OBJECTS = {
},
},
viewFields: {
connectedAccount: {
universalIdentifier: '19079cf6-2a9c-40b9-b6c2-58d63c6e37ad',
},
type: {
universalIdentifier: '280b9097-0bcf-4389-9ee7-fa89990d1369',
},
@@ -3136,9 +2989,6 @@ export const STANDARD_OBJECTS = {
accountOwnerForCompanies: {
universalIdentifier: '20202020-dc29-4bd4-a3c1-29eafa324bee',
},
connectedAccounts: {
universalIdentifier: '20202020-e322-4bde-a525-727079b4a100',
},
messageParticipants: {
universalIdentifier: '20202020-8f99-48bc-a5eb-edd33dd54188',
},
@@ -8,7 +8,6 @@ export enum CoreObjectNameSingular {
CalendarEvent = 'calendarEvent',
Comment = 'comment',
Company = 'company',
ConnectedAccount = 'connectedAccount',
Dashboard = 'dashboard',
TimelineActivity = 'timelineActivity',
Message = 'message',