chore(server): remove unused flat-field-metadata per-object mocks (#22581)
## Context The `flat-field-metadata/__mocks__/` directory contained 11 large per-object `as const` mock catalogs (`OPPORTUNITY_FLAT_FIELDS_MOCK`, `PERSON_FLAT_FIELDS_MOCK`, `PET_FLAT_FIELDS_MOCK`, ...) plus a `getRelationTargetFlatFieldMetadataMock` helper. An audit of the whole server package (searching both the constant names and any import of the directory) showed almost none of them are consumed anymore — tests have moved to building exactly the fields they need with the `getFlatFieldMetadataMock` factory. Usage found: - `getFlatFieldMetadataMock` (factory): ~25 spec files + 2 core-modules mocks — **kept** - `COMPANY_FLAT_FIELDS_MOCK`: 1 spec (`object-record-event-publisher.spec.ts`), which only used the `name` field - The other 10 `*_FLAT_FIELDS_MOCK` catalogs and `getRelationTargetFlatFieldMetadataMock`: **zero consumers** ## Changes - Delete the 11 unused `*-flat-fields.mock.ts` catalogs and `get-morph-or-relation-target-flat-field-metadata-mock.ts` (~4,900 lines). Only `get-flat-field-metadata.mock.ts` remains. - In `object-record-event-publisher.spec.ts`, build the company `name` field inline with `getFlatFieldMetadataMock` (wired to `COMPANY_FLAT_OBJECT_MOCK.id`/`workspaceId`) and replace the three `COMPANY_FLAT_FIELDS_MOCK.name.type` references with `FieldMetadataType.TEXT`. The sibling `flat-object-metadata/__mocks__/` catalogs are untouched — several of those are still consumed by the morph/relation specs. ## Verification - `object-record-event-publisher.spec.ts`: 27/27 passing - `npx nx lint:diff-with-main twenty-server`: green - `npx nx typecheck twenty-server`: green https://claude.ai/code/session_01XcGEtwdXQo9uJibGRPexuG --- _Generated by [Claude Code](https://claude.ai/code/session_01XcGEtwdXQo9uJibGRPexuG)_ <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/twentyhq/twenty/pull/22581?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="Review in cubic" src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a> <!-- End of auto-generated description by cubic. -->
This commit is contained in:
-401
@@ -1,401 +0,0 @@
|
||||
import {
|
||||
FieldMetadataType,
|
||||
DateDisplayFormat,
|
||||
RelationOnDeleteAction,
|
||||
} from 'twenty-shared/types';
|
||||
|
||||
import { RelationType } from 'src/engine/metadata-modules/field-metadata/interfaces/relation-type.interface';
|
||||
|
||||
import { getFlatFieldMetadataMock } from 'src/engine/metadata-modules/flat-field-metadata/__mocks__/get-flat-field-metadata.mock';
|
||||
import { type FlatFieldMetadata } from 'src/engine/metadata-modules/flat-field-metadata/types/flat-field-metadata.type';
|
||||
|
||||
export const ATTACHMENT_FLAT_FIELDS_MOCK = {
|
||||
name: getFlatFieldMetadataMock({
|
||||
id: 'f51cfa5d-7190-48a5-b548-3e542322c144',
|
||||
objectMetadataId: '819ed5ff-312f-4423-8e95-02a691cf5c27',
|
||||
type: FieldMetadataType.TEXT,
|
||||
name: 'name',
|
||||
label: 'Name',
|
||||
defaultValue: "''",
|
||||
description: 'Attachment name',
|
||||
icon: 'IconFileUpload',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-87a5-48f8-bbf7-ade388825a57',
|
||||
}),
|
||||
fullPath: getFlatFieldMetadataMock({
|
||||
id: '38207e43-a958-4058-bc32-36f838d102d3',
|
||||
objectMetadataId: '819ed5ff-312f-4423-8e95-02a691cf5c27',
|
||||
type: FieldMetadataType.TEXT,
|
||||
name: 'fullPath',
|
||||
label: 'Full path',
|
||||
defaultValue: "''",
|
||||
description: 'Attachment full path',
|
||||
icon: 'IconLink',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-0d19-453d-8e8d-fbcda8ca3747',
|
||||
}),
|
||||
type: getFlatFieldMetadataMock({
|
||||
id: '840360e7-efa6-4ca2-a0d6-113b79474b98',
|
||||
objectMetadataId: '819ed5ff-312f-4423-8e95-02a691cf5c27',
|
||||
type: FieldMetadataType.TEXT,
|
||||
name: 'type',
|
||||
label: 'Type',
|
||||
defaultValue: "''",
|
||||
description: 'Attachment type',
|
||||
icon: 'IconList',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-a417-49b8-a40b-f6a7874caa0d',
|
||||
}),
|
||||
id: getFlatFieldMetadataMock({
|
||||
id: '8662ced6-5e48-4576-993f-1be479dba176',
|
||||
objectMetadataId: '819ed5ff-312f-4423-8e95-02a691cf5c27',
|
||||
type: FieldMetadataType.UUID,
|
||||
name: 'id',
|
||||
label: 'Id',
|
||||
defaultValue: 'uuid',
|
||||
description: 'Id',
|
||||
icon: 'Icon123',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-eda0-4cee-9577-3eb357e3c22b',
|
||||
}),
|
||||
createdAt: getFlatFieldMetadataMock({
|
||||
id: '367923d5-658b-4b7b-9381-6f8e6cf84c85',
|
||||
objectMetadataId: '819ed5ff-312f-4423-8e95-02a691cf5c27',
|
||||
type: FieldMetadataType.DATE_TIME,
|
||||
name: 'createdAt',
|
||||
label: 'Creation date',
|
||||
defaultValue: 'now',
|
||||
description: 'Creation date',
|
||||
icon: 'IconCalendar',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { displayFormat: DateDisplayFormat.RELATIVE },
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-66ac-4502-9975-e4d959c50311',
|
||||
}),
|
||||
updatedAt: getFlatFieldMetadataMock({
|
||||
id: 'b81f8f1b-4173-4176-bc3c-fe1b6a45a0dc',
|
||||
objectMetadataId: '819ed5ff-312f-4423-8e95-02a691cf5c27',
|
||||
type: FieldMetadataType.DATE_TIME,
|
||||
name: 'updatedAt',
|
||||
label: 'Last update',
|
||||
defaultValue: 'now',
|
||||
description: 'Last time the record was changed',
|
||||
icon: 'IconCalendarClock',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { displayFormat: DateDisplayFormat.RELATIVE },
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-d767-4622-bdcf-d8a084834d86',
|
||||
}),
|
||||
deletedAt: getFlatFieldMetadataMock({
|
||||
id: 'eab57da6-41ae-45e8-a5ee-014cfcab450f',
|
||||
objectMetadataId: '819ed5ff-312f-4423-8e95-02a691cf5c27',
|
||||
type: FieldMetadataType.DATE_TIME,
|
||||
name: 'deletedAt',
|
||||
label: 'Deleted at',
|
||||
defaultValue: null,
|
||||
description: 'Date when the record was deleted',
|
||||
icon: 'IconCalendarMinus',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { displayFormat: DateDisplayFormat.RELATIVE },
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-b9a7-48d8-8387-b9a3090a50ec',
|
||||
}),
|
||||
author: getFlatFieldMetadataMock({
|
||||
id: '99724bb6-7a84-4b54-9b3f-dab730ab445a',
|
||||
objectMetadataId: '819ed5ff-312f-4423-8e95-02a691cf5c27',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'author',
|
||||
label: 'Author',
|
||||
defaultValue: null,
|
||||
description: 'Attachment author',
|
||||
icon: 'IconCircleUser',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.SET_NULL,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'authorId',
|
||||
},
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '958b82d0-a290-4e10-898d-3d858fbf684f',
|
||||
relationTargetObjectMetadataId: '7d8264db-2b55-4b74-81ff-b7064ed43840',
|
||||
universalIdentifier: '20202020-6501-4ac5-a4ef-b2f8522ef6cd',
|
||||
}),
|
||||
task: getFlatFieldMetadataMock({
|
||||
id: 'bd823f17-f923-4f0d-8533-51d7bc062975',
|
||||
objectMetadataId: '819ed5ff-312f-4423-8e95-02a691cf5c27',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'task',
|
||||
label: 'Task',
|
||||
defaultValue: null,
|
||||
description: 'Attachment task',
|
||||
icon: 'IconNotes',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.SET_NULL,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'taskId',
|
||||
},
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '00fd339a-6431-465d-9524-09b5c804f497',
|
||||
relationTargetObjectMetadataId: '3186920d-2a15-4b5f-96c7-2bf6567024b0',
|
||||
universalIdentifier: '20202020-51e5-4621-9cf8-215487951c4b',
|
||||
}),
|
||||
note: getFlatFieldMetadataMock({
|
||||
id: '5a98eb2b-1120-42e3-afd3-09d7da642fba',
|
||||
objectMetadataId: '819ed5ff-312f-4423-8e95-02a691cf5c27',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'note',
|
||||
label: 'Note',
|
||||
defaultValue: null,
|
||||
description: 'Attachment note',
|
||||
icon: 'IconNotes',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.SET_NULL,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'noteId',
|
||||
},
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '4d4b3225-ddd2-4d76-a4d6-bcdd43a256e8',
|
||||
relationTargetObjectMetadataId: '1253e3e5-5b00-4a34-93b8-02f3dc6e2b7c',
|
||||
universalIdentifier: '20202020-4f4b-4503-a6fc-6b982f3dffb5',
|
||||
}),
|
||||
person: getFlatFieldMetadataMock({
|
||||
id: '6938c2ec-ebcc-4f30-8d38-2c9c40228c53',
|
||||
objectMetadataId: '819ed5ff-312f-4423-8e95-02a691cf5c27',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'person',
|
||||
label: 'Person',
|
||||
defaultValue: null,
|
||||
description: 'Attachment person',
|
||||
icon: 'IconUser',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'personId',
|
||||
},
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '367ad117-de09-466c-94f8-ce99d951b5ce',
|
||||
relationTargetObjectMetadataId: '843e0b67-9619-4628-91c4-2fa62256a611',
|
||||
universalIdentifier: '20202020-0158-4aa2-965c-5cdafe21ffa2',
|
||||
}),
|
||||
company: getFlatFieldMetadataMock({
|
||||
id: '0bacf73b-f45b-4683-85b4-3e812e6228bf',
|
||||
objectMetadataId: '819ed5ff-312f-4423-8e95-02a691cf5c27',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'company',
|
||||
label: 'Company',
|
||||
defaultValue: null,
|
||||
description: 'Attachment company',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'companyId',
|
||||
},
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '44a572c5-d620-47f5-943a-346ae967e99e',
|
||||
relationTargetObjectMetadataId: '7f5c2c7a-bb23-46fb-b59d-9b7a52a8d1cc',
|
||||
universalIdentifier: '20202020-ceab-4a28-b546-73b06b4c08d5',
|
||||
}),
|
||||
opportunity: getFlatFieldMetadataMock({
|
||||
id: 'da72fbe2-a5aa-42b5-b6bd-482a3919eb20',
|
||||
objectMetadataId: '819ed5ff-312f-4423-8e95-02a691cf5c27',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'opportunity',
|
||||
label: 'Opportunity',
|
||||
defaultValue: null,
|
||||
description: 'Attachment opportunity',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'opportunityId',
|
||||
},
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '16515578-a6ce-48af-a303-2005bb8492f0',
|
||||
relationTargetObjectMetadataId: 'e6996bbf-dd41-423a-9324-8546f5b22fa7',
|
||||
universalIdentifier: '20202020-7374-499d-bea3-9354890755b5',
|
||||
}),
|
||||
rocket: getFlatFieldMetadataMock({
|
||||
id: 'ba23019c-7f25-42c3-8138-622e61c42968',
|
||||
objectMetadataId: '819ed5ff-312f-4423-8e95-02a691cf5c27',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'rocket',
|
||||
label: 'Rocket',
|
||||
defaultValue: null,
|
||||
description: 'Attachments Rocket',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'rocketId',
|
||||
},
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: 'f5984acf-5128-42ac-840f-9d2888423699',
|
||||
relationTargetObjectMetadataId: 'd78ec657-74a4-4652-a350-1f44ff62970a',
|
||||
universalIdentifier: '20202020-ca2d-47c0-8253-9d0b662fb01a',
|
||||
}),
|
||||
pet: getFlatFieldMetadataMock({
|
||||
id: '317a33ef-117e-4953-86d4-c4a9670a2ce3',
|
||||
objectMetadataId: '819ed5ff-312f-4423-8e95-02a691cf5c27',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'pet',
|
||||
label: 'Pet',
|
||||
defaultValue: null,
|
||||
description: 'Attachments Pet',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'petId',
|
||||
},
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: '231903d0-3b14-47ed-9a88-fbf11031c451',
|
||||
relationTargetObjectMetadataId: 'd34e0f07-1b8c-4de0-938e-599cf05e1f7f',
|
||||
universalIdentifier: '20202020-b715-4658-8b6a-5359824dbddd',
|
||||
}),
|
||||
surveyResult: getFlatFieldMetadataMock({
|
||||
id: 'a09463e6-5e56-4965-bc8a-2faa23a64672',
|
||||
objectMetadataId: '819ed5ff-312f-4423-8e95-02a691cf5c27',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'surveyResult',
|
||||
label: 'Survey result',
|
||||
defaultValue: null,
|
||||
description: 'Attachments Survey result',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'surveyResultId',
|
||||
},
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: '3347ffcc-43d0-4697-a9ce-6fb9b0e677e1',
|
||||
relationTargetObjectMetadataId: '713da753-0340-49b5-b1fa-add34d2dc9a8',
|
||||
universalIdentifier: '20202020-58b5-4f6c-8402-06b2bf3ea064',
|
||||
}),
|
||||
} as const satisfies Record<string, FlatFieldMetadata>;
|
||||
-572
@@ -1,572 +0,0 @@
|
||||
import {
|
||||
FieldMetadataType,
|
||||
DateDisplayFormat,
|
||||
RelationOnDeleteAction,
|
||||
} from 'twenty-shared/types';
|
||||
|
||||
import { RelationType } from 'src/engine/metadata-modules/field-metadata/interfaces/relation-type.interface';
|
||||
|
||||
import { getFlatFieldMetadataMock } from 'src/engine/metadata-modules/flat-field-metadata/__mocks__/get-flat-field-metadata.mock';
|
||||
import { type FlatFieldMetadata } from 'src/engine/metadata-modules/flat-field-metadata/types/flat-field-metadata.type';
|
||||
|
||||
export const COMPANY_FLAT_FIELDS_MOCK = {
|
||||
name: getFlatFieldMetadataMock({
|
||||
id: '12b304b6-ea97-4dcc-9415-9f7b2ac4b729',
|
||||
objectMetadataId: '7f5c2c7a-bb23-46fb-b59d-9b7a52a8d1cc',
|
||||
type: FieldMetadataType.TEXT,
|
||||
name: 'name',
|
||||
label: 'Name',
|
||||
defaultValue: "''",
|
||||
description: 'The company name',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-4d99-4e2e-a84c-4a27837b1ece',
|
||||
}),
|
||||
domainName: getFlatFieldMetadataMock({
|
||||
id: 'f4b67402-1686-491f-a3c7-f70ac9b021cf',
|
||||
objectMetadataId: '7f5c2c7a-bb23-46fb-b59d-9b7a52a8d1cc',
|
||||
type: FieldMetadataType.LINKS,
|
||||
name: 'domainName',
|
||||
label: 'Domain Name',
|
||||
defaultValue: {
|
||||
primaryLinkUrl: "''",
|
||||
secondaryLinks: [],
|
||||
primaryLinkLabel: "''",
|
||||
},
|
||||
description:
|
||||
'The company website URL. We use this url to fetch the company icon',
|
||||
icon: 'IconLink',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: false,
|
||||
isUnique: true,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-0c28-43d8-8ba5-3659924d3489',
|
||||
}),
|
||||
linkedinLink: getFlatFieldMetadataMock({
|
||||
id: '6acb80a0-dab8-4d97-a0c8-15e4a495fb54',
|
||||
objectMetadataId: '7f5c2c7a-bb23-46fb-b59d-9b7a52a8d1cc',
|
||||
type: FieldMetadataType.LINKS,
|
||||
name: 'linkedinLink',
|
||||
label: 'Linkedin',
|
||||
defaultValue: {
|
||||
primaryLinkUrl: "''",
|
||||
secondaryLinks: [],
|
||||
primaryLinkLabel: "''",
|
||||
},
|
||||
description: 'The company Linkedin account',
|
||||
icon: 'IconBrandLinkedin',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-ebeb-4beb-b9ad-6848036fb451',
|
||||
}),
|
||||
annualRevenue: getFlatFieldMetadataMock({
|
||||
id: '1e34d871-3e1a-4903-850e-1e4bc6b1d72b',
|
||||
objectMetadataId: '7f5c2c7a-bb23-46fb-b59d-9b7a52a8d1cc',
|
||||
type: FieldMetadataType.CURRENCY,
|
||||
name: 'annualRevenue',
|
||||
label: 'Annual Revenue',
|
||||
defaultValue: { amountMicros: null, currencyCode: "''" },
|
||||
description: "The company's total annual revenue",
|
||||
icon: 'IconMoneybag',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '60f533b7-2166-4071-a767-ceb0286822fd',
|
||||
}),
|
||||
address: getFlatFieldMetadataMock({
|
||||
id: '1bd4dc61-e644-4a9e-8899-cacdf43571a1',
|
||||
objectMetadataId: '7f5c2c7a-bb23-46fb-b59d-9b7a52a8d1cc',
|
||||
type: FieldMetadataType.ADDRESS,
|
||||
name: 'address',
|
||||
label: 'Address',
|
||||
defaultValue: {
|
||||
addressLat: null,
|
||||
addressLng: null,
|
||||
addressCity: "''",
|
||||
addressState: "''",
|
||||
addressCountry: "''",
|
||||
addressStreet1: "''",
|
||||
addressStreet2: "''",
|
||||
addressPostcode: "''",
|
||||
},
|
||||
description: 'Address of the company',
|
||||
icon: 'IconMap',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-c5ce-4adc-b7b6-9c0979fc55e7',
|
||||
}),
|
||||
position: getFlatFieldMetadataMock({
|
||||
id: 'ed081dac-ff61-4fe1-bc2c-073644b61c28',
|
||||
objectMetadataId: '7f5c2c7a-bb23-46fb-b59d-9b7a52a8d1cc',
|
||||
type: FieldMetadataType.POSITION,
|
||||
name: 'position',
|
||||
label: 'Position',
|
||||
defaultValue: 0,
|
||||
description: 'Company record position',
|
||||
icon: 'IconHierarchy2',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-9b4e-462b-991d-a0ee33326454',
|
||||
}),
|
||||
createdBy: getFlatFieldMetadataMock({
|
||||
id: 'dbbddd40-a72b-47fe-9ecf-9bdd4282369a',
|
||||
objectMetadataId: '7f5c2c7a-bb23-46fb-b59d-9b7a52a8d1cc',
|
||||
type: FieldMetadataType.ACTOR,
|
||||
name: 'createdBy',
|
||||
label: 'Created by',
|
||||
defaultValue: {
|
||||
name: "'System'",
|
||||
source: "'MANUAL'",
|
||||
workspaceMemberId: null,
|
||||
},
|
||||
description: 'The creator of the record',
|
||||
icon: 'IconCreativeCommonsSa',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-fabc-451d-ab7d-412170916baa',
|
||||
}),
|
||||
searchVector: getFlatFieldMetadataMock({
|
||||
id: 'b2850ac5-d368-44ab-bc79-b1bf7212e5fb',
|
||||
objectMetadataId: '7f5c2c7a-bb23-46fb-b59d-9b7a52a8d1cc',
|
||||
type: FieldMetadataType.TS_VECTOR,
|
||||
name: 'searchVector',
|
||||
label: 'Search vector',
|
||||
defaultValue: null,
|
||||
description: 'Field used for full-text search',
|
||||
icon: 'IconUser',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '85c71601-72f9-4b7b-b343-d46100b2c74d',
|
||||
}),
|
||||
id: getFlatFieldMetadataMock({
|
||||
id: '982dff40-66c9-4b9b-b3ec-8fa7076ea3a6',
|
||||
objectMetadataId: '7f5c2c7a-bb23-46fb-b59d-9b7a52a8d1cc',
|
||||
type: FieldMetadataType.UUID,
|
||||
name: 'id',
|
||||
label: 'Id',
|
||||
defaultValue: 'uuid',
|
||||
description: 'Id',
|
||||
icon: 'Icon123',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-eda0-4cee-9577-3eb357e3c22b',
|
||||
}),
|
||||
createdAt: getFlatFieldMetadataMock({
|
||||
id: 'e2f65a26-0210-4f22-954b-7d448abbdb28',
|
||||
objectMetadataId: '7f5c2c7a-bb23-46fb-b59d-9b7a52a8d1cc',
|
||||
type: FieldMetadataType.DATE_TIME,
|
||||
name: 'createdAt',
|
||||
label: 'Creation date',
|
||||
defaultValue: 'now',
|
||||
description: 'Creation date',
|
||||
icon: 'IconCalendar',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { displayFormat: DateDisplayFormat.RELATIVE },
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-66ac-4502-9975-e4d959c50311',
|
||||
}),
|
||||
updatedAt: getFlatFieldMetadataMock({
|
||||
id: '26518091-a31b-4716-8627-4e2d25bc0e60',
|
||||
objectMetadataId: '7f5c2c7a-bb23-46fb-b59d-9b7a52a8d1cc',
|
||||
type: FieldMetadataType.DATE_TIME,
|
||||
name: 'updatedAt',
|
||||
label: 'Last update',
|
||||
defaultValue: 'now',
|
||||
description: 'Last time the record was changed',
|
||||
icon: 'IconCalendarClock',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { displayFormat: DateDisplayFormat.RELATIVE },
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-d767-4622-bdcf-d8a084834d86',
|
||||
}),
|
||||
deletedAt: getFlatFieldMetadataMock({
|
||||
id: '29ba1ee7-fc21-441c-8acc-45d9e56751e3',
|
||||
objectMetadataId: '7f5c2c7a-bb23-46fb-b59d-9b7a52a8d1cc',
|
||||
type: FieldMetadataType.DATE_TIME,
|
||||
name: 'deletedAt',
|
||||
label: 'Deleted at',
|
||||
defaultValue: null,
|
||||
description: 'Date when the record was deleted',
|
||||
icon: 'IconCalendarMinus',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { displayFormat: DateDisplayFormat.RELATIVE },
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-b9a7-48d8-8387-b9a3090a50ec',
|
||||
}),
|
||||
people: getFlatFieldMetadataMock({
|
||||
id: 'b0563539-f027-40c5-a14c-ee7a25ff6fd9',
|
||||
objectMetadataId: '7f5c2c7a-bb23-46fb-b59d-9b7a52a8d1cc',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'people',
|
||||
label: 'People',
|
||||
defaultValue: null,
|
||||
description: 'People linked to the company.',
|
||||
icon: 'IconUsers',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: 'ee247ca6-fdaa-4a56-87a2-730cf84f5f29',
|
||||
relationTargetObjectMetadataId: '843e0b67-9619-4628-91c4-2fa62256a611',
|
||||
universalIdentifier: '20202020-3213-4ddf-9494-6422bcff8d7c',
|
||||
}),
|
||||
accountOwner: getFlatFieldMetadataMock({
|
||||
id: '86c6692b-bed5-4ef1-bad0-657e56a85eba',
|
||||
objectMetadataId: '7f5c2c7a-bb23-46fb-b59d-9b7a52a8d1cc',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'accountOwner',
|
||||
label: 'Account Owner',
|
||||
defaultValue: null,
|
||||
description:
|
||||
'Your team member responsible for managing the company account',
|
||||
icon: 'IconUserCircle',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.SET_NULL,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'accountOwnerId',
|
||||
},
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '1fe5453f-6042-4370-b388-c9a198bd0ab4',
|
||||
relationTargetObjectMetadataId: '7d8264db-2b55-4b74-81ff-b7064ed43840',
|
||||
universalIdentifier: '20202020-95b8-4e10-9881-edb5d4765f9d',
|
||||
}),
|
||||
taskTargets: getFlatFieldMetadataMock({
|
||||
id: '4f9138da-cd36-4df4-98f9-ebabe036b141',
|
||||
objectMetadataId: '7f5c2c7a-bb23-46fb-b59d-9b7a52a8d1cc',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'taskTargets',
|
||||
label: 'Tasks',
|
||||
defaultValue: null,
|
||||
description: 'Tasks tied to the company',
|
||||
icon: 'IconCheckbox',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: 'ec11b025-1476-4e84-81c5-cf5b5c776edc',
|
||||
relationTargetObjectMetadataId: 'bb2b29b8-7f46-4106-a8ae-3a32df9c9166',
|
||||
universalIdentifier: '20202020-cb17-4a61-8f8f-3be6730480de',
|
||||
}),
|
||||
noteTargets: getFlatFieldMetadataMock({
|
||||
id: '56b9dc8a-0379-42cf-ab31-8db7061f5a2a',
|
||||
objectMetadataId: '7f5c2c7a-bb23-46fb-b59d-9b7a52a8d1cc',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'noteTargets',
|
||||
label: 'Notes',
|
||||
defaultValue: null,
|
||||
description: 'Notes tied to the company',
|
||||
icon: 'IconNotes',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: 'd1d3f9eb-1447-4adb-bc2b-f133bc58ac35',
|
||||
relationTargetObjectMetadataId: '12e3cb51-c3de-4192-b0d5-965d48d001c0',
|
||||
universalIdentifier: '20202020-bae0-4556-a74a-a9c686f77a88',
|
||||
}),
|
||||
opportunities: getFlatFieldMetadataMock({
|
||||
id: '3eda8c8e-74e4-401f-bb0e-470db5b267e6',
|
||||
objectMetadataId: '7f5c2c7a-bb23-46fb-b59d-9b7a52a8d1cc',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'opportunities',
|
||||
label: 'Opportunities',
|
||||
defaultValue: null,
|
||||
description: 'Opportunities linked to the company.',
|
||||
icon: 'IconTargetArrow',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '512890f1-4da0-4b96-bb71-5ccabefb82e7',
|
||||
relationTargetObjectMetadataId: 'e6996bbf-dd41-423a-9324-8546f5b22fa7',
|
||||
universalIdentifier: '20202020-add3-4658-8e23-d70dccb6d0ec',
|
||||
}),
|
||||
attachments: getFlatFieldMetadataMock({
|
||||
id: '44a572c5-d620-47f5-943a-346ae967e99e',
|
||||
objectMetadataId: '7f5c2c7a-bb23-46fb-b59d-9b7a52a8d1cc',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'attachments',
|
||||
label: 'Attachments',
|
||||
defaultValue: null,
|
||||
description: 'Attachments linked to the company',
|
||||
icon: 'IconFileImport',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '0bacf73b-f45b-4683-85b4-3e812e6228bf',
|
||||
relationTargetObjectMetadataId: '819ed5ff-312f-4423-8e95-02a691cf5c27',
|
||||
universalIdentifier: '20202020-c1b5-4120-b0f0-987ca401ed53',
|
||||
}),
|
||||
timelineActivities: getFlatFieldMetadataMock({
|
||||
id: 'cc78390f-f570-4c2c-9f19-2a8fef67f4f6',
|
||||
objectMetadataId: '7f5c2c7a-bb23-46fb-b59d-9b7a52a8d1cc',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'timelineActivities',
|
||||
label: 'Timeline Activities',
|
||||
defaultValue: null,
|
||||
description: 'Timeline Activities linked to the company',
|
||||
icon: 'IconTimelineEvent',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: 'fd8cabe5-7dc8-4d6a-8053-43434488b3e4',
|
||||
relationTargetObjectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
universalIdentifier: '20202020-0414-4daf-9c0d-64fe7b27f89f',
|
||||
}),
|
||||
tagline: getFlatFieldMetadataMock({
|
||||
id: 'f869f4ed-e440-486a-8392-be33ab327cf4',
|
||||
objectMetadataId: '7f5c2c7a-bb23-46fb-b59d-9b7a52a8d1cc',
|
||||
type: FieldMetadataType.TEXT,
|
||||
name: 'tagline',
|
||||
label: 'Tagline',
|
||||
defaultValue: "''",
|
||||
description: null,
|
||||
icon: 'IconAdCircle',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: 'f869f4ed-e440-486a-8392-be33ab327cf4',
|
||||
}),
|
||||
introVideo: getFlatFieldMetadataMock({
|
||||
id: '339b52b7-adfb-4bd3-ae42-0697da92c0fa',
|
||||
objectMetadataId: '7f5c2c7a-bb23-46fb-b59d-9b7a52a8d1cc',
|
||||
type: FieldMetadataType.LINKS,
|
||||
name: 'introVideo',
|
||||
label: 'Intro Video',
|
||||
defaultValue: {
|
||||
primaryLinkUrl: "''",
|
||||
secondaryLinks: [],
|
||||
primaryLinkLabel: "''",
|
||||
},
|
||||
description: null,
|
||||
icon: 'IconVideo',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '339b52b7-adfb-4bd3-ae42-0697da92c0fa',
|
||||
}),
|
||||
workPolicy: getFlatFieldMetadataMock({
|
||||
id: '74c546c1-b183-41d0-ac20-aecde83bf674',
|
||||
objectMetadataId: '7f5c2c7a-bb23-46fb-b59d-9b7a52a8d1cc',
|
||||
type: FieldMetadataType.MULTI_SELECT,
|
||||
name: 'workPolicy',
|
||||
label: 'Work Policy',
|
||||
defaultValue: null,
|
||||
description: null,
|
||||
icon: 'IconHome',
|
||||
overrides: null,
|
||||
options: [
|
||||
{
|
||||
id: '325240d6-8c67-4fb2-bb02-51e9de4cd6be',
|
||||
color: 'green',
|
||||
label: 'On-Site',
|
||||
value: 'ON_SITE',
|
||||
position: 0,
|
||||
},
|
||||
{
|
||||
id: 'dcf5b58a-945f-4e21-9146-e5ed6adebd32',
|
||||
color: 'turquoise',
|
||||
label: 'Hybrid',
|
||||
value: 'HYBRID',
|
||||
position: 1,
|
||||
},
|
||||
{
|
||||
id: '0c17887a-8f49-48ae-9d6b-1034f2b2fc03',
|
||||
color: 'sky',
|
||||
label: 'Remote Work',
|
||||
value: 'REMOTE_WORK',
|
||||
position: 2,
|
||||
},
|
||||
],
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '74c546c1-b183-41d0-ac20-aecde83bf674',
|
||||
}),
|
||||
visaSponsorship: getFlatFieldMetadataMock({
|
||||
id: '5e48697e-a3d0-4faa-b79c-bddd8c7ae17f',
|
||||
objectMetadataId: '7f5c2c7a-bb23-46fb-b59d-9b7a52a8d1cc',
|
||||
type: FieldMetadataType.BOOLEAN,
|
||||
name: 'visaSponsorship',
|
||||
label: 'Visa Sponsorship',
|
||||
defaultValue: false,
|
||||
description: null,
|
||||
icon: 'IconBrandVisa',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '5e48697e-a3d0-4faa-b79c-bddd8c7ae17f',
|
||||
}),
|
||||
} as const satisfies Record<string, FlatFieldMetadata>;
|
||||
-84
@@ -1,84 +0,0 @@
|
||||
import { faker } from '@faker-js/faker';
|
||||
import {
|
||||
type FieldMetadataType,
|
||||
type NonNullableRequired,
|
||||
} from 'twenty-shared/types';
|
||||
|
||||
import { type MorphOrRelationFieldMetadataType } from 'src/engine/metadata-modules/field-metadata/types/morph-or-relation-field-metadata-type.type';
|
||||
import { type FlatFieldMetadata } from 'src/engine/metadata-modules/flat-field-metadata/types/flat-field-metadata.type';
|
||||
|
||||
type GetMorphOrRelationFlatFieldMetadataMockArgs = NonNullableRequired<
|
||||
Pick<
|
||||
FlatFieldMetadata<FieldMetadataType.RELATION>,
|
||||
| 'universalIdentifier'
|
||||
| 'objectMetadataId'
|
||||
| 'type'
|
||||
| 'settings'
|
||||
| 'relationTargetFieldMetadataId'
|
||||
| 'relationTargetObjectMetadataId'
|
||||
>
|
||||
> &
|
||||
Partial<FlatFieldMetadata>;
|
||||
|
||||
export const getRelationTargetFlatFieldMetadataMock = ({
|
||||
objectMetadataId,
|
||||
settings,
|
||||
type,
|
||||
universalIdentifier,
|
||||
relationTargetFieldMetadataId,
|
||||
relationTargetObjectMetadataId,
|
||||
...overrides
|
||||
}: GetMorphOrRelationFlatFieldMetadataMockArgs): FlatFieldMetadata<MorphOrRelationFieldMetadataType> => {
|
||||
const createdAt = '2024-01-01T00:00:00.000Z';
|
||||
|
||||
return {
|
||||
isSystemSideEffect: false,
|
||||
calendarViewIds: [],
|
||||
mainGroupByFieldMetadataViewIds: [],
|
||||
viewFilterIds: [],
|
||||
viewFieldIds: [],
|
||||
kanbanAggregateOperationViewIds: [],
|
||||
fieldPermissionIds: [],
|
||||
fieldPermissionUniversalIdentifiers: [],
|
||||
createdAt,
|
||||
updatedAt: createdAt,
|
||||
description: 'default flat field metadata description',
|
||||
icon: 'icon',
|
||||
id: faker.string.uuid(),
|
||||
isActive: true,
|
||||
name: 'flatFieldMetadataName',
|
||||
label: 'flat field metadata label',
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
isUIEditable: true,
|
||||
isLabelSyncedWithName: false,
|
||||
isSystem: false,
|
||||
overrides: null,
|
||||
workspaceId: faker.string.uuid(),
|
||||
objectMetadataId,
|
||||
type,
|
||||
universalIdentifier,
|
||||
settings,
|
||||
relationTargetFieldMetadataId,
|
||||
relationTargetObjectMetadataId,
|
||||
morphId: null,
|
||||
...overrides,
|
||||
defaultValue: null,
|
||||
options: null,
|
||||
applicationId: faker.string.uuid(),
|
||||
applicationUniversalIdentifier: faker.string.uuid(),
|
||||
objectMetadataUniversalIdentifier: faker.string.uuid(),
|
||||
relationTargetObjectMetadataUniversalIdentifier: faker.string.uuid(),
|
||||
relationTargetFieldMetadataUniversalIdentifier: faker.string.uuid(),
|
||||
viewFilterUniversalIdentifiers: [],
|
||||
viewFieldUniversalIdentifiers: [],
|
||||
kanbanAggregateOperationViewUniversalIdentifiers: [],
|
||||
calendarViewUniversalIdentifiers: [],
|
||||
mainGroupByFieldMetadataViewUniversalIdentifiers: [],
|
||||
viewSortIds: [],
|
||||
viewSortUniversalIdentifiers: [],
|
||||
searchFieldMetadataIds: [],
|
||||
searchFieldMetadataUniversalIdentifiers: [],
|
||||
universalSettings: settings,
|
||||
};
|
||||
};
|
||||
-277
@@ -1,277 +0,0 @@
|
||||
import { FieldMetadataType, DateDisplayFormat } from 'twenty-shared/types';
|
||||
|
||||
import { RelationType } from 'src/engine/metadata-modules/field-metadata/interfaces/relation-type.interface';
|
||||
|
||||
import { getFlatFieldMetadataMock } from 'src/engine/metadata-modules/flat-field-metadata/__mocks__/get-flat-field-metadata.mock';
|
||||
import { type FlatFieldMetadata } from 'src/engine/metadata-modules/flat-field-metadata/types/flat-field-metadata.type';
|
||||
|
||||
export const NOTE_FLAT_FIELDS_MOCK = {
|
||||
position: getFlatFieldMetadataMock({
|
||||
id: '3ea4b48b-3b88-4db5-b455-c7c77b208599',
|
||||
objectMetadataId: '1253e3e5-5b00-4a34-93b8-02f3dc6e2b7c',
|
||||
type: FieldMetadataType.POSITION,
|
||||
name: 'position',
|
||||
label: 'Position',
|
||||
defaultValue: 0,
|
||||
description: 'Note record position',
|
||||
icon: 'IconHierarchy2',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-368d-4dc2-943f-ed8a49c7fdfb',
|
||||
}),
|
||||
title: getFlatFieldMetadataMock({
|
||||
id: '3cb30a3f-31c1-47d3-a61e-e537615390c8',
|
||||
objectMetadataId: '1253e3e5-5b00-4a34-93b8-02f3dc6e2b7c',
|
||||
type: FieldMetadataType.TEXT,
|
||||
name: 'title',
|
||||
label: 'Title',
|
||||
defaultValue: "''",
|
||||
description: 'Note title',
|
||||
icon: 'IconNotes',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-faeb-4c76-8ba6-ccbb0b4a965f',
|
||||
}),
|
||||
bodyV2: getFlatFieldMetadataMock({
|
||||
id: 'acb2973c-7e46-4296-ac79-8b8d163b6d85',
|
||||
objectMetadataId: '1253e3e5-5b00-4a34-93b8-02f3dc6e2b7c',
|
||||
type: FieldMetadataType.RICH_TEXT,
|
||||
name: 'bodyV2',
|
||||
label: 'Body',
|
||||
defaultValue: null,
|
||||
description: 'Note body',
|
||||
icon: 'IconFilePencil',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-a7bb-4d94-be51-8f25181502c8',
|
||||
}),
|
||||
createdBy: getFlatFieldMetadataMock({
|
||||
id: '1caa79de-f2ec-405c-8667-7a65e9a3bcbf',
|
||||
objectMetadataId: '1253e3e5-5b00-4a34-93b8-02f3dc6e2b7c',
|
||||
type: FieldMetadataType.ACTOR,
|
||||
name: 'createdBy',
|
||||
label: 'Created by',
|
||||
defaultValue: {
|
||||
name: "'System'",
|
||||
source: "'MANUAL'",
|
||||
workspaceMemberId: null,
|
||||
},
|
||||
description: 'The creator of the record',
|
||||
icon: 'IconCreativeCommonsSa',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-0d79-4e21-ab77-5a394eff97be',
|
||||
}),
|
||||
searchVector: getFlatFieldMetadataMock({
|
||||
id: '597b0c10-840e-4ba5-99db-7ef834a72bed',
|
||||
objectMetadataId: '1253e3e5-5b00-4a34-93b8-02f3dc6e2b7c',
|
||||
type: FieldMetadataType.TS_VECTOR,
|
||||
name: 'searchVector',
|
||||
label: 'Search vector',
|
||||
defaultValue: null,
|
||||
description: 'Field used for full-text search',
|
||||
icon: 'IconUser',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-7ea8-44d4-9d4c-51dd2a757950',
|
||||
}),
|
||||
id: getFlatFieldMetadataMock({
|
||||
id: '6ece96a9-2948-4735-8c8a-40cdb76e23b8',
|
||||
objectMetadataId: '1253e3e5-5b00-4a34-93b8-02f3dc6e2b7c',
|
||||
type: FieldMetadataType.UUID,
|
||||
name: 'id',
|
||||
label: 'Id',
|
||||
defaultValue: 'uuid',
|
||||
description: 'Id',
|
||||
icon: 'Icon123',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-eda0-4cee-9577-3eb357e3c22b',
|
||||
}),
|
||||
createdAt: getFlatFieldMetadataMock({
|
||||
id: '0b849709-eee4-4d63-9fef-058cfdd0c098',
|
||||
objectMetadataId: '1253e3e5-5b00-4a34-93b8-02f3dc6e2b7c',
|
||||
type: FieldMetadataType.DATE_TIME,
|
||||
name: 'createdAt',
|
||||
label: 'Creation date',
|
||||
defaultValue: 'now',
|
||||
description: 'Creation date',
|
||||
icon: 'IconCalendar',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { displayFormat: DateDisplayFormat.RELATIVE },
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-66ac-4502-9975-e4d959c50311',
|
||||
}),
|
||||
updatedAt: getFlatFieldMetadataMock({
|
||||
id: '8b4fe2dd-f4fa-4365-964d-d8f0dd7890cd',
|
||||
objectMetadataId: '1253e3e5-5b00-4a34-93b8-02f3dc6e2b7c',
|
||||
type: FieldMetadataType.DATE_TIME,
|
||||
name: 'updatedAt',
|
||||
label: 'Last update',
|
||||
defaultValue: 'now',
|
||||
description: 'Last time the record was changed',
|
||||
icon: 'IconCalendarClock',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { displayFormat: DateDisplayFormat.RELATIVE },
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-d767-4622-bdcf-d8a084834d86',
|
||||
}),
|
||||
deletedAt: getFlatFieldMetadataMock({
|
||||
id: 'fbf20b48-0aca-49a2-b3a8-67d0d7dfe104',
|
||||
objectMetadataId: '1253e3e5-5b00-4a34-93b8-02f3dc6e2b7c',
|
||||
type: FieldMetadataType.DATE_TIME,
|
||||
name: 'deletedAt',
|
||||
label: 'Deleted at',
|
||||
defaultValue: null,
|
||||
description: 'Date when the record was deleted',
|
||||
icon: 'IconCalendarMinus',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { displayFormat: DateDisplayFormat.RELATIVE },
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-b9a7-48d8-8387-b9a3090a50ec',
|
||||
}),
|
||||
noteTargets: getFlatFieldMetadataMock({
|
||||
id: '3a13d398-b7e6-4871-a5f8-5446806b3e5b',
|
||||
objectMetadataId: '1253e3e5-5b00-4a34-93b8-02f3dc6e2b7c',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'noteTargets',
|
||||
label: 'Relations',
|
||||
defaultValue: null,
|
||||
description: 'Note targets',
|
||||
icon: 'IconArrowUpRight',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: 'b1e812b7-604e-459b-9449-31fa414b315c',
|
||||
relationTargetObjectMetadataId: '12e3cb51-c3de-4192-b0d5-965d48d001c0',
|
||||
universalIdentifier: '20202020-1f25-43fe-8b00-af212fdde823',
|
||||
}),
|
||||
attachments: getFlatFieldMetadataMock({
|
||||
id: '4d4b3225-ddd2-4d76-a4d6-bcdd43a256e8',
|
||||
objectMetadataId: '1253e3e5-5b00-4a34-93b8-02f3dc6e2b7c',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'attachments',
|
||||
label: 'Attachments',
|
||||
defaultValue: null,
|
||||
description: 'Note attachments',
|
||||
icon: 'IconFileImport',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '5a98eb2b-1120-42e3-afd3-09d7da642fba',
|
||||
relationTargetObjectMetadataId: '819ed5ff-312f-4423-8e95-02a691cf5c27',
|
||||
universalIdentifier: '20202020-4986-4c92-bf19-39934b149b16',
|
||||
}),
|
||||
timelineActivities: getFlatFieldMetadataMock({
|
||||
id: '1207d260-db2c-41d4-bb09-34ea1188978f',
|
||||
objectMetadataId: '1253e3e5-5b00-4a34-93b8-02f3dc6e2b7c',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'timelineActivities',
|
||||
label: 'Timeline Activities',
|
||||
defaultValue: null,
|
||||
description: 'Timeline Activities linked to the note.',
|
||||
icon: 'IconTimelineEvent',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '2b9f1c90-9e35-4ccc-8d84-b42de31ef127',
|
||||
relationTargetObjectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
universalIdentifier: '20202020-7030-42f8-929c-1a57b25d6bce',
|
||||
}),
|
||||
} as const satisfies Record<string, FlatFieldMetadata>;
|
||||
-283
@@ -1,283 +0,0 @@
|
||||
import {
|
||||
FieldMetadataType,
|
||||
DateDisplayFormat,
|
||||
RelationOnDeleteAction,
|
||||
} from 'twenty-shared/types';
|
||||
|
||||
import { RelationType } from 'src/engine/metadata-modules/field-metadata/interfaces/relation-type.interface';
|
||||
|
||||
import { getFlatFieldMetadataMock } from 'src/engine/metadata-modules/flat-field-metadata/__mocks__/get-flat-field-metadata.mock';
|
||||
import { type FlatFieldMetadata } from 'src/engine/metadata-modules/flat-field-metadata/types/flat-field-metadata.type';
|
||||
|
||||
export const NOTETARGET_FLAT_FIELDS_MOCK = {
|
||||
id: getFlatFieldMetadataMock({
|
||||
id: '3ef6c3df-6569-4d00-b1ae-3893e8e55a7e',
|
||||
objectMetadataId: '12e3cb51-c3de-4192-b0d5-965d48d001c0',
|
||||
type: FieldMetadataType.UUID,
|
||||
name: 'id',
|
||||
label: 'Id',
|
||||
defaultValue: 'uuid',
|
||||
description: 'Id',
|
||||
icon: 'Icon123',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-eda0-4cee-9577-3eb357e3c22b',
|
||||
}),
|
||||
createdAt: getFlatFieldMetadataMock({
|
||||
id: '3cecf38d-1186-4e66-9eb6-06516d3b3172',
|
||||
objectMetadataId: '12e3cb51-c3de-4192-b0d5-965d48d001c0',
|
||||
type: FieldMetadataType.DATE_TIME,
|
||||
name: 'createdAt',
|
||||
label: 'Creation date',
|
||||
defaultValue: 'now',
|
||||
description: 'Creation date',
|
||||
icon: 'IconCalendar',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { displayFormat: DateDisplayFormat.RELATIVE },
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-66ac-4502-9975-e4d959c50311',
|
||||
}),
|
||||
updatedAt: getFlatFieldMetadataMock({
|
||||
id: '41e0ee99-7319-4709-a11a-b0d624625359',
|
||||
objectMetadataId: '12e3cb51-c3de-4192-b0d5-965d48d001c0',
|
||||
type: FieldMetadataType.DATE_TIME,
|
||||
name: 'updatedAt',
|
||||
label: 'Last update',
|
||||
defaultValue: 'now',
|
||||
description: 'Last time the record was changed',
|
||||
icon: 'IconCalendarClock',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { displayFormat: DateDisplayFormat.RELATIVE },
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-d767-4622-bdcf-d8a084834d86',
|
||||
}),
|
||||
deletedAt: getFlatFieldMetadataMock({
|
||||
id: '3ef1221e-649f-41f9-a360-12896e3c0935',
|
||||
objectMetadataId: '12e3cb51-c3de-4192-b0d5-965d48d001c0',
|
||||
type: FieldMetadataType.DATE_TIME,
|
||||
name: 'deletedAt',
|
||||
label: 'Deleted at',
|
||||
defaultValue: null,
|
||||
description: 'Date when the record was deleted',
|
||||
icon: 'IconCalendarMinus',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { displayFormat: DateDisplayFormat.RELATIVE },
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-b9a7-48d8-8387-b9a3090a50ec',
|
||||
}),
|
||||
note: getFlatFieldMetadataMock({
|
||||
id: 'b1e812b7-604e-459b-9449-31fa414b315c',
|
||||
objectMetadataId: '12e3cb51-c3de-4192-b0d5-965d48d001c0',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'note',
|
||||
label: 'Note',
|
||||
defaultValue: null,
|
||||
description: 'NoteTarget note',
|
||||
icon: 'IconNotes',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.SET_NULL,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'noteId',
|
||||
},
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '3a13d398-b7e6-4871-a5f8-5446806b3e5b',
|
||||
relationTargetObjectMetadataId: '1253e3e5-5b00-4a34-93b8-02f3dc6e2b7c',
|
||||
universalIdentifier: '20202020-57f3-4f50-9599-fc0f671df003',
|
||||
}),
|
||||
person: getFlatFieldMetadataMock({
|
||||
id: '560c71ff-254f-4baf-a4d1-054c53444f41',
|
||||
objectMetadataId: '12e3cb51-c3de-4192-b0d5-965d48d001c0',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'person',
|
||||
label: 'Person',
|
||||
defaultValue: null,
|
||||
description: 'NoteTarget person',
|
||||
icon: 'IconUser',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'personId',
|
||||
},
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '60388ed8-45f6-4fb5-8752-81c73e13f4ab',
|
||||
relationTargetObjectMetadataId: '843e0b67-9619-4628-91c4-2fa62256a611',
|
||||
universalIdentifier: '20202020-38ca-4aab-92f5-8a605ca2e4c5',
|
||||
}),
|
||||
company: getFlatFieldMetadataMock({
|
||||
id: 'd1d3f9eb-1447-4adb-bc2b-f133bc58ac35',
|
||||
objectMetadataId: '12e3cb51-c3de-4192-b0d5-965d48d001c0',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'company',
|
||||
label: 'Company',
|
||||
defaultValue: null,
|
||||
description: 'NoteTarget company',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'companyId',
|
||||
},
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '56b9dc8a-0379-42cf-ab31-8db7061f5a2a',
|
||||
relationTargetObjectMetadataId: '7f5c2c7a-bb23-46fb-b59d-9b7a52a8d1cc',
|
||||
universalIdentifier: 'c500fbc0-d6f2-4982-a959-5a755431696c',
|
||||
}),
|
||||
opportunity: getFlatFieldMetadataMock({
|
||||
id: 'f42eac2a-8d99-4259-b69a-549abd553eda',
|
||||
objectMetadataId: '12e3cb51-c3de-4192-b0d5-965d48d001c0',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'opportunity',
|
||||
label: 'Opportunity',
|
||||
defaultValue: null,
|
||||
description: 'NoteTarget opportunity',
|
||||
icon: 'IconTargetArrow',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'opportunityId',
|
||||
},
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '36210a54-a72e-4530-a1eb-a0420c53e551',
|
||||
relationTargetObjectMetadataId: 'e6996bbf-dd41-423a-9324-8546f5b22fa7',
|
||||
universalIdentifier: '20202020-4e42-417a-a705-76581c9ade79',
|
||||
}),
|
||||
rocket: getFlatFieldMetadataMock({
|
||||
id: '4212b3d7-dd9f-4da9-85f7-2fa69a42296f',
|
||||
objectMetadataId: '12e3cb51-c3de-4192-b0d5-965d48d001c0',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'rocket',
|
||||
label: 'Rocket',
|
||||
defaultValue: null,
|
||||
description: 'NoteTargets Rocket',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'rocketId',
|
||||
},
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: 'c91376fb-20bd-47c7-8922-b64f7db51cfa',
|
||||
relationTargetObjectMetadataId: 'd78ec657-74a4-4652-a350-1f44ff62970a',
|
||||
universalIdentifier: '20202020-52b6-4d5e-8f21-ed8b7c09c4a9',
|
||||
}),
|
||||
pet: getFlatFieldMetadataMock({
|
||||
id: 'd88d0737-e83a-47b1-b701-8edfe4a2ae2e',
|
||||
objectMetadataId: '12e3cb51-c3de-4192-b0d5-965d48d001c0',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'pet',
|
||||
label: 'Pet',
|
||||
defaultValue: null,
|
||||
description: 'NoteTargets Pet',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'petId',
|
||||
},
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: '98afd46e-0259-4c87-969d-16e7e660e007',
|
||||
relationTargetObjectMetadataId: 'd34e0f07-1b8c-4de0-938e-599cf05e1f7f',
|
||||
universalIdentifier: '20202020-c54e-4804-8b0d-8795e5166432',
|
||||
}),
|
||||
surveyResult: getFlatFieldMetadataMock({
|
||||
id: '7f444190-cb0e-4417-9c61-e59d8969b7f7',
|
||||
objectMetadataId: '12e3cb51-c3de-4192-b0d5-965d48d001c0',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'surveyResult',
|
||||
label: 'Survey result',
|
||||
defaultValue: null,
|
||||
description: 'NoteTargets Survey result',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'surveyResultId',
|
||||
},
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: '1135971a-b1fa-4e63-b480-69410c6a09cd',
|
||||
relationTargetObjectMetadataId: '713da753-0340-49b5-b1fa-add34d2dc9a8',
|
||||
universalIdentifier: '20202020-75c4-4165-8146-dfdc2a76b940',
|
||||
}),
|
||||
} as const satisfies Record<string, FlatFieldMetadata>;
|
||||
-435
@@ -1,435 +0,0 @@
|
||||
import {
|
||||
FieldMetadataType,
|
||||
DateDisplayFormat,
|
||||
RelationOnDeleteAction,
|
||||
} from 'twenty-shared/types';
|
||||
|
||||
import { RelationType } from 'src/engine/metadata-modules/field-metadata/interfaces/relation-type.interface';
|
||||
|
||||
import { getFlatFieldMetadataMock } from 'src/engine/metadata-modules/flat-field-metadata/__mocks__/get-flat-field-metadata.mock';
|
||||
import { type FlatFieldMetadata } from 'src/engine/metadata-modules/flat-field-metadata/types/flat-field-metadata.type';
|
||||
|
||||
export const OPPORTUNITY_FLAT_FIELDS_MOCK = {
|
||||
name: getFlatFieldMetadataMock({
|
||||
id: '5f510348-58e9-4ded-8dbe-144ae3644bd4',
|
||||
objectMetadataId: 'e6996bbf-dd41-423a-9324-8546f5b22fa7',
|
||||
type: FieldMetadataType.TEXT,
|
||||
name: 'name',
|
||||
label: 'Name',
|
||||
defaultValue: "''",
|
||||
description: 'The opportunity name',
|
||||
icon: 'IconTargetArrow',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-8609-4f65-a2d9-44009eb422b5',
|
||||
}),
|
||||
amount: getFlatFieldMetadataMock({
|
||||
id: '2713c658-cfad-4bc2-a6a0-adc4815185a1',
|
||||
objectMetadataId: 'e6996bbf-dd41-423a-9324-8546f5b22fa7',
|
||||
type: FieldMetadataType.CURRENCY,
|
||||
name: 'amount',
|
||||
label: 'Amount',
|
||||
defaultValue: { amountMicros: null, currencyCode: "''" },
|
||||
description: 'Opportunity amount',
|
||||
icon: 'IconCurrencyDollar',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-583e-4642-8533-db761d5fa82f',
|
||||
}),
|
||||
closeDate: getFlatFieldMetadataMock({
|
||||
id: '1d15aa71-38ea-473f-aac9-e4519882213f',
|
||||
objectMetadataId: 'e6996bbf-dd41-423a-9324-8546f5b22fa7',
|
||||
type: FieldMetadataType.DATE_TIME,
|
||||
name: 'closeDate',
|
||||
label: 'Close date',
|
||||
defaultValue: null,
|
||||
description: 'Opportunity close date',
|
||||
icon: 'IconCalendarEvent',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-527e-44d6-b1ac-c4158d307b97',
|
||||
}),
|
||||
stage: getFlatFieldMetadataMock({
|
||||
id: '4642f809-f302-4525-8af1-3f3ad79998fb',
|
||||
objectMetadataId: 'e6996bbf-dd41-423a-9324-8546f5b22fa7',
|
||||
type: FieldMetadataType.SELECT,
|
||||
name: 'stage',
|
||||
label: 'Stage',
|
||||
defaultValue: "'NEW'",
|
||||
description: 'Opportunity stage',
|
||||
icon: 'IconProgressCheck',
|
||||
overrides: null,
|
||||
options: [
|
||||
{
|
||||
id: 'fdf5cede-2b0e-44d0-adbe-3bc7e613efc9',
|
||||
color: 'red',
|
||||
label: 'New',
|
||||
value: 'NEW',
|
||||
position: 0,
|
||||
},
|
||||
{
|
||||
id: '2bf892e2-79ad-4182-84a2-54f797ec8b95',
|
||||
color: 'purple',
|
||||
label: 'Screening',
|
||||
value: 'SCREENING',
|
||||
position: 1,
|
||||
},
|
||||
{
|
||||
id: 'fa1c0aee-d400-4352-93c6-077a4fc6ff96',
|
||||
color: 'sky',
|
||||
label: 'Meeting',
|
||||
value: 'MEETING',
|
||||
position: 2,
|
||||
},
|
||||
{
|
||||
id: '2aaf3721-6ea7-4596-8b3f-2d09a09f8a8e',
|
||||
color: 'turquoise',
|
||||
label: 'Proposal',
|
||||
value: 'PROPOSAL',
|
||||
position: 3,
|
||||
},
|
||||
{
|
||||
id: '24da0470-c4c0-4a3f-86d7-1629d850663e',
|
||||
color: 'yellow',
|
||||
label: 'Customer',
|
||||
value: 'CUSTOMER',
|
||||
position: 4,
|
||||
},
|
||||
],
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-6f76-477d-8551-28cd65b2b4b9',
|
||||
}),
|
||||
position: getFlatFieldMetadataMock({
|
||||
id: 'd4ca6cb7-fbdb-4e27-b5be-ac9f3a17cf0a',
|
||||
objectMetadataId: 'e6996bbf-dd41-423a-9324-8546f5b22fa7',
|
||||
type: FieldMetadataType.POSITION,
|
||||
name: 'position',
|
||||
label: 'Position',
|
||||
defaultValue: 0,
|
||||
description: 'Opportunity record position',
|
||||
icon: 'IconHierarchy2',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-806d-493a-bbc6-6313e62958e2',
|
||||
}),
|
||||
createdBy: getFlatFieldMetadataMock({
|
||||
id: '29222276-99f1-4443-b5d6-6ea6aa16f28a',
|
||||
objectMetadataId: 'e6996bbf-dd41-423a-9324-8546f5b22fa7',
|
||||
type: FieldMetadataType.ACTOR,
|
||||
name: 'createdBy',
|
||||
label: 'Created by',
|
||||
defaultValue: {
|
||||
name: "'System'",
|
||||
source: "'MANUAL'",
|
||||
workspaceMemberId: null,
|
||||
},
|
||||
description: 'The creator of the record',
|
||||
icon: 'IconCreativeCommonsSa',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-a63e-4a62-8e63-42a51828f831',
|
||||
}),
|
||||
searchVector: getFlatFieldMetadataMock({
|
||||
id: '0ba0c3f0-41f1-4c49-b28b-0a04adddbc7c',
|
||||
objectMetadataId: 'e6996bbf-dd41-423a-9324-8546f5b22fa7',
|
||||
type: FieldMetadataType.TS_VECTOR,
|
||||
name: 'searchVector',
|
||||
label: 'Search vector',
|
||||
defaultValue: null,
|
||||
description: 'Field used for full-text search',
|
||||
icon: 'IconUser',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '428a0da5-4b2e-4ce3-b695-89a8b384e6e3',
|
||||
}),
|
||||
id: getFlatFieldMetadataMock({
|
||||
id: '06f91646-dd7c-481d-b2d9-6dc02b9b6ca8',
|
||||
objectMetadataId: 'e6996bbf-dd41-423a-9324-8546f5b22fa7',
|
||||
type: FieldMetadataType.UUID,
|
||||
name: 'id',
|
||||
label: 'Id',
|
||||
defaultValue: 'uuid',
|
||||
description: 'Id',
|
||||
icon: 'Icon123',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-eda0-4cee-9577-3eb357e3c22b',
|
||||
}),
|
||||
createdAt: getFlatFieldMetadataMock({
|
||||
id: '9cc5c7c6-d9eb-46aa-b4a9-e5a922749b14',
|
||||
objectMetadataId: 'e6996bbf-dd41-423a-9324-8546f5b22fa7',
|
||||
type: FieldMetadataType.DATE_TIME,
|
||||
name: 'createdAt',
|
||||
label: 'Creation date',
|
||||
defaultValue: 'now',
|
||||
description: 'Creation date',
|
||||
icon: 'IconCalendar',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { displayFormat: DateDisplayFormat.RELATIVE },
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-66ac-4502-9975-e4d959c50311',
|
||||
}),
|
||||
updatedAt: getFlatFieldMetadataMock({
|
||||
id: '04629f30-4fdc-4084-bf3f-7f254acc6cf8',
|
||||
objectMetadataId: 'e6996bbf-dd41-423a-9324-8546f5b22fa7',
|
||||
type: FieldMetadataType.DATE_TIME,
|
||||
name: 'updatedAt',
|
||||
label: 'Last update',
|
||||
defaultValue: 'now',
|
||||
description: 'Last time the record was changed',
|
||||
icon: 'IconCalendarClock',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { displayFormat: DateDisplayFormat.RELATIVE },
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-d767-4622-bdcf-d8a084834d86',
|
||||
}),
|
||||
deletedAt: getFlatFieldMetadataMock({
|
||||
id: '07435758-30b2-4d10-a2c3-947b8db7797f',
|
||||
objectMetadataId: 'e6996bbf-dd41-423a-9324-8546f5b22fa7',
|
||||
type: FieldMetadataType.DATE_TIME,
|
||||
name: 'deletedAt',
|
||||
label: 'Deleted at',
|
||||
defaultValue: null,
|
||||
description: 'Date when the record was deleted',
|
||||
icon: 'IconCalendarMinus',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { displayFormat: DateDisplayFormat.RELATIVE },
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-b9a7-48d8-8387-b9a3090a50ec',
|
||||
}),
|
||||
pointOfContact: getFlatFieldMetadataMock({
|
||||
id: '0e55bf63-1ffb-4f74-89f2-edd5a6a6686c',
|
||||
objectMetadataId: 'e6996bbf-dd41-423a-9324-8546f5b22fa7',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'pointOfContact',
|
||||
label: 'Point of Contact',
|
||||
defaultValue: null,
|
||||
description: 'Opportunity point of contact',
|
||||
icon: 'IconUser',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.SET_NULL,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'pointOfContactId',
|
||||
},
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '7580c1b1-e8f9-480b-bd41-38b20df35777',
|
||||
relationTargetObjectMetadataId: '843e0b67-9619-4628-91c4-2fa62256a611',
|
||||
universalIdentifier: '20202020-8dfb-42fc-92b6-01afb759ed16',
|
||||
}),
|
||||
company: getFlatFieldMetadataMock({
|
||||
id: '512890f1-4da0-4b96-bb71-5ccabefb82e7',
|
||||
objectMetadataId: 'e6996bbf-dd41-423a-9324-8546f5b22fa7',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'company',
|
||||
label: 'Company',
|
||||
defaultValue: null,
|
||||
description: 'Opportunity company',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.SET_NULL,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'companyId',
|
||||
},
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '3eda8c8e-74e4-401f-bb0e-470db5b267e6',
|
||||
relationTargetObjectMetadataId: '7f5c2c7a-bb23-46fb-b59d-9b7a52a8d1cc',
|
||||
universalIdentifier: '20202020-cbac-457e-b565-adece5fc815f',
|
||||
}),
|
||||
taskTargets: getFlatFieldMetadataMock({
|
||||
id: 'c0c9f9ac-0d40-4206-90e5-0d1e14f8a09f',
|
||||
objectMetadataId: 'e6996bbf-dd41-423a-9324-8546f5b22fa7',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'taskTargets',
|
||||
label: 'Tasks',
|
||||
defaultValue: null,
|
||||
description: 'Tasks tied to the opportunity',
|
||||
icon: 'IconCheckbox',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: '49afc8d8-dde3-4d19-aa6b-bd16a751b114',
|
||||
relationTargetObjectMetadataId: 'bb2b29b8-7f46-4106-a8ae-3a32df9c9166',
|
||||
universalIdentifier: '20202020-59c0-4179-a208-4a255f04a5be',
|
||||
}),
|
||||
noteTargets: getFlatFieldMetadataMock({
|
||||
id: '36210a54-a72e-4530-a1eb-a0420c53e551',
|
||||
objectMetadataId: 'e6996bbf-dd41-423a-9324-8546f5b22fa7',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'noteTargets',
|
||||
label: 'Notes',
|
||||
defaultValue: null,
|
||||
description: 'Notes tied to the opportunity',
|
||||
icon: 'IconNotes',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: 'f42eac2a-8d99-4259-b69a-549abd553eda',
|
||||
relationTargetObjectMetadataId: '12e3cb51-c3de-4192-b0d5-965d48d001c0',
|
||||
universalIdentifier: '20202020-dd3f-42d5-a382-db58aabf43d3',
|
||||
}),
|
||||
attachments: getFlatFieldMetadataMock({
|
||||
id: '16515578-a6ce-48af-a303-2005bb8492f0',
|
||||
objectMetadataId: 'e6996bbf-dd41-423a-9324-8546f5b22fa7',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'attachments',
|
||||
label: 'Attachments',
|
||||
defaultValue: null,
|
||||
description: 'Attachments linked to the opportunity',
|
||||
icon: 'IconFileImport',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: 'da72fbe2-a5aa-42b5-b6bd-482a3919eb20',
|
||||
relationTargetObjectMetadataId: '819ed5ff-312f-4423-8e95-02a691cf5c27',
|
||||
universalIdentifier: '20202020-87c7-4118-83d6-2f4031005209',
|
||||
}),
|
||||
timelineActivities: getFlatFieldMetadataMock({
|
||||
id: '7826944b-3b21-4448-892e-5a2a68161313',
|
||||
objectMetadataId: 'e6996bbf-dd41-423a-9324-8546f5b22fa7',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'timelineActivities',
|
||||
label: 'Timeline Activities',
|
||||
defaultValue: null,
|
||||
description: 'Timeline Activities linked to the opportunity.',
|
||||
icon: 'IconTimelineEvent',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '026cbaa7-860c-4ed4-b878-8d78849e6c28',
|
||||
relationTargetObjectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
universalIdentifier: '20202020-30e2-421f-96c7-19c69d1cf631',
|
||||
}),
|
||||
} as const satisfies Record<string, FlatFieldMetadata>;
|
||||
-639
@@ -1,639 +0,0 @@
|
||||
import {
|
||||
FieldMetadataType,
|
||||
DateDisplayFormat,
|
||||
RelationOnDeleteAction,
|
||||
} from 'twenty-shared/types';
|
||||
|
||||
import { RelationType } from 'src/engine/metadata-modules/field-metadata/interfaces/relation-type.interface';
|
||||
|
||||
import { getFlatFieldMetadataMock } from 'src/engine/metadata-modules/flat-field-metadata/__mocks__/get-flat-field-metadata.mock';
|
||||
import { type FlatFieldMetadata } from 'src/engine/metadata-modules/flat-field-metadata/types/flat-field-metadata.type';
|
||||
|
||||
export const PERSON_FLAT_FIELDS_MOCK = {
|
||||
name: getFlatFieldMetadataMock({
|
||||
id: 'f410c1cd-2523-4802-be8e-1acc852b4b1a',
|
||||
objectMetadataId: '843e0b67-9619-4628-91c4-2fa62256a611',
|
||||
type: FieldMetadataType.FULL_NAME,
|
||||
name: 'name',
|
||||
label: 'Name',
|
||||
defaultValue: { lastName: "''", firstName: "''" },
|
||||
description: 'Contact’s name',
|
||||
icon: 'IconUser',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-3875-44d5-8c33-a6239011cab8',
|
||||
}),
|
||||
emails: getFlatFieldMetadataMock({
|
||||
id: '012dd567-b7d9-4088-a0c1-4ded96a25e35',
|
||||
objectMetadataId: '843e0b67-9619-4628-91c4-2fa62256a611',
|
||||
type: FieldMetadataType.EMAILS,
|
||||
name: 'emails',
|
||||
label: 'Emails',
|
||||
defaultValue: { primaryEmail: "''", additionalEmails: null },
|
||||
description: 'Contact’s Emails',
|
||||
icon: 'IconMail',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: false,
|
||||
isUnique: true,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-3c51-43fa-8b6e-af39e29368ab',
|
||||
}),
|
||||
linkedinLink: getFlatFieldMetadataMock({
|
||||
id: '86e35da6-151d-47e3-8745-bb1e652b789c',
|
||||
objectMetadataId: '843e0b67-9619-4628-91c4-2fa62256a611',
|
||||
type: FieldMetadataType.LINKS,
|
||||
name: 'linkedinLink',
|
||||
label: 'Linkedin',
|
||||
defaultValue: {
|
||||
primaryLinkUrl: "''",
|
||||
secondaryLinks: [],
|
||||
primaryLinkLabel: "''",
|
||||
},
|
||||
description: 'Contact’s Linkedin account',
|
||||
icon: 'IconBrandLinkedin',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-f1af-48f7-893b-2007a73dd508',
|
||||
}),
|
||||
jobTitle: getFlatFieldMetadataMock({
|
||||
id: 'ab82c659-b553-4317-9708-998f6884c72e',
|
||||
objectMetadataId: '843e0b67-9619-4628-91c4-2fa62256a611',
|
||||
type: FieldMetadataType.TEXT,
|
||||
name: 'jobTitle',
|
||||
label: 'Job Title',
|
||||
defaultValue: "''",
|
||||
description: 'Contact’s job title',
|
||||
icon: 'IconBriefcase',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-b0d0-415a-bef9-640a26dacd9b',
|
||||
}),
|
||||
phones: getFlatFieldMetadataMock({
|
||||
id: '4955e9cb-a740-49fa-9c91-69ec74a6b3df',
|
||||
objectMetadataId: '843e0b67-9619-4628-91c4-2fa62256a611',
|
||||
type: FieldMetadataType.PHONES,
|
||||
name: 'phones',
|
||||
label: 'Phones',
|
||||
defaultValue: {
|
||||
additionalPhones: null,
|
||||
primaryPhoneNumber: "''",
|
||||
primaryPhoneCallingCode: "''",
|
||||
primaryPhoneCountryCode: "''",
|
||||
},
|
||||
description: 'Contact’s phone numbers',
|
||||
icon: 'IconPhone',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-0638-448e-8825-439134618022',
|
||||
}),
|
||||
avatarUrl: getFlatFieldMetadataMock({
|
||||
id: '05e46775-93e9-46c4-8b6f-94829045b1ad',
|
||||
objectMetadataId: '843e0b67-9619-4628-91c4-2fa62256a611',
|
||||
type: FieldMetadataType.TEXT,
|
||||
name: 'avatarUrl',
|
||||
label: 'Avatar',
|
||||
defaultValue: "''",
|
||||
description: 'Contact’s avatar',
|
||||
icon: 'IconFileUpload',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-b8a6-40df-961c-373dc5d2ec21',
|
||||
}),
|
||||
position: getFlatFieldMetadataMock({
|
||||
id: '5162d850-29dd-474e-982b-24257b57fd46',
|
||||
objectMetadataId: '843e0b67-9619-4628-91c4-2fa62256a611',
|
||||
type: FieldMetadataType.POSITION,
|
||||
name: 'position',
|
||||
label: 'Position',
|
||||
defaultValue: 0,
|
||||
description: 'Person record Position',
|
||||
icon: 'IconHierarchy2',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-fcd5-4231-aff5-fff583eaa0b1',
|
||||
}),
|
||||
createdBy: getFlatFieldMetadataMock({
|
||||
id: '1a3de345-4f47-4dc9-b328-61c802efa36e',
|
||||
objectMetadataId: '843e0b67-9619-4628-91c4-2fa62256a611',
|
||||
type: FieldMetadataType.ACTOR,
|
||||
name: 'createdBy',
|
||||
label: 'Created by',
|
||||
defaultValue: {
|
||||
name: "'System'",
|
||||
source: "'MANUAL'",
|
||||
workspaceMemberId: null,
|
||||
},
|
||||
description: 'The creator of the record',
|
||||
icon: 'IconCreativeCommonsSa',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-f6ab-4d98-af24-a3d5b664148a',
|
||||
}),
|
||||
searchVector: getFlatFieldMetadataMock({
|
||||
id: '1d7f79d4-7811-45dc-8f9f-5dbd4863d0a1',
|
||||
objectMetadataId: '843e0b67-9619-4628-91c4-2fa62256a611',
|
||||
type: FieldMetadataType.TS_VECTOR,
|
||||
name: 'searchVector',
|
||||
label: 'Search vector',
|
||||
defaultValue: null,
|
||||
description: 'Field used for full-text search',
|
||||
icon: 'IconUser',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '57d1d7ad-fa10-44fc-82f3-ad0959ec2534',
|
||||
}),
|
||||
id: getFlatFieldMetadataMock({
|
||||
id: 'd9b3e129-49ce-4843-a813-9d16f2239472',
|
||||
objectMetadataId: '843e0b67-9619-4628-91c4-2fa62256a611',
|
||||
type: FieldMetadataType.UUID,
|
||||
name: 'id',
|
||||
label: 'Id',
|
||||
defaultValue: 'uuid',
|
||||
description: 'Id',
|
||||
icon: 'Icon123',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-eda0-4cee-9577-3eb357e3c22b',
|
||||
}),
|
||||
createdAt: getFlatFieldMetadataMock({
|
||||
id: '9fec2460-6fd2-4aaf-8781-78893ba61d6d',
|
||||
objectMetadataId: '843e0b67-9619-4628-91c4-2fa62256a611',
|
||||
type: FieldMetadataType.DATE_TIME,
|
||||
name: 'createdAt',
|
||||
label: 'Creation date',
|
||||
defaultValue: 'now',
|
||||
description: 'Creation date',
|
||||
icon: 'IconCalendar',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { displayFormat: DateDisplayFormat.RELATIVE },
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-66ac-4502-9975-e4d959c50311',
|
||||
}),
|
||||
updatedAt: getFlatFieldMetadataMock({
|
||||
id: '6a00c4b7-d77c-4268-85e7-9e3a597bd0e7',
|
||||
objectMetadataId: '843e0b67-9619-4628-91c4-2fa62256a611',
|
||||
type: FieldMetadataType.DATE_TIME,
|
||||
name: 'updatedAt',
|
||||
label: 'Last update',
|
||||
defaultValue: 'now',
|
||||
description: 'Last time the record was changed',
|
||||
icon: 'IconCalendarClock',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { displayFormat: DateDisplayFormat.RELATIVE },
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-d767-4622-bdcf-d8a084834d86',
|
||||
}),
|
||||
deletedAt: getFlatFieldMetadataMock({
|
||||
id: 'a9f5469d-d7ff-42f6-b3a7-399c8ab8b468',
|
||||
objectMetadataId: '843e0b67-9619-4628-91c4-2fa62256a611',
|
||||
type: FieldMetadataType.DATE_TIME,
|
||||
name: 'deletedAt',
|
||||
label: 'Deleted at',
|
||||
defaultValue: null,
|
||||
description: 'Date when the record was deleted',
|
||||
icon: 'IconCalendarMinus',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { displayFormat: DateDisplayFormat.RELATIVE },
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-b9a7-48d8-8387-b9a3090a50ec',
|
||||
}),
|
||||
company: getFlatFieldMetadataMock({
|
||||
id: 'ee247ca6-fdaa-4a56-87a2-730cf84f5f29',
|
||||
objectMetadataId: '843e0b67-9619-4628-91c4-2fa62256a611',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'company',
|
||||
label: 'Company',
|
||||
defaultValue: null,
|
||||
description: 'Contact’s company',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.SET_NULL,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'companyId',
|
||||
},
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: 'b0563539-f027-40c5-a14c-ee7a25ff6fd9',
|
||||
relationTargetObjectMetadataId: '7f5c2c7a-bb23-46fb-b59d-9b7a52a8d1cc',
|
||||
universalIdentifier: '20202020-e2f3-448e-b34c-2d625f0025fd',
|
||||
}),
|
||||
pointOfContactForOpportunities: getFlatFieldMetadataMock({
|
||||
id: '7580c1b1-e8f9-480b-bd41-38b20df35777',
|
||||
objectMetadataId: '843e0b67-9619-4628-91c4-2fa62256a611',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'pointOfContactForOpportunities',
|
||||
label: 'Opportunities',
|
||||
defaultValue: null,
|
||||
description:
|
||||
'List of opportunities for which that person is the point of contact',
|
||||
icon: 'IconTargetArrow',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: '0e55bf63-1ffb-4f74-89f2-edd5a6a6686c',
|
||||
relationTargetObjectMetadataId: 'e6996bbf-dd41-423a-9324-8546f5b22fa7',
|
||||
universalIdentifier: '20202020-911b-4a7d-b67b-918aa9a5b33a',
|
||||
}),
|
||||
taskTargets: getFlatFieldMetadataMock({
|
||||
id: '9609ca31-215e-47fd-9b3b-ab200acb2fa8',
|
||||
objectMetadataId: '843e0b67-9619-4628-91c4-2fa62256a611',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'taskTargets',
|
||||
label: 'Tasks',
|
||||
defaultValue: null,
|
||||
description: 'Tasks tied to the contact',
|
||||
icon: 'IconCheckbox',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: '64225f87-96c4-4846-9462-e7aa3ad9e182',
|
||||
relationTargetObjectMetadataId: 'bb2b29b8-7f46-4106-a8ae-3a32df9c9166',
|
||||
universalIdentifier: '20202020-584b-4d3e-88b6-53ab1fa03c3a',
|
||||
}),
|
||||
noteTargets: getFlatFieldMetadataMock({
|
||||
id: '60388ed8-45f6-4fb5-8752-81c73e13f4ab',
|
||||
objectMetadataId: '843e0b67-9619-4628-91c4-2fa62256a611',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'noteTargets',
|
||||
label: 'Notes',
|
||||
defaultValue: null,
|
||||
description: 'Notes tied to the contact',
|
||||
icon: 'IconNotes',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: '560c71ff-254f-4baf-a4d1-054c53444f41',
|
||||
relationTargetObjectMetadataId: '12e3cb51-c3de-4192-b0d5-965d48d001c0',
|
||||
universalIdentifier: '20202020-c8fc-4258-8250-15905d3fcfec',
|
||||
}),
|
||||
attachments: getFlatFieldMetadataMock({
|
||||
id: '367ad117-de09-466c-94f8-ce99d951b5ce',
|
||||
objectMetadataId: '843e0b67-9619-4628-91c4-2fa62256a611',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'attachments',
|
||||
label: 'Attachments',
|
||||
defaultValue: null,
|
||||
description: 'Attachments linked to the contact.',
|
||||
icon: 'IconFileImport',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '6938c2ec-ebcc-4f30-8d38-2c9c40228c53',
|
||||
relationTargetObjectMetadataId: '819ed5ff-312f-4423-8e95-02a691cf5c27',
|
||||
universalIdentifier: '20202020-cd97-451f-87fa-bcb789bdbf3a',
|
||||
}),
|
||||
messageParticipants: getFlatFieldMetadataMock({
|
||||
id: '22dcab3c-939c-4b8d-bd7c-4c4d58588460',
|
||||
objectMetadataId: '843e0b67-9619-4628-91c4-2fa62256a611',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'messageParticipants',
|
||||
label: 'Message Participants',
|
||||
defaultValue: null,
|
||||
description: 'Message Participants',
|
||||
icon: 'IconUserCircle',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: 'e95d7d1a-9101-4048-b019-d2f8bc110328',
|
||||
relationTargetObjectMetadataId: 'edb170fd-a0c2-4619-b1a9-293cf07437c4',
|
||||
universalIdentifier: '20202020-498e-4c61-8158-fa04f0638334',
|
||||
}),
|
||||
calendarEventParticipants: getFlatFieldMetadataMock({
|
||||
id: '9e82a873-2988-4d9d-af04-81f2d947f4ec',
|
||||
objectMetadataId: '843e0b67-9619-4628-91c4-2fa62256a611',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'calendarEventParticipants',
|
||||
label: 'Calendar Event Participants',
|
||||
defaultValue: null,
|
||||
description: 'Calendar Event Participants',
|
||||
icon: 'IconCalendar',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: 'e39f443d-3282-47a3-a24d-47ed604d58be',
|
||||
relationTargetObjectMetadataId: 'a4c662b6-e08d-40a5-ae55-82ed8f4edf78',
|
||||
universalIdentifier: '20202020-52ee-45e9-a702-b64b3753e3a9',
|
||||
}),
|
||||
timelineActivities: getFlatFieldMetadataMock({
|
||||
id: 'b1457347-545b-4a42-9c68-bc655952229a',
|
||||
objectMetadataId: '843e0b67-9619-4628-91c4-2fa62256a611',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'timelineActivities',
|
||||
label: 'Events',
|
||||
defaultValue: null,
|
||||
description: 'Events linked to the person',
|
||||
icon: 'IconTimelineEvent',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: 'dbd02754-4bef-4149-b39d-54759983ab47',
|
||||
relationTargetObjectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
universalIdentifier: '20202020-a43e-4873-9c23-e522de906ce5',
|
||||
}),
|
||||
intro: getFlatFieldMetadataMock({
|
||||
id: '94c95bfa-88bc-4271-87c2-08e6df084a15',
|
||||
objectMetadataId: '843e0b67-9619-4628-91c4-2fa62256a611',
|
||||
type: FieldMetadataType.TEXT,
|
||||
name: 'intro',
|
||||
label: 'Intro',
|
||||
defaultValue: "''",
|
||||
description: null,
|
||||
icon: 'IconNote',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '94c95bfa-88bc-4271-87c2-08e6df084a15',
|
||||
}),
|
||||
whatsapp: getFlatFieldMetadataMock({
|
||||
id: 'adc26aa8-d146-49d2-a037-77e15d8b20fc',
|
||||
objectMetadataId: '843e0b67-9619-4628-91c4-2fa62256a611',
|
||||
type: FieldMetadataType.PHONES,
|
||||
name: 'whatsapp',
|
||||
label: 'Whatsapp',
|
||||
defaultValue: {
|
||||
additionalPhones: null,
|
||||
primaryPhoneNumber: "''",
|
||||
primaryPhoneCallingCode: "'+33'",
|
||||
primaryPhoneCountryCode: "'FR'",
|
||||
},
|
||||
description: null,
|
||||
icon: 'IconBrandWhatsapp',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: 'adc26aa8-d146-49d2-a037-77e15d8b20fc',
|
||||
}),
|
||||
workPreference: getFlatFieldMetadataMock({
|
||||
id: '421b5788-94dd-40b0-8d5f-6c649d7464c4',
|
||||
objectMetadataId: '843e0b67-9619-4628-91c4-2fa62256a611',
|
||||
type: FieldMetadataType.MULTI_SELECT,
|
||||
name: 'workPreference',
|
||||
label: 'Work Preference',
|
||||
defaultValue: null,
|
||||
description: null,
|
||||
icon: 'IconHome',
|
||||
overrides: null,
|
||||
options: [
|
||||
{
|
||||
id: 'c33d02fd-0bd9-4769-bd32-036d9ff645a5',
|
||||
color: 'green',
|
||||
label: 'On-Site',
|
||||
value: 'ON_SITE',
|
||||
position: 0,
|
||||
},
|
||||
{
|
||||
id: '98d938d8-9439-4483-9944-ec073c9a3986',
|
||||
color: 'turquoise',
|
||||
label: 'Hybrid',
|
||||
value: 'HYBRID',
|
||||
position: 1,
|
||||
},
|
||||
{
|
||||
id: '661f6ba8-7340-4830-ab0c-b6d8ed658ade',
|
||||
color: 'sky',
|
||||
label: 'Remote Work',
|
||||
value: 'REMOTE_WORK',
|
||||
position: 2,
|
||||
},
|
||||
],
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '421b5788-94dd-40b0-8d5f-6c649d7464c4',
|
||||
}),
|
||||
performanceRating: getFlatFieldMetadataMock({
|
||||
id: 'f75b0e71-e34c-4bc9-bb91-55a94127ab82',
|
||||
objectMetadataId: '843e0b67-9619-4628-91c4-2fa62256a611',
|
||||
type: FieldMetadataType.RATING,
|
||||
name: 'performanceRating',
|
||||
label: 'Performance Rating',
|
||||
defaultValue: null,
|
||||
description: null,
|
||||
icon: 'IconStars',
|
||||
overrides: null,
|
||||
options: [
|
||||
{
|
||||
id: 'e6b4b1bb-c707-41cb-8f30-418a81ae3299',
|
||||
label: '1',
|
||||
value: 'RATING_1',
|
||||
position: 0,
|
||||
},
|
||||
{
|
||||
id: '5eaa1985-6970-4add-ab73-9e7a590f7a27',
|
||||
label: '2',
|
||||
value: 'RATING_2',
|
||||
position: 1,
|
||||
},
|
||||
{
|
||||
id: '6b61794f-42d5-4a3a-8cb3-f911aac15803',
|
||||
label: '3',
|
||||
value: 'RATING_3',
|
||||
position: 2,
|
||||
},
|
||||
{
|
||||
id: '3ed5ba36-8c24-400b-b58a-d2ee306bb46f',
|
||||
label: '4',
|
||||
value: 'RATING_4',
|
||||
position: 3,
|
||||
},
|
||||
{
|
||||
id: 'af3beb45-5937-4c4b-8aa4-3cc3f356d131',
|
||||
label: '5',
|
||||
value: 'RATING_5',
|
||||
position: 4,
|
||||
},
|
||||
],
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: 'f75b0e71-e34c-4bc9-bb91-55a94127ab82',
|
||||
}),
|
||||
} as const satisfies Record<string, FlatFieldMetadata>;
|
||||
-760
@@ -1,760 +0,0 @@
|
||||
import { FieldMetadataType } from 'twenty-shared/types';
|
||||
|
||||
import { RelationType } from 'src/engine/metadata-modules/field-metadata/interfaces/relation-type.interface';
|
||||
|
||||
import { getFlatFieldMetadataMock } from 'src/engine/metadata-modules/flat-field-metadata/__mocks__/get-flat-field-metadata.mock';
|
||||
import { type FlatFieldMetadata } from 'src/engine/metadata-modules/flat-field-metadata/types/flat-field-metadata.type';
|
||||
|
||||
export const PET_FLAT_FIELDS_MOCK = {
|
||||
noteTargets: getFlatFieldMetadataMock({
|
||||
id: '98afd46e-0259-4c87-969d-16e7e660e007',
|
||||
objectMetadataId: 'd34e0f07-1b8c-4de0-938e-599cf05e1f7f',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'noteTargets',
|
||||
label: 'NoteTargets',
|
||||
defaultValue: null,
|
||||
description: 'NoteTargets tied to the Pet',
|
||||
icon: 'IconCheckbox',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: 'd88d0737-e83a-47b1-b701-8edfe4a2ae2e',
|
||||
relationTargetObjectMetadataId: '12e3cb51-c3de-4192-b0d5-965d48d001c0',
|
||||
universalIdentifier: '20202020-01fd-4f37-99dc-9427a444018a',
|
||||
}),
|
||||
id: getFlatFieldMetadataMock({
|
||||
id: 'ce25501a-1cc6-44c5-9158-b602db0efaca',
|
||||
objectMetadataId: 'd34e0f07-1b8c-4de0-938e-599cf05e1f7f',
|
||||
type: FieldMetadataType.UUID,
|
||||
name: 'id',
|
||||
label: 'Id',
|
||||
defaultValue: 'uuid',
|
||||
description: 'Id',
|
||||
icon: 'Icon123',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-eda0-4cee-9577-3eb357e3c22b',
|
||||
}),
|
||||
name: getFlatFieldMetadataMock({
|
||||
id: '4311d4e0-ce63-479c-a4da-5b244e2348cc',
|
||||
objectMetadataId: 'd34e0f07-1b8c-4de0-938e-599cf05e1f7f',
|
||||
type: FieldMetadataType.TEXT,
|
||||
name: 'name',
|
||||
label: 'Name',
|
||||
defaultValue: "'Untitled'",
|
||||
description: 'Name',
|
||||
icon: 'IconAbc',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-ba07-4ffd-ba63-009491f5749c',
|
||||
}),
|
||||
createdAt: getFlatFieldMetadataMock({
|
||||
id: '0bbe259b-0fd1-43ca-922f-1c0b7960efbe',
|
||||
objectMetadataId: 'd34e0f07-1b8c-4de0-938e-599cf05e1f7f',
|
||||
type: FieldMetadataType.DATE_TIME,
|
||||
name: 'createdAt',
|
||||
label: 'Creation date',
|
||||
defaultValue: 'now',
|
||||
description: 'Creation date',
|
||||
icon: 'IconCalendar',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-66ac-4502-9975-e4d959c50311',
|
||||
}),
|
||||
updatedAt: getFlatFieldMetadataMock({
|
||||
id: 'c96d123d-4c13-47ee-85bf-00428ce5e242',
|
||||
objectMetadataId: 'd34e0f07-1b8c-4de0-938e-599cf05e1f7f',
|
||||
type: FieldMetadataType.DATE_TIME,
|
||||
name: 'updatedAt',
|
||||
label: 'Last update',
|
||||
defaultValue: 'now',
|
||||
description: 'Last time the record was changed',
|
||||
icon: 'IconCalendarClock',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-d767-4622-bdcf-d8a084834d86',
|
||||
}),
|
||||
deletedAt: getFlatFieldMetadataMock({
|
||||
id: 'bbfd9b09-be13-4232-af2c-585a9137aa62',
|
||||
objectMetadataId: 'd34e0f07-1b8c-4de0-938e-599cf05e1f7f',
|
||||
type: FieldMetadataType.DATE_TIME,
|
||||
name: 'deletedAt',
|
||||
label: 'Deleted at',
|
||||
defaultValue: null,
|
||||
description: 'Deletion date',
|
||||
icon: 'IconCalendarClock',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-b9a7-48d8-8387-b9a3090a50ec',
|
||||
}),
|
||||
createdBy: getFlatFieldMetadataMock({
|
||||
id: '2090b892-376c-4349-990d-6a789b53e31d',
|
||||
objectMetadataId: 'd34e0f07-1b8c-4de0-938e-599cf05e1f7f',
|
||||
type: FieldMetadataType.ACTOR,
|
||||
name: 'createdBy',
|
||||
label: 'Created by',
|
||||
defaultValue: { name: "''", source: "'MANUAL'" },
|
||||
description: 'The creator of the record',
|
||||
icon: 'IconCreativeCommonsSa',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-be0e-4971-865b-32ca87cbb315',
|
||||
}),
|
||||
position: getFlatFieldMetadataMock({
|
||||
id: '3087f7da-f422-4b69-9b95-fadef79dd12a',
|
||||
objectMetadataId: 'd34e0f07-1b8c-4de0-938e-599cf05e1f7f',
|
||||
type: FieldMetadataType.POSITION,
|
||||
name: 'position',
|
||||
label: 'Position',
|
||||
defaultValue: 0,
|
||||
description: 'Position',
|
||||
icon: 'IconHierarchy2',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-c2bd-4e16-bb9a-c8b0411bf49d',
|
||||
}),
|
||||
timelineActivities: getFlatFieldMetadataMock({
|
||||
id: '4eb74f21-1cb4-46b5-b3bb-4e41108e70d9',
|
||||
objectMetadataId: 'd34e0f07-1b8c-4de0-938e-599cf05e1f7f',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'timelineActivities',
|
||||
label: 'TimelineActivities',
|
||||
defaultValue: null,
|
||||
description: 'TimelineActivities tied to the Pet',
|
||||
icon: 'IconTimelineEvent',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: '3cb86390-4ee7-42fa-bd1e-bd6326b47610',
|
||||
relationTargetObjectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
universalIdentifier: '20202020-f1ef-4ba4-8f33-1a4577afa477',
|
||||
}),
|
||||
attachments: getFlatFieldMetadataMock({
|
||||
id: '231903d0-3b14-47ed-9a88-fbf11031c451',
|
||||
objectMetadataId: 'd34e0f07-1b8c-4de0-938e-599cf05e1f7f',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'attachments',
|
||||
label: 'Attachments',
|
||||
defaultValue: null,
|
||||
description: 'Attachments tied to the Pet',
|
||||
icon: 'IconFileImport',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: '317a33ef-117e-4953-86d4-c4a9670a2ce3',
|
||||
relationTargetObjectMetadataId: '819ed5ff-312f-4423-8e95-02a691cf5c27',
|
||||
universalIdentifier: '20202020-8d59-46ca-b7b2-73d167712134',
|
||||
}),
|
||||
taskTargets: getFlatFieldMetadataMock({
|
||||
id: '3cae8259-ece8-4b81-9044-f5abae5ff25c',
|
||||
objectMetadataId: 'd34e0f07-1b8c-4de0-938e-599cf05e1f7f',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'taskTargets',
|
||||
label: 'TaskTargets',
|
||||
defaultValue: null,
|
||||
description: 'TaskTargets tied to the Pet',
|
||||
icon: 'IconCheckbox',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: '3955a4b4-1c10-4ce8-a92e-98e727ee7aec',
|
||||
relationTargetObjectMetadataId: 'bb2b29b8-7f46-4106-a8ae-3a32df9c9166',
|
||||
universalIdentifier: '20202020-0860-4566-b865-bff3c626c303',
|
||||
}),
|
||||
searchVector: getFlatFieldMetadataMock({
|
||||
id: '0db37175-e573-43e4-bd83-fa71923fde0c',
|
||||
objectMetadataId: 'd34e0f07-1b8c-4de0-938e-599cf05e1f7f',
|
||||
type: FieldMetadataType.TS_VECTOR,
|
||||
name: 'searchVector',
|
||||
label: 'Search vector',
|
||||
defaultValue: null,
|
||||
description: 'Field used for full-text search',
|
||||
icon: null,
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: false,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '70e56537-18ef-4811-b1c7-0a444006b815',
|
||||
}),
|
||||
species: getFlatFieldMetadataMock({
|
||||
id: '0292cc51-246f-40b8-99e8-3345dac0e688',
|
||||
objectMetadataId: 'd34e0f07-1b8c-4de0-938e-599cf05e1f7f',
|
||||
type: FieldMetadataType.SELECT,
|
||||
name: 'species',
|
||||
label: 'Species',
|
||||
defaultValue: null,
|
||||
description: null,
|
||||
icon: null,
|
||||
overrides: null,
|
||||
options: [
|
||||
{
|
||||
id: '23a75463-ca50-4b33-bfd8-701e2944c76c',
|
||||
color: 'blue',
|
||||
label: 'Dog',
|
||||
value: 'DOG',
|
||||
position: 0,
|
||||
},
|
||||
{
|
||||
id: 'e4669573-b219-44e1-a857-ed9fb31c51cd',
|
||||
color: 'red',
|
||||
label: 'Cat',
|
||||
value: 'CAT',
|
||||
position: 1,
|
||||
},
|
||||
{
|
||||
id: '26cc93c8-e2ef-452a-80c3-60d274033f38',
|
||||
color: 'green',
|
||||
label: 'Bird',
|
||||
value: 'BIRD',
|
||||
position: 2,
|
||||
},
|
||||
{
|
||||
id: '364e1363-166d-4dbd-b39b-c50e658b536c',
|
||||
color: 'yellow',
|
||||
label: 'Fish',
|
||||
value: 'FISH',
|
||||
position: 3,
|
||||
},
|
||||
{
|
||||
id: '041726a2-73b8-45de-b311-6deeec79886e',
|
||||
color: 'purple',
|
||||
label: 'Rabbit',
|
||||
value: 'RABBIT',
|
||||
position: 4,
|
||||
},
|
||||
{
|
||||
id: '3966dd54-985e-49d9-ab13-aea1346763d4',
|
||||
color: 'orange',
|
||||
label: 'Hamster',
|
||||
value: 'HAMSTER',
|
||||
position: 5,
|
||||
},
|
||||
],
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '0292cc51-246f-40b8-99e8-3345dac0e688',
|
||||
}),
|
||||
traits: getFlatFieldMetadataMock({
|
||||
id: '5aaf6be0-b9f5-4222-9810-941d5ab58527',
|
||||
objectMetadataId: 'd34e0f07-1b8c-4de0-938e-599cf05e1f7f',
|
||||
type: FieldMetadataType.MULTI_SELECT,
|
||||
name: 'traits',
|
||||
label: 'Traits',
|
||||
defaultValue: null,
|
||||
description: null,
|
||||
icon: null,
|
||||
overrides: null,
|
||||
options: [
|
||||
{
|
||||
id: '5bb37088-b364-44c5-a984-54b01aa241ce',
|
||||
color: 'blue',
|
||||
label: 'Playful',
|
||||
value: 'PLAYFUL',
|
||||
position: 0,
|
||||
},
|
||||
{
|
||||
id: '69d7d78d-3983-4e3b-aec5-6e6daafb06d6',
|
||||
color: 'red',
|
||||
label: 'Friendly',
|
||||
value: 'FRIENDLY',
|
||||
position: 1,
|
||||
},
|
||||
{
|
||||
id: 'c5d7fa50-ed21-4373-bcca-ae7006e3a784',
|
||||
color: 'green',
|
||||
label: 'Protective',
|
||||
value: 'PROTECTIVE',
|
||||
position: 2,
|
||||
},
|
||||
{
|
||||
id: '85595ae8-5d17-4580-8c99-cd429f509d75',
|
||||
color: 'yellow',
|
||||
label: 'Shy',
|
||||
value: 'SHY',
|
||||
position: 3,
|
||||
},
|
||||
{
|
||||
id: '77d4bffb-8da3-4aad-ab08-fa5f0b0ab0f2',
|
||||
color: 'purple',
|
||||
label: 'Brave',
|
||||
value: 'BRAVE',
|
||||
position: 4,
|
||||
},
|
||||
{
|
||||
id: '4942a08c-00fd-43a1-99bb-79288d9c4e6a',
|
||||
color: 'orange',
|
||||
label: 'Curious',
|
||||
value: 'CURIOUS',
|
||||
position: 5,
|
||||
},
|
||||
],
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '5aaf6be0-b9f5-4222-9810-941d5ab58527',
|
||||
}),
|
||||
comments: getFlatFieldMetadataMock({
|
||||
id: '2e726631-d80a-4594-9a5a-3cca0c2a50a9',
|
||||
objectMetadataId: 'd34e0f07-1b8c-4de0-938e-599cf05e1f7f',
|
||||
type: FieldMetadataType.TEXT,
|
||||
name: 'comments',
|
||||
label: 'Comments',
|
||||
defaultValue: "''",
|
||||
description: null,
|
||||
icon: null,
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '2e726631-d80a-4594-9a5a-3cca0c2a50a9',
|
||||
}),
|
||||
age: getFlatFieldMetadataMock({
|
||||
id: 'ed1573cf-b29e-4d4f-a8e3-19d472d28c0d',
|
||||
objectMetadataId: 'd34e0f07-1b8c-4de0-938e-599cf05e1f7f',
|
||||
type: FieldMetadataType.NUMBER,
|
||||
name: 'age',
|
||||
label: 'Age',
|
||||
defaultValue: null,
|
||||
description: null,
|
||||
icon: null,
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: 'ed1573cf-b29e-4d4f-a8e3-19d472d28c0d',
|
||||
}),
|
||||
location: getFlatFieldMetadataMock({
|
||||
id: '7b05e127-d0ea-422a-8f98-ef48f41d4388',
|
||||
objectMetadataId: 'd34e0f07-1b8c-4de0-938e-599cf05e1f7f',
|
||||
type: FieldMetadataType.ADDRESS,
|
||||
name: 'location',
|
||||
label: 'Location',
|
||||
defaultValue: {
|
||||
addressLat: null,
|
||||
addressLng: null,
|
||||
addressCity: "''",
|
||||
addressState: "''",
|
||||
addressCountry: "''",
|
||||
addressStreet1: "''",
|
||||
addressStreet2: "''",
|
||||
addressPostcode: "''",
|
||||
},
|
||||
description: null,
|
||||
icon: null,
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '7b05e127-d0ea-422a-8f98-ef48f41d4388',
|
||||
}),
|
||||
vetPhone: getFlatFieldMetadataMock({
|
||||
id: '92c856ef-5b4b-4202-8c23-b2f22f959eda',
|
||||
objectMetadataId: 'd34e0f07-1b8c-4de0-938e-599cf05e1f7f',
|
||||
type: FieldMetadataType.PHONES,
|
||||
name: 'vetPhone',
|
||||
label: 'Vet phone',
|
||||
defaultValue: {
|
||||
additionalPhones: null,
|
||||
primaryPhoneNumber: "''",
|
||||
primaryPhoneCallingCode: "''",
|
||||
primaryPhoneCountryCode: "''",
|
||||
},
|
||||
description: null,
|
||||
icon: null,
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '92c856ef-5b4b-4202-8c23-b2f22f959eda',
|
||||
}),
|
||||
vetEmail: getFlatFieldMetadataMock({
|
||||
id: '2c89697d-925a-485c-a0ed-adf2f1228e0f',
|
||||
objectMetadataId: 'd34e0f07-1b8c-4de0-938e-599cf05e1f7f',
|
||||
type: FieldMetadataType.EMAILS,
|
||||
name: 'vetEmail',
|
||||
label: 'Vet email',
|
||||
defaultValue: { primaryEmail: "''", additionalEmails: null },
|
||||
description: null,
|
||||
icon: null,
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '2c89697d-925a-485c-a0ed-adf2f1228e0f',
|
||||
}),
|
||||
birthday: getFlatFieldMetadataMock({
|
||||
id: '13c5b4ed-5746-494f-856b-081bdbb4a8ec',
|
||||
objectMetadataId: 'd34e0f07-1b8c-4de0-938e-599cf05e1f7f',
|
||||
type: FieldMetadataType.DATE,
|
||||
name: 'birthday',
|
||||
label: 'Birthday',
|
||||
defaultValue: null,
|
||||
description: null,
|
||||
icon: null,
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '13c5b4ed-5746-494f-856b-081bdbb4a8ec',
|
||||
}),
|
||||
isGoodWithKids: getFlatFieldMetadataMock({
|
||||
id: 'ec3bf27e-70e6-4d4a-932e-6ef026013603',
|
||||
objectMetadataId: 'd34e0f07-1b8c-4de0-938e-599cf05e1f7f',
|
||||
type: FieldMetadataType.BOOLEAN,
|
||||
name: 'isGoodWithKids',
|
||||
label: 'Is good with kids',
|
||||
defaultValue: null,
|
||||
description: null,
|
||||
icon: null,
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: 'ec3bf27e-70e6-4d4a-932e-6ef026013603',
|
||||
}),
|
||||
pictures: getFlatFieldMetadataMock({
|
||||
id: '8aa0a700-c308-4d8b-8fbd-f545daa8980a',
|
||||
objectMetadataId: 'd34e0f07-1b8c-4de0-938e-599cf05e1f7f',
|
||||
type: FieldMetadataType.LINKS,
|
||||
name: 'pictures',
|
||||
label: 'Pictures',
|
||||
defaultValue: {
|
||||
primaryLinkUrl: "''",
|
||||
secondaryLinks: [],
|
||||
primaryLinkLabel: "''",
|
||||
},
|
||||
description: null,
|
||||
icon: null,
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '8aa0a700-c308-4d8b-8fbd-f545daa8980a',
|
||||
}),
|
||||
averageCostOfKibblePerMonth: getFlatFieldMetadataMock({
|
||||
id: '37421848-b64d-4827-be33-da4e337acbb6',
|
||||
objectMetadataId: 'd34e0f07-1b8c-4de0-938e-599cf05e1f7f',
|
||||
type: FieldMetadataType.CURRENCY,
|
||||
name: 'averageCostOfKibblePerMonth',
|
||||
label: 'Average cost of kibble per month',
|
||||
defaultValue: { amountMicros: null, currencyCode: "''" },
|
||||
description: null,
|
||||
icon: null,
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '37421848-b64d-4827-be33-da4e337acbb6',
|
||||
}),
|
||||
makesOwnerThinkOf: getFlatFieldMetadataMock({
|
||||
id: '84b874dc-983d-47eb-9c67-54f557a99f60',
|
||||
objectMetadataId: 'd34e0f07-1b8c-4de0-938e-599cf05e1f7f',
|
||||
type: FieldMetadataType.FULL_NAME,
|
||||
name: 'makesOwnerThinkOf',
|
||||
label: 'Makes its owner think of',
|
||||
defaultValue: { lastName: "''", firstName: "''" },
|
||||
description: null,
|
||||
icon: null,
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '84b874dc-983d-47eb-9c67-54f557a99f60',
|
||||
}),
|
||||
soundSwag: getFlatFieldMetadataMock({
|
||||
id: '42e6c0d2-6d00-4c77-b179-890af8c56236',
|
||||
objectMetadataId: 'd34e0f07-1b8c-4de0-938e-599cf05e1f7f',
|
||||
type: FieldMetadataType.RATING,
|
||||
name: 'soundSwag',
|
||||
label: 'Sound swag (bark style, meow style, etc.)',
|
||||
defaultValue: null,
|
||||
description: null,
|
||||
icon: null,
|
||||
overrides: null,
|
||||
options: [
|
||||
{
|
||||
id: '4a3ed94d-30db-4231-8c2e-5893d55df860',
|
||||
label: '1',
|
||||
value: 'RATING_1',
|
||||
position: 0,
|
||||
},
|
||||
{
|
||||
id: '7b837621-34e5-4a65-be45-9386062150c6',
|
||||
label: '2',
|
||||
value: 'RATING_2',
|
||||
position: 1,
|
||||
},
|
||||
{
|
||||
id: '1b0aa9fd-c4b9-4714-952f-492da858f766',
|
||||
label: '3',
|
||||
value: 'RATING_3',
|
||||
position: 2,
|
||||
},
|
||||
{
|
||||
id: '35b92ebf-ecc7-4a9d-9ef2-4739cbfcb61a',
|
||||
label: '4',
|
||||
value: 'RATING_4',
|
||||
position: 3,
|
||||
},
|
||||
{
|
||||
id: 'a225c6ca-301b-4f90-bb3e-17edbcb84d92',
|
||||
label: '5',
|
||||
value: 'RATING_5',
|
||||
position: 4,
|
||||
},
|
||||
],
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '42e6c0d2-6d00-4c77-b179-890af8c56236',
|
||||
}),
|
||||
bio: getFlatFieldMetadataMock({
|
||||
id: 'fa0ec409-0f29-4b19-b304-31d1018a2344',
|
||||
objectMetadataId: 'd34e0f07-1b8c-4de0-938e-599cf05e1f7f',
|
||||
type: FieldMetadataType.TEXT,
|
||||
name: 'bio',
|
||||
label: 'Bio',
|
||||
defaultValue: null,
|
||||
description: null,
|
||||
icon: null,
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: 'fa0ec409-0f29-4b19-b304-31d1018a2344',
|
||||
}),
|
||||
interestingFacts: getFlatFieldMetadataMock({
|
||||
id: '2b806a74-e7a5-4ec7-b902-67cf811e8bda',
|
||||
objectMetadataId: 'd34e0f07-1b8c-4de0-938e-599cf05e1f7f',
|
||||
type: FieldMetadataType.ARRAY,
|
||||
name: 'interestingFacts',
|
||||
label: 'Interesting facts',
|
||||
defaultValue: null,
|
||||
description: null,
|
||||
icon: null,
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '2b806a74-e7a5-4ec7-b902-67cf811e8bda',
|
||||
}),
|
||||
extraData: getFlatFieldMetadataMock({
|
||||
id: 'a79bd7c8-c7ce-416a-9d12-a05335c9c596',
|
||||
objectMetadataId: 'd34e0f07-1b8c-4de0-938e-599cf05e1f7f',
|
||||
type: FieldMetadataType.RAW_JSON,
|
||||
name: 'extraData',
|
||||
label: 'Extra data',
|
||||
defaultValue: null,
|
||||
description: null,
|
||||
icon: null,
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: 'a79bd7c8-c7ce-416a-9d12-a05335c9c596',
|
||||
}),
|
||||
} as const satisfies Record<string, FlatFieldMetadata>;
|
||||
-273
@@ -1,273 +0,0 @@
|
||||
import { FieldMetadataType } from 'twenty-shared/types';
|
||||
|
||||
import { RelationType } from 'src/engine/metadata-modules/field-metadata/interfaces/relation-type.interface';
|
||||
|
||||
import { getFlatFieldMetadataMock } from 'src/engine/metadata-modules/flat-field-metadata/__mocks__/get-flat-field-metadata.mock';
|
||||
import { type FlatFieldMetadata } from 'src/engine/metadata-modules/flat-field-metadata/types/flat-field-metadata.type';
|
||||
|
||||
export const ROCKET_FLAT_FIELDS_MOCK = {
|
||||
id: getFlatFieldMetadataMock({
|
||||
id: 'c7c23914-80c4-46d2-a559-1ce20d07fb3c',
|
||||
objectMetadataId: 'd78ec657-74a4-4652-a350-1f44ff62970a',
|
||||
type: FieldMetadataType.UUID,
|
||||
name: 'id',
|
||||
label: 'Id',
|
||||
defaultValue: 'uuid',
|
||||
description: 'Id',
|
||||
icon: 'Icon123',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-eda0-4cee-9577-3eb357e3c22b',
|
||||
}),
|
||||
name: getFlatFieldMetadataMock({
|
||||
id: '9c10de36-1ade-4be1-af78-c4fc55669fbd',
|
||||
objectMetadataId: 'd78ec657-74a4-4652-a350-1f44ff62970a',
|
||||
type: FieldMetadataType.TEXT,
|
||||
name: 'name',
|
||||
label: 'Name',
|
||||
defaultValue: "'Untitled'",
|
||||
description: 'Name',
|
||||
icon: 'IconAbc',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-ba07-4ffd-ba63-009491f5749c',
|
||||
}),
|
||||
createdAt: getFlatFieldMetadataMock({
|
||||
id: '7aa0896a-82dd-43c0-b38f-a316a8064d51',
|
||||
objectMetadataId: 'd78ec657-74a4-4652-a350-1f44ff62970a',
|
||||
type: FieldMetadataType.DATE_TIME,
|
||||
name: 'createdAt',
|
||||
label: 'Creation date',
|
||||
defaultValue: 'now',
|
||||
description: 'Creation date',
|
||||
icon: 'IconCalendar',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-66ac-4502-9975-e4d959c50311',
|
||||
}),
|
||||
updatedAt: getFlatFieldMetadataMock({
|
||||
id: '1ca95b19-f02d-43c1-b9ae-8a9d522bb34b',
|
||||
objectMetadataId: 'd78ec657-74a4-4652-a350-1f44ff62970a',
|
||||
type: FieldMetadataType.DATE_TIME,
|
||||
name: 'updatedAt',
|
||||
label: 'Last update',
|
||||
defaultValue: 'now',
|
||||
description: 'Last time the record was changed',
|
||||
icon: 'IconCalendarClock',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-d767-4622-bdcf-d8a084834d86',
|
||||
}),
|
||||
deletedAt: getFlatFieldMetadataMock({
|
||||
id: 'aae8d11a-27b3-4844-a68f-a2023ae12443',
|
||||
objectMetadataId: 'd78ec657-74a4-4652-a350-1f44ff62970a',
|
||||
type: FieldMetadataType.DATE_TIME,
|
||||
name: 'deletedAt',
|
||||
label: 'Deleted at',
|
||||
defaultValue: null,
|
||||
description: 'Deletion date',
|
||||
icon: 'IconCalendarClock',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-b9a7-48d8-8387-b9a3090a50ec',
|
||||
}),
|
||||
createdBy: getFlatFieldMetadataMock({
|
||||
id: '23ebf744-88ad-4d0f-9084-a63e29c4655b',
|
||||
objectMetadataId: 'd78ec657-74a4-4652-a350-1f44ff62970a',
|
||||
type: FieldMetadataType.ACTOR,
|
||||
name: 'createdBy',
|
||||
label: 'Created by',
|
||||
defaultValue: { name: "''", source: "'MANUAL'" },
|
||||
description: 'The creator of the record',
|
||||
icon: 'IconCreativeCommonsSa',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-be0e-4971-865b-32ca87cbb315',
|
||||
}),
|
||||
position: getFlatFieldMetadataMock({
|
||||
id: '2f1976a6-ae59-43c5-85bc-49fb8fd03e18',
|
||||
objectMetadataId: 'd78ec657-74a4-4652-a350-1f44ff62970a',
|
||||
type: FieldMetadataType.POSITION,
|
||||
name: 'position',
|
||||
label: 'Position',
|
||||
defaultValue: 0,
|
||||
description: 'Position',
|
||||
icon: 'IconHierarchy2',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-c2bd-4e16-bb9a-c8b0411bf49d',
|
||||
}),
|
||||
timelineActivities: getFlatFieldMetadataMock({
|
||||
id: '53a223cc-a445-420d-8698-1a9137039448',
|
||||
objectMetadataId: 'd78ec657-74a4-4652-a350-1f44ff62970a',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'timelineActivities',
|
||||
label: 'TimelineActivities',
|
||||
defaultValue: null,
|
||||
description: 'TimelineActivities tied to the Rocket',
|
||||
icon: 'IconTimelineEvent',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: 'eebb9590-817b-4a51-88f7-9792aa8e0a59',
|
||||
relationTargetObjectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
universalIdentifier: '20202020-f1ef-4ba4-8f33-1a4577afa477',
|
||||
}),
|
||||
attachments: getFlatFieldMetadataMock({
|
||||
id: 'f5984acf-5128-42ac-840f-9d2888423699',
|
||||
objectMetadataId: 'd78ec657-74a4-4652-a350-1f44ff62970a',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'attachments',
|
||||
label: 'Attachments',
|
||||
defaultValue: null,
|
||||
description: 'Attachments tied to the Rocket',
|
||||
icon: 'IconFileImport',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: 'ba23019c-7f25-42c3-8138-622e61c42968',
|
||||
relationTargetObjectMetadataId: '819ed5ff-312f-4423-8e95-02a691cf5c27',
|
||||
universalIdentifier: '20202020-8d59-46ca-b7b2-73d167712134',
|
||||
}),
|
||||
noteTargets: getFlatFieldMetadataMock({
|
||||
id: 'c91376fb-20bd-47c7-8922-b64f7db51cfa',
|
||||
objectMetadataId: 'd78ec657-74a4-4652-a350-1f44ff62970a',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'noteTargets',
|
||||
label: 'NoteTargets',
|
||||
defaultValue: null,
|
||||
description: 'NoteTargets tied to the Rocket',
|
||||
icon: 'IconCheckbox',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: '4212b3d7-dd9f-4da9-85f7-2fa69a42296f',
|
||||
relationTargetObjectMetadataId: '12e3cb51-c3de-4192-b0d5-965d48d001c0',
|
||||
universalIdentifier: '20202020-01fd-4f37-99dc-9427a444018a',
|
||||
}),
|
||||
taskTargets: getFlatFieldMetadataMock({
|
||||
id: '80e3b587-69ec-48bc-a872-20105c3b7df4',
|
||||
objectMetadataId: 'd78ec657-74a4-4652-a350-1f44ff62970a',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'taskTargets',
|
||||
label: 'TaskTargets',
|
||||
defaultValue: null,
|
||||
description: 'TaskTargets tied to the Rocket',
|
||||
icon: 'IconCheckbox',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: 'a7e80fd8-76bc-45ed-b843-a2b87ef4d601',
|
||||
relationTargetObjectMetadataId: 'bb2b29b8-7f46-4106-a8ae-3a32df9c9166',
|
||||
universalIdentifier: '20202020-0860-4566-b865-bff3c626c303',
|
||||
}),
|
||||
searchVector: getFlatFieldMetadataMock({
|
||||
id: 'e7609ea3-5a88-4d64-b0c1-eefd4602361a',
|
||||
objectMetadataId: 'd78ec657-74a4-4652-a350-1f44ff62970a',
|
||||
type: FieldMetadataType.TS_VECTOR,
|
||||
name: 'searchVector',
|
||||
label: 'Search vector',
|
||||
defaultValue: null,
|
||||
description: 'Field used for full-text search',
|
||||
icon: null,
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: false,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '70e56537-18ef-4811-b1c7-0a444006b815',
|
||||
}),
|
||||
} as const satisfies Record<string, FlatFieldMetadata>;
|
||||
-373
@@ -1,373 +0,0 @@
|
||||
import {
|
||||
FieldMetadataType,
|
||||
DateDisplayFormat,
|
||||
RelationOnDeleteAction,
|
||||
} from 'twenty-shared/types';
|
||||
|
||||
import { RelationType } from 'src/engine/metadata-modules/field-metadata/interfaces/relation-type.interface';
|
||||
|
||||
import { getFlatFieldMetadataMock } from 'src/engine/metadata-modules/flat-field-metadata/__mocks__/get-flat-field-metadata.mock';
|
||||
import { type FlatFieldMetadata } from 'src/engine/metadata-modules/flat-field-metadata/types/flat-field-metadata.type';
|
||||
|
||||
export const TASK_FLAT_FIELDS_MOCK = {
|
||||
position: getFlatFieldMetadataMock({
|
||||
id: '53134864-086f-40ab-a455-11417542ebd4',
|
||||
objectMetadataId: '3186920d-2a15-4b5f-96c7-2bf6567024b0',
|
||||
type: FieldMetadataType.POSITION,
|
||||
name: 'position',
|
||||
label: 'Position',
|
||||
defaultValue: 0,
|
||||
description: 'Task record position',
|
||||
icon: 'IconHierarchy2',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-7d47-4690-8a98-98b9a0c05dd8',
|
||||
}),
|
||||
title: getFlatFieldMetadataMock({
|
||||
id: '88e4eeac-1d47-4e44-a795-bb5ca93c6557',
|
||||
objectMetadataId: '3186920d-2a15-4b5f-96c7-2bf6567024b0',
|
||||
type: FieldMetadataType.TEXT,
|
||||
name: 'title',
|
||||
label: 'Title',
|
||||
defaultValue: "''",
|
||||
description: 'Task title',
|
||||
icon: 'IconNotes',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-b386-4cb7-aa5a-08d4a4d92680',
|
||||
}),
|
||||
bodyV2: getFlatFieldMetadataMock({
|
||||
id: '161570ed-7fcd-4172-a5d1-c773cd9afe76',
|
||||
objectMetadataId: '3186920d-2a15-4b5f-96c7-2bf6567024b0',
|
||||
type: FieldMetadataType.RICH_TEXT,
|
||||
name: 'bodyV2',
|
||||
label: 'Body',
|
||||
defaultValue: null,
|
||||
description: 'Task body',
|
||||
icon: 'IconFilePencil',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-4aa0-4ae8-898d-7df0afd47ab1',
|
||||
}),
|
||||
dueAt: getFlatFieldMetadataMock({
|
||||
id: '1723b01e-e10b-4410-8cc2-3e0b937754e4',
|
||||
objectMetadataId: '3186920d-2a15-4b5f-96c7-2bf6567024b0',
|
||||
type: FieldMetadataType.DATE_TIME,
|
||||
name: 'dueAt',
|
||||
label: 'Due Date',
|
||||
defaultValue: null,
|
||||
description: 'Task due date',
|
||||
icon: 'IconCalendarEvent',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-fd99-40da-951b-4cb9a352fce3',
|
||||
}),
|
||||
status: getFlatFieldMetadataMock({
|
||||
id: '44924cd6-fa70-4239-8c22-f17107f83574',
|
||||
objectMetadataId: '3186920d-2a15-4b5f-96c7-2bf6567024b0',
|
||||
type: FieldMetadataType.SELECT,
|
||||
name: 'status',
|
||||
label: 'Status',
|
||||
defaultValue: "'TODO'",
|
||||
description: 'Task status',
|
||||
icon: 'IconCheck',
|
||||
overrides: null,
|
||||
options: [
|
||||
{
|
||||
id: '178a8a6f-6411-4731-a417-36e85e5526a3',
|
||||
color: 'sky',
|
||||
label: 'To do',
|
||||
value: 'TODO',
|
||||
position: 0,
|
||||
},
|
||||
{
|
||||
id: 'f6543bd8-3c5e-47ff-b61f-0c2821efd7bf',
|
||||
color: 'purple',
|
||||
label: 'In progress',
|
||||
value: 'IN_PROGRESS',
|
||||
position: 1,
|
||||
},
|
||||
{
|
||||
id: '50513334-67ca-4126-ba06-95a1be572ea5',
|
||||
color: 'green',
|
||||
label: 'Done',
|
||||
value: 'DONE',
|
||||
position: 2,
|
||||
},
|
||||
],
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-70bc-48f9-89c5-6aa730b151e0',
|
||||
}),
|
||||
createdBy: getFlatFieldMetadataMock({
|
||||
id: '575c3d51-5cdc-4ff0-aa67-dcc7f1ba2448',
|
||||
objectMetadataId: '3186920d-2a15-4b5f-96c7-2bf6567024b0',
|
||||
type: FieldMetadataType.ACTOR,
|
||||
name: 'createdBy',
|
||||
label: 'Created by',
|
||||
defaultValue: {
|
||||
name: "'System'",
|
||||
source: "'MANUAL'",
|
||||
workspaceMemberId: null,
|
||||
},
|
||||
description: 'The creator of the record',
|
||||
icon: 'IconCreativeCommonsSa',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-1a04-48ab-a567-576965ae5387',
|
||||
}),
|
||||
searchVector: getFlatFieldMetadataMock({
|
||||
id: 'bc00547b-b4c5-4d49-a4f1-97159df5cbc1',
|
||||
objectMetadataId: '3186920d-2a15-4b5f-96c7-2bf6567024b0',
|
||||
type: FieldMetadataType.TS_VECTOR,
|
||||
name: 'searchVector',
|
||||
label: 'Search vector',
|
||||
defaultValue: null,
|
||||
description: 'Field used for full-text search',
|
||||
icon: 'IconUser',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-4746-4e2f-870c-52b02c67c90d',
|
||||
}),
|
||||
id: getFlatFieldMetadataMock({
|
||||
id: 'dc9b18f9-237c-40ba-97c1-e92c2d7c8e2e',
|
||||
objectMetadataId: '3186920d-2a15-4b5f-96c7-2bf6567024b0',
|
||||
type: FieldMetadataType.UUID,
|
||||
name: 'id',
|
||||
label: 'Id',
|
||||
defaultValue: 'uuid',
|
||||
description: 'Id',
|
||||
icon: 'Icon123',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-eda0-4cee-9577-3eb357e3c22b',
|
||||
}),
|
||||
createdAt: getFlatFieldMetadataMock({
|
||||
id: '10c9e428-0739-48a6-8c39-28e6935dfb7c',
|
||||
objectMetadataId: '3186920d-2a15-4b5f-96c7-2bf6567024b0',
|
||||
type: FieldMetadataType.DATE_TIME,
|
||||
name: 'createdAt',
|
||||
label: 'Creation date',
|
||||
defaultValue: 'now',
|
||||
description: 'Creation date',
|
||||
icon: 'IconCalendar',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { displayFormat: DateDisplayFormat.RELATIVE },
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-66ac-4502-9975-e4d959c50311',
|
||||
}),
|
||||
updatedAt: getFlatFieldMetadataMock({
|
||||
id: 'cafcc785-7940-4d27-92e3-ba4b5be5af03',
|
||||
objectMetadataId: '3186920d-2a15-4b5f-96c7-2bf6567024b0',
|
||||
type: FieldMetadataType.DATE_TIME,
|
||||
name: 'updatedAt',
|
||||
label: 'Last update',
|
||||
defaultValue: 'now',
|
||||
description: 'Last time the record was changed',
|
||||
icon: 'IconCalendarClock',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { displayFormat: DateDisplayFormat.RELATIVE },
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-d767-4622-bdcf-d8a084834d86',
|
||||
}),
|
||||
deletedAt: getFlatFieldMetadataMock({
|
||||
id: 'aa440383-fb91-492c-948f-5b57275cf8e1',
|
||||
objectMetadataId: '3186920d-2a15-4b5f-96c7-2bf6567024b0',
|
||||
type: FieldMetadataType.DATE_TIME,
|
||||
name: 'deletedAt',
|
||||
label: 'Deleted at',
|
||||
defaultValue: null,
|
||||
description: 'Date when the record was deleted',
|
||||
icon: 'IconCalendarMinus',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { displayFormat: DateDisplayFormat.RELATIVE },
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-b9a7-48d8-8387-b9a3090a50ec',
|
||||
}),
|
||||
taskTargets: getFlatFieldMetadataMock({
|
||||
id: 'cd08bc00-d02c-48d4-a1ac-a0cfa13742b7',
|
||||
objectMetadataId: '3186920d-2a15-4b5f-96c7-2bf6567024b0',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'taskTargets',
|
||||
label: 'Relations',
|
||||
defaultValue: null,
|
||||
description: 'Task targets',
|
||||
icon: 'IconArrowUpRight',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: 'c906885c-315a-4783-942e-6caafecf2031',
|
||||
relationTargetObjectMetadataId: 'bb2b29b8-7f46-4106-a8ae-3a32df9c9166',
|
||||
universalIdentifier: '20202020-de9c-4d0e-a452-713d4a3e5fc7',
|
||||
}),
|
||||
attachments: getFlatFieldMetadataMock({
|
||||
id: '00fd339a-6431-465d-9524-09b5c804f497',
|
||||
objectMetadataId: '3186920d-2a15-4b5f-96c7-2bf6567024b0',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'attachments',
|
||||
label: 'Attachments',
|
||||
defaultValue: null,
|
||||
description: 'Task attachments',
|
||||
icon: 'IconFileImport',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: 'bd823f17-f923-4f0d-8533-51d7bc062975',
|
||||
relationTargetObjectMetadataId: '819ed5ff-312f-4423-8e95-02a691cf5c27',
|
||||
universalIdentifier: '20202020-794d-4783-a8ff-cecdb15be139',
|
||||
}),
|
||||
assignee: getFlatFieldMetadataMock({
|
||||
id: '0e18f5e1-32c3-4daa-b282-ab64fb629b20',
|
||||
objectMetadataId: '3186920d-2a15-4b5f-96c7-2bf6567024b0',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'assignee',
|
||||
label: 'Assignee',
|
||||
defaultValue: null,
|
||||
description: 'Task assignee',
|
||||
icon: 'IconUserCircle',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.SET_NULL,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'assigneeId',
|
||||
},
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '68779392-f0ec-42b4-9d89-9645ae84039d',
|
||||
relationTargetObjectMetadataId: '7d8264db-2b55-4b74-81ff-b7064ed43840',
|
||||
universalIdentifier: '20202020-065a-4f42-a906-e20422c1753f',
|
||||
}),
|
||||
timelineActivities: getFlatFieldMetadataMock({
|
||||
id: '3536b3af-76a2-44f5-9d89-1961a0a0a763',
|
||||
objectMetadataId: '3186920d-2a15-4b5f-96c7-2bf6567024b0',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'timelineActivities',
|
||||
label: 'Timeline Activities',
|
||||
defaultValue: null,
|
||||
description: 'Timeline Activities linked to the task.',
|
||||
icon: 'IconTimelineEvent',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '187eaeb8-62c8-4925-815f-946b4768b786',
|
||||
relationTargetObjectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
universalIdentifier: '20202020-c778-4278-99ee-23a2837aee64',
|
||||
}),
|
||||
} as const satisfies Record<string, FlatFieldMetadata>;
|
||||
-283
@@ -1,283 +0,0 @@
|
||||
import {
|
||||
FieldMetadataType,
|
||||
DateDisplayFormat,
|
||||
RelationOnDeleteAction,
|
||||
} from 'twenty-shared/types';
|
||||
|
||||
import { RelationType } from 'src/engine/metadata-modules/field-metadata/interfaces/relation-type.interface';
|
||||
|
||||
import { getFlatFieldMetadataMock } from 'src/engine/metadata-modules/flat-field-metadata/__mocks__/get-flat-field-metadata.mock';
|
||||
import { type FlatFieldMetadata } from 'src/engine/metadata-modules/flat-field-metadata/types/flat-field-metadata.type';
|
||||
|
||||
export const TASKTARGET_FLAT_FIELDS_MOCK = {
|
||||
id: getFlatFieldMetadataMock({
|
||||
id: '762d956d-d11a-4fe6-b6c1-182b9f63a56b',
|
||||
objectMetadataId: 'bb2b29b8-7f46-4106-a8ae-3a32df9c9166',
|
||||
type: FieldMetadataType.UUID,
|
||||
name: 'id',
|
||||
label: 'Id',
|
||||
defaultValue: 'uuid',
|
||||
description: 'Id',
|
||||
icon: 'Icon123',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-eda0-4cee-9577-3eb357e3c22b',
|
||||
}),
|
||||
createdAt: getFlatFieldMetadataMock({
|
||||
id: '040784f1-4b59-4033-b4c7-7ed426d70b65',
|
||||
objectMetadataId: 'bb2b29b8-7f46-4106-a8ae-3a32df9c9166',
|
||||
type: FieldMetadataType.DATE_TIME,
|
||||
name: 'createdAt',
|
||||
label: 'Creation date',
|
||||
defaultValue: 'now',
|
||||
description: 'Creation date',
|
||||
icon: 'IconCalendar',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { displayFormat: DateDisplayFormat.RELATIVE },
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-66ac-4502-9975-e4d959c50311',
|
||||
}),
|
||||
updatedAt: getFlatFieldMetadataMock({
|
||||
id: '2b0881e8-767b-4428-ae25-b6ac1a97293a',
|
||||
objectMetadataId: 'bb2b29b8-7f46-4106-a8ae-3a32df9c9166',
|
||||
type: FieldMetadataType.DATE_TIME,
|
||||
name: 'updatedAt',
|
||||
label: 'Last update',
|
||||
defaultValue: 'now',
|
||||
description: 'Last time the record was changed',
|
||||
icon: 'IconCalendarClock',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { displayFormat: DateDisplayFormat.RELATIVE },
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-d767-4622-bdcf-d8a084834d86',
|
||||
}),
|
||||
deletedAt: getFlatFieldMetadataMock({
|
||||
id: '42b66721-a65c-41bf-a1d7-971ff732be12',
|
||||
objectMetadataId: 'bb2b29b8-7f46-4106-a8ae-3a32df9c9166',
|
||||
type: FieldMetadataType.DATE_TIME,
|
||||
name: 'deletedAt',
|
||||
label: 'Deleted at',
|
||||
defaultValue: null,
|
||||
description: 'Date when the record was deleted',
|
||||
icon: 'IconCalendarMinus',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { displayFormat: DateDisplayFormat.RELATIVE },
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-b9a7-48d8-8387-b9a3090a50ec',
|
||||
}),
|
||||
task: getFlatFieldMetadataMock({
|
||||
id: 'c906885c-315a-4783-942e-6caafecf2031',
|
||||
objectMetadataId: 'bb2b29b8-7f46-4106-a8ae-3a32df9c9166',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'task',
|
||||
label: 'Task',
|
||||
defaultValue: null,
|
||||
description: 'TaskTarget task',
|
||||
icon: 'IconCheckbox',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.SET_NULL,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'taskId',
|
||||
},
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: 'cd08bc00-d02c-48d4-a1ac-a0cfa13742b7',
|
||||
relationTargetObjectMetadataId: '3186920d-2a15-4b5f-96c7-2bf6567024b0',
|
||||
universalIdentifier: '20202020-e881-457a-8758-74aaef4ae78a',
|
||||
}),
|
||||
person: getFlatFieldMetadataMock({
|
||||
id: '64225f87-96c4-4846-9462-e7aa3ad9e182',
|
||||
objectMetadataId: 'bb2b29b8-7f46-4106-a8ae-3a32df9c9166',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'person',
|
||||
label: 'Person',
|
||||
defaultValue: null,
|
||||
description: 'TaskTarget person',
|
||||
icon: 'IconUser',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'personId',
|
||||
},
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '9609ca31-215e-47fd-9b3b-ab200acb2fa8',
|
||||
relationTargetObjectMetadataId: '843e0b67-9619-4628-91c4-2fa62256a611',
|
||||
universalIdentifier: '20202020-c8a0-4e85-a016-87e2349cfbec',
|
||||
}),
|
||||
company: getFlatFieldMetadataMock({
|
||||
id: 'ec11b025-1476-4e84-81c5-cf5b5c776edc',
|
||||
objectMetadataId: 'bb2b29b8-7f46-4106-a8ae-3a32df9c9166',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'company',
|
||||
label: 'Company',
|
||||
defaultValue: null,
|
||||
description: 'TaskTarget company',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'companyId',
|
||||
},
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '4f9138da-cd36-4df4-98f9-ebabe036b141',
|
||||
relationTargetObjectMetadataId: '7f5c2c7a-bb23-46fb-b59d-9b7a52a8d1cc',
|
||||
universalIdentifier: '20202020-4703-4a4e-948c-487b0c60a92c',
|
||||
}),
|
||||
opportunity: getFlatFieldMetadataMock({
|
||||
id: '49afc8d8-dde3-4d19-aa6b-bd16a751b114',
|
||||
objectMetadataId: 'bb2b29b8-7f46-4106-a8ae-3a32df9c9166',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'opportunity',
|
||||
label: 'Opportunity',
|
||||
defaultValue: null,
|
||||
description: 'TaskTarget opportunity',
|
||||
icon: 'IconTargetArrow',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'opportunityId',
|
||||
},
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: 'c0c9f9ac-0d40-4206-90e5-0d1e14f8a09f',
|
||||
relationTargetObjectMetadataId: 'e6996bbf-dd41-423a-9324-8546f5b22fa7',
|
||||
universalIdentifier: '20202020-6cb2-4c01-a9a5-aca3dbc11d41',
|
||||
}),
|
||||
rocket: getFlatFieldMetadataMock({
|
||||
id: 'a7e80fd8-76bc-45ed-b843-a2b87ef4d601',
|
||||
objectMetadataId: 'bb2b29b8-7f46-4106-a8ae-3a32df9c9166',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'rocket',
|
||||
label: 'Rocket',
|
||||
defaultValue: null,
|
||||
description: 'TaskTargets Rocket',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'rocketId',
|
||||
},
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: '80e3b587-69ec-48bc-a872-20105c3b7df4',
|
||||
relationTargetObjectMetadataId: 'd78ec657-74a4-4652-a350-1f44ff62970a',
|
||||
universalIdentifier: '20202020-b98f-473d-85fb-8cebc40b9a50',
|
||||
}),
|
||||
pet: getFlatFieldMetadataMock({
|
||||
id: '3955a4b4-1c10-4ce8-a92e-98e727ee7aec',
|
||||
objectMetadataId: 'bb2b29b8-7f46-4106-a8ae-3a32df9c9166',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'pet',
|
||||
label: 'Pet',
|
||||
defaultValue: null,
|
||||
description: 'TaskTargets Pet',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'petId',
|
||||
},
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: '3cae8259-ece8-4b81-9044-f5abae5ff25c',
|
||||
relationTargetObjectMetadataId: 'd34e0f07-1b8c-4de0-938e-599cf05e1f7f',
|
||||
universalIdentifier: '20202020-07d9-4d04-8b73-a39ab65943f1',
|
||||
}),
|
||||
surveyResult: getFlatFieldMetadataMock({
|
||||
id: 'caa8b6cf-c668-4fb0-abf9-e49645668020',
|
||||
objectMetadataId: 'bb2b29b8-7f46-4106-a8ae-3a32df9c9166',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'surveyResult',
|
||||
label: 'Survey result',
|
||||
defaultValue: null,
|
||||
description: 'TaskTargets Survey result',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'surveyResultId',
|
||||
},
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: 'c4004fb2-3464-4302-b3c3-a32a1879fed7',
|
||||
relationTargetObjectMetadataId: '713da753-0340-49b5-b1fa-add34d2dc9a8',
|
||||
universalIdentifier: '20202020-c376-450d-8a49-a573f23eafd8',
|
||||
}),
|
||||
} as const satisfies Record<string, FlatFieldMetadata>;
|
||||
-545
@@ -1,545 +0,0 @@
|
||||
import {
|
||||
FieldMetadataType,
|
||||
DateDisplayFormat,
|
||||
RelationOnDeleteAction,
|
||||
} from 'twenty-shared/types';
|
||||
|
||||
import { RelationType } from 'src/engine/metadata-modules/field-metadata/interfaces/relation-type.interface';
|
||||
|
||||
import { getFlatFieldMetadataMock } from 'src/engine/metadata-modules/flat-field-metadata/__mocks__/get-flat-field-metadata.mock';
|
||||
import { type FlatFieldMetadata } from 'src/engine/metadata-modules/flat-field-metadata/types/flat-field-metadata.type';
|
||||
|
||||
export const TIMELINEACTIVITY_FLAT_FIELDS_MOCK = {
|
||||
happensAt: getFlatFieldMetadataMock({
|
||||
id: 'f8bbe593-cc45-4509-ba5f-aff1b4ae78a9',
|
||||
objectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
type: FieldMetadataType.DATE_TIME,
|
||||
name: 'happensAt',
|
||||
label: 'Creation date',
|
||||
defaultValue: 'now',
|
||||
description: 'Creation date',
|
||||
icon: 'IconCalendar',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-9526-4993-b339-c4318c4d39f0',
|
||||
}),
|
||||
name: getFlatFieldMetadataMock({
|
||||
id: '8271b048-89c8-4db9-ba49-e20d1e634cea',
|
||||
objectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
type: FieldMetadataType.TEXT,
|
||||
name: 'name',
|
||||
label: 'Event name',
|
||||
defaultValue: "''",
|
||||
description: 'Event name',
|
||||
icon: 'IconAbc',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-7207-46e8-9dab-849505ae8497',
|
||||
}),
|
||||
properties: getFlatFieldMetadataMock({
|
||||
id: '5067203a-5fc0-47a7-8fb3-466e8edc8e82',
|
||||
objectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
type: FieldMetadataType.RAW_JSON,
|
||||
name: 'properties',
|
||||
label: 'Event details',
|
||||
defaultValue: null,
|
||||
description: 'Json value for event details',
|
||||
icon: 'IconListDetails',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-f142-4b04-b91b-6a2b4af3bf11',
|
||||
}),
|
||||
linkedRecordCachedName: getFlatFieldMetadataMock({
|
||||
id: '6192bb0a-dcff-4ce9-9373-6b3efd74def3',
|
||||
objectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
type: FieldMetadataType.TEXT,
|
||||
name: 'linkedRecordCachedName',
|
||||
label: 'Linked Record cached name',
|
||||
defaultValue: "''",
|
||||
description: 'Cached record name',
|
||||
icon: 'IconAbc',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-cfdb-4bef-bbce-a29f41230934',
|
||||
}),
|
||||
linkedRecordId: getFlatFieldMetadataMock({
|
||||
id: '1a1b9069-0274-4d89-a189-6944ebd8afd5',
|
||||
objectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
type: FieldMetadataType.UUID,
|
||||
name: 'linkedRecordId',
|
||||
label: 'Linked Record id',
|
||||
defaultValue: null,
|
||||
description: 'Linked Record id',
|
||||
icon: 'IconAbc',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-2e0e-48c0-b445-ee6c1e61687d',
|
||||
}),
|
||||
linkedObjectMetadataId: getFlatFieldMetadataMock({
|
||||
id: 'aa0a6096-ddd6-44b3-a8c1-ec4c1ec70c52',
|
||||
objectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
type: FieldMetadataType.UUID,
|
||||
name: 'linkedObjectMetadataId',
|
||||
label: 'Linked Object Metadata Id',
|
||||
defaultValue: null,
|
||||
description: 'Linked Object Metadata Id',
|
||||
icon: 'IconAbc',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-c595-449d-9f89-562758c9ee69',
|
||||
}),
|
||||
id: getFlatFieldMetadataMock({
|
||||
id: 'e78264fa-48bc-46cd-afc1-c5f2b5eb9472',
|
||||
objectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
type: FieldMetadataType.UUID,
|
||||
name: 'id',
|
||||
label: 'Id',
|
||||
defaultValue: 'uuid',
|
||||
description: 'Id',
|
||||
icon: 'Icon123',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: null,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-eda0-4cee-9577-3eb357e3c22b',
|
||||
}),
|
||||
createdAt: getFlatFieldMetadataMock({
|
||||
id: 'cb8b2800-2a6e-443c-b671-df51c8a8ccdc',
|
||||
objectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
type: FieldMetadataType.DATE_TIME,
|
||||
name: 'createdAt',
|
||||
label: 'Creation date',
|
||||
defaultValue: 'now',
|
||||
description: 'Creation date',
|
||||
icon: 'IconCalendar',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { displayFormat: DateDisplayFormat.RELATIVE },
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-66ac-4502-9975-e4d959c50311',
|
||||
}),
|
||||
updatedAt: getFlatFieldMetadataMock({
|
||||
id: 'cc7b974c-4cb3-4b61-821a-824b4764fc6b',
|
||||
objectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
type: FieldMetadataType.DATE_TIME,
|
||||
name: 'updatedAt',
|
||||
label: 'Last update',
|
||||
defaultValue: 'now',
|
||||
description: 'Last time the record was changed',
|
||||
icon: 'IconCalendarClock',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { displayFormat: DateDisplayFormat.RELATIVE },
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: false,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-d767-4622-bdcf-d8a084834d86',
|
||||
}),
|
||||
deletedAt: getFlatFieldMetadataMock({
|
||||
id: '544fdd41-6418-43e4-a46a-086c2c55924d',
|
||||
objectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
type: FieldMetadataType.DATE_TIME,
|
||||
name: 'deletedAt',
|
||||
label: 'Deleted at',
|
||||
defaultValue: null,
|
||||
description: 'Date when the record was deleted',
|
||||
icon: 'IconCalendarMinus',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: { displayFormat: DateDisplayFormat.RELATIVE },
|
||||
isActive: true,
|
||||
isSystem: false,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
universalIdentifier: '20202020-b9a7-48d8-8387-b9a3090a50ec',
|
||||
}),
|
||||
workspaceMember: getFlatFieldMetadataMock({
|
||||
id: 'c8d9c315-034a-4ffd-a6b3-e6386092d0a8',
|
||||
objectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'workspaceMember',
|
||||
label: 'Workspace Member',
|
||||
defaultValue: null,
|
||||
description: 'Event workspace member',
|
||||
icon: 'IconCircleUser',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'workspaceMemberId',
|
||||
},
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: 'b2172f26-093d-4c9f-86c3-f0bcfaf54ad6',
|
||||
relationTargetObjectMetadataId: '7d8264db-2b55-4b74-81ff-b7064ed43840',
|
||||
universalIdentifier: '20202020-af23-4479-9a30-868edc474b36',
|
||||
}),
|
||||
person: getFlatFieldMetadataMock({
|
||||
id: 'dbd02754-4bef-4149-b39d-54759983ab47',
|
||||
objectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'person',
|
||||
label: 'Person',
|
||||
defaultValue: null,
|
||||
description: 'Event person',
|
||||
icon: 'IconUser',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'personId',
|
||||
},
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: 'b1457347-545b-4a42-9c68-bc655952229a',
|
||||
relationTargetObjectMetadataId: '843e0b67-9619-4628-91c4-2fa62256a611',
|
||||
universalIdentifier: '20202020-c414-45b9-a60a-ac27aa96229f',
|
||||
}),
|
||||
company: getFlatFieldMetadataMock({
|
||||
id: 'fd8cabe5-7dc8-4d6a-8053-43434488b3e4',
|
||||
objectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'company',
|
||||
label: 'Company',
|
||||
defaultValue: null,
|
||||
description: 'Event company',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'companyId',
|
||||
},
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: 'cc78390f-f570-4c2c-9f19-2a8fef67f4f6',
|
||||
relationTargetObjectMetadataId: '7f5c2c7a-bb23-46fb-b59d-9b7a52a8d1cc',
|
||||
universalIdentifier: '20202020-04ad-4221-a744-7a8278a5ce21',
|
||||
}),
|
||||
opportunity: getFlatFieldMetadataMock({
|
||||
id: '026cbaa7-860c-4ed4-b878-8d78849e6c28',
|
||||
objectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'opportunity',
|
||||
label: 'Opportunity',
|
||||
defaultValue: null,
|
||||
description: 'Event opportunity',
|
||||
icon: 'IconTargetArrow',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.SET_NULL,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'opportunityId',
|
||||
},
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '7826944b-3b21-4448-892e-5a2a68161313',
|
||||
relationTargetObjectMetadataId: 'e6996bbf-dd41-423a-9324-8546f5b22fa7',
|
||||
universalIdentifier: '20202020-7664-4a35-a3df-580d389fd527',
|
||||
}),
|
||||
note: getFlatFieldMetadataMock({
|
||||
id: '2b9f1c90-9e35-4ccc-8d84-b42de31ef127',
|
||||
objectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'note',
|
||||
label: 'Note',
|
||||
defaultValue: null,
|
||||
description: 'Event note',
|
||||
icon: 'IconTargetArrow',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.SET_NULL,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'noteId',
|
||||
},
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '1207d260-db2c-41d4-bb09-34ea1188978f',
|
||||
relationTargetObjectMetadataId: '1253e3e5-5b00-4a34-93b8-02f3dc6e2b7c',
|
||||
universalIdentifier: '20202020-ec55-4135-8da5-3a20badc0156',
|
||||
}),
|
||||
task: getFlatFieldMetadataMock({
|
||||
id: '187eaeb8-62c8-4925-815f-946b4768b786',
|
||||
objectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'task',
|
||||
label: 'Task',
|
||||
defaultValue: null,
|
||||
description: 'Event task',
|
||||
icon: 'IconTargetArrow',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.SET_NULL,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'taskId',
|
||||
},
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '3536b3af-76a2-44f5-9d89-1961a0a0a763',
|
||||
relationTargetObjectMetadataId: '3186920d-2a15-4b5f-96c7-2bf6567024b0',
|
||||
universalIdentifier: '20202020-b2f5-415c-9135-a31dfe49501b',
|
||||
}),
|
||||
workflow: getFlatFieldMetadataMock({
|
||||
id: '9973da2e-cc65-41b2-8f52-4130cfa31fc6',
|
||||
objectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'workflow',
|
||||
label: 'Workflow',
|
||||
defaultValue: null,
|
||||
description: 'Event workflow',
|
||||
icon: 'IconTargetArrow',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'workflowId',
|
||||
},
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '384db7b5-3551-4774-9258-7082b26b502a',
|
||||
relationTargetObjectMetadataId: '664c19a5-0693-45d4-a4e5-76c3717db83c',
|
||||
universalIdentifier: '20202020-616c-4ad3-a2e9-c477c341e295',
|
||||
}),
|
||||
workflowVersion: getFlatFieldMetadataMock({
|
||||
id: '7e5b7033-8c4f-4bdc-9156-6954c268fbb8',
|
||||
objectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'workflowVersion',
|
||||
label: 'WorkflowVersion',
|
||||
defaultValue: null,
|
||||
description: 'Event workflow version',
|
||||
icon: 'IconTargetArrow',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'workflowVersionId',
|
||||
},
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: '767ab66d-f3d7-4bac-b0be-f738f8c6fda7',
|
||||
relationTargetObjectMetadataId: '99cf5f27-b41d-4f25-a23b-9e47d27dae9b',
|
||||
universalIdentifier: '20202020-74f1-4711-a129-e14ca0ecd744',
|
||||
}),
|
||||
workflowRun: getFlatFieldMetadataMock({
|
||||
id: '1cd2b19c-f5c5-40b4-ad41-cc7aa3e955b2',
|
||||
objectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'workflowRun',
|
||||
label: 'Workflow Run',
|
||||
defaultValue: null,
|
||||
description: 'Event workflow run',
|
||||
icon: 'IconTargetArrow',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'workflowRunId',
|
||||
},
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: 'c17fe20f-fcd1-4b21-ac5c-c595473a3af8',
|
||||
relationTargetObjectMetadataId: '06d95e96-b050-443f-946e-dd276d291a2f',
|
||||
universalIdentifier: '20202020-96f0-401b-9186-a3a0759225ac',
|
||||
}),
|
||||
rocket: getFlatFieldMetadataMock({
|
||||
id: 'eebb9590-817b-4a51-88f7-9792aa8e0a59',
|
||||
objectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'rocket',
|
||||
label: 'Rocket',
|
||||
defaultValue: null,
|
||||
description: 'TimelineActivities Rocket',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'rocketId',
|
||||
},
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: '53a223cc-a445-420d-8698-1a9137039448',
|
||||
relationTargetObjectMetadataId: 'd78ec657-74a4-4652-a350-1f44ff62970a',
|
||||
universalIdentifier: '20202020-0be6-444e-88f0-12e0c64ac27d',
|
||||
}),
|
||||
pet: getFlatFieldMetadataMock({
|
||||
id: '3cb86390-4ee7-42fa-bd1e-bd6326b47610',
|
||||
objectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'pet',
|
||||
label: 'Pet',
|
||||
defaultValue: null,
|
||||
description: 'TimelineActivities Pet',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'petId',
|
||||
},
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: '4eb74f21-1cb4-46b5-b3bb-4e41108e70d9',
|
||||
relationTargetObjectMetadataId: 'd34e0f07-1b8c-4de0-938e-599cf05e1f7f',
|
||||
universalIdentifier: '20202020-d88f-4020-8c85-d6c600903762',
|
||||
}),
|
||||
surveyResult: getFlatFieldMetadataMock({
|
||||
id: '06010d88-dc3c-4172-92c9-8c73924f950d',
|
||||
objectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'surveyResult',
|
||||
label: 'Survey result',
|
||||
defaultValue: null,
|
||||
description: 'TimelineActivities Survey result',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
overrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'surveyResultId',
|
||||
},
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: 'd544ccb4-b0df-43bb-b70c-57ae477838c4',
|
||||
relationTargetObjectMetadataId: '713da753-0340-49b5-b1fa-add34d2dc9a8',
|
||||
universalIdentifier: '20202020-d13a-4342-8df0-df48bd783787',
|
||||
}),
|
||||
} as const satisfies Record<string, FlatFieldMetadata>;
|
||||
-9
@@ -35,12 +35,3 @@ export const getFlatIndexMetadataMock = (
|
||||
...overrides,
|
||||
};
|
||||
};
|
||||
|
||||
export const getStandardFlatIndexMetadataMock = (
|
||||
overrides: Omit<FlatIndexMetadataOverrides, 'isCustom'>,
|
||||
) => {
|
||||
return getFlatIndexMetadataMock({
|
||||
isCustom: false,
|
||||
...overrides,
|
||||
});
|
||||
};
|
||||
|
||||
-13
@@ -1,13 +0,0 @@
|
||||
import { ATTACHMENT_FLAT_OBJECT_MOCK } from 'src/engine/metadata-modules/flat-object-metadata/__mocks__/attachment-flat-object.mock';
|
||||
import { NOTE_FLAT_OBJECT_MOCK } from 'src/engine/metadata-modules/flat-object-metadata/__mocks__/note-flat-object.mock';
|
||||
import { NOTE_TARGET_FLAT_OBJECT_MOCK } from 'src/engine/metadata-modules/flat-object-metadata/__mocks__/note-target-flat-object.mock';
|
||||
import { TASK_TARGET_FLAT_OBJECT_MOCK } from 'src/engine/metadata-modules/flat-object-metadata/__mocks__/task-target-flat-object.mock';
|
||||
import { TIMELINE_ACTIVITY_FLAT_OBJECT_MOCK } from 'src/engine/metadata-modules/flat-object-metadata/__mocks__/timeline-activity-flat-object.mock';
|
||||
|
||||
export const STANDARD_RELATION_TARGET_FLAT_OBJECT_METADATA_MOCKS = [
|
||||
NOTE_FLAT_OBJECT_MOCK,
|
||||
TIMELINE_ACTIVITY_FLAT_OBJECT_MOCK,
|
||||
NOTE_TARGET_FLAT_OBJECT_MOCK,
|
||||
ATTACHMENT_FLAT_OBJECT_MOCK,
|
||||
TASK_TARGET_FLAT_OBJECT_MOCK,
|
||||
] as const;
|
||||
Reference in New Issue
Block a user