Add MorphId column to MORPH_RELATION field metadata (#14285)
close https://github.com/twentyhq/core-team-issues/issues/1426
This commit is contained in:
+31
@@ -0,0 +1,31 @@
|
||||
import { type MigrationInterface, type QueryRunner } from 'typeorm';
|
||||
|
||||
export class AddMorphIdToFieldMetadata1756910835948
|
||||
implements MigrationInterface
|
||||
{
|
||||
name = 'AddMorphIdToFieldMetadata1756910835948';
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(
|
||||
`DROP INDEX "core"."IDX_FIELD_METADATA_NAME_OBJMID_WORKSPACE_ID_EXCEPT_MORPH_UNIQUE"`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "core"."fieldMetadata" ADD "morphId" uuid`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "core"."fieldMetadata" ADD CONSTRAINT "CHK_FIELD_METADATA_MORPH_RELATION_REQUIRES_MORPH_ID" CHECK (("type" != 'MORPH_RELATION') OR ("type" = 'MORPH_RELATION' AND "morphId" IS NOT NULL))`,
|
||||
);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "core"."fieldMetadata" DROP CONSTRAINT "CHK_FIELD_METADATA_MORPH_RELATION_REQUIRES_MORPH_ID"`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "core"."fieldMetadata" DROP COLUMN "morphId"`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`CREATE UNIQUE INDEX "IDX_FIELD_METADATA_NAME_OBJMID_WORKSPACE_ID_EXCEPT_MORPH_UNIQUE" ON "core"."fieldMetadata" ("objectMetadataId", "name", "workspaceId") WHERE ((type)::text <> 'MORPH_RELATION'::text)`,
|
||||
);
|
||||
}
|
||||
}
|
||||
+27
-22
@@ -1,5 +1,6 @@
|
||||
import { type FieldMetadataType } from 'twenty-shared/types';
|
||||
import { FieldMetadataType } from 'twenty-shared/types';
|
||||
import {
|
||||
Check,
|
||||
Column,
|
||||
CreateDateColumn,
|
||||
Entity,
|
||||
@@ -18,19 +19,16 @@ import { FieldMetadataOptions } from 'src/engine/metadata-modules/field-metadata
|
||||
import { FieldMetadataSettings } from 'src/engine/metadata-modules/field-metadata/interfaces/field-metadata-settings.interface';
|
||||
|
||||
import { type FieldStandardOverridesDTO } from 'src/engine/metadata-modules/field-metadata/dtos/field-standard-overrides.dto';
|
||||
import { AssignTypeIfIsRelationFieldMetadataType } from 'src/engine/metadata-modules/field-metadata/types/assign-type-if-is-relation-field-metadata-type.type';
|
||||
import { AssignIfIsGivenFieldMetadataType } from 'src/engine/metadata-modules/field-metadata/types/assign-if-is-given-field-metadata-type.type';
|
||||
import { AssignTypeIfIsMorphOrRelationFieldMetadataType } from 'src/engine/metadata-modules/field-metadata/types/assign-type-if-is-morph-or-relation-field-metadata-type.type';
|
||||
import { IndexFieldMetadataEntity } from 'src/engine/metadata-modules/index-metadata/index-field-metadata.entity';
|
||||
import { ObjectMetadataEntity } from 'src/engine/metadata-modules/object-metadata/object-metadata.entity';
|
||||
import { FieldPermissionEntity } from 'src/engine/metadata-modules/object-permission/field-permission/field-permission.entity';
|
||||
|
||||
@Entity('fieldMetadata')
|
||||
@Index(
|
||||
'IDX_FIELD_METADATA_NAME_OBJMID_WORKSPACE_ID_EXCEPT_MORPH_UNIQUE',
|
||||
['name', 'objectMetadataId', 'workspaceId'],
|
||||
{
|
||||
unique: true,
|
||||
where: `"type" <> ''MORPH_RELATION''`,
|
||||
},
|
||||
@Check(
|
||||
'CHK_FIELD_METADATA_MORPH_RELATION_REQUIRES_MORPH_ID',
|
||||
`("type" != 'MORPH_RELATION') OR ("type" = 'MORPH_RELATION' AND "morphId" IS NOT NULL)`,
|
||||
)
|
||||
@Index('IDX_FIELD_METADATA_RELATION_TARGET_FIELD_METADATA_ID', [
|
||||
'relationTargetFieldMetadataId',
|
||||
@@ -44,7 +42,7 @@ import { FieldPermissionEntity } from 'src/engine/metadata-modules/object-permis
|
||||
])
|
||||
// TODO add some documentation about this entity
|
||||
export class FieldMetadataEntity<
|
||||
T extends FieldMetadataType = FieldMetadataType,
|
||||
TFieldMetadataType extends FieldMetadataType = FieldMetadataType,
|
||||
> implements Required<FieldMetadataEntity>
|
||||
{
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
@@ -68,7 +66,7 @@ export class FieldMetadataEntity<
|
||||
nullable: false,
|
||||
type: 'varchar',
|
||||
})
|
||||
type: T;
|
||||
type: TFieldMetadataType;
|
||||
|
||||
@Column({ nullable: false })
|
||||
name: string;
|
||||
@@ -77,7 +75,7 @@ export class FieldMetadataEntity<
|
||||
label: string;
|
||||
|
||||
@Column({ nullable: true, type: 'jsonb' })
|
||||
defaultValue: FieldMetadataDefaultValue<T>;
|
||||
defaultValue: FieldMetadataDefaultValue<TFieldMetadataType>;
|
||||
|
||||
@Column({ nullable: true, type: 'text' })
|
||||
description: string | null;
|
||||
@@ -89,10 +87,10 @@ export class FieldMetadataEntity<
|
||||
standardOverrides: FieldStandardOverridesDTO | null;
|
||||
|
||||
@Column('jsonb', { nullable: true })
|
||||
options: FieldMetadataOptions<T>;
|
||||
options: FieldMetadataOptions<TFieldMetadataType>;
|
||||
|
||||
@Column('jsonb', { nullable: true })
|
||||
settings: FieldMetadataSettings<T>;
|
||||
settings: FieldMetadataSettings<TFieldMetadataType>;
|
||||
|
||||
@Column({ default: false })
|
||||
isCustom: boolean;
|
||||
@@ -122,9 +120,9 @@ export class FieldMetadataEntity<
|
||||
isLabelSyncedWithName: boolean;
|
||||
|
||||
@Column({ nullable: true, type: 'uuid' })
|
||||
relationTargetFieldMetadataId: AssignTypeIfIsRelationFieldMetadataType<
|
||||
relationTargetFieldMetadataId: AssignTypeIfIsMorphOrRelationFieldMetadataType<
|
||||
string,
|
||||
T
|
||||
TFieldMetadataType
|
||||
>;
|
||||
|
||||
@OneToOne(
|
||||
@@ -134,15 +132,15 @@ export class FieldMetadataEntity<
|
||||
{ nullable: true },
|
||||
)
|
||||
@JoinColumn({ name: 'relationTargetFieldMetadataId' })
|
||||
relationTargetFieldMetadata: AssignTypeIfIsRelationFieldMetadataType<
|
||||
relationTargetFieldMetadata: AssignTypeIfIsMorphOrRelationFieldMetadataType<
|
||||
Relation<FieldMetadataEntity>,
|
||||
T
|
||||
TFieldMetadataType
|
||||
>;
|
||||
|
||||
@Column({ nullable: true, type: 'uuid' })
|
||||
relationTargetObjectMetadataId: AssignTypeIfIsRelationFieldMetadataType<
|
||||
relationTargetObjectMetadataId: AssignTypeIfIsMorphOrRelationFieldMetadataType<
|
||||
string,
|
||||
T
|
||||
TFieldMetadataType
|
||||
>;
|
||||
|
||||
@ManyToOne(
|
||||
@@ -152,9 +150,16 @@ export class FieldMetadataEntity<
|
||||
{ onDelete: 'CASCADE', nullable: true },
|
||||
)
|
||||
@JoinColumn({ name: 'relationTargetObjectMetadataId' })
|
||||
relationTargetObjectMetadata: AssignTypeIfIsRelationFieldMetadataType<
|
||||
relationTargetObjectMetadata: AssignTypeIfIsMorphOrRelationFieldMetadataType<
|
||||
Relation<ObjectMetadataEntity>,
|
||||
T
|
||||
TFieldMetadataType
|
||||
>;
|
||||
|
||||
@Column({ nullable: true, type: 'uuid' })
|
||||
morphId: AssignIfIsGivenFieldMetadataType<
|
||||
string,
|
||||
TFieldMetadataType,
|
||||
FieldMetadataType.MORPH_RELATION
|
||||
>;
|
||||
|
||||
@OneToMany(
|
||||
|
||||
+8
-5
@@ -65,6 +65,7 @@ export class FieldMetadataMorphRelationService {
|
||||
}
|
||||
|
||||
const fieldsCreated: FieldMetadataEntity[] = [];
|
||||
const morphId = v4();
|
||||
|
||||
for (const relation of morphRelationsCreationPayload) {
|
||||
const targetObjectMetadata =
|
||||
@@ -99,9 +100,10 @@ export class FieldMetadataMorphRelationService {
|
||||
},
|
||||
);
|
||||
|
||||
const createdFieldMetadataItem = await fieldMetadataRepository.save(
|
||||
omit(relationFieldMetadataForCreate, 'id'),
|
||||
);
|
||||
const createdMorphFieldMetadataItemWithoutTargetField =
|
||||
await fieldMetadataRepository.save(
|
||||
omit({ ...relationFieldMetadataForCreate, morphId }, 'id'),
|
||||
);
|
||||
|
||||
const targetFieldMetadataName = computeMetadataNameFromLabel(
|
||||
relation.targetFieldLabel,
|
||||
@@ -146,12 +148,13 @@ export class FieldMetadataMorphRelationService {
|
||||
|
||||
const targetFieldMetadata = await fieldMetadataRepository.save({
|
||||
...targetFieldMetadataToCreateWithRelationWithId,
|
||||
relationTargetFieldMetadataId: createdFieldMetadataItem.id,
|
||||
relationTargetFieldMetadataId:
|
||||
createdMorphFieldMetadataItemWithoutTargetField.id,
|
||||
});
|
||||
|
||||
const createdFieldMetadataItemUpdated =
|
||||
await fieldMetadataRepository.save({
|
||||
...createdFieldMetadataItem,
|
||||
...createdMorphFieldMetadataItemWithoutTargetField,
|
||||
relationTargetFieldMetadataId: targetFieldMetadata.id,
|
||||
});
|
||||
|
||||
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
import { type FieldMetadataType, type IsExactly } from 'twenty-shared/types';
|
||||
|
||||
export type AssignIfIsGivenFieldMetadataType<
|
||||
TTypeToAssign,
|
||||
TInputFieldMetadataType extends FieldMetadataType,
|
||||
TExpectedFieldMetadataType extends FieldMetadataType,
|
||||
> =
|
||||
IsExactly<TInputFieldMetadataType, FieldMetadataType> extends true
|
||||
? null | TTypeToAssign
|
||||
: TInputFieldMetadataType extends TExpectedFieldMetadataType
|
||||
? TTypeToAssign
|
||||
: TInputFieldMetadataType extends TExpectedFieldMetadataType
|
||||
? TTypeToAssign
|
||||
: never | null;
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
import { type FieldMetadataType } from 'twenty-shared/types';
|
||||
|
||||
import { type AssignIfIsGivenFieldMetadataType } from 'src/engine/metadata-modules/field-metadata/types/assign-if-is-given-field-metadata-type.type';
|
||||
import { type MorphOrRelationFieldMetadataType } from 'src/engine/metadata-modules/field-metadata/types/morph-or-relation-field-metadata-type.type';
|
||||
|
||||
export type AssignTypeIfIsMorphOrRelationFieldMetadataType<
|
||||
TTypeToAssign,
|
||||
TFieldMetadataType extends FieldMetadataType,
|
||||
> = AssignIfIsGivenFieldMetadataType<
|
||||
TTypeToAssign,
|
||||
TFieldMetadataType,
|
||||
MorphOrRelationFieldMetadataType
|
||||
>;
|
||||
-13
@@ -1,13 +0,0 @@
|
||||
import { type FieldMetadataType, type IsExactly } from 'twenty-shared/types';
|
||||
|
||||
export type AssignTypeIfIsRelationFieldMetadataType<
|
||||
Ttype,
|
||||
T extends FieldMetadataType,
|
||||
> =
|
||||
IsExactly<T, FieldMetadataType> extends true
|
||||
? null | Ttype // Could be improved to be | unknown
|
||||
: T extends FieldMetadataType.RELATION
|
||||
? Ttype
|
||||
: T extends FieldMetadataType.MORPH_RELATION
|
||||
? Ttype
|
||||
: never | null;
|
||||
+217
-226
@@ -4,7 +4,7 @@ import { DateDisplayFormat } from 'src/engine/metadata-modules/field-metadata/in
|
||||
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 { getMorphOrRelationTargetFlatFieldMetadataMock } from 'src/engine/metadata-modules/flat-field-metadata/__mocks__/get-morph-or-relation-target-flat-field-metadata-mock';
|
||||
import { getRelationTargetFlatFieldMetadataMock } from 'src/engine/metadata-modules/flat-field-metadata/__mocks__/get-morph-or-relation-target-flat-field-metadata-mock';
|
||||
import { type FlatFieldMetadata } from 'src/engine/metadata-modules/flat-field-metadata/types/flat-field-metadata.type';
|
||||
import { RelationOnDeleteAction } from 'src/engine/metadata-modules/relation-metadata/relation-on-delete-action.type';
|
||||
|
||||
@@ -211,31 +211,30 @@ export const ATTACHMENT_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '958b82d0-a290-4e10-898d-3d858fbf684f',
|
||||
relationTargetObjectMetadataId: '7d8264db-2b55-4b74-81ff-b7064ed43840',
|
||||
universalIdentifier: '20202020-6501-4ac5-a4ef-b2f8522ef6cd',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '958b82d0-a290-4e10-898d-3d858fbf684f',
|
||||
standardId: '20202020-000f-4947-917f-1b09851024fe',
|
||||
objectMetadataId: '7d8264db-2b55-4b74-81ff-b7064ed43840',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'authoredAttachments',
|
||||
label: 'Authored attachments',
|
||||
defaultValue: null,
|
||||
description: 'Attachments created by the workspace member',
|
||||
icon: 'IconFileImport',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '99724bb6-7a84-4b54-9b3f-dab730ab445a',
|
||||
relationTargetObjectMetadataId: '819ed5ff-312f-4423-8e95-02a691cf5c27',
|
||||
universalIdentifier: '20202020-000f-4947-917f-1b09851024fe',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '958b82d0-a290-4e10-898d-3d858fbf684f',
|
||||
standardId: '20202020-000f-4947-917f-1b09851024fe',
|
||||
objectMetadataId: '7d8264db-2b55-4b74-81ff-b7064ed43840',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'authoredAttachments',
|
||||
label: 'Authored attachments',
|
||||
defaultValue: null,
|
||||
description: 'Attachments created by the workspace member',
|
||||
icon: 'IconFileImport',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '99724bb6-7a84-4b54-9b3f-dab730ab445a',
|
||||
relationTargetObjectMetadataId: '819ed5ff-312f-4423-8e95-02a691cf5c27',
|
||||
universalIdentifier: '20202020-000f-4947-917f-1b09851024fe',
|
||||
}),
|
||||
}),
|
||||
task: getFlatFieldMetadataMock({
|
||||
id: 'bd823f17-f923-4f0d-8533-51d7bc062975',
|
||||
@@ -264,31 +263,30 @@ export const ATTACHMENT_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '00fd339a-6431-465d-9524-09b5c804f497',
|
||||
relationTargetObjectMetadataId: '3186920d-2a15-4b5f-96c7-2bf6567024b0',
|
||||
universalIdentifier: '20202020-51e5-4621-9cf8-215487951c4b',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '00fd339a-6431-465d-9524-09b5c804f497',
|
||||
standardId: '20202020-794d-4783-a8ff-cecdb15be139',
|
||||
objectMetadataId: '3186920d-2a15-4b5f-96c7-2bf6567024b0',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'attachments',
|
||||
label: 'Attachments',
|
||||
defaultValue: null,
|
||||
description: 'Task attachments',
|
||||
icon: 'IconFileImport',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '00fd339a-6431-465d-9524-09b5c804f497',
|
||||
standardId: '20202020-794d-4783-a8ff-cecdb15be139',
|
||||
objectMetadataId: '3186920d-2a15-4b5f-96c7-2bf6567024b0',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'attachments',
|
||||
label: 'Attachments',
|
||||
defaultValue: null,
|
||||
description: 'Task attachments',
|
||||
icon: 'IconFileImport',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
note: getFlatFieldMetadataMock({
|
||||
id: '5a98eb2b-1120-42e3-afd3-09d7da642fba',
|
||||
@@ -317,31 +315,30 @@ export const ATTACHMENT_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '4d4b3225-ddd2-4d76-a4d6-bcdd43a256e8',
|
||||
relationTargetObjectMetadataId: '1253e3e5-5b00-4a34-93b8-02f3dc6e2b7c',
|
||||
universalIdentifier: '20202020-4f4b-4503-a6fc-6b982f3dffb5',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '4d4b3225-ddd2-4d76-a4d6-bcdd43a256e8',
|
||||
standardId: '20202020-4986-4c92-bf19-39934b149b16',
|
||||
objectMetadataId: '1253e3e5-5b00-4a34-93b8-02f3dc6e2b7c',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'attachments',
|
||||
label: 'Attachments',
|
||||
defaultValue: null,
|
||||
description: 'Note attachments',
|
||||
icon: 'IconFileImport',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '4d4b3225-ddd2-4d76-a4d6-bcdd43a256e8',
|
||||
standardId: '20202020-4986-4c92-bf19-39934b149b16',
|
||||
objectMetadataId: '1253e3e5-5b00-4a34-93b8-02f3dc6e2b7c',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'attachments',
|
||||
label: 'Attachments',
|
||||
defaultValue: null,
|
||||
description: 'Note attachments',
|
||||
icon: 'IconFileImport',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
person: getFlatFieldMetadataMock({
|
||||
id: '6938c2ec-ebcc-4f30-8d38-2c9c40228c53',
|
||||
@@ -370,31 +367,30 @@ export const ATTACHMENT_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '367ad117-de09-466c-94f8-ce99d951b5ce',
|
||||
relationTargetObjectMetadataId: '843e0b67-9619-4628-91c4-2fa62256a611',
|
||||
universalIdentifier: '20202020-0158-4aa2-965c-5cdafe21ffa2',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '367ad117-de09-466c-94f8-ce99d951b5ce',
|
||||
standardId: '20202020-cd97-451f-87fa-bcb789bdbf3a',
|
||||
objectMetadataId: '843e0b67-9619-4628-91c4-2fa62256a611',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'attachments',
|
||||
label: 'Attachments',
|
||||
defaultValue: null,
|
||||
description: 'Attachments linked to the contact.',
|
||||
icon: 'IconFileImport',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '367ad117-de09-466c-94f8-ce99d951b5ce',
|
||||
standardId: '20202020-cd97-451f-87fa-bcb789bdbf3a',
|
||||
objectMetadataId: '843e0b67-9619-4628-91c4-2fa62256a611',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'attachments',
|
||||
label: 'Attachments',
|
||||
defaultValue: null,
|
||||
description: 'Attachments linked to the contact.',
|
||||
icon: 'IconFileImport',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
company: getFlatFieldMetadataMock({
|
||||
id: '0bacf73b-f45b-4683-85b4-3e812e6228bf',
|
||||
@@ -423,31 +419,30 @@ export const ATTACHMENT_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '44a572c5-d620-47f5-943a-346ae967e99e',
|
||||
relationTargetObjectMetadataId: '7f5c2c7a-bb23-46fb-b59d-9b7a52a8d1cc',
|
||||
universalIdentifier: '20202020-ceab-4a28-b546-73b06b4c08d5',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '44a572c5-d620-47f5-943a-346ae967e99e',
|
||||
standardId: '20202020-c1b5-4120-b0f0-987ca401ed53',
|
||||
objectMetadataId: '7f5c2c7a-bb23-46fb-b59d-9b7a52a8d1cc',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'attachments',
|
||||
label: 'Attachments',
|
||||
defaultValue: null,
|
||||
description: 'Attachments linked to the company',
|
||||
icon: 'IconFileImport',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '44a572c5-d620-47f5-943a-346ae967e99e',
|
||||
standardId: '20202020-c1b5-4120-b0f0-987ca401ed53',
|
||||
objectMetadataId: '7f5c2c7a-bb23-46fb-b59d-9b7a52a8d1cc',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'attachments',
|
||||
label: 'Attachments',
|
||||
defaultValue: null,
|
||||
description: 'Attachments linked to the company',
|
||||
icon: 'IconFileImport',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
opportunity: getFlatFieldMetadataMock({
|
||||
id: 'da72fbe2-a5aa-42b5-b6bd-482a3919eb20',
|
||||
@@ -476,31 +471,30 @@ export const ATTACHMENT_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '16515578-a6ce-48af-a303-2005bb8492f0',
|
||||
relationTargetObjectMetadataId: 'e6996bbf-dd41-423a-9324-8546f5b22fa7',
|
||||
universalIdentifier: '20202020-7374-499d-bea3-9354890755b5',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '16515578-a6ce-48af-a303-2005bb8492f0',
|
||||
standardId: '20202020-87c7-4118-83d6-2f4031005209',
|
||||
objectMetadataId: 'e6996bbf-dd41-423a-9324-8546f5b22fa7',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'attachments',
|
||||
label: 'Attachments',
|
||||
defaultValue: null,
|
||||
description: 'Attachments linked to the opportunity',
|
||||
icon: 'IconFileImport',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '16515578-a6ce-48af-a303-2005bb8492f0',
|
||||
standardId: '20202020-87c7-4118-83d6-2f4031005209',
|
||||
objectMetadataId: 'e6996bbf-dd41-423a-9324-8546f5b22fa7',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'attachments',
|
||||
label: 'Attachments',
|
||||
defaultValue: null,
|
||||
description: 'Attachments linked to the opportunity',
|
||||
icon: 'IconFileImport',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
rocket: getFlatFieldMetadataMock({
|
||||
id: 'ba23019c-7f25-42c3-8138-622e61c42968',
|
||||
@@ -529,31 +523,30 @@ export const ATTACHMENT_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: 'f5984acf-5128-42ac-840f-9d2888423699',
|
||||
relationTargetObjectMetadataId: 'd78ec657-74a4-4652-a350-1f44ff62970a',
|
||||
universalIdentifier: '20202020-ca2d-47c0-8253-9d0b662fb01a',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: 'f5984acf-5128-42ac-840f-9d2888423699',
|
||||
standardId: '20202020-8d59-46ca-b7b2-73d167712134',
|
||||
objectMetadataId: 'd78ec657-74a4-4652-a350-1f44ff62970a',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'attachments',
|
||||
label: 'Attachments',
|
||||
defaultValue: null,
|
||||
description: 'Attachments tied to the Rocket',
|
||||
icon: 'IconFileImport',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: 'f5984acf-5128-42ac-840f-9d2888423699',
|
||||
standardId: '20202020-8d59-46ca-b7b2-73d167712134',
|
||||
objectMetadataId: 'd78ec657-74a4-4652-a350-1f44ff62970a',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'attachments',
|
||||
label: 'Attachments',
|
||||
defaultValue: null,
|
||||
description: 'Attachments tied to the Rocket',
|
||||
icon: 'IconFileImport',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
pet: getFlatFieldMetadataMock({
|
||||
id: '317a33ef-117e-4953-86d4-c4a9670a2ce3',
|
||||
@@ -582,31 +575,30 @@ export const ATTACHMENT_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '231903d0-3b14-47ed-9a88-fbf11031c451',
|
||||
relationTargetObjectMetadataId: 'd34e0f07-1b8c-4de0-938e-599cf05e1f7f',
|
||||
universalIdentifier: '20202020-b715-4658-8b6a-5359824dbddd',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '231903d0-3b14-47ed-9a88-fbf11031c451',
|
||||
standardId: '20202020-8d59-46ca-b7b2-73d167712134',
|
||||
objectMetadataId: 'd34e0f07-1b8c-4de0-938e-599cf05e1f7f',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'attachments',
|
||||
label: 'Attachments',
|
||||
defaultValue: null,
|
||||
description: 'Attachments tied to the Pet',
|
||||
icon: 'IconFileImport',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '231903d0-3b14-47ed-9a88-fbf11031c451',
|
||||
standardId: '20202020-8d59-46ca-b7b2-73d167712134',
|
||||
objectMetadataId: 'd34e0f07-1b8c-4de0-938e-599cf05e1f7f',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'attachments',
|
||||
label: 'Attachments',
|
||||
defaultValue: null,
|
||||
description: 'Attachments tied to the Pet',
|
||||
icon: 'IconFileImport',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
surveyResult: getFlatFieldMetadataMock({
|
||||
id: 'a09463e6-5e56-4965-bc8a-2faa23a64672',
|
||||
@@ -635,30 +627,29 @@ export const ATTACHMENT_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '3347ffcc-43d0-4697-a9ce-6fb9b0e677e1',
|
||||
relationTargetObjectMetadataId: '713da753-0340-49b5-b1fa-add34d2dc9a8',
|
||||
universalIdentifier: '20202020-58b5-4f6c-8402-06b2bf3ea064',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '3347ffcc-43d0-4697-a9ce-6fb9b0e677e1',
|
||||
standardId: '20202020-8d59-46ca-b7b2-73d167712134',
|
||||
objectMetadataId: '713da753-0340-49b5-b1fa-add34d2dc9a8',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'attachments',
|
||||
label: 'Attachments',
|
||||
defaultValue: null,
|
||||
description: 'Attachments tied to the Survey result',
|
||||
icon: 'IconFileImport',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: 'a09463e6-5e56-4965-bc8a-2faa23a64672',
|
||||
relationTargetObjectMetadataId: '819ed5ff-312f-4423-8e95-02a691cf5c27',
|
||||
universalIdentifier: '20202020-8d59-46ca-b7b2-73d167712134',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '3347ffcc-43d0-4697-a9ce-6fb9b0e677e1',
|
||||
standardId: '20202020-8d59-46ca-b7b2-73d167712134',
|
||||
objectMetadataId: '713da753-0340-49b5-b1fa-add34d2dc9a8',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'attachments',
|
||||
label: 'Attachments',
|
||||
defaultValue: null,
|
||||
description: 'Attachments tied to the Survey result',
|
||||
icon: 'IconFileImport',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: 'a09463e6-5e56-4965-bc8a-2faa23a64672',
|
||||
relationTargetObjectMetadataId: '819ed5ff-312f-4423-8e95-02a691cf5c27',
|
||||
universalIdentifier: '20202020-8d59-46ca-b7b2-73d167712134',
|
||||
}),
|
||||
}),
|
||||
} as const satisfies Record<string, FlatFieldMetadata>;
|
||||
|
||||
+221
-229
@@ -4,7 +4,7 @@ import { DateDisplayFormat } from 'src/engine/metadata-modules/field-metadata/in
|
||||
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 { getMorphOrRelationTargetFlatFieldMetadataMock } from 'src/engine/metadata-modules/flat-field-metadata/__mocks__/get-morph-or-relation-target-flat-field-metadata-mock';
|
||||
import { getRelationTargetFlatFieldMetadataMock } from 'src/engine/metadata-modules/flat-field-metadata/__mocks__/get-morph-or-relation-target-flat-field-metadata-mock';
|
||||
import { type FlatFieldMetadata } from 'src/engine/metadata-modules/flat-field-metadata/types/flat-field-metadata.type';
|
||||
import { RelationOnDeleteAction } from 'src/engine/metadata-modules/relation-metadata/relation-on-delete-action.type';
|
||||
|
||||
@@ -435,35 +435,34 @@ export const COMPANY_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: 'ee247ca6-fdaa-4a56-87a2-730cf84f5f29',
|
||||
relationTargetObjectMetadataId: '843e0b67-9619-4628-91c4-2fa62256a611',
|
||||
universalIdentifier: '20202020-3213-4ddf-9494-6422bcff8d7c',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: 'ee247ca6-fdaa-4a56-87a2-730cf84f5f29',
|
||||
standardId: '20202020-e2f3-448e-b34c-2d625f0025fd',
|
||||
objectMetadataId: '843e0b67-9619-4628-91c4-2fa62256a611',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'company',
|
||||
label: 'Company',
|
||||
defaultValue: null,
|
||||
description: 'Contact’s company',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.SET_NULL,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'companyId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: 'ee247ca6-fdaa-4a56-87a2-730cf84f5f29',
|
||||
standardId: '20202020-e2f3-448e-b34c-2d625f0025fd',
|
||||
objectMetadataId: '843e0b67-9619-4628-91c4-2fa62256a611',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'company',
|
||||
label: 'Company',
|
||||
defaultValue: null,
|
||||
description: 'Contact’s company',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.SET_NULL,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'companyId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
accountOwner: getFlatFieldMetadataMock({
|
||||
id: '86c6692b-bed5-4ef1-bad0-657e56a85eba',
|
||||
@@ -493,31 +492,30 @@ export const COMPANY_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '1fe5453f-6042-4370-b388-c9a198bd0ab4',
|
||||
relationTargetObjectMetadataId: '7d8264db-2b55-4b74-81ff-b7064ed43840',
|
||||
universalIdentifier: '20202020-95b8-4e10-9881-edb5d4765f9d',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '1fe5453f-6042-4370-b388-c9a198bd0ab4',
|
||||
standardId: '20202020-dc29-4bd4-a3c1-29eafa324bee',
|
||||
objectMetadataId: '7d8264db-2b55-4b74-81ff-b7064ed43840',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'accountOwnerForCompanies',
|
||||
label: 'Account Owner For Companies',
|
||||
defaultValue: null,
|
||||
description: 'Account owner for companies',
|
||||
icon: 'IconBriefcase',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '86c6692b-bed5-4ef1-bad0-657e56a85eba',
|
||||
relationTargetObjectMetadataId: '7f5c2c7a-bb23-46fb-b59d-9b7a52a8d1cc',
|
||||
universalIdentifier: '20202020-dc29-4bd4-a3c1-29eafa324bee',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '1fe5453f-6042-4370-b388-c9a198bd0ab4',
|
||||
standardId: '20202020-dc29-4bd4-a3c1-29eafa324bee',
|
||||
objectMetadataId: '7d8264db-2b55-4b74-81ff-b7064ed43840',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'accountOwnerForCompanies',
|
||||
label: 'Account Owner For Companies',
|
||||
defaultValue: null,
|
||||
description: 'Account owner for companies',
|
||||
icon: 'IconBriefcase',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '86c6692b-bed5-4ef1-bad0-657e56a85eba',
|
||||
relationTargetObjectMetadataId: '7f5c2c7a-bb23-46fb-b59d-9b7a52a8d1cc',
|
||||
universalIdentifier: '20202020-dc29-4bd4-a3c1-29eafa324bee',
|
||||
}),
|
||||
}),
|
||||
taskTargets: getFlatFieldMetadataMock({
|
||||
id: '4f9138da-cd36-4df4-98f9-ebabe036b141',
|
||||
@@ -542,35 +540,34 @@ export const COMPANY_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: 'ec11b025-1476-4e84-81c5-cf5b5c776edc',
|
||||
relationTargetObjectMetadataId: 'bb2b29b8-7f46-4106-a8ae-3a32df9c9166',
|
||||
universalIdentifier: '20202020-cb17-4a61-8f8f-3be6730480de',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: 'ec11b025-1476-4e84-81c5-cf5b5c776edc',
|
||||
standardId: '20202020-4703-4a4e-948c-487b0c60a92c',
|
||||
objectMetadataId: 'bb2b29b8-7f46-4106-a8ae-3a32df9c9166',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'company',
|
||||
label: 'Company',
|
||||
defaultValue: null,
|
||||
description: 'TaskTarget company',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'companyId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: 'ec11b025-1476-4e84-81c5-cf5b5c776edc',
|
||||
standardId: '20202020-4703-4a4e-948c-487b0c60a92c',
|
||||
objectMetadataId: 'bb2b29b8-7f46-4106-a8ae-3a32df9c9166',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'company',
|
||||
label: 'Company',
|
||||
defaultValue: null,
|
||||
description: 'TaskTarget company',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'companyId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
noteTargets: getFlatFieldMetadataMock({
|
||||
id: '56b9dc8a-0379-42cf-ab31-8db7061f5a2a',
|
||||
@@ -595,35 +592,34 @@ export const COMPANY_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: 'd1d3f9eb-1447-4adb-bc2b-f133bc58ac35',
|
||||
relationTargetObjectMetadataId: '12e3cb51-c3de-4192-b0d5-965d48d001c0',
|
||||
universalIdentifier: '20202020-bae0-4556-a74a-a9c686f77a88',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: 'd1d3f9eb-1447-4adb-bc2b-f133bc58ac35',
|
||||
standardId: 'c500fbc0-d6f2-4982-a959-5a755431696c',
|
||||
objectMetadataId: '12e3cb51-c3de-4192-b0d5-965d48d001c0',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'company',
|
||||
label: 'Company',
|
||||
defaultValue: null,
|
||||
description: 'NoteTarget company',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'companyId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: 'd1d3f9eb-1447-4adb-bc2b-f133bc58ac35',
|
||||
standardId: 'c500fbc0-d6f2-4982-a959-5a755431696c',
|
||||
objectMetadataId: '12e3cb51-c3de-4192-b0d5-965d48d001c0',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'company',
|
||||
label: 'Company',
|
||||
defaultValue: null,
|
||||
description: 'NoteTarget company',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'companyId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
opportunities: getFlatFieldMetadataMock({
|
||||
id: '3eda8c8e-74e4-401f-bb0e-470db5b267e6',
|
||||
@@ -648,35 +644,34 @@ export const COMPANY_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '512890f1-4da0-4b96-bb71-5ccabefb82e7',
|
||||
relationTargetObjectMetadataId: 'e6996bbf-dd41-423a-9324-8546f5b22fa7',
|
||||
universalIdentifier: '20202020-add3-4658-8e23-d70dccb6d0ec',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '512890f1-4da0-4b96-bb71-5ccabefb82e7',
|
||||
standardId: '20202020-cbac-457e-b565-adece5fc815f',
|
||||
objectMetadataId: 'e6996bbf-dd41-423a-9324-8546f5b22fa7',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'company',
|
||||
label: 'Company',
|
||||
defaultValue: null,
|
||||
description: 'Opportunity company',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.SET_NULL,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'companyId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '512890f1-4da0-4b96-bb71-5ccabefb82e7',
|
||||
standardId: '20202020-cbac-457e-b565-adece5fc815f',
|
||||
objectMetadataId: 'e6996bbf-dd41-423a-9324-8546f5b22fa7',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'company',
|
||||
label: 'Company',
|
||||
defaultValue: null,
|
||||
description: 'Opportunity company',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.SET_NULL,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'companyId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
favorites: getFlatFieldMetadataMock({
|
||||
id: '72415216-fed4-450b-aa00-691e37718b01',
|
||||
@@ -701,35 +696,34 @@ export const COMPANY_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '9a11532c-6839-46ed-a2f5-ed03f88b86f6',
|
||||
relationTargetObjectMetadataId: 'f4749ffb-dde8-44ff-8b01-d3fc82df0ba2',
|
||||
universalIdentifier: '20202020-4d1d-41ac-b13b-621631298d55',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '9a11532c-6839-46ed-a2f5-ed03f88b86f6',
|
||||
standardId: '20202020-cff5-4682-8bf9-069169e08279',
|
||||
objectMetadataId: 'f4749ffb-dde8-44ff-8b01-d3fc82df0ba2',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'company',
|
||||
label: 'Company',
|
||||
defaultValue: null,
|
||||
description: 'Favorite company',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'companyId',
|
||||
},
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '72415216-fed4-450b-aa00-691e37718b01',
|
||||
relationTargetObjectMetadataId: '7f5c2c7a-bb23-46fb-b59d-9b7a52a8d1cc',
|
||||
universalIdentifier: '20202020-cff5-4682-8bf9-069169e08279',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '9a11532c-6839-46ed-a2f5-ed03f88b86f6',
|
||||
standardId: '20202020-cff5-4682-8bf9-069169e08279',
|
||||
objectMetadataId: 'f4749ffb-dde8-44ff-8b01-d3fc82df0ba2',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'company',
|
||||
label: 'Company',
|
||||
defaultValue: null,
|
||||
description: 'Favorite company',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'companyId',
|
||||
},
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '72415216-fed4-450b-aa00-691e37718b01',
|
||||
relationTargetObjectMetadataId: '7f5c2c7a-bb23-46fb-b59d-9b7a52a8d1cc',
|
||||
universalIdentifier: '20202020-cff5-4682-8bf9-069169e08279',
|
||||
}),
|
||||
}),
|
||||
attachments: getFlatFieldMetadataMock({
|
||||
id: '44a572c5-d620-47f5-943a-346ae967e99e',
|
||||
@@ -754,35 +748,34 @@ export const COMPANY_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '0bacf73b-f45b-4683-85b4-3e812e6228bf',
|
||||
relationTargetObjectMetadataId: '819ed5ff-312f-4423-8e95-02a691cf5c27',
|
||||
universalIdentifier: '20202020-c1b5-4120-b0f0-987ca401ed53',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '0bacf73b-f45b-4683-85b4-3e812e6228bf',
|
||||
standardId: '20202020-ceab-4a28-b546-73b06b4c08d5',
|
||||
objectMetadataId: '819ed5ff-312f-4423-8e95-02a691cf5c27',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'company',
|
||||
label: 'Company',
|
||||
defaultValue: null,
|
||||
description: 'Attachment company',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'companyId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '0bacf73b-f45b-4683-85b4-3e812e6228bf',
|
||||
standardId: '20202020-ceab-4a28-b546-73b06b4c08d5',
|
||||
objectMetadataId: '819ed5ff-312f-4423-8e95-02a691cf5c27',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'company',
|
||||
label: 'Company',
|
||||
defaultValue: null,
|
||||
description: 'Attachment company',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'companyId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
timelineActivities: getFlatFieldMetadataMock({
|
||||
id: 'cc78390f-f570-4c2c-9f19-2a8fef67f4f6',
|
||||
@@ -807,35 +800,34 @@ export const COMPANY_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: 'fd8cabe5-7dc8-4d6a-8053-43434488b3e4',
|
||||
relationTargetObjectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
universalIdentifier: '20202020-0414-4daf-9c0d-64fe7b27f89f',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: 'fd8cabe5-7dc8-4d6a-8053-43434488b3e4',
|
||||
standardId: '20202020-04ad-4221-a744-7a8278a5ce21',
|
||||
objectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'company',
|
||||
label: 'Company',
|
||||
defaultValue: null,
|
||||
description: 'Event company',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'companyId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: 'fd8cabe5-7dc8-4d6a-8053-43434488b3e4',
|
||||
standardId: '20202020-04ad-4221-a744-7a8278a5ce21',
|
||||
objectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'company',
|
||||
label: 'Company',
|
||||
defaultValue: null,
|
||||
description: 'Event company',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'companyId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
tagline: getFlatFieldMetadataMock({
|
||||
id: 'f869f4ed-e440-486a-8392-be33ab327cf4',
|
||||
|
||||
+337
-351
@@ -4,7 +4,7 @@ import { DateDisplayFormat } from 'src/engine/metadata-modules/field-metadata/in
|
||||
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 { getMorphOrRelationTargetFlatFieldMetadataMock } from 'src/engine/metadata-modules/flat-field-metadata/__mocks__/get-morph-or-relation-target-flat-field-metadata-mock';
|
||||
import { getRelationTargetFlatFieldMetadataMock } from 'src/engine/metadata-modules/flat-field-metadata/__mocks__/get-morph-or-relation-target-flat-field-metadata-mock';
|
||||
import { type FlatFieldMetadata } from 'src/engine/metadata-modules/flat-field-metadata/types/flat-field-metadata.type';
|
||||
import { RelationOnDeleteAction } from 'src/engine/metadata-modules/relation-metadata/relation-on-delete-action.type';
|
||||
|
||||
@@ -161,31 +161,30 @@ export const FAVORITE_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: 'a15a4b41-1849-4dea-aa43-f53caad016be',
|
||||
relationTargetObjectMetadataId: '7d8264db-2b55-4b74-81ff-b7064ed43840',
|
||||
universalIdentifier: '20202020-ce63-49cb-9676-fdc0c45892cd',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: 'a15a4b41-1849-4dea-aa43-f53caad016be',
|
||||
standardId: '20202020-f3c1-4faf-b343-cf7681038757',
|
||||
objectMetadataId: '7d8264db-2b55-4b74-81ff-b7064ed43840',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'favorites',
|
||||
label: 'Favorites',
|
||||
defaultValue: null,
|
||||
description: 'Favorites linked to the workspace member',
|
||||
icon: 'IconHeart',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '07f2c3ba-63d1-4e44-bac4-bc4591e51bac',
|
||||
relationTargetObjectMetadataId: 'f4749ffb-dde8-44ff-8b01-d3fc82df0ba2',
|
||||
universalIdentifier: '20202020-f3c1-4faf-b343-cf7681038757',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: 'a15a4b41-1849-4dea-aa43-f53caad016be',
|
||||
standardId: '20202020-f3c1-4faf-b343-cf7681038757',
|
||||
objectMetadataId: '7d8264db-2b55-4b74-81ff-b7064ed43840',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'favorites',
|
||||
label: 'Favorites',
|
||||
defaultValue: null,
|
||||
description: 'Favorites linked to the workspace member',
|
||||
icon: 'IconHeart',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '07f2c3ba-63d1-4e44-bac4-bc4591e51bac',
|
||||
relationTargetObjectMetadataId: 'f4749ffb-dde8-44ff-8b01-d3fc82df0ba2',
|
||||
universalIdentifier: '20202020-f3c1-4faf-b343-cf7681038757',
|
||||
}),
|
||||
}),
|
||||
person: getFlatFieldMetadataMock({
|
||||
id: '013cec20-e9cc-42db-b9b9-ff6bd0f52abd',
|
||||
@@ -214,31 +213,30 @@ export const FAVORITE_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: 'a1a72bee-1c15-4598-ba23-67ba8e3e505d',
|
||||
relationTargetObjectMetadataId: '843e0b67-9619-4628-91c4-2fa62256a611',
|
||||
universalIdentifier: '20202020-c428-4f40-b6f3-86091511c41c',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: 'a1a72bee-1c15-4598-ba23-67ba8e3e505d',
|
||||
standardId: '20202020-4073-4117-9cf1-203bcdc91cbd',
|
||||
objectMetadataId: '843e0b67-9619-4628-91c4-2fa62256a611',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'favorites',
|
||||
label: 'Favorites',
|
||||
defaultValue: null,
|
||||
description: 'Favorites linked to the contact',
|
||||
icon: 'IconHeart',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '013cec20-e9cc-42db-b9b9-ff6bd0f52abd',
|
||||
relationTargetObjectMetadataId: 'f4749ffb-dde8-44ff-8b01-d3fc82df0ba2',
|
||||
universalIdentifier: '20202020-4073-4117-9cf1-203bcdc91cbd',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: 'a1a72bee-1c15-4598-ba23-67ba8e3e505d',
|
||||
standardId: '20202020-4073-4117-9cf1-203bcdc91cbd',
|
||||
objectMetadataId: '843e0b67-9619-4628-91c4-2fa62256a611',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'favorites',
|
||||
label: 'Favorites',
|
||||
defaultValue: null,
|
||||
description: 'Favorites linked to the contact',
|
||||
icon: 'IconHeart',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '013cec20-e9cc-42db-b9b9-ff6bd0f52abd',
|
||||
relationTargetObjectMetadataId: 'f4749ffb-dde8-44ff-8b01-d3fc82df0ba2',
|
||||
universalIdentifier: '20202020-4073-4117-9cf1-203bcdc91cbd',
|
||||
}),
|
||||
}),
|
||||
company: getFlatFieldMetadataMock({
|
||||
id: '9a11532c-6839-46ed-a2f5-ed03f88b86f6',
|
||||
@@ -267,31 +265,30 @@ export const FAVORITE_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '72415216-fed4-450b-aa00-691e37718b01',
|
||||
relationTargetObjectMetadataId: '7f5c2c7a-bb23-46fb-b59d-9b7a52a8d1cc',
|
||||
universalIdentifier: '20202020-cff5-4682-8bf9-069169e08279',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '72415216-fed4-450b-aa00-691e37718b01',
|
||||
standardId: '20202020-4d1d-41ac-b13b-621631298d55',
|
||||
objectMetadataId: '7f5c2c7a-bb23-46fb-b59d-9b7a52a8d1cc',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'favorites',
|
||||
label: 'Favorites',
|
||||
defaultValue: null,
|
||||
description: 'Favorites linked to the company',
|
||||
icon: 'IconHeart',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '9a11532c-6839-46ed-a2f5-ed03f88b86f6',
|
||||
relationTargetObjectMetadataId: 'f4749ffb-dde8-44ff-8b01-d3fc82df0ba2',
|
||||
universalIdentifier: '20202020-4d1d-41ac-b13b-621631298d55',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '72415216-fed4-450b-aa00-691e37718b01',
|
||||
standardId: '20202020-4d1d-41ac-b13b-621631298d55',
|
||||
objectMetadataId: '7f5c2c7a-bb23-46fb-b59d-9b7a52a8d1cc',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'favorites',
|
||||
label: 'Favorites',
|
||||
defaultValue: null,
|
||||
description: 'Favorites linked to the company',
|
||||
icon: 'IconHeart',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '9a11532c-6839-46ed-a2f5-ed03f88b86f6',
|
||||
relationTargetObjectMetadataId: 'f4749ffb-dde8-44ff-8b01-d3fc82df0ba2',
|
||||
universalIdentifier: '20202020-4d1d-41ac-b13b-621631298d55',
|
||||
}),
|
||||
}),
|
||||
favoriteFolder: getFlatFieldMetadataMock({
|
||||
id: 'fabbe669-b8fc-49fe-8010-f13d01eb61f1',
|
||||
@@ -320,31 +317,30 @@ export const FAVORITE_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '71b95076-6b8d-45c9-9a7c-ab981b81bd1b',
|
||||
relationTargetObjectMetadataId: '35763b74-1abe-4c4b-9eab-27693f0ee06d',
|
||||
universalIdentifier: '20202020-f658-4d12-8b4d-248356aa4bd9',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '71b95076-6b8d-45c9-9a7c-ab981b81bd1b',
|
||||
standardId: '20202020-b5e3-4b42-8af2-03cd4fd2e4d2',
|
||||
objectMetadataId: '35763b74-1abe-4c4b-9eab-27693f0ee06d',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'favorites',
|
||||
label: 'Favorites',
|
||||
defaultValue: null,
|
||||
description: 'Favorites in this folder',
|
||||
icon: 'IconHeart',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: 'fabbe669-b8fc-49fe-8010-f13d01eb61f1',
|
||||
relationTargetObjectMetadataId: 'f4749ffb-dde8-44ff-8b01-d3fc82df0ba2',
|
||||
universalIdentifier: '20202020-b5e3-4b42-8af2-03cd4fd2e4d2',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '71b95076-6b8d-45c9-9a7c-ab981b81bd1b',
|
||||
standardId: '20202020-b5e3-4b42-8af2-03cd4fd2e4d2',
|
||||
objectMetadataId: '35763b74-1abe-4c4b-9eab-27693f0ee06d',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'favorites',
|
||||
label: 'Favorites',
|
||||
defaultValue: null,
|
||||
description: 'Favorites in this folder',
|
||||
icon: 'IconHeart',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: 'fabbe669-b8fc-49fe-8010-f13d01eb61f1',
|
||||
relationTargetObjectMetadataId: 'f4749ffb-dde8-44ff-8b01-d3fc82df0ba2',
|
||||
universalIdentifier: '20202020-b5e3-4b42-8af2-03cd4fd2e4d2',
|
||||
}),
|
||||
}),
|
||||
opportunity: getFlatFieldMetadataMock({
|
||||
id: '6380cf8e-4327-4d1e-ad21-1826ce4ecf05',
|
||||
@@ -373,31 +369,30 @@ export const FAVORITE_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '87bb9924-a1cc-4357-9c8a-52141dabf266',
|
||||
relationTargetObjectMetadataId: 'e6996bbf-dd41-423a-9324-8546f5b22fa7',
|
||||
universalIdentifier: '20202020-dabc-48e1-8318-2781a2b32aa2',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '87bb9924-a1cc-4357-9c8a-52141dabf266',
|
||||
standardId: '20202020-a1c2-4500-aaae-83ba8a0e827a',
|
||||
objectMetadataId: 'e6996bbf-dd41-423a-9324-8546f5b22fa7',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'favorites',
|
||||
label: 'Favorites',
|
||||
defaultValue: null,
|
||||
description: 'Favorites linked to the opportunity',
|
||||
icon: 'IconHeart',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '6380cf8e-4327-4d1e-ad21-1826ce4ecf05',
|
||||
relationTargetObjectMetadataId: 'f4749ffb-dde8-44ff-8b01-d3fc82df0ba2',
|
||||
universalIdentifier: '20202020-a1c2-4500-aaae-83ba8a0e827a',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '87bb9924-a1cc-4357-9c8a-52141dabf266',
|
||||
standardId: '20202020-a1c2-4500-aaae-83ba8a0e827a',
|
||||
objectMetadataId: 'e6996bbf-dd41-423a-9324-8546f5b22fa7',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'favorites',
|
||||
label: 'Favorites',
|
||||
defaultValue: null,
|
||||
description: 'Favorites linked to the opportunity',
|
||||
icon: 'IconHeart',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '6380cf8e-4327-4d1e-ad21-1826ce4ecf05',
|
||||
relationTargetObjectMetadataId: 'f4749ffb-dde8-44ff-8b01-d3fc82df0ba2',
|
||||
universalIdentifier: '20202020-a1c2-4500-aaae-83ba8a0e827a',
|
||||
}),
|
||||
}),
|
||||
workflow: getFlatFieldMetadataMock({
|
||||
id: '12c20527-9b1d-4922-9650-00cc31b26387',
|
||||
@@ -426,31 +421,30 @@ export const FAVORITE_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: 'b848abe8-276b-46c9-9eab-baf34d2a0583',
|
||||
relationTargetObjectMetadataId: '664c19a5-0693-45d4-a4e5-76c3717db83c',
|
||||
universalIdentifier: '20202020-b11b-4dc8-999a-6bd0a947b463',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: 'b848abe8-276b-46c9-9eab-baf34d2a0583',
|
||||
standardId: '20202020-c554-4c41-be7a-cf9cd4b0d512',
|
||||
objectMetadataId: '664c19a5-0693-45d4-a4e5-76c3717db83c',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'favorites',
|
||||
label: 'Favorites',
|
||||
defaultValue: null,
|
||||
description: 'Favorites linked to the workflow',
|
||||
icon: 'IconHeart',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '12c20527-9b1d-4922-9650-00cc31b26387',
|
||||
relationTargetObjectMetadataId: 'f4749ffb-dde8-44ff-8b01-d3fc82df0ba2',
|
||||
universalIdentifier: '20202020-c554-4c41-be7a-cf9cd4b0d512',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: 'b848abe8-276b-46c9-9eab-baf34d2a0583',
|
||||
standardId: '20202020-c554-4c41-be7a-cf9cd4b0d512',
|
||||
objectMetadataId: '664c19a5-0693-45d4-a4e5-76c3717db83c',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'favorites',
|
||||
label: 'Favorites',
|
||||
defaultValue: null,
|
||||
description: 'Favorites linked to the workflow',
|
||||
icon: 'IconHeart',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '12c20527-9b1d-4922-9650-00cc31b26387',
|
||||
relationTargetObjectMetadataId: 'f4749ffb-dde8-44ff-8b01-d3fc82df0ba2',
|
||||
universalIdentifier: '20202020-c554-4c41-be7a-cf9cd4b0d512',
|
||||
}),
|
||||
}),
|
||||
workflowVersion: getFlatFieldMetadataMock({
|
||||
id: '5cb92f25-c067-4e19-afb3-c7cc038ed1a4',
|
||||
@@ -479,31 +473,30 @@ export const FAVORITE_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: 'ea6b6bda-6ba7-4549-b81a-1f3ced0d4b25',
|
||||
relationTargetObjectMetadataId: '99cf5f27-b41d-4f25-a23b-9e47d27dae9b',
|
||||
universalIdentifier: '20202020-e1b8-4caf-b55a-3ab4d4cbcd21',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: 'ea6b6bda-6ba7-4549-b81a-1f3ced0d4b25',
|
||||
standardId: '20202020-b8e0-4e57-928d-b51671cc71f2',
|
||||
objectMetadataId: '99cf5f27-b41d-4f25-a23b-9e47d27dae9b',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'favorites',
|
||||
label: 'Favorites',
|
||||
defaultValue: null,
|
||||
description: 'Favorites linked to the workflow version',
|
||||
icon: 'IconHeart',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '5cb92f25-c067-4e19-afb3-c7cc038ed1a4',
|
||||
relationTargetObjectMetadataId: 'f4749ffb-dde8-44ff-8b01-d3fc82df0ba2',
|
||||
universalIdentifier: '20202020-b8e0-4e57-928d-b51671cc71f2',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: 'ea6b6bda-6ba7-4549-b81a-1f3ced0d4b25',
|
||||
standardId: '20202020-b8e0-4e57-928d-b51671cc71f2',
|
||||
objectMetadataId: '99cf5f27-b41d-4f25-a23b-9e47d27dae9b',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'favorites',
|
||||
label: 'Favorites',
|
||||
defaultValue: null,
|
||||
description: 'Favorites linked to the workflow version',
|
||||
icon: 'IconHeart',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '5cb92f25-c067-4e19-afb3-c7cc038ed1a4',
|
||||
relationTargetObjectMetadataId: 'f4749ffb-dde8-44ff-8b01-d3fc82df0ba2',
|
||||
universalIdentifier: '20202020-b8e0-4e57-928d-b51671cc71f2',
|
||||
}),
|
||||
}),
|
||||
workflowRun: getFlatFieldMetadataMock({
|
||||
id: 'a4bdd0d8-c36f-4519-812b-be4800ab14b0',
|
||||
@@ -532,31 +525,30 @@ export const FAVORITE_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '444a6e9e-443d-4f04-a60d-32f76f17049c',
|
||||
relationTargetObjectMetadataId: '06d95e96-b050-443f-946e-dd276d291a2f',
|
||||
universalIdentifier: '20202020-db5a-4fe4-9a13-9afa22b1e762',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '444a6e9e-443d-4f04-a60d-32f76f17049c',
|
||||
standardId: '20202020-4baf-4604-b899-2f7fcfbbf90d',
|
||||
objectMetadataId: '06d95e96-b050-443f-946e-dd276d291a2f',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'favorites',
|
||||
label: 'Favorites',
|
||||
defaultValue: null,
|
||||
description: 'Favorites linked to the workflow run',
|
||||
icon: 'IconHeart',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: 'a4bdd0d8-c36f-4519-812b-be4800ab14b0',
|
||||
relationTargetObjectMetadataId: 'f4749ffb-dde8-44ff-8b01-d3fc82df0ba2',
|
||||
universalIdentifier: '20202020-4baf-4604-b899-2f7fcfbbf90d',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '444a6e9e-443d-4f04-a60d-32f76f17049c',
|
||||
standardId: '20202020-4baf-4604-b899-2f7fcfbbf90d',
|
||||
objectMetadataId: '06d95e96-b050-443f-946e-dd276d291a2f',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'favorites',
|
||||
label: 'Favorites',
|
||||
defaultValue: null,
|
||||
description: 'Favorites linked to the workflow run',
|
||||
icon: 'IconHeart',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: 'a4bdd0d8-c36f-4519-812b-be4800ab14b0',
|
||||
relationTargetObjectMetadataId: 'f4749ffb-dde8-44ff-8b01-d3fc82df0ba2',
|
||||
universalIdentifier: '20202020-4baf-4604-b899-2f7fcfbbf90d',
|
||||
}),
|
||||
}),
|
||||
task: getFlatFieldMetadataMock({
|
||||
id: 'db16ab78-ea3f-4b67-93e3-6ad9ab1b7273',
|
||||
@@ -585,31 +577,30 @@ export const FAVORITE_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '33e4eff0-ff0f-4530-802a-cd630481ee84',
|
||||
relationTargetObjectMetadataId: '3186920d-2a15-4b5f-96c7-2bf6567024b0',
|
||||
universalIdentifier: '20202020-1b1b-4b3b-8b1b-7f8d6a1d7d5c',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '33e4eff0-ff0f-4530-802a-cd630481ee84',
|
||||
standardId: '20202020-4d1d-41ac-b13b-621631298d65',
|
||||
objectMetadataId: '3186920d-2a15-4b5f-96c7-2bf6567024b0',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'favorites',
|
||||
label: 'Favorites',
|
||||
defaultValue: null,
|
||||
description: 'Favorites linked to the task',
|
||||
icon: 'IconHeart',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: 'db16ab78-ea3f-4b67-93e3-6ad9ab1b7273',
|
||||
relationTargetObjectMetadataId: 'f4749ffb-dde8-44ff-8b01-d3fc82df0ba2',
|
||||
universalIdentifier: '20202020-4d1d-41ac-b13b-621631298d65',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '33e4eff0-ff0f-4530-802a-cd630481ee84',
|
||||
standardId: '20202020-4d1d-41ac-b13b-621631298d65',
|
||||
objectMetadataId: '3186920d-2a15-4b5f-96c7-2bf6567024b0',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'favorites',
|
||||
label: 'Favorites',
|
||||
defaultValue: null,
|
||||
description: 'Favorites linked to the task',
|
||||
icon: 'IconHeart',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: 'db16ab78-ea3f-4b67-93e3-6ad9ab1b7273',
|
||||
relationTargetObjectMetadataId: 'f4749ffb-dde8-44ff-8b01-d3fc82df0ba2',
|
||||
universalIdentifier: '20202020-4d1d-41ac-b13b-621631298d65',
|
||||
}),
|
||||
}),
|
||||
note: getFlatFieldMetadataMock({
|
||||
id: 'a61baf0f-2d43-4fda-9baf-efb000c17ecd',
|
||||
@@ -638,31 +629,30 @@ export const FAVORITE_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '065a1ede-f773-48ca-84bf-70f61d838396',
|
||||
relationTargetObjectMetadataId: '1253e3e5-5b00-4a34-93b8-02f3dc6e2b7c',
|
||||
universalIdentifier: '20202020-1f25-43fe-8b00-af212fdde824',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '065a1ede-f773-48ca-84bf-70f61d838396',
|
||||
standardId: '20202020-4d1d-41ac-b13b-621631298d67',
|
||||
objectMetadataId: '1253e3e5-5b00-4a34-93b8-02f3dc6e2b7c',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'favorites',
|
||||
label: 'Favorites',
|
||||
defaultValue: null,
|
||||
description: 'Favorites linked to the note',
|
||||
icon: 'IconHeart',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: 'a61baf0f-2d43-4fda-9baf-efb000c17ecd',
|
||||
relationTargetObjectMetadataId: 'f4749ffb-dde8-44ff-8b01-d3fc82df0ba2',
|
||||
universalIdentifier: '20202020-4d1d-41ac-b13b-621631298d67',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '065a1ede-f773-48ca-84bf-70f61d838396',
|
||||
standardId: '20202020-4d1d-41ac-b13b-621631298d67',
|
||||
objectMetadataId: '1253e3e5-5b00-4a34-93b8-02f3dc6e2b7c',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'favorites',
|
||||
label: 'Favorites',
|
||||
defaultValue: null,
|
||||
description: 'Favorites linked to the note',
|
||||
icon: 'IconHeart',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: 'a61baf0f-2d43-4fda-9baf-efb000c17ecd',
|
||||
relationTargetObjectMetadataId: 'f4749ffb-dde8-44ff-8b01-d3fc82df0ba2',
|
||||
universalIdentifier: '20202020-4d1d-41ac-b13b-621631298d67',
|
||||
}),
|
||||
}),
|
||||
view: getFlatFieldMetadataMock({
|
||||
id: 'accd216c-790e-4bd2-83bb-0700e06d0e5c',
|
||||
@@ -691,31 +681,30 @@ export const FAVORITE_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '90a103ec-7dce-4bd4-aed4-e2c9d46ecf32',
|
||||
relationTargetObjectMetadataId: '8377fc0d-ec1c-4fb5-b6ae-9381d9b22a95',
|
||||
universalIdentifier: '20202020-5a93-4fa9-acce-e73481a0bbdf',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '90a103ec-7dce-4bd4-aed4-e2c9d46ecf32',
|
||||
standardId: '20202020-c818-4a86-8284-9ec0ef0a59a5',
|
||||
objectMetadataId: '8377fc0d-ec1c-4fb5-b6ae-9381d9b22a95',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'favorites',
|
||||
label: 'Favorites',
|
||||
defaultValue: null,
|
||||
description: 'Favorites linked to the view',
|
||||
icon: 'IconHeart',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: 'accd216c-790e-4bd2-83bb-0700e06d0e5c',
|
||||
relationTargetObjectMetadataId: 'f4749ffb-dde8-44ff-8b01-d3fc82df0ba2',
|
||||
universalIdentifier: '20202020-c818-4a86-8284-9ec0ef0a59a5',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '90a103ec-7dce-4bd4-aed4-e2c9d46ecf32',
|
||||
standardId: '20202020-c818-4a86-8284-9ec0ef0a59a5',
|
||||
objectMetadataId: '8377fc0d-ec1c-4fb5-b6ae-9381d9b22a95',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'favorites',
|
||||
label: 'Favorites',
|
||||
defaultValue: null,
|
||||
description: 'Favorites linked to the view',
|
||||
icon: 'IconHeart',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: 'accd216c-790e-4bd2-83bb-0700e06d0e5c',
|
||||
relationTargetObjectMetadataId: 'f4749ffb-dde8-44ff-8b01-d3fc82df0ba2',
|
||||
universalIdentifier: '20202020-c818-4a86-8284-9ec0ef0a59a5',
|
||||
}),
|
||||
}),
|
||||
rocket: getFlatFieldMetadataMock({
|
||||
id: '9448627d-725d-499e-a071-90fd5cfcf0ea',
|
||||
@@ -744,31 +733,30 @@ export const FAVORITE_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '14010360-f3c2-442e-b05f-43c30158f246',
|
||||
relationTargetObjectMetadataId: 'd78ec657-74a4-4652-a350-1f44ff62970a',
|
||||
universalIdentifier: '20202020-78f7-4d7d-86e9-7562ced0b381',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '14010360-f3c2-442e-b05f-43c30158f246',
|
||||
standardId: '20202020-a4a7-4686-b296-1c6c3482ee21',
|
||||
objectMetadataId: 'd78ec657-74a4-4652-a350-1f44ff62970a',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'favorites',
|
||||
label: 'Favorites',
|
||||
defaultValue: null,
|
||||
description: 'Favorites tied to the Rocket',
|
||||
icon: 'IconHeart',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: '9448627d-725d-499e-a071-90fd5cfcf0ea',
|
||||
relationTargetObjectMetadataId: 'f4749ffb-dde8-44ff-8b01-d3fc82df0ba2',
|
||||
universalIdentifier: '20202020-a4a7-4686-b296-1c6c3482ee21',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '14010360-f3c2-442e-b05f-43c30158f246',
|
||||
standardId: '20202020-a4a7-4686-b296-1c6c3482ee21',
|
||||
objectMetadataId: 'd78ec657-74a4-4652-a350-1f44ff62970a',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'favorites',
|
||||
label: 'Favorites',
|
||||
defaultValue: null,
|
||||
description: 'Favorites tied to the Rocket',
|
||||
icon: 'IconHeart',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: '9448627d-725d-499e-a071-90fd5cfcf0ea',
|
||||
relationTargetObjectMetadataId: 'f4749ffb-dde8-44ff-8b01-d3fc82df0ba2',
|
||||
universalIdentifier: '20202020-a4a7-4686-b296-1c6c3482ee21',
|
||||
}),
|
||||
}),
|
||||
pet: getFlatFieldMetadataMock({
|
||||
id: 'd34b4048-bf0c-4c61-8ffe-59f1838a2cc4',
|
||||
@@ -797,31 +785,30 @@ export const FAVORITE_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '80bc4e7a-6bd1-4f2b-98b1-6333c631cc1a',
|
||||
relationTargetObjectMetadataId: 'd34e0f07-1b8c-4de0-938e-599cf05e1f7f',
|
||||
universalIdentifier: '20202020-1bd7-4d10-80dc-968b9f5d1a8a',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '80bc4e7a-6bd1-4f2b-98b1-6333c631cc1a',
|
||||
standardId: '20202020-a4a7-4686-b296-1c6c3482ee21',
|
||||
objectMetadataId: 'd34e0f07-1b8c-4de0-938e-599cf05e1f7f',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'favorites',
|
||||
label: 'Favorites',
|
||||
defaultValue: null,
|
||||
description: 'Favorites tied to the Pet',
|
||||
icon: 'IconHeart',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: 'd34b4048-bf0c-4c61-8ffe-59f1838a2cc4',
|
||||
relationTargetObjectMetadataId: 'f4749ffb-dde8-44ff-8b01-d3fc82df0ba2',
|
||||
universalIdentifier: '20202020-a4a7-4686-b296-1c6c3482ee21',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '80bc4e7a-6bd1-4f2b-98b1-6333c631cc1a',
|
||||
standardId: '20202020-a4a7-4686-b296-1c6c3482ee21',
|
||||
objectMetadataId: 'd34e0f07-1b8c-4de0-938e-599cf05e1f7f',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'favorites',
|
||||
label: 'Favorites',
|
||||
defaultValue: null,
|
||||
description: 'Favorites tied to the Pet',
|
||||
icon: 'IconHeart',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: 'd34b4048-bf0c-4c61-8ffe-59f1838a2cc4',
|
||||
relationTargetObjectMetadataId: 'f4749ffb-dde8-44ff-8b01-d3fc82df0ba2',
|
||||
universalIdentifier: '20202020-a4a7-4686-b296-1c6c3482ee21',
|
||||
}),
|
||||
}),
|
||||
surveyResult: getFlatFieldMetadataMock({
|
||||
id: '9cdfb5a1-bb9c-4a59-811d-f5a1034a8f8b',
|
||||
@@ -850,30 +837,29 @@ export const FAVORITE_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '8e11aced-3a20-4551-baa1-b38b98a74e1c',
|
||||
relationTargetObjectMetadataId: '713da753-0340-49b5-b1fa-add34d2dc9a8',
|
||||
universalIdentifier: '20202020-d049-4912-80ee-43b09fe3b0ac',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '8e11aced-3a20-4551-baa1-b38b98a74e1c',
|
||||
standardId: '20202020-a4a7-4686-b296-1c6c3482ee21',
|
||||
objectMetadataId: '713da753-0340-49b5-b1fa-add34d2dc9a8',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'favorites',
|
||||
label: 'Favorites',
|
||||
defaultValue: null,
|
||||
description: 'Favorites tied to the Survey result',
|
||||
icon: 'IconHeart',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: '9cdfb5a1-bb9c-4a59-811d-f5a1034a8f8b',
|
||||
relationTargetObjectMetadataId: 'f4749ffb-dde8-44ff-8b01-d3fc82df0ba2',
|
||||
universalIdentifier: '20202020-a4a7-4686-b296-1c6c3482ee21',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '8e11aced-3a20-4551-baa1-b38b98a74e1c',
|
||||
standardId: '20202020-a4a7-4686-b296-1c6c3482ee21',
|
||||
objectMetadataId: '713da753-0340-49b5-b1fa-add34d2dc9a8',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'favorites',
|
||||
label: 'Favorites',
|
||||
defaultValue: null,
|
||||
description: 'Favorites tied to the Survey result',
|
||||
icon: 'IconHeart',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: '9cdfb5a1-bb9c-4a59-811d-f5a1034a8f8b',
|
||||
relationTargetObjectMetadataId: 'f4749ffb-dde8-44ff-8b01-d3fc82df0ba2',
|
||||
universalIdentifier: '20202020-a4a7-4686-b296-1c6c3482ee21',
|
||||
}),
|
||||
}),
|
||||
} as const satisfies Record<string, FlatFieldMetadata>;
|
||||
|
||||
+29
-30
@@ -4,7 +4,7 @@ import { DateDisplayFormat } from 'src/engine/metadata-modules/field-metadata/in
|
||||
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 { getMorphOrRelationTargetFlatFieldMetadataMock } from 'src/engine/metadata-modules/flat-field-metadata/__mocks__/get-morph-or-relation-target-flat-field-metadata-mock';
|
||||
import { getRelationTargetFlatFieldMetadataMock } from 'src/engine/metadata-modules/flat-field-metadata/__mocks__/get-morph-or-relation-target-flat-field-metadata-mock';
|
||||
import { type FlatFieldMetadata } from 'src/engine/metadata-modules/flat-field-metadata/types/flat-field-metadata.type';
|
||||
import { RelationOnDeleteAction } from 'src/engine/metadata-modules/relation-metadata/relation-on-delete-action.type';
|
||||
|
||||
@@ -182,34 +182,33 @@ export const FAVORITE_FOLDER_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: 'fabbe669-b8fc-49fe-8010-f13d01eb61f1',
|
||||
relationTargetObjectMetadataId: 'f4749ffb-dde8-44ff-8b01-d3fc82df0ba2',
|
||||
universalIdentifier: '20202020-b5e3-4b42-8af2-03cd4fd2e4d2',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: 'fabbe669-b8fc-49fe-8010-f13d01eb61f1',
|
||||
standardId: '20202020-f658-4d12-8b4d-248356aa4bd9',
|
||||
objectMetadataId: 'f4749ffb-dde8-44ff-8b01-d3fc82df0ba2',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'favoriteFolder',
|
||||
label: 'Favorite Folder',
|
||||
defaultValue: null,
|
||||
description: 'The folder this favorite belongs to',
|
||||
icon: 'IconFolder',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.SET_NULL,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'favoriteFolderId',
|
||||
},
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '71b95076-6b8d-45c9-9a7c-ab981b81bd1b',
|
||||
relationTargetObjectMetadataId: '35763b74-1abe-4c4b-9eab-27693f0ee06d',
|
||||
universalIdentifier: '20202020-f658-4d12-8b4d-248356aa4bd9',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: 'fabbe669-b8fc-49fe-8010-f13d01eb61f1',
|
||||
standardId: '20202020-f658-4d12-8b4d-248356aa4bd9',
|
||||
objectMetadataId: 'f4749ffb-dde8-44ff-8b01-d3fc82df0ba2',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'favoriteFolder',
|
||||
label: 'Favorite Folder',
|
||||
defaultValue: null,
|
||||
description: 'The folder this favorite belongs to',
|
||||
icon: 'IconFolder',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.SET_NULL,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'favoriteFolderId',
|
||||
},
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '71b95076-6b8d-45c9-9a7c-ab981b81bd1b',
|
||||
relationTargetObjectMetadataId: '35763b74-1abe-4c4b-9eab-27693f0ee06d',
|
||||
universalIdentifier: '20202020-f658-4d12-8b4d-248356aa4bd9',
|
||||
}),
|
||||
}),
|
||||
} as const satisfies Record<string, FlatFieldMetadata>;
|
||||
|
||||
+1
@@ -23,6 +23,7 @@ export const getFlatFieldMetadataMock = <T extends FieldMetadataType>(
|
||||
updatedAt: createdAt,
|
||||
defaultValue: null,
|
||||
options: null,
|
||||
morphId: null,
|
||||
settings: null,
|
||||
description: 'default flat field metadata description',
|
||||
icon: 'icon',
|
||||
|
||||
+7
-4
@@ -1,13 +1,15 @@
|
||||
import { faker } from '@faker-js/faker';
|
||||
import { type NonNullableRequired } from 'twenty-shared/types';
|
||||
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';
|
||||
import { type FlatRelationTargetFieldMetadata } from 'src/engine/metadata-modules/flat-field-metadata/types/flat-relation-target-field-metadata.type';
|
||||
|
||||
type GetMorphOrRelationFlatFieldMetadataMockArgs = NonNullableRequired<
|
||||
Pick<
|
||||
FlatFieldMetadata<MorphOrRelationFieldMetadataType>,
|
||||
FlatFieldMetadata<FieldMetadataType.RELATION>,
|
||||
| 'universalIdentifier'
|
||||
| 'objectMetadataId'
|
||||
| 'type'
|
||||
@@ -18,7 +20,7 @@ type GetMorphOrRelationFlatFieldMetadataMockArgs = NonNullableRequired<
|
||||
> &
|
||||
Partial<FlatFieldMetadata>;
|
||||
|
||||
export const getMorphOrRelationTargetFlatFieldMetadataMock = ({
|
||||
export const getRelationTargetFlatFieldMetadataMock = ({
|
||||
objectMetadataId,
|
||||
settings,
|
||||
type,
|
||||
@@ -53,6 +55,7 @@ export const getMorphOrRelationTargetFlatFieldMetadataMock = ({
|
||||
settings,
|
||||
relationTargetFieldMetadataId,
|
||||
relationTargetObjectMetadataId,
|
||||
morphId: null,
|
||||
...overrides,
|
||||
defaultValue: null,
|
||||
options: null,
|
||||
|
||||
+113
-117
@@ -4,7 +4,7 @@ import { DateDisplayFormat } from 'src/engine/metadata-modules/field-metadata/in
|
||||
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 { getMorphOrRelationTargetFlatFieldMetadataMock } from 'src/engine/metadata-modules/flat-field-metadata/__mocks__/get-morph-or-relation-target-flat-field-metadata-mock';
|
||||
import { getRelationTargetFlatFieldMetadataMock } from 'src/engine/metadata-modules/flat-field-metadata/__mocks__/get-morph-or-relation-target-flat-field-metadata-mock';
|
||||
import { type FlatFieldMetadata } from 'src/engine/metadata-modules/flat-field-metadata/types/flat-field-metadata.type';
|
||||
import { RelationOnDeleteAction } from 'src/engine/metadata-modules/relation-metadata/relation-on-delete-action.type';
|
||||
|
||||
@@ -261,35 +261,34 @@ export const NOTE_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: 'b1e812b7-604e-459b-9449-31fa414b315c',
|
||||
relationTargetObjectMetadataId: '12e3cb51-c3de-4192-b0d5-965d48d001c0',
|
||||
universalIdentifier: '20202020-1f25-43fe-8b00-af212fdde823',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: 'b1e812b7-604e-459b-9449-31fa414b315c',
|
||||
standardId: '20202020-57f3-4f50-9599-fc0f671df003',
|
||||
objectMetadataId: '12e3cb51-c3de-4192-b0d5-965d48d001c0',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'note',
|
||||
label: 'Note',
|
||||
defaultValue: null,
|
||||
description: 'NoteTarget note',
|
||||
icon: 'IconNotes',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.SET_NULL,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'noteId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: 'b1e812b7-604e-459b-9449-31fa414b315c',
|
||||
standardId: '20202020-57f3-4f50-9599-fc0f671df003',
|
||||
objectMetadataId: '12e3cb51-c3de-4192-b0d5-965d48d001c0',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'note',
|
||||
label: 'Note',
|
||||
defaultValue: null,
|
||||
description: 'NoteTarget note',
|
||||
icon: 'IconNotes',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.SET_NULL,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'noteId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
attachments: getFlatFieldMetadataMock({
|
||||
id: '4d4b3225-ddd2-4d76-a4d6-bcdd43a256e8',
|
||||
@@ -314,35 +313,34 @@ export const NOTE_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '5a98eb2b-1120-42e3-afd3-09d7da642fba',
|
||||
relationTargetObjectMetadataId: '819ed5ff-312f-4423-8e95-02a691cf5c27',
|
||||
universalIdentifier: '20202020-4986-4c92-bf19-39934b149b16',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '5a98eb2b-1120-42e3-afd3-09d7da642fba',
|
||||
standardId: '20202020-4f4b-4503-a6fc-6b982f3dffb5',
|
||||
objectMetadataId: '819ed5ff-312f-4423-8e95-02a691cf5c27',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'note',
|
||||
label: 'Note',
|
||||
defaultValue: null,
|
||||
description: 'Attachment note',
|
||||
icon: 'IconNotes',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.SET_NULL,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'noteId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '5a98eb2b-1120-42e3-afd3-09d7da642fba',
|
||||
standardId: '20202020-4f4b-4503-a6fc-6b982f3dffb5',
|
||||
objectMetadataId: '819ed5ff-312f-4423-8e95-02a691cf5c27',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'note',
|
||||
label: 'Note',
|
||||
defaultValue: null,
|
||||
description: 'Attachment note',
|
||||
icon: 'IconNotes',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.SET_NULL,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'noteId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
timelineActivities: getFlatFieldMetadataMock({
|
||||
id: '1207d260-db2c-41d4-bb09-34ea1188978f',
|
||||
@@ -367,35 +365,34 @@ export const NOTE_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '2b9f1c90-9e35-4ccc-8d84-b42de31ef127',
|
||||
relationTargetObjectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
universalIdentifier: '20202020-7030-42f8-929c-1a57b25d6bce',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '2b9f1c90-9e35-4ccc-8d84-b42de31ef127',
|
||||
standardId: '20202020-ec55-4135-8da5-3a20badc0156',
|
||||
objectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'note',
|
||||
label: 'Note',
|
||||
defaultValue: null,
|
||||
description: 'Event note',
|
||||
icon: 'IconTargetArrow',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.SET_NULL,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'noteId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '2b9f1c90-9e35-4ccc-8d84-b42de31ef127',
|
||||
standardId: '20202020-ec55-4135-8da5-3a20badc0156',
|
||||
objectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'note',
|
||||
label: 'Note',
|
||||
defaultValue: null,
|
||||
description: 'Event note',
|
||||
icon: 'IconTargetArrow',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.SET_NULL,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'noteId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
favorites: getFlatFieldMetadataMock({
|
||||
id: '065a1ede-f773-48ca-84bf-70f61d838396',
|
||||
@@ -420,34 +417,33 @@ export const NOTE_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: 'a61baf0f-2d43-4fda-9baf-efb000c17ecd',
|
||||
relationTargetObjectMetadataId: 'f4749ffb-dde8-44ff-8b01-d3fc82df0ba2',
|
||||
universalIdentifier: '20202020-4d1d-41ac-b13b-621631298d67',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: 'a61baf0f-2d43-4fda-9baf-efb000c17ecd',
|
||||
standardId: '20202020-1f25-43fe-8b00-af212fdde824',
|
||||
objectMetadataId: 'f4749ffb-dde8-44ff-8b01-d3fc82df0ba2',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'note',
|
||||
label: 'Note',
|
||||
defaultValue: null,
|
||||
description: 'Favorite note',
|
||||
icon: 'IconNotes',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'noteId',
|
||||
},
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '065a1ede-f773-48ca-84bf-70f61d838396',
|
||||
relationTargetObjectMetadataId: '1253e3e5-5b00-4a34-93b8-02f3dc6e2b7c',
|
||||
universalIdentifier: '20202020-1f25-43fe-8b00-af212fdde824',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: 'a61baf0f-2d43-4fda-9baf-efb000c17ecd',
|
||||
standardId: '20202020-1f25-43fe-8b00-af212fdde824',
|
||||
objectMetadataId: 'f4749ffb-dde8-44ff-8b01-d3fc82df0ba2',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'note',
|
||||
label: 'Note',
|
||||
defaultValue: null,
|
||||
description: 'Favorite note',
|
||||
icon: 'IconNotes',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'noteId',
|
||||
},
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '065a1ede-f773-48ca-84bf-70f61d838396',
|
||||
relationTargetObjectMetadataId: '1253e3e5-5b00-4a34-93b8-02f3dc6e2b7c',
|
||||
universalIdentifier: '20202020-1f25-43fe-8b00-af212fdde824',
|
||||
}),
|
||||
}),
|
||||
} as const satisfies Record<string, FlatFieldMetadata>;
|
||||
|
||||
+169
-176
@@ -4,7 +4,7 @@ import { DateDisplayFormat } from 'src/engine/metadata-modules/field-metadata/in
|
||||
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 { getMorphOrRelationTargetFlatFieldMetadataMock } from 'src/engine/metadata-modules/flat-field-metadata/__mocks__/get-morph-or-relation-target-flat-field-metadata-mock';
|
||||
import { getRelationTargetFlatFieldMetadataMock } from 'src/engine/metadata-modules/flat-field-metadata/__mocks__/get-morph-or-relation-target-flat-field-metadata-mock';
|
||||
import { type FlatFieldMetadata } from 'src/engine/metadata-modules/flat-field-metadata/types/flat-field-metadata.type';
|
||||
import { RelationOnDeleteAction } from 'src/engine/metadata-modules/relation-metadata/relation-on-delete-action.type';
|
||||
|
||||
@@ -136,31 +136,30 @@ export const NOTETARGET_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '3a13d398-b7e6-4871-a5f8-5446806b3e5b',
|
||||
relationTargetObjectMetadataId: '1253e3e5-5b00-4a34-93b8-02f3dc6e2b7c',
|
||||
universalIdentifier: '20202020-57f3-4f50-9599-fc0f671df003',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '3a13d398-b7e6-4871-a5f8-5446806b3e5b',
|
||||
standardId: '20202020-1f25-43fe-8b00-af212fdde823',
|
||||
objectMetadataId: '1253e3e5-5b00-4a34-93b8-02f3dc6e2b7c',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'noteTargets',
|
||||
label: 'Relations',
|
||||
defaultValue: null,
|
||||
description: 'Note targets',
|
||||
icon: 'IconArrowUpRight',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '3a13d398-b7e6-4871-a5f8-5446806b3e5b',
|
||||
standardId: '20202020-1f25-43fe-8b00-af212fdde823',
|
||||
objectMetadataId: '1253e3e5-5b00-4a34-93b8-02f3dc6e2b7c',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'noteTargets',
|
||||
label: 'Relations',
|
||||
defaultValue: null,
|
||||
description: 'Note targets',
|
||||
icon: 'IconArrowUpRight',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
person: getFlatFieldMetadataMock({
|
||||
id: '560c71ff-254f-4baf-a4d1-054c53444f41',
|
||||
@@ -189,31 +188,30 @@ export const NOTETARGET_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '60388ed8-45f6-4fb5-8752-81c73e13f4ab',
|
||||
relationTargetObjectMetadataId: '843e0b67-9619-4628-91c4-2fa62256a611',
|
||||
universalIdentifier: '20202020-38ca-4aab-92f5-8a605ca2e4c5',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '60388ed8-45f6-4fb5-8752-81c73e13f4ab',
|
||||
standardId: '20202020-c8fc-4258-8250-15905d3fcfec',
|
||||
objectMetadataId: '843e0b67-9619-4628-91c4-2fa62256a611',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'noteTargets',
|
||||
label: 'Notes',
|
||||
defaultValue: null,
|
||||
description: 'Notes tied to the contact',
|
||||
icon: 'IconNotes',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '60388ed8-45f6-4fb5-8752-81c73e13f4ab',
|
||||
standardId: '20202020-c8fc-4258-8250-15905d3fcfec',
|
||||
objectMetadataId: '843e0b67-9619-4628-91c4-2fa62256a611',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'noteTargets',
|
||||
label: 'Notes',
|
||||
defaultValue: null,
|
||||
description: 'Notes tied to the contact',
|
||||
icon: 'IconNotes',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
company: getFlatFieldMetadataMock({
|
||||
id: 'd1d3f9eb-1447-4adb-bc2b-f133bc58ac35',
|
||||
@@ -242,31 +240,30 @@ export const NOTETARGET_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '56b9dc8a-0379-42cf-ab31-8db7061f5a2a',
|
||||
relationTargetObjectMetadataId: '7f5c2c7a-bb23-46fb-b59d-9b7a52a8d1cc',
|
||||
universalIdentifier: 'c500fbc0-d6f2-4982-a959-5a755431696c',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '56b9dc8a-0379-42cf-ab31-8db7061f5a2a',
|
||||
standardId: '20202020-bae0-4556-a74a-a9c686f77a88',
|
||||
objectMetadataId: '7f5c2c7a-bb23-46fb-b59d-9b7a52a8d1cc',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'noteTargets',
|
||||
label: 'Notes',
|
||||
defaultValue: null,
|
||||
description: 'Notes tied to the company',
|
||||
icon: 'IconNotes',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '56b9dc8a-0379-42cf-ab31-8db7061f5a2a',
|
||||
standardId: '20202020-bae0-4556-a74a-a9c686f77a88',
|
||||
objectMetadataId: '7f5c2c7a-bb23-46fb-b59d-9b7a52a8d1cc',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'noteTargets',
|
||||
label: 'Notes',
|
||||
defaultValue: null,
|
||||
description: 'Notes tied to the company',
|
||||
icon: 'IconNotes',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
opportunity: getFlatFieldMetadataMock({
|
||||
id: 'f42eac2a-8d99-4259-b69a-549abd553eda',
|
||||
@@ -295,31 +292,30 @@ export const NOTETARGET_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '36210a54-a72e-4530-a1eb-a0420c53e551',
|
||||
relationTargetObjectMetadataId: 'e6996bbf-dd41-423a-9324-8546f5b22fa7',
|
||||
universalIdentifier: '20202020-4e42-417a-a705-76581c9ade79',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '36210a54-a72e-4530-a1eb-a0420c53e551',
|
||||
standardId: '20202020-dd3f-42d5-a382-db58aabf43d3',
|
||||
objectMetadataId: 'e6996bbf-dd41-423a-9324-8546f5b22fa7',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'noteTargets',
|
||||
label: 'Notes',
|
||||
defaultValue: null,
|
||||
description: 'Notes tied to the opportunity',
|
||||
icon: 'IconNotes',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '36210a54-a72e-4530-a1eb-a0420c53e551',
|
||||
standardId: '20202020-dd3f-42d5-a382-db58aabf43d3',
|
||||
objectMetadataId: 'e6996bbf-dd41-423a-9324-8546f5b22fa7',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'noteTargets',
|
||||
label: 'Notes',
|
||||
defaultValue: null,
|
||||
description: 'Notes tied to the opportunity',
|
||||
icon: 'IconNotes',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
rocket: getFlatFieldMetadataMock({
|
||||
id: '4212b3d7-dd9f-4da9-85f7-2fa69a42296f',
|
||||
@@ -348,31 +344,30 @@ export const NOTETARGET_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: 'c91376fb-20bd-47c7-8922-b64f7db51cfa',
|
||||
relationTargetObjectMetadataId: 'd78ec657-74a4-4652-a350-1f44ff62970a',
|
||||
universalIdentifier: '20202020-52b6-4d5e-8f21-ed8b7c09c4a9',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: 'c91376fb-20bd-47c7-8922-b64f7db51cfa',
|
||||
standardId: '20202020-01fd-4f37-99dc-9427a444018a',
|
||||
objectMetadataId: 'd78ec657-74a4-4652-a350-1f44ff62970a',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'noteTargets',
|
||||
label: 'NoteTargets',
|
||||
defaultValue: null,
|
||||
description: 'NoteTargets tied to the Rocket',
|
||||
icon: 'IconCheckbox',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: 'c91376fb-20bd-47c7-8922-b64f7db51cfa',
|
||||
standardId: '20202020-01fd-4f37-99dc-9427a444018a',
|
||||
objectMetadataId: 'd78ec657-74a4-4652-a350-1f44ff62970a',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'noteTargets',
|
||||
label: 'NoteTargets',
|
||||
defaultValue: null,
|
||||
description: 'NoteTargets tied to the Rocket',
|
||||
icon: 'IconCheckbox',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
pet: getFlatFieldMetadataMock({
|
||||
id: 'd88d0737-e83a-47b1-b701-8edfe4a2ae2e',
|
||||
@@ -401,31 +396,30 @@ export const NOTETARGET_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '98afd46e-0259-4c87-969d-16e7e660e007',
|
||||
relationTargetObjectMetadataId: 'd34e0f07-1b8c-4de0-938e-599cf05e1f7f',
|
||||
universalIdentifier: '20202020-c54e-4804-8b0d-8795e5166432',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '98afd46e-0259-4c87-969d-16e7e660e007',
|
||||
standardId: '20202020-01fd-4f37-99dc-9427a444018a',
|
||||
objectMetadataId: 'd34e0f07-1b8c-4de0-938e-599cf05e1f7f',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'noteTargets',
|
||||
label: 'NoteTargets',
|
||||
defaultValue: null,
|
||||
description: 'NoteTargets tied to the Pet',
|
||||
icon: 'IconCheckbox',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '98afd46e-0259-4c87-969d-16e7e660e007',
|
||||
standardId: '20202020-01fd-4f37-99dc-9427a444018a',
|
||||
objectMetadataId: 'd34e0f07-1b8c-4de0-938e-599cf05e1f7f',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'noteTargets',
|
||||
label: 'NoteTargets',
|
||||
defaultValue: null,
|
||||
description: 'NoteTargets tied to the Pet',
|
||||
icon: 'IconCheckbox',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
surveyResult: getFlatFieldMetadataMock({
|
||||
id: '7f444190-cb0e-4417-9c61-e59d8969b7f7',
|
||||
@@ -454,30 +448,29 @@ export const NOTETARGET_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '1135971a-b1fa-4e63-b480-69410c6a09cd',
|
||||
relationTargetObjectMetadataId: '713da753-0340-49b5-b1fa-add34d2dc9a8',
|
||||
universalIdentifier: '20202020-75c4-4165-8146-dfdc2a76b940',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '1135971a-b1fa-4e63-b480-69410c6a09cd',
|
||||
standardId: '20202020-01fd-4f37-99dc-9427a444018a',
|
||||
objectMetadataId: '713da753-0340-49b5-b1fa-add34d2dc9a8',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'noteTargets',
|
||||
label: 'NoteTargets',
|
||||
defaultValue: null,
|
||||
description: 'NoteTargets tied to the Survey result',
|
||||
icon: 'IconCheckbox',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: '7f444190-cb0e-4417-9c61-e59d8969b7f7',
|
||||
relationTargetObjectMetadataId: '12e3cb51-c3de-4192-b0d5-965d48d001c0',
|
||||
universalIdentifier: '20202020-01fd-4f37-99dc-9427a444018a',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '1135971a-b1fa-4e63-b480-69410c6a09cd',
|
||||
standardId: '20202020-01fd-4f37-99dc-9427a444018a',
|
||||
objectMetadataId: '713da753-0340-49b5-b1fa-add34d2dc9a8',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'noteTargets',
|
||||
label: 'NoteTargets',
|
||||
defaultValue: null,
|
||||
description: 'NoteTargets tied to the Survey result',
|
||||
icon: 'IconCheckbox',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: '7f444190-cb0e-4417-9c61-e59d8969b7f7',
|
||||
relationTargetObjectMetadataId: '12e3cb51-c3de-4192-b0d5-965d48d001c0',
|
||||
universalIdentifier: '20202020-01fd-4f37-99dc-9427a444018a',
|
||||
}),
|
||||
}),
|
||||
} as const satisfies Record<string, FlatFieldMetadata>;
|
||||
|
||||
+190
-197
@@ -4,7 +4,7 @@ import { DateDisplayFormat } from 'src/engine/metadata-modules/field-metadata/in
|
||||
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 { getMorphOrRelationTargetFlatFieldMetadataMock } from 'src/engine/metadata-modules/flat-field-metadata/__mocks__/get-morph-or-relation-target-flat-field-metadata-mock';
|
||||
import { getRelationTargetFlatFieldMetadataMock } from 'src/engine/metadata-modules/flat-field-metadata/__mocks__/get-morph-or-relation-target-flat-field-metadata-mock';
|
||||
import { type FlatFieldMetadata } from 'src/engine/metadata-modules/flat-field-metadata/types/flat-field-metadata.type';
|
||||
import { RelationOnDeleteAction } from 'src/engine/metadata-modules/relation-metadata/relation-on-delete-action.type';
|
||||
|
||||
@@ -351,32 +351,31 @@ export const OPPORTUNITY_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '7580c1b1-e8f9-480b-bd41-38b20df35777',
|
||||
relationTargetObjectMetadataId: '843e0b67-9619-4628-91c4-2fa62256a611',
|
||||
universalIdentifier: '20202020-8dfb-42fc-92b6-01afb759ed16',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '7580c1b1-e8f9-480b-bd41-38b20df35777',
|
||||
standardId: '20202020-911b-4a7d-b67b-918aa9a5b33a',
|
||||
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',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '7580c1b1-e8f9-480b-bd41-38b20df35777',
|
||||
standardId: '20202020-911b-4a7d-b67b-918aa9a5b33a',
|
||||
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',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
company: getFlatFieldMetadataMock({
|
||||
id: '512890f1-4da0-4b96-bb71-5ccabefb82e7',
|
||||
@@ -405,31 +404,30 @@ export const OPPORTUNITY_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '3eda8c8e-74e4-401f-bb0e-470db5b267e6',
|
||||
relationTargetObjectMetadataId: '7f5c2c7a-bb23-46fb-b59d-9b7a52a8d1cc',
|
||||
universalIdentifier: '20202020-cbac-457e-b565-adece5fc815f',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '3eda8c8e-74e4-401f-bb0e-470db5b267e6',
|
||||
standardId: '20202020-add3-4658-8e23-d70dccb6d0ec',
|
||||
objectMetadataId: '7f5c2c7a-bb23-46fb-b59d-9b7a52a8d1cc',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'opportunities',
|
||||
label: 'Opportunities',
|
||||
defaultValue: null,
|
||||
description: 'Opportunities linked to the company.',
|
||||
icon: 'IconTargetArrow',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '3eda8c8e-74e4-401f-bb0e-470db5b267e6',
|
||||
standardId: '20202020-add3-4658-8e23-d70dccb6d0ec',
|
||||
objectMetadataId: '7f5c2c7a-bb23-46fb-b59d-9b7a52a8d1cc',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'opportunities',
|
||||
label: 'Opportunities',
|
||||
defaultValue: null,
|
||||
description: 'Opportunities linked to the company.',
|
||||
icon: 'IconTargetArrow',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
favorites: getFlatFieldMetadataMock({
|
||||
id: '87bb9924-a1cc-4357-9c8a-52141dabf266',
|
||||
@@ -454,35 +452,34 @@ export const OPPORTUNITY_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '6380cf8e-4327-4d1e-ad21-1826ce4ecf05',
|
||||
relationTargetObjectMetadataId: 'f4749ffb-dde8-44ff-8b01-d3fc82df0ba2',
|
||||
universalIdentifier: '20202020-a1c2-4500-aaae-83ba8a0e827a',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '6380cf8e-4327-4d1e-ad21-1826ce4ecf05',
|
||||
standardId: '20202020-dabc-48e1-8318-2781a2b32aa2',
|
||||
objectMetadataId: 'f4749ffb-dde8-44ff-8b01-d3fc82df0ba2',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'opportunity',
|
||||
label: 'Opportunity',
|
||||
defaultValue: null,
|
||||
description: 'Favorite opportunity',
|
||||
icon: 'IconTargetArrow',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'opportunityId',
|
||||
},
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '87bb9924-a1cc-4357-9c8a-52141dabf266',
|
||||
relationTargetObjectMetadataId: 'e6996bbf-dd41-423a-9324-8546f5b22fa7',
|
||||
universalIdentifier: '20202020-dabc-48e1-8318-2781a2b32aa2',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '6380cf8e-4327-4d1e-ad21-1826ce4ecf05',
|
||||
standardId: '20202020-dabc-48e1-8318-2781a2b32aa2',
|
||||
objectMetadataId: 'f4749ffb-dde8-44ff-8b01-d3fc82df0ba2',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'opportunity',
|
||||
label: 'Opportunity',
|
||||
defaultValue: null,
|
||||
description: 'Favorite opportunity',
|
||||
icon: 'IconTargetArrow',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'opportunityId',
|
||||
},
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '87bb9924-a1cc-4357-9c8a-52141dabf266',
|
||||
relationTargetObjectMetadataId: 'e6996bbf-dd41-423a-9324-8546f5b22fa7',
|
||||
universalIdentifier: '20202020-dabc-48e1-8318-2781a2b32aa2',
|
||||
}),
|
||||
}),
|
||||
taskTargets: getFlatFieldMetadataMock({
|
||||
id: 'c0c9f9ac-0d40-4206-90e5-0d1e14f8a09f',
|
||||
@@ -507,35 +504,34 @@ export const OPPORTUNITY_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '49afc8d8-dde3-4d19-aa6b-bd16a751b114',
|
||||
relationTargetObjectMetadataId: 'bb2b29b8-7f46-4106-a8ae-3a32df9c9166',
|
||||
universalIdentifier: '20202020-59c0-4179-a208-4a255f04a5be',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '49afc8d8-dde3-4d19-aa6b-bd16a751b114',
|
||||
standardId: '20202020-6cb2-4c01-a9a5-aca3dbc11d41',
|
||||
objectMetadataId: 'bb2b29b8-7f46-4106-a8ae-3a32df9c9166',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'opportunity',
|
||||
label: 'Opportunity',
|
||||
defaultValue: null,
|
||||
description: 'TaskTarget opportunity',
|
||||
icon: 'IconTargetArrow',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'opportunityId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '49afc8d8-dde3-4d19-aa6b-bd16a751b114',
|
||||
standardId: '20202020-6cb2-4c01-a9a5-aca3dbc11d41',
|
||||
objectMetadataId: 'bb2b29b8-7f46-4106-a8ae-3a32df9c9166',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'opportunity',
|
||||
label: 'Opportunity',
|
||||
defaultValue: null,
|
||||
description: 'TaskTarget opportunity',
|
||||
icon: 'IconTargetArrow',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'opportunityId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
noteTargets: getFlatFieldMetadataMock({
|
||||
id: '36210a54-a72e-4530-a1eb-a0420c53e551',
|
||||
@@ -560,35 +556,34 @@ export const OPPORTUNITY_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: 'f42eac2a-8d99-4259-b69a-549abd553eda',
|
||||
relationTargetObjectMetadataId: '12e3cb51-c3de-4192-b0d5-965d48d001c0',
|
||||
universalIdentifier: '20202020-dd3f-42d5-a382-db58aabf43d3',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: 'f42eac2a-8d99-4259-b69a-549abd553eda',
|
||||
standardId: '20202020-4e42-417a-a705-76581c9ade79',
|
||||
objectMetadataId: '12e3cb51-c3de-4192-b0d5-965d48d001c0',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'opportunity',
|
||||
label: 'Opportunity',
|
||||
defaultValue: null,
|
||||
description: 'NoteTarget opportunity',
|
||||
icon: 'IconTargetArrow',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'opportunityId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: 'f42eac2a-8d99-4259-b69a-549abd553eda',
|
||||
standardId: '20202020-4e42-417a-a705-76581c9ade79',
|
||||
objectMetadataId: '12e3cb51-c3de-4192-b0d5-965d48d001c0',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'opportunity',
|
||||
label: 'Opportunity',
|
||||
defaultValue: null,
|
||||
description: 'NoteTarget opportunity',
|
||||
icon: 'IconTargetArrow',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'opportunityId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
attachments: getFlatFieldMetadataMock({
|
||||
id: '16515578-a6ce-48af-a303-2005bb8492f0',
|
||||
@@ -613,35 +608,34 @@ export const OPPORTUNITY_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: 'da72fbe2-a5aa-42b5-b6bd-482a3919eb20',
|
||||
relationTargetObjectMetadataId: '819ed5ff-312f-4423-8e95-02a691cf5c27',
|
||||
universalIdentifier: '20202020-87c7-4118-83d6-2f4031005209',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: 'da72fbe2-a5aa-42b5-b6bd-482a3919eb20',
|
||||
standardId: '20202020-7374-499d-bea3-9354890755b5',
|
||||
objectMetadataId: '819ed5ff-312f-4423-8e95-02a691cf5c27',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'opportunity',
|
||||
label: 'Opportunity',
|
||||
defaultValue: null,
|
||||
description: 'Attachment opportunity',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'opportunityId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: 'da72fbe2-a5aa-42b5-b6bd-482a3919eb20',
|
||||
standardId: '20202020-7374-499d-bea3-9354890755b5',
|
||||
objectMetadataId: '819ed5ff-312f-4423-8e95-02a691cf5c27',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'opportunity',
|
||||
label: 'Opportunity',
|
||||
defaultValue: null,
|
||||
description: 'Attachment opportunity',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'opportunityId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
timelineActivities: getFlatFieldMetadataMock({
|
||||
id: '7826944b-3b21-4448-892e-5a2a68161313',
|
||||
@@ -666,34 +660,33 @@ export const OPPORTUNITY_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '026cbaa7-860c-4ed4-b878-8d78849e6c28',
|
||||
relationTargetObjectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
universalIdentifier: '20202020-30e2-421f-96c7-19c69d1cf631',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '026cbaa7-860c-4ed4-b878-8d78849e6c28',
|
||||
standardId: '20202020-7664-4a35-a3df-580d389fd527',
|
||||
objectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'opportunity',
|
||||
label: 'Opportunity',
|
||||
defaultValue: null,
|
||||
description: 'Event opportunity',
|
||||
icon: 'IconTargetArrow',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.SET_NULL,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'opportunityId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '026cbaa7-860c-4ed4-b878-8d78849e6c28',
|
||||
standardId: '20202020-7664-4a35-a3df-580d389fd527',
|
||||
objectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'opportunity',
|
||||
label: 'Opportunity',
|
||||
defaultValue: null,
|
||||
description: 'Event opportunity',
|
||||
icon: 'IconTargetArrow',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.SET_NULL,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'opportunityId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
} as const satisfies Record<string, FlatFieldMetadata>;
|
||||
|
||||
+249
-258
@@ -4,7 +4,7 @@ import { DateDisplayFormat } from 'src/engine/metadata-modules/field-metadata/in
|
||||
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 { getMorphOrRelationTargetFlatFieldMetadataMock } from 'src/engine/metadata-modules/flat-field-metadata/__mocks__/get-morph-or-relation-target-flat-field-metadata-mock';
|
||||
import { getRelationTargetFlatFieldMetadataMock } from 'src/engine/metadata-modules/flat-field-metadata/__mocks__/get-morph-or-relation-target-flat-field-metadata-mock';
|
||||
import { type FlatFieldMetadata } from 'src/engine/metadata-modules/flat-field-metadata/types/flat-field-metadata.type';
|
||||
import { RelationOnDeleteAction } from 'src/engine/metadata-modules/relation-metadata/relation-on-delete-action.type';
|
||||
|
||||
@@ -428,31 +428,30 @@ export const PERSON_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: 'b0563539-f027-40c5-a14c-ee7a25ff6fd9',
|
||||
relationTargetObjectMetadataId: '7f5c2c7a-bb23-46fb-b59d-9b7a52a8d1cc',
|
||||
universalIdentifier: '20202020-e2f3-448e-b34c-2d625f0025fd',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: 'b0563539-f027-40c5-a14c-ee7a25ff6fd9',
|
||||
standardId: '20202020-3213-4ddf-9494-6422bcff8d7c',
|
||||
objectMetadataId: '7f5c2c7a-bb23-46fb-b59d-9b7a52a8d1cc',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'people',
|
||||
label: 'People',
|
||||
defaultValue: null,
|
||||
description: 'People linked to the company.',
|
||||
icon: 'IconUsers',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: 'b0563539-f027-40c5-a14c-ee7a25ff6fd9',
|
||||
standardId: '20202020-3213-4ddf-9494-6422bcff8d7c',
|
||||
objectMetadataId: '7f5c2c7a-bb23-46fb-b59d-9b7a52a8d1cc',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'people',
|
||||
label: 'People',
|
||||
defaultValue: null,
|
||||
description: 'People linked to the company.',
|
||||
icon: 'IconUsers',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
pointOfContactForOpportunities: getFlatFieldMetadataMock({
|
||||
id: '7580c1b1-e8f9-480b-bd41-38b20df35777',
|
||||
@@ -478,35 +477,34 @@ export const PERSON_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '0e55bf63-1ffb-4f74-89f2-edd5a6a6686c',
|
||||
relationTargetObjectMetadataId: 'e6996bbf-dd41-423a-9324-8546f5b22fa7',
|
||||
universalIdentifier: '20202020-911b-4a7d-b67b-918aa9a5b33a',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '0e55bf63-1ffb-4f74-89f2-edd5a6a6686c',
|
||||
standardId: '20202020-8dfb-42fc-92b6-01afb759ed16',
|
||||
objectMetadataId: 'e6996bbf-dd41-423a-9324-8546f5b22fa7',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'pointOfContact',
|
||||
label: 'Point of Contact',
|
||||
defaultValue: null,
|
||||
description: 'Opportunity point of contact',
|
||||
icon: 'IconUser',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.SET_NULL,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'pointOfContactId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '0e55bf63-1ffb-4f74-89f2-edd5a6a6686c',
|
||||
standardId: '20202020-8dfb-42fc-92b6-01afb759ed16',
|
||||
objectMetadataId: 'e6996bbf-dd41-423a-9324-8546f5b22fa7',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'pointOfContact',
|
||||
label: 'Point of Contact',
|
||||
defaultValue: null,
|
||||
description: 'Opportunity point of contact',
|
||||
icon: 'IconUser',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.SET_NULL,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'pointOfContactId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
taskTargets: getFlatFieldMetadataMock({
|
||||
id: '9609ca31-215e-47fd-9b3b-ab200acb2fa8',
|
||||
@@ -531,35 +529,34 @@ export const PERSON_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '64225f87-96c4-4846-9462-e7aa3ad9e182',
|
||||
relationTargetObjectMetadataId: 'bb2b29b8-7f46-4106-a8ae-3a32df9c9166',
|
||||
universalIdentifier: '20202020-584b-4d3e-88b6-53ab1fa03c3a',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '64225f87-96c4-4846-9462-e7aa3ad9e182',
|
||||
standardId: '20202020-c8a0-4e85-a016-87e2349cfbec',
|
||||
objectMetadataId: 'bb2b29b8-7f46-4106-a8ae-3a32df9c9166',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'person',
|
||||
label: 'Person',
|
||||
defaultValue: null,
|
||||
description: 'TaskTarget person',
|
||||
icon: 'IconUser',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'personId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '64225f87-96c4-4846-9462-e7aa3ad9e182',
|
||||
standardId: '20202020-c8a0-4e85-a016-87e2349cfbec',
|
||||
objectMetadataId: 'bb2b29b8-7f46-4106-a8ae-3a32df9c9166',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'person',
|
||||
label: 'Person',
|
||||
defaultValue: null,
|
||||
description: 'TaskTarget person',
|
||||
icon: 'IconUser',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'personId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
noteTargets: getFlatFieldMetadataMock({
|
||||
id: '60388ed8-45f6-4fb5-8752-81c73e13f4ab',
|
||||
@@ -584,35 +581,34 @@ export const PERSON_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '560c71ff-254f-4baf-a4d1-054c53444f41',
|
||||
relationTargetObjectMetadataId: '12e3cb51-c3de-4192-b0d5-965d48d001c0',
|
||||
universalIdentifier: '20202020-c8fc-4258-8250-15905d3fcfec',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '560c71ff-254f-4baf-a4d1-054c53444f41',
|
||||
standardId: '20202020-38ca-4aab-92f5-8a605ca2e4c5',
|
||||
objectMetadataId: '12e3cb51-c3de-4192-b0d5-965d48d001c0',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'person',
|
||||
label: 'Person',
|
||||
defaultValue: null,
|
||||
description: 'NoteTarget person',
|
||||
icon: 'IconUser',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'personId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '560c71ff-254f-4baf-a4d1-054c53444f41',
|
||||
standardId: '20202020-38ca-4aab-92f5-8a605ca2e4c5',
|
||||
objectMetadataId: '12e3cb51-c3de-4192-b0d5-965d48d001c0',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'person',
|
||||
label: 'Person',
|
||||
defaultValue: null,
|
||||
description: 'NoteTarget person',
|
||||
icon: 'IconUser',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'personId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
favorites: getFlatFieldMetadataMock({
|
||||
id: 'a1a72bee-1c15-4598-ba23-67ba8e3e505d',
|
||||
@@ -637,35 +633,34 @@ export const PERSON_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '013cec20-e9cc-42db-b9b9-ff6bd0f52abd',
|
||||
relationTargetObjectMetadataId: 'f4749ffb-dde8-44ff-8b01-d3fc82df0ba2',
|
||||
universalIdentifier: '20202020-4073-4117-9cf1-203bcdc91cbd',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '013cec20-e9cc-42db-b9b9-ff6bd0f52abd',
|
||||
standardId: '20202020-c428-4f40-b6f3-86091511c41c',
|
||||
objectMetadataId: 'f4749ffb-dde8-44ff-8b01-d3fc82df0ba2',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'person',
|
||||
label: 'Person',
|
||||
defaultValue: null,
|
||||
description: 'Favorite person',
|
||||
icon: 'IconUser',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'personId',
|
||||
},
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: 'a1a72bee-1c15-4598-ba23-67ba8e3e505d',
|
||||
relationTargetObjectMetadataId: '843e0b67-9619-4628-91c4-2fa62256a611',
|
||||
universalIdentifier: '20202020-c428-4f40-b6f3-86091511c41c',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '013cec20-e9cc-42db-b9b9-ff6bd0f52abd',
|
||||
standardId: '20202020-c428-4f40-b6f3-86091511c41c',
|
||||
objectMetadataId: 'f4749ffb-dde8-44ff-8b01-d3fc82df0ba2',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'person',
|
||||
label: 'Person',
|
||||
defaultValue: null,
|
||||
description: 'Favorite person',
|
||||
icon: 'IconUser',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'personId',
|
||||
},
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: 'a1a72bee-1c15-4598-ba23-67ba8e3e505d',
|
||||
relationTargetObjectMetadataId: '843e0b67-9619-4628-91c4-2fa62256a611',
|
||||
universalIdentifier: '20202020-c428-4f40-b6f3-86091511c41c',
|
||||
}),
|
||||
}),
|
||||
attachments: getFlatFieldMetadataMock({
|
||||
id: '367ad117-de09-466c-94f8-ce99d951b5ce',
|
||||
@@ -690,35 +685,34 @@ export const PERSON_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '6938c2ec-ebcc-4f30-8d38-2c9c40228c53',
|
||||
relationTargetObjectMetadataId: '819ed5ff-312f-4423-8e95-02a691cf5c27',
|
||||
universalIdentifier: '20202020-cd97-451f-87fa-bcb789bdbf3a',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '6938c2ec-ebcc-4f30-8d38-2c9c40228c53',
|
||||
standardId: '20202020-0158-4aa2-965c-5cdafe21ffa2',
|
||||
objectMetadataId: '819ed5ff-312f-4423-8e95-02a691cf5c27',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'person',
|
||||
label: 'Person',
|
||||
defaultValue: null,
|
||||
description: 'Attachment person',
|
||||
icon: 'IconUser',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'personId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '6938c2ec-ebcc-4f30-8d38-2c9c40228c53',
|
||||
standardId: '20202020-0158-4aa2-965c-5cdafe21ffa2',
|
||||
objectMetadataId: '819ed5ff-312f-4423-8e95-02a691cf5c27',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'person',
|
||||
label: 'Person',
|
||||
defaultValue: null,
|
||||
description: 'Attachment person',
|
||||
icon: 'IconUser',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'personId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
messageParticipants: getFlatFieldMetadataMock({
|
||||
id: '22dcab3c-939c-4b8d-bd7c-4c4d58588460',
|
||||
@@ -743,35 +737,34 @@ export const PERSON_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: 'e95d7d1a-9101-4048-b019-d2f8bc110328',
|
||||
relationTargetObjectMetadataId: 'edb170fd-a0c2-4619-b1a9-293cf07437c4',
|
||||
universalIdentifier: '20202020-498e-4c61-8158-fa04f0638334',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: 'e95d7d1a-9101-4048-b019-d2f8bc110328',
|
||||
standardId: '20202020-249d-4e0f-82cd-1b9df5cd3da2',
|
||||
objectMetadataId: 'edb170fd-a0c2-4619-b1a9-293cf07437c4',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'person',
|
||||
label: 'Person',
|
||||
defaultValue: null,
|
||||
description: 'Person',
|
||||
icon: 'IconUser',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.SET_NULL,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'personId',
|
||||
},
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '22dcab3c-939c-4b8d-bd7c-4c4d58588460',
|
||||
relationTargetObjectMetadataId: '843e0b67-9619-4628-91c4-2fa62256a611',
|
||||
universalIdentifier: '20202020-249d-4e0f-82cd-1b9df5cd3da2',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: 'e95d7d1a-9101-4048-b019-d2f8bc110328',
|
||||
standardId: '20202020-249d-4e0f-82cd-1b9df5cd3da2',
|
||||
objectMetadataId: 'edb170fd-a0c2-4619-b1a9-293cf07437c4',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'person',
|
||||
label: 'Person',
|
||||
defaultValue: null,
|
||||
description: 'Person',
|
||||
icon: 'IconUser',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.SET_NULL,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'personId',
|
||||
},
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '22dcab3c-939c-4b8d-bd7c-4c4d58588460',
|
||||
relationTargetObjectMetadataId: '843e0b67-9619-4628-91c4-2fa62256a611',
|
||||
universalIdentifier: '20202020-249d-4e0f-82cd-1b9df5cd3da2',
|
||||
}),
|
||||
}),
|
||||
calendarEventParticipants: getFlatFieldMetadataMock({
|
||||
id: '9e82a873-2988-4d9d-af04-81f2d947f4ec',
|
||||
@@ -796,35 +789,34 @@ export const PERSON_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: 'e39f443d-3282-47a3-a24d-47ed604d58be',
|
||||
relationTargetObjectMetadataId: 'a4c662b6-e08d-40a5-ae55-82ed8f4edf78',
|
||||
universalIdentifier: '20202020-52ee-45e9-a702-b64b3753e3a9',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: 'e39f443d-3282-47a3-a24d-47ed604d58be',
|
||||
standardId: '20202020-5761-4842-8186-e1898ef93966',
|
||||
objectMetadataId: 'a4c662b6-e08d-40a5-ae55-82ed8f4edf78',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'person',
|
||||
label: 'Person',
|
||||
defaultValue: null,
|
||||
description: 'Person',
|
||||
icon: 'IconUser',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.SET_NULL,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'personId',
|
||||
},
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '9e82a873-2988-4d9d-af04-81f2d947f4ec',
|
||||
relationTargetObjectMetadataId: '843e0b67-9619-4628-91c4-2fa62256a611',
|
||||
universalIdentifier: '20202020-5761-4842-8186-e1898ef93966',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: 'e39f443d-3282-47a3-a24d-47ed604d58be',
|
||||
standardId: '20202020-5761-4842-8186-e1898ef93966',
|
||||
objectMetadataId: 'a4c662b6-e08d-40a5-ae55-82ed8f4edf78',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'person',
|
||||
label: 'Person',
|
||||
defaultValue: null,
|
||||
description: 'Person',
|
||||
icon: 'IconUser',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.SET_NULL,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'personId',
|
||||
},
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '9e82a873-2988-4d9d-af04-81f2d947f4ec',
|
||||
relationTargetObjectMetadataId: '843e0b67-9619-4628-91c4-2fa62256a611',
|
||||
universalIdentifier: '20202020-5761-4842-8186-e1898ef93966',
|
||||
}),
|
||||
}),
|
||||
timelineActivities: getFlatFieldMetadataMock({
|
||||
id: 'b1457347-545b-4a42-9c68-bc655952229a',
|
||||
@@ -849,35 +841,34 @@ export const PERSON_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: 'dbd02754-4bef-4149-b39d-54759983ab47',
|
||||
relationTargetObjectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
universalIdentifier: '20202020-a43e-4873-9c23-e522de906ce5',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: 'dbd02754-4bef-4149-b39d-54759983ab47',
|
||||
standardId: '20202020-c414-45b9-a60a-ac27aa96229f',
|
||||
objectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'person',
|
||||
label: 'Person',
|
||||
defaultValue: null,
|
||||
description: 'Event person',
|
||||
icon: 'IconUser',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'personId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: 'dbd02754-4bef-4149-b39d-54759983ab47',
|
||||
standardId: '20202020-c414-45b9-a60a-ac27aa96229f',
|
||||
objectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'person',
|
||||
label: 'Person',
|
||||
defaultValue: null,
|
||||
description: 'Event person',
|
||||
icon: 'IconUser',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'personId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
intro: getFlatFieldMetadataMock({
|
||||
id: '94c95bfa-88bc-4271-87c2-08e6df084a15',
|
||||
|
||||
+141
-146
@@ -3,7 +3,7 @@ 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 { getMorphOrRelationTargetFlatFieldMetadataMock } from 'src/engine/metadata-modules/flat-field-metadata/__mocks__/get-morph-or-relation-target-flat-field-metadata-mock';
|
||||
import { getRelationTargetFlatFieldMetadataMock } from 'src/engine/metadata-modules/flat-field-metadata/__mocks__/get-morph-or-relation-target-flat-field-metadata-mock';
|
||||
import { type FlatFieldMetadata } from 'src/engine/metadata-modules/flat-field-metadata/types/flat-field-metadata.type';
|
||||
import { RelationOnDeleteAction } from 'src/engine/metadata-modules/relation-metadata/relation-on-delete-action.type';
|
||||
|
||||
@@ -31,35 +31,34 @@ export const PET_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: 'd88d0737-e83a-47b1-b701-8edfe4a2ae2e',
|
||||
relationTargetObjectMetadataId: '12e3cb51-c3de-4192-b0d5-965d48d001c0',
|
||||
universalIdentifier: '20202020-01fd-4f37-99dc-9427a444018a',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: 'd88d0737-e83a-47b1-b701-8edfe4a2ae2e',
|
||||
standardId: '20202020-c54e-4804-8b0d-8795e5166432',
|
||||
objectMetadataId: '12e3cb51-c3de-4192-b0d5-965d48d001c0',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'pet',
|
||||
label: 'Pet',
|
||||
defaultValue: null,
|
||||
description: 'NoteTargets Pet',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'petId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: 'd88d0737-e83a-47b1-b701-8edfe4a2ae2e',
|
||||
standardId: '20202020-c54e-4804-8b0d-8795e5166432',
|
||||
objectMetadataId: '12e3cb51-c3de-4192-b0d5-965d48d001c0',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'pet',
|
||||
label: 'Pet',
|
||||
defaultValue: null,
|
||||
description: 'NoteTargets Pet',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'petId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
id: getFlatFieldMetadataMock({
|
||||
id: 'ce25501a-1cc6-44c5-9158-b602db0efaca',
|
||||
@@ -259,35 +258,34 @@ export const PET_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '3cb86390-4ee7-42fa-bd1e-bd6326b47610',
|
||||
relationTargetObjectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
universalIdentifier: '20202020-f1ef-4ba4-8f33-1a4577afa477',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '3cb86390-4ee7-42fa-bd1e-bd6326b47610',
|
||||
standardId: '20202020-d88f-4020-8c85-d6c600903762',
|
||||
objectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'pet',
|
||||
label: 'Pet',
|
||||
defaultValue: null,
|
||||
description: 'TimelineActivities Pet',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'petId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '3cb86390-4ee7-42fa-bd1e-bd6326b47610',
|
||||
standardId: '20202020-d88f-4020-8c85-d6c600903762',
|
||||
objectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'pet',
|
||||
label: 'Pet',
|
||||
defaultValue: null,
|
||||
description: 'TimelineActivities Pet',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'petId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
favorites: getFlatFieldMetadataMock({
|
||||
id: '80bc4e7a-6bd1-4f2b-98b1-6333c631cc1a',
|
||||
@@ -312,35 +310,34 @@ export const PET_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: 'd34b4048-bf0c-4c61-8ffe-59f1838a2cc4',
|
||||
relationTargetObjectMetadataId: 'f4749ffb-dde8-44ff-8b01-d3fc82df0ba2',
|
||||
universalIdentifier: '20202020-a4a7-4686-b296-1c6c3482ee21',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: 'd34b4048-bf0c-4c61-8ffe-59f1838a2cc4',
|
||||
standardId: '20202020-1bd7-4d10-80dc-968b9f5d1a8a',
|
||||
objectMetadataId: 'f4749ffb-dde8-44ff-8b01-d3fc82df0ba2',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'pet',
|
||||
label: 'Pet',
|
||||
defaultValue: null,
|
||||
description: 'Favorites Pet',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'petId',
|
||||
},
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: '80bc4e7a-6bd1-4f2b-98b1-6333c631cc1a',
|
||||
relationTargetObjectMetadataId: 'd34e0f07-1b8c-4de0-938e-599cf05e1f7f',
|
||||
universalIdentifier: '20202020-1bd7-4d10-80dc-968b9f5d1a8a',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: 'd34b4048-bf0c-4c61-8ffe-59f1838a2cc4',
|
||||
standardId: '20202020-1bd7-4d10-80dc-968b9f5d1a8a',
|
||||
objectMetadataId: 'f4749ffb-dde8-44ff-8b01-d3fc82df0ba2',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'pet',
|
||||
label: 'Pet',
|
||||
defaultValue: null,
|
||||
description: 'Favorites Pet',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'petId',
|
||||
},
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: '80bc4e7a-6bd1-4f2b-98b1-6333c631cc1a',
|
||||
relationTargetObjectMetadataId: 'd34e0f07-1b8c-4de0-938e-599cf05e1f7f',
|
||||
universalIdentifier: '20202020-1bd7-4d10-80dc-968b9f5d1a8a',
|
||||
}),
|
||||
}),
|
||||
attachments: getFlatFieldMetadataMock({
|
||||
id: '231903d0-3b14-47ed-9a88-fbf11031c451',
|
||||
@@ -365,35 +362,34 @@ export const PET_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '317a33ef-117e-4953-86d4-c4a9670a2ce3',
|
||||
relationTargetObjectMetadataId: '819ed5ff-312f-4423-8e95-02a691cf5c27',
|
||||
universalIdentifier: '20202020-8d59-46ca-b7b2-73d167712134',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '317a33ef-117e-4953-86d4-c4a9670a2ce3',
|
||||
standardId: '20202020-b715-4658-8b6a-5359824dbddd',
|
||||
objectMetadataId: '819ed5ff-312f-4423-8e95-02a691cf5c27',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'pet',
|
||||
label: 'Pet',
|
||||
defaultValue: null,
|
||||
description: 'Attachments Pet',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'petId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '317a33ef-117e-4953-86d4-c4a9670a2ce3',
|
||||
standardId: '20202020-b715-4658-8b6a-5359824dbddd',
|
||||
objectMetadataId: '819ed5ff-312f-4423-8e95-02a691cf5c27',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'pet',
|
||||
label: 'Pet',
|
||||
defaultValue: null,
|
||||
description: 'Attachments Pet',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'petId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
taskTargets: getFlatFieldMetadataMock({
|
||||
id: '3cae8259-ece8-4b81-9044-f5abae5ff25c',
|
||||
@@ -418,35 +414,34 @@ export const PET_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '3955a4b4-1c10-4ce8-a92e-98e727ee7aec',
|
||||
relationTargetObjectMetadataId: 'bb2b29b8-7f46-4106-a8ae-3a32df9c9166',
|
||||
universalIdentifier: '20202020-0860-4566-b865-bff3c626c303',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '3955a4b4-1c10-4ce8-a92e-98e727ee7aec',
|
||||
standardId: '20202020-07d9-4d04-8b73-a39ab65943f1',
|
||||
objectMetadataId: 'bb2b29b8-7f46-4106-a8ae-3a32df9c9166',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'pet',
|
||||
label: 'Pet',
|
||||
defaultValue: null,
|
||||
description: 'TaskTargets Pet',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'petId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '3955a4b4-1c10-4ce8-a92e-98e727ee7aec',
|
||||
standardId: '20202020-07d9-4d04-8b73-a39ab65943f1',
|
||||
objectMetadataId: 'bb2b29b8-7f46-4106-a8ae-3a32df9c9166',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'pet',
|
||||
label: 'Pet',
|
||||
defaultValue: null,
|
||||
description: 'TaskTargets Pet',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'petId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
searchVector: getFlatFieldMetadataMock({
|
||||
id: '0db37175-e573-43e4-bd83-fa71923fde0c',
|
||||
|
||||
+141
-146
@@ -3,7 +3,7 @@ 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 { getMorphOrRelationTargetFlatFieldMetadataMock } from 'src/engine/metadata-modules/flat-field-metadata/__mocks__/get-morph-or-relation-target-flat-field-metadata-mock';
|
||||
import { getRelationTargetFlatFieldMetadataMock } from 'src/engine/metadata-modules/flat-field-metadata/__mocks__/get-morph-or-relation-target-flat-field-metadata-mock';
|
||||
import { type FlatFieldMetadata } from 'src/engine/metadata-modules/flat-field-metadata/types/flat-field-metadata.type';
|
||||
import { RelationOnDeleteAction } from 'src/engine/metadata-modules/relation-metadata/relation-on-delete-action.type';
|
||||
|
||||
@@ -206,35 +206,34 @@ export const ROCKET_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: 'eebb9590-817b-4a51-88f7-9792aa8e0a59',
|
||||
relationTargetObjectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
universalIdentifier: '20202020-f1ef-4ba4-8f33-1a4577afa477',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: 'eebb9590-817b-4a51-88f7-9792aa8e0a59',
|
||||
standardId: '20202020-0be6-444e-88f0-12e0c64ac27d',
|
||||
objectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'rocket',
|
||||
label: 'Rocket',
|
||||
defaultValue: null,
|
||||
description: 'TimelineActivities Rocket',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'rocketId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: 'eebb9590-817b-4a51-88f7-9792aa8e0a59',
|
||||
standardId: '20202020-0be6-444e-88f0-12e0c64ac27d',
|
||||
objectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'rocket',
|
||||
label: 'Rocket',
|
||||
defaultValue: null,
|
||||
description: 'TimelineActivities Rocket',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'rocketId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
favorites: getFlatFieldMetadataMock({
|
||||
id: '14010360-f3c2-442e-b05f-43c30158f246',
|
||||
@@ -259,35 +258,34 @@ export const ROCKET_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '9448627d-725d-499e-a071-90fd5cfcf0ea',
|
||||
relationTargetObjectMetadataId: 'f4749ffb-dde8-44ff-8b01-d3fc82df0ba2',
|
||||
universalIdentifier: '20202020-a4a7-4686-b296-1c6c3482ee21',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '9448627d-725d-499e-a071-90fd5cfcf0ea',
|
||||
standardId: '20202020-78f7-4d7d-86e9-7562ced0b381',
|
||||
objectMetadataId: 'f4749ffb-dde8-44ff-8b01-d3fc82df0ba2',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'rocket',
|
||||
label: 'Rocket',
|
||||
defaultValue: null,
|
||||
description: 'Favorites Rocket',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'rocketId',
|
||||
},
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: '14010360-f3c2-442e-b05f-43c30158f246',
|
||||
relationTargetObjectMetadataId: 'd78ec657-74a4-4652-a350-1f44ff62970a',
|
||||
universalIdentifier: '20202020-78f7-4d7d-86e9-7562ced0b381',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '9448627d-725d-499e-a071-90fd5cfcf0ea',
|
||||
standardId: '20202020-78f7-4d7d-86e9-7562ced0b381',
|
||||
objectMetadataId: 'f4749ffb-dde8-44ff-8b01-d3fc82df0ba2',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'rocket',
|
||||
label: 'Rocket',
|
||||
defaultValue: null,
|
||||
description: 'Favorites Rocket',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'rocketId',
|
||||
},
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: '14010360-f3c2-442e-b05f-43c30158f246',
|
||||
relationTargetObjectMetadataId: 'd78ec657-74a4-4652-a350-1f44ff62970a',
|
||||
universalIdentifier: '20202020-78f7-4d7d-86e9-7562ced0b381',
|
||||
}),
|
||||
}),
|
||||
attachments: getFlatFieldMetadataMock({
|
||||
id: 'f5984acf-5128-42ac-840f-9d2888423699',
|
||||
@@ -312,35 +310,34 @@ export const ROCKET_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: 'ba23019c-7f25-42c3-8138-622e61c42968',
|
||||
relationTargetObjectMetadataId: '819ed5ff-312f-4423-8e95-02a691cf5c27',
|
||||
universalIdentifier: '20202020-8d59-46ca-b7b2-73d167712134',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: 'ba23019c-7f25-42c3-8138-622e61c42968',
|
||||
standardId: '20202020-ca2d-47c0-8253-9d0b662fb01a',
|
||||
objectMetadataId: '819ed5ff-312f-4423-8e95-02a691cf5c27',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'rocket',
|
||||
label: 'Rocket',
|
||||
defaultValue: null,
|
||||
description: 'Attachments Rocket',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'rocketId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: 'ba23019c-7f25-42c3-8138-622e61c42968',
|
||||
standardId: '20202020-ca2d-47c0-8253-9d0b662fb01a',
|
||||
objectMetadataId: '819ed5ff-312f-4423-8e95-02a691cf5c27',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'rocket',
|
||||
label: 'Rocket',
|
||||
defaultValue: null,
|
||||
description: 'Attachments Rocket',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'rocketId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
noteTargets: getFlatFieldMetadataMock({
|
||||
id: 'c91376fb-20bd-47c7-8922-b64f7db51cfa',
|
||||
@@ -365,35 +362,34 @@ export const ROCKET_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '4212b3d7-dd9f-4da9-85f7-2fa69a42296f',
|
||||
relationTargetObjectMetadataId: '12e3cb51-c3de-4192-b0d5-965d48d001c0',
|
||||
universalIdentifier: '20202020-01fd-4f37-99dc-9427a444018a',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '4212b3d7-dd9f-4da9-85f7-2fa69a42296f',
|
||||
standardId: '20202020-52b6-4d5e-8f21-ed8b7c09c4a9',
|
||||
objectMetadataId: '12e3cb51-c3de-4192-b0d5-965d48d001c0',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'rocket',
|
||||
label: 'Rocket',
|
||||
defaultValue: null,
|
||||
description: 'NoteTargets Rocket',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'rocketId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '4212b3d7-dd9f-4da9-85f7-2fa69a42296f',
|
||||
standardId: '20202020-52b6-4d5e-8f21-ed8b7c09c4a9',
|
||||
objectMetadataId: '12e3cb51-c3de-4192-b0d5-965d48d001c0',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'rocket',
|
||||
label: 'Rocket',
|
||||
defaultValue: null,
|
||||
description: 'NoteTargets Rocket',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'rocketId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
taskTargets: getFlatFieldMetadataMock({
|
||||
id: '80e3b587-69ec-48bc-a872-20105c3b7df4',
|
||||
@@ -418,35 +414,34 @@ export const ROCKET_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: 'a7e80fd8-76bc-45ed-b843-a2b87ef4d601',
|
||||
relationTargetObjectMetadataId: 'bb2b29b8-7f46-4106-a8ae-3a32df9c9166',
|
||||
universalIdentifier: '20202020-0860-4566-b865-bff3c626c303',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: 'a7e80fd8-76bc-45ed-b843-a2b87ef4d601',
|
||||
standardId: '20202020-b98f-473d-85fb-8cebc40b9a50',
|
||||
objectMetadataId: 'bb2b29b8-7f46-4106-a8ae-3a32df9c9166',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'rocket',
|
||||
label: 'Rocket',
|
||||
defaultValue: null,
|
||||
description: 'TaskTargets Rocket',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'rocketId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: 'a7e80fd8-76bc-45ed-b843-a2b87ef4d601',
|
||||
standardId: '20202020-b98f-473d-85fb-8cebc40b9a50',
|
||||
objectMetadataId: 'bb2b29b8-7f46-4106-a8ae-3a32df9c9166',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'rocket',
|
||||
label: 'Rocket',
|
||||
defaultValue: null,
|
||||
description: 'TaskTargets Rocket',
|
||||
icon: 'IconBuildingSkyscraper',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'rocketId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
searchVector: getFlatFieldMetadataMock({
|
||||
id: 'e7609ea3-5a88-4d64-b0c1-eefd4602361a',
|
||||
|
||||
+137
-142
@@ -4,7 +4,7 @@ import { DateDisplayFormat } from 'src/engine/metadata-modules/field-metadata/in
|
||||
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 { getMorphOrRelationTargetFlatFieldMetadataMock } from 'src/engine/metadata-modules/flat-field-metadata/__mocks__/get-morph-or-relation-target-flat-field-metadata-mock';
|
||||
import { getRelationTargetFlatFieldMetadataMock } from 'src/engine/metadata-modules/flat-field-metadata/__mocks__/get-morph-or-relation-target-flat-field-metadata-mock';
|
||||
import { type FlatFieldMetadata } from 'src/engine/metadata-modules/flat-field-metadata/types/flat-field-metadata.type';
|
||||
import { RelationOnDeleteAction } from 'src/engine/metadata-modules/relation-metadata/relation-on-delete-action.type';
|
||||
|
||||
@@ -333,35 +333,34 @@ export const TASK_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: 'c906885c-315a-4783-942e-6caafecf2031',
|
||||
relationTargetObjectMetadataId: 'bb2b29b8-7f46-4106-a8ae-3a32df9c9166',
|
||||
universalIdentifier: '20202020-de9c-4d0e-a452-713d4a3e5fc7',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: 'c906885c-315a-4783-942e-6caafecf2031',
|
||||
standardId: '20202020-e881-457a-8758-74aaef4ae78a',
|
||||
objectMetadataId: 'bb2b29b8-7f46-4106-a8ae-3a32df9c9166',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'task',
|
||||
label: 'Task',
|
||||
defaultValue: null,
|
||||
description: 'TaskTarget task',
|
||||
icon: 'IconCheckbox',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.SET_NULL,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'taskId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: 'c906885c-315a-4783-942e-6caafecf2031',
|
||||
standardId: '20202020-e881-457a-8758-74aaef4ae78a',
|
||||
objectMetadataId: 'bb2b29b8-7f46-4106-a8ae-3a32df9c9166',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'task',
|
||||
label: 'Task',
|
||||
defaultValue: null,
|
||||
description: 'TaskTarget task',
|
||||
icon: 'IconCheckbox',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.SET_NULL,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'taskId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
attachments: getFlatFieldMetadataMock({
|
||||
id: '00fd339a-6431-465d-9524-09b5c804f497',
|
||||
@@ -386,35 +385,34 @@ export const TASK_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: 'bd823f17-f923-4f0d-8533-51d7bc062975',
|
||||
relationTargetObjectMetadataId: '819ed5ff-312f-4423-8e95-02a691cf5c27',
|
||||
universalIdentifier: '20202020-794d-4783-a8ff-cecdb15be139',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: 'bd823f17-f923-4f0d-8533-51d7bc062975',
|
||||
standardId: '20202020-51e5-4621-9cf8-215487951c4b',
|
||||
objectMetadataId: '819ed5ff-312f-4423-8e95-02a691cf5c27',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'task',
|
||||
label: 'Task',
|
||||
defaultValue: null,
|
||||
description: 'Attachment task',
|
||||
icon: 'IconNotes',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.SET_NULL,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'taskId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: 'bd823f17-f923-4f0d-8533-51d7bc062975',
|
||||
standardId: '20202020-51e5-4621-9cf8-215487951c4b',
|
||||
objectMetadataId: '819ed5ff-312f-4423-8e95-02a691cf5c27',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'task',
|
||||
label: 'Task',
|
||||
defaultValue: null,
|
||||
description: 'Attachment task',
|
||||
icon: 'IconNotes',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.SET_NULL,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'taskId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
assignee: getFlatFieldMetadataMock({
|
||||
id: '0e18f5e1-32c3-4daa-b282-ab64fb629b20',
|
||||
@@ -443,31 +441,30 @@ export const TASK_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '68779392-f0ec-42b4-9d89-9645ae84039d',
|
||||
relationTargetObjectMetadataId: '7d8264db-2b55-4b74-81ff-b7064ed43840',
|
||||
universalIdentifier: '20202020-065a-4f42-a906-e20422c1753f',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '68779392-f0ec-42b4-9d89-9645ae84039d',
|
||||
standardId: '20202020-61dc-4a1c-99e8-38ebf8d2bbeb',
|
||||
objectMetadataId: '7d8264db-2b55-4b74-81ff-b7064ed43840',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'assignedTasks',
|
||||
label: 'Assigned tasks',
|
||||
defaultValue: null,
|
||||
description: 'Tasks assigned to the workspace member',
|
||||
icon: 'IconCheckbox',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '0e18f5e1-32c3-4daa-b282-ab64fb629b20',
|
||||
relationTargetObjectMetadataId: '3186920d-2a15-4b5f-96c7-2bf6567024b0',
|
||||
universalIdentifier: '20202020-61dc-4a1c-99e8-38ebf8d2bbeb',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '68779392-f0ec-42b4-9d89-9645ae84039d',
|
||||
standardId: '20202020-61dc-4a1c-99e8-38ebf8d2bbeb',
|
||||
objectMetadataId: '7d8264db-2b55-4b74-81ff-b7064ed43840',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'assignedTasks',
|
||||
label: 'Assigned tasks',
|
||||
defaultValue: null,
|
||||
description: 'Tasks assigned to the workspace member',
|
||||
icon: 'IconCheckbox',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '0e18f5e1-32c3-4daa-b282-ab64fb629b20',
|
||||
relationTargetObjectMetadataId: '3186920d-2a15-4b5f-96c7-2bf6567024b0',
|
||||
universalIdentifier: '20202020-61dc-4a1c-99e8-38ebf8d2bbeb',
|
||||
}),
|
||||
}),
|
||||
timelineActivities: getFlatFieldMetadataMock({
|
||||
id: '3536b3af-76a2-44f5-9d89-1961a0a0a763',
|
||||
@@ -492,35 +489,34 @@ export const TASK_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '187eaeb8-62c8-4925-815f-946b4768b786',
|
||||
relationTargetObjectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
universalIdentifier: '20202020-c778-4278-99ee-23a2837aee64',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '187eaeb8-62c8-4925-815f-946b4768b786',
|
||||
standardId: '20202020-b2f5-415c-9135-a31dfe49501b',
|
||||
objectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'task',
|
||||
label: 'Task',
|
||||
defaultValue: null,
|
||||
description: 'Event task',
|
||||
icon: 'IconTargetArrow',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.SET_NULL,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'taskId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '187eaeb8-62c8-4925-815f-946b4768b786',
|
||||
standardId: '20202020-b2f5-415c-9135-a31dfe49501b',
|
||||
objectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'task',
|
||||
label: 'Task',
|
||||
defaultValue: null,
|
||||
description: 'Event task',
|
||||
icon: 'IconTargetArrow',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.SET_NULL,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'taskId',
|
||||
},
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
favorites: getFlatFieldMetadataMock({
|
||||
id: '33e4eff0-ff0f-4530-802a-cd630481ee84',
|
||||
@@ -545,34 +541,33 @@ export const TASK_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: 'db16ab78-ea3f-4b67-93e3-6ad9ab1b7273',
|
||||
relationTargetObjectMetadataId: 'f4749ffb-dde8-44ff-8b01-d3fc82df0ba2',
|
||||
universalIdentifier: '20202020-4d1d-41ac-b13b-621631298d65',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: 'db16ab78-ea3f-4b67-93e3-6ad9ab1b7273',
|
||||
standardId: '20202020-1b1b-4b3b-8b1b-7f8d6a1d7d5c',
|
||||
objectMetadataId: 'f4749ffb-dde8-44ff-8b01-d3fc82df0ba2',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'task',
|
||||
label: 'Task',
|
||||
defaultValue: null,
|
||||
description: 'Favorite task',
|
||||
icon: 'IconCheckbox',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'taskId',
|
||||
},
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '33e4eff0-ff0f-4530-802a-cd630481ee84',
|
||||
relationTargetObjectMetadataId: '3186920d-2a15-4b5f-96c7-2bf6567024b0',
|
||||
universalIdentifier: '20202020-1b1b-4b3b-8b1b-7f8d6a1d7d5c',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: 'db16ab78-ea3f-4b67-93e3-6ad9ab1b7273',
|
||||
standardId: '20202020-1b1b-4b3b-8b1b-7f8d6a1d7d5c',
|
||||
objectMetadataId: 'f4749ffb-dde8-44ff-8b01-d3fc82df0ba2',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'task',
|
||||
label: 'Task',
|
||||
defaultValue: null,
|
||||
description: 'Favorite task',
|
||||
icon: 'IconCheckbox',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: {
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
relationType: RelationType.MANY_TO_ONE,
|
||||
joinColumnName: 'taskId',
|
||||
},
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '33e4eff0-ff0f-4530-802a-cd630481ee84',
|
||||
relationTargetObjectMetadataId: '3186920d-2a15-4b5f-96c7-2bf6567024b0',
|
||||
universalIdentifier: '20202020-1b1b-4b3b-8b1b-7f8d6a1d7d5c',
|
||||
}),
|
||||
}),
|
||||
} as const satisfies Record<string, FlatFieldMetadata>;
|
||||
|
||||
+169
-176
@@ -4,7 +4,7 @@ import { DateDisplayFormat } from 'src/engine/metadata-modules/field-metadata/in
|
||||
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 { getMorphOrRelationTargetFlatFieldMetadataMock } from 'src/engine/metadata-modules/flat-field-metadata/__mocks__/get-morph-or-relation-target-flat-field-metadata-mock';
|
||||
import { getRelationTargetFlatFieldMetadataMock } from 'src/engine/metadata-modules/flat-field-metadata/__mocks__/get-morph-or-relation-target-flat-field-metadata-mock';
|
||||
import { type FlatFieldMetadata } from 'src/engine/metadata-modules/flat-field-metadata/types/flat-field-metadata.type';
|
||||
import { RelationOnDeleteAction } from 'src/engine/metadata-modules/relation-metadata/relation-on-delete-action.type';
|
||||
|
||||
@@ -136,31 +136,30 @@ export const TASKTARGET_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: 'cd08bc00-d02c-48d4-a1ac-a0cfa13742b7',
|
||||
relationTargetObjectMetadataId: '3186920d-2a15-4b5f-96c7-2bf6567024b0',
|
||||
universalIdentifier: '20202020-e881-457a-8758-74aaef4ae78a',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: 'cd08bc00-d02c-48d4-a1ac-a0cfa13742b7',
|
||||
standardId: '20202020-de9c-4d0e-a452-713d4a3e5fc7',
|
||||
objectMetadataId: '3186920d-2a15-4b5f-96c7-2bf6567024b0',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'taskTargets',
|
||||
label: 'Relations',
|
||||
defaultValue: null,
|
||||
description: 'Task targets',
|
||||
icon: 'IconArrowUpRight',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: 'cd08bc00-d02c-48d4-a1ac-a0cfa13742b7',
|
||||
standardId: '20202020-de9c-4d0e-a452-713d4a3e5fc7',
|
||||
objectMetadataId: '3186920d-2a15-4b5f-96c7-2bf6567024b0',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'taskTargets',
|
||||
label: 'Relations',
|
||||
defaultValue: null,
|
||||
description: 'Task targets',
|
||||
icon: 'IconArrowUpRight',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
person: getFlatFieldMetadataMock({
|
||||
id: '64225f87-96c4-4846-9462-e7aa3ad9e182',
|
||||
@@ -189,31 +188,30 @@ export const TASKTARGET_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '9609ca31-215e-47fd-9b3b-ab200acb2fa8',
|
||||
relationTargetObjectMetadataId: '843e0b67-9619-4628-91c4-2fa62256a611',
|
||||
universalIdentifier: '20202020-c8a0-4e85-a016-87e2349cfbec',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '9609ca31-215e-47fd-9b3b-ab200acb2fa8',
|
||||
standardId: '20202020-584b-4d3e-88b6-53ab1fa03c3a',
|
||||
objectMetadataId: '843e0b67-9619-4628-91c4-2fa62256a611',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'taskTargets',
|
||||
label: 'Tasks',
|
||||
defaultValue: null,
|
||||
description: 'Tasks tied to the contact',
|
||||
icon: 'IconCheckbox',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '9609ca31-215e-47fd-9b3b-ab200acb2fa8',
|
||||
standardId: '20202020-584b-4d3e-88b6-53ab1fa03c3a',
|
||||
objectMetadataId: '843e0b67-9619-4628-91c4-2fa62256a611',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'taskTargets',
|
||||
label: 'Tasks',
|
||||
defaultValue: null,
|
||||
description: 'Tasks tied to the contact',
|
||||
icon: 'IconCheckbox',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
company: getFlatFieldMetadataMock({
|
||||
id: 'ec11b025-1476-4e84-81c5-cf5b5c776edc',
|
||||
@@ -242,31 +240,30 @@ export const TASKTARGET_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '4f9138da-cd36-4df4-98f9-ebabe036b141',
|
||||
relationTargetObjectMetadataId: '7f5c2c7a-bb23-46fb-b59d-9b7a52a8d1cc',
|
||||
universalIdentifier: '20202020-4703-4a4e-948c-487b0c60a92c',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '4f9138da-cd36-4df4-98f9-ebabe036b141',
|
||||
standardId: '20202020-cb17-4a61-8f8f-3be6730480de',
|
||||
objectMetadataId: '7f5c2c7a-bb23-46fb-b59d-9b7a52a8d1cc',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'taskTargets',
|
||||
label: 'Tasks',
|
||||
defaultValue: null,
|
||||
description: 'Tasks tied to the company',
|
||||
icon: 'IconCheckbox',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '4f9138da-cd36-4df4-98f9-ebabe036b141',
|
||||
standardId: '20202020-cb17-4a61-8f8f-3be6730480de',
|
||||
objectMetadataId: '7f5c2c7a-bb23-46fb-b59d-9b7a52a8d1cc',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'taskTargets',
|
||||
label: 'Tasks',
|
||||
defaultValue: null,
|
||||
description: 'Tasks tied to the company',
|
||||
icon: 'IconCheckbox',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
opportunity: getFlatFieldMetadataMock({
|
||||
id: '49afc8d8-dde3-4d19-aa6b-bd16a751b114',
|
||||
@@ -295,31 +292,30 @@ export const TASKTARGET_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: 'c0c9f9ac-0d40-4206-90e5-0d1e14f8a09f',
|
||||
relationTargetObjectMetadataId: 'e6996bbf-dd41-423a-9324-8546f5b22fa7',
|
||||
universalIdentifier: '20202020-6cb2-4c01-a9a5-aca3dbc11d41',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: 'c0c9f9ac-0d40-4206-90e5-0d1e14f8a09f',
|
||||
standardId: '20202020-59c0-4179-a208-4a255f04a5be',
|
||||
objectMetadataId: 'e6996bbf-dd41-423a-9324-8546f5b22fa7',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'taskTargets',
|
||||
label: 'Tasks',
|
||||
defaultValue: null,
|
||||
description: 'Tasks tied to the opportunity',
|
||||
icon: 'IconCheckbox',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: 'c0c9f9ac-0d40-4206-90e5-0d1e14f8a09f',
|
||||
standardId: '20202020-59c0-4179-a208-4a255f04a5be',
|
||||
objectMetadataId: 'e6996bbf-dd41-423a-9324-8546f5b22fa7',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'taskTargets',
|
||||
label: 'Tasks',
|
||||
defaultValue: null,
|
||||
description: 'Tasks tied to the opportunity',
|
||||
icon: 'IconCheckbox',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
rocket: getFlatFieldMetadataMock({
|
||||
id: 'a7e80fd8-76bc-45ed-b843-a2b87ef4d601',
|
||||
@@ -348,31 +344,30 @@ export const TASKTARGET_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '80e3b587-69ec-48bc-a872-20105c3b7df4',
|
||||
relationTargetObjectMetadataId: 'd78ec657-74a4-4652-a350-1f44ff62970a',
|
||||
universalIdentifier: '20202020-b98f-473d-85fb-8cebc40b9a50',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '80e3b587-69ec-48bc-a872-20105c3b7df4',
|
||||
standardId: '20202020-0860-4566-b865-bff3c626c303',
|
||||
objectMetadataId: 'd78ec657-74a4-4652-a350-1f44ff62970a',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'taskTargets',
|
||||
label: 'TaskTargets',
|
||||
defaultValue: null,
|
||||
description: 'TaskTargets tied to the Rocket',
|
||||
icon: 'IconCheckbox',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '80e3b587-69ec-48bc-a872-20105c3b7df4',
|
||||
standardId: '20202020-0860-4566-b865-bff3c626c303',
|
||||
objectMetadataId: 'd78ec657-74a4-4652-a350-1f44ff62970a',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'taskTargets',
|
||||
label: 'TaskTargets',
|
||||
defaultValue: null,
|
||||
description: 'TaskTargets tied to the Rocket',
|
||||
icon: 'IconCheckbox',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
pet: getFlatFieldMetadataMock({
|
||||
id: '3955a4b4-1c10-4ce8-a92e-98e727ee7aec',
|
||||
@@ -401,31 +396,30 @@ export const TASKTARGET_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '3cae8259-ece8-4b81-9044-f5abae5ff25c',
|
||||
relationTargetObjectMetadataId: 'd34e0f07-1b8c-4de0-938e-599cf05e1f7f',
|
||||
universalIdentifier: '20202020-07d9-4d04-8b73-a39ab65943f1',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '3cae8259-ece8-4b81-9044-f5abae5ff25c',
|
||||
standardId: '20202020-0860-4566-b865-bff3c626c303',
|
||||
objectMetadataId: 'd34e0f07-1b8c-4de0-938e-599cf05e1f7f',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'taskTargets',
|
||||
label: 'TaskTargets',
|
||||
defaultValue: null,
|
||||
description: 'TaskTargets tied to the Pet',
|
||||
icon: 'IconCheckbox',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '3cae8259-ece8-4b81-9044-f5abae5ff25c',
|
||||
standardId: '20202020-0860-4566-b865-bff3c626c303',
|
||||
objectMetadataId: 'd34e0f07-1b8c-4de0-938e-599cf05e1f7f',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'taskTargets',
|
||||
label: 'TaskTargets',
|
||||
defaultValue: null,
|
||||
description: 'TaskTargets tied to the Pet',
|
||||
icon: 'IconCheckbox',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
surveyResult: getFlatFieldMetadataMock({
|
||||
id: 'caa8b6cf-c668-4fb0-abf9-e49645668020',
|
||||
@@ -454,30 +448,29 @@ export const TASKTARGET_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: 'c4004fb2-3464-4302-b3c3-a32a1879fed7',
|
||||
relationTargetObjectMetadataId: '713da753-0340-49b5-b1fa-add34d2dc9a8',
|
||||
universalIdentifier: '20202020-c376-450d-8a49-a573f23eafd8',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: 'c4004fb2-3464-4302-b3c3-a32a1879fed7',
|
||||
standardId: '20202020-0860-4566-b865-bff3c626c303',
|
||||
objectMetadataId: '713da753-0340-49b5-b1fa-add34d2dc9a8',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'taskTargets',
|
||||
label: 'TaskTargets',
|
||||
defaultValue: null,
|
||||
description: 'TaskTargets tied to the Survey result',
|
||||
icon: 'IconCheckbox',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: 'caa8b6cf-c668-4fb0-abf9-e49645668020',
|
||||
relationTargetObjectMetadataId: 'bb2b29b8-7f46-4106-a8ae-3a32df9c9166',
|
||||
universalIdentifier: '20202020-0860-4566-b865-bff3c626c303',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: 'c4004fb2-3464-4302-b3c3-a32a1879fed7',
|
||||
standardId: '20202020-0860-4566-b865-bff3c626c303',
|
||||
objectMetadataId: '713da753-0340-49b5-b1fa-add34d2dc9a8',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'taskTargets',
|
||||
label: 'TaskTargets',
|
||||
defaultValue: null,
|
||||
description: 'TaskTargets tied to the Survey result',
|
||||
icon: 'IconCheckbox',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: 'caa8b6cf-c668-4fb0-abf9-e49645668020',
|
||||
relationTargetObjectMetadataId: 'bb2b29b8-7f46-4106-a8ae-3a32df9c9166',
|
||||
universalIdentifier: '20202020-0860-4566-b865-bff3c626c303',
|
||||
}),
|
||||
}),
|
||||
} as const satisfies Record<string, FlatFieldMetadata>;
|
||||
|
||||
+289
-301
@@ -4,7 +4,7 @@ import { DateDisplayFormat } from 'src/engine/metadata-modules/field-metadata/in
|
||||
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 { getMorphOrRelationTargetFlatFieldMetadataMock } from 'src/engine/metadata-modules/flat-field-metadata/__mocks__/get-morph-or-relation-target-flat-field-metadata-mock';
|
||||
import { getRelationTargetFlatFieldMetadataMock } from 'src/engine/metadata-modules/flat-field-metadata/__mocks__/get-morph-or-relation-target-flat-field-metadata-mock';
|
||||
import { type FlatFieldMetadata } from 'src/engine/metadata-modules/flat-field-metadata/types/flat-field-metadata.type';
|
||||
import { RelationOnDeleteAction } from 'src/engine/metadata-modules/relation-metadata/relation-on-delete-action.type';
|
||||
|
||||
@@ -286,31 +286,30 @@ export const TIMELINEACTIVITY_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: 'b2172f26-093d-4c9f-86c3-f0bcfaf54ad6',
|
||||
relationTargetObjectMetadataId: '7d8264db-2b55-4b74-81ff-b7064ed43840',
|
||||
universalIdentifier: '20202020-af23-4479-9a30-868edc474b36',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: 'b2172f26-093d-4c9f-86c3-f0bcfaf54ad6',
|
||||
standardId: '20202020-e15b-47b8-94fe-8200e3c66615',
|
||||
objectMetadataId: '7d8264db-2b55-4b74-81ff-b7064ed43840',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'timelineActivities',
|
||||
label: 'Events',
|
||||
defaultValue: null,
|
||||
description: 'Events linked to the workspace member',
|
||||
icon: 'IconTimelineEvent',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: 'c8d9c315-034a-4ffd-a6b3-e6386092d0a8',
|
||||
relationTargetObjectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
universalIdentifier: '20202020-e15b-47b8-94fe-8200e3c66615',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: 'b2172f26-093d-4c9f-86c3-f0bcfaf54ad6',
|
||||
standardId: '20202020-e15b-47b8-94fe-8200e3c66615',
|
||||
objectMetadataId: '7d8264db-2b55-4b74-81ff-b7064ed43840',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'timelineActivities',
|
||||
label: 'Events',
|
||||
defaultValue: null,
|
||||
description: 'Events linked to the workspace member',
|
||||
icon: 'IconTimelineEvent',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: 'c8d9c315-034a-4ffd-a6b3-e6386092d0a8',
|
||||
relationTargetObjectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
universalIdentifier: '20202020-e15b-47b8-94fe-8200e3c66615',
|
||||
}),
|
||||
}),
|
||||
person: getFlatFieldMetadataMock({
|
||||
id: 'dbd02754-4bef-4149-b39d-54759983ab47',
|
||||
@@ -339,31 +338,30 @@ export const TIMELINEACTIVITY_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: 'b1457347-545b-4a42-9c68-bc655952229a',
|
||||
relationTargetObjectMetadataId: '843e0b67-9619-4628-91c4-2fa62256a611',
|
||||
universalIdentifier: '20202020-c414-45b9-a60a-ac27aa96229f',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: 'b1457347-545b-4a42-9c68-bc655952229a',
|
||||
standardId: '20202020-a43e-4873-9c23-e522de906ce5',
|
||||
objectMetadataId: '843e0b67-9619-4628-91c4-2fa62256a611',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'timelineActivities',
|
||||
label: 'Events',
|
||||
defaultValue: null,
|
||||
description: 'Events linked to the person',
|
||||
icon: 'IconTimelineEvent',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: 'b1457347-545b-4a42-9c68-bc655952229a',
|
||||
standardId: '20202020-a43e-4873-9c23-e522de906ce5',
|
||||
objectMetadataId: '843e0b67-9619-4628-91c4-2fa62256a611',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'timelineActivities',
|
||||
label: 'Events',
|
||||
defaultValue: null,
|
||||
description: 'Events linked to the person',
|
||||
icon: 'IconTimelineEvent',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
company: getFlatFieldMetadataMock({
|
||||
id: 'fd8cabe5-7dc8-4d6a-8053-43434488b3e4',
|
||||
@@ -392,31 +390,30 @@ export const TIMELINEACTIVITY_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: 'cc78390f-f570-4c2c-9f19-2a8fef67f4f6',
|
||||
relationTargetObjectMetadataId: '7f5c2c7a-bb23-46fb-b59d-9b7a52a8d1cc',
|
||||
universalIdentifier: '20202020-04ad-4221-a744-7a8278a5ce21',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: 'cc78390f-f570-4c2c-9f19-2a8fef67f4f6',
|
||||
standardId: '20202020-0414-4daf-9c0d-64fe7b27f89f',
|
||||
objectMetadataId: '7f5c2c7a-bb23-46fb-b59d-9b7a52a8d1cc',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'timelineActivities',
|
||||
label: 'Timeline Activities',
|
||||
defaultValue: null,
|
||||
description: 'Timeline Activities linked to the company',
|
||||
icon: 'IconIconTimelineEvent',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: 'cc78390f-f570-4c2c-9f19-2a8fef67f4f6',
|
||||
standardId: '20202020-0414-4daf-9c0d-64fe7b27f89f',
|
||||
objectMetadataId: '7f5c2c7a-bb23-46fb-b59d-9b7a52a8d1cc',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'timelineActivities',
|
||||
label: 'Timeline Activities',
|
||||
defaultValue: null,
|
||||
description: 'Timeline Activities linked to the company',
|
||||
icon: 'IconIconTimelineEvent',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
opportunity: getFlatFieldMetadataMock({
|
||||
id: '026cbaa7-860c-4ed4-b878-8d78849e6c28',
|
||||
@@ -445,31 +442,30 @@ export const TIMELINEACTIVITY_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '7826944b-3b21-4448-892e-5a2a68161313',
|
||||
relationTargetObjectMetadataId: 'e6996bbf-dd41-423a-9324-8546f5b22fa7',
|
||||
universalIdentifier: '20202020-7664-4a35-a3df-580d389fd527',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '7826944b-3b21-4448-892e-5a2a68161313',
|
||||
standardId: '20202020-30e2-421f-96c7-19c69d1cf631',
|
||||
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',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '7826944b-3b21-4448-892e-5a2a68161313',
|
||||
standardId: '20202020-30e2-421f-96c7-19c69d1cf631',
|
||||
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',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
note: getFlatFieldMetadataMock({
|
||||
id: '2b9f1c90-9e35-4ccc-8d84-b42de31ef127',
|
||||
@@ -498,31 +494,30 @@ export const TIMELINEACTIVITY_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '1207d260-db2c-41d4-bb09-34ea1188978f',
|
||||
relationTargetObjectMetadataId: '1253e3e5-5b00-4a34-93b8-02f3dc6e2b7c',
|
||||
universalIdentifier: '20202020-ec55-4135-8da5-3a20badc0156',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '1207d260-db2c-41d4-bb09-34ea1188978f',
|
||||
standardId: '20202020-7030-42f8-929c-1a57b25d6bce',
|
||||
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',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '1207d260-db2c-41d4-bb09-34ea1188978f',
|
||||
standardId: '20202020-7030-42f8-929c-1a57b25d6bce',
|
||||
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',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
task: getFlatFieldMetadataMock({
|
||||
id: '187eaeb8-62c8-4925-815f-946b4768b786',
|
||||
@@ -551,31 +546,30 @@ export const TIMELINEACTIVITY_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '3536b3af-76a2-44f5-9d89-1961a0a0a763',
|
||||
relationTargetObjectMetadataId: '3186920d-2a15-4b5f-96c7-2bf6567024b0',
|
||||
universalIdentifier: '20202020-b2f5-415c-9135-a31dfe49501b',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '3536b3af-76a2-44f5-9d89-1961a0a0a763',
|
||||
standardId: '20202020-c778-4278-99ee-23a2837aee64',
|
||||
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',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '3536b3af-76a2-44f5-9d89-1961a0a0a763',
|
||||
standardId: '20202020-c778-4278-99ee-23a2837aee64',
|
||||
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',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
workflow: getFlatFieldMetadataMock({
|
||||
id: '9973da2e-cc65-41b2-8f52-4130cfa31fc6',
|
||||
@@ -604,31 +598,30 @@ export const TIMELINEACTIVITY_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '384db7b5-3551-4774-9258-7082b26b502a',
|
||||
relationTargetObjectMetadataId: '664c19a5-0693-45d4-a4e5-76c3717db83c',
|
||||
universalIdentifier: '20202020-616c-4ad3-a2e9-c477c341e295',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '384db7b5-3551-4774-9258-7082b26b502a',
|
||||
standardId: '20202020-906e-486a-a798-131a5f081faf',
|
||||
objectMetadataId: '664c19a5-0693-45d4-a4e5-76c3717db83c',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'timelineActivities',
|
||||
label: 'Timeline Activities',
|
||||
defaultValue: null,
|
||||
description: 'Timeline activities linked to the workflow',
|
||||
icon: null,
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '9973da2e-cc65-41b2-8f52-4130cfa31fc6',
|
||||
relationTargetObjectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
universalIdentifier: '20202020-906e-486a-a798-131a5f081faf',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '384db7b5-3551-4774-9258-7082b26b502a',
|
||||
standardId: '20202020-906e-486a-a798-131a5f081faf',
|
||||
objectMetadataId: '664c19a5-0693-45d4-a4e5-76c3717db83c',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'timelineActivities',
|
||||
label: 'Timeline Activities',
|
||||
defaultValue: null,
|
||||
description: 'Timeline activities linked to the workflow',
|
||||
icon: null,
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '9973da2e-cc65-41b2-8f52-4130cfa31fc6',
|
||||
relationTargetObjectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
universalIdentifier: '20202020-906e-486a-a798-131a5f081faf',
|
||||
}),
|
||||
}),
|
||||
workflowVersion: getFlatFieldMetadataMock({
|
||||
id: '7e5b7033-8c4f-4bdc-9156-6954c268fbb8',
|
||||
@@ -657,31 +650,30 @@ export const TIMELINEACTIVITY_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '767ab66d-f3d7-4bac-b0be-f738f8c6fda7',
|
||||
relationTargetObjectMetadataId: '99cf5f27-b41d-4f25-a23b-9e47d27dae9b',
|
||||
universalIdentifier: '20202020-74f1-4711-a129-e14ca0ecd744',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '767ab66d-f3d7-4bac-b0be-f738f8c6fda7',
|
||||
standardId: '20202020-fcb0-4695-b17e-3b43a421c633',
|
||||
objectMetadataId: '99cf5f27-b41d-4f25-a23b-9e47d27dae9b',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'timelineActivities',
|
||||
label: 'Timeline Activities',
|
||||
defaultValue: null,
|
||||
description: 'Timeline activities linked to the version',
|
||||
icon: null,
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '7e5b7033-8c4f-4bdc-9156-6954c268fbb8',
|
||||
relationTargetObjectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
universalIdentifier: '20202020-fcb0-4695-b17e-3b43a421c633',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '767ab66d-f3d7-4bac-b0be-f738f8c6fda7',
|
||||
standardId: '20202020-fcb0-4695-b17e-3b43a421c633',
|
||||
objectMetadataId: '99cf5f27-b41d-4f25-a23b-9e47d27dae9b',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'timelineActivities',
|
||||
label: 'Timeline Activities',
|
||||
defaultValue: null,
|
||||
description: 'Timeline activities linked to the version',
|
||||
icon: null,
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '7e5b7033-8c4f-4bdc-9156-6954c268fbb8',
|
||||
relationTargetObjectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
universalIdentifier: '20202020-fcb0-4695-b17e-3b43a421c633',
|
||||
}),
|
||||
}),
|
||||
workflowRun: getFlatFieldMetadataMock({
|
||||
id: '1cd2b19c-f5c5-40b4-ad41-cc7aa3e955b2',
|
||||
@@ -710,31 +702,30 @@ export const TIMELINEACTIVITY_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: 'c17fe20f-fcd1-4b21-ac5c-c595473a3af8',
|
||||
relationTargetObjectMetadataId: '06d95e96-b050-443f-946e-dd276d291a2f',
|
||||
universalIdentifier: '20202020-96f0-401b-9186-a3a0759225ac',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: 'c17fe20f-fcd1-4b21-ac5c-c595473a3af8',
|
||||
standardId: '20202020-af4d-4eb0-babc-eb960a45b356',
|
||||
objectMetadataId: '06d95e96-b050-443f-946e-dd276d291a2f',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'timelineActivities',
|
||||
label: 'Timeline Activities',
|
||||
defaultValue: null,
|
||||
description: 'Timeline activities linked to the run',
|
||||
icon: null,
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '1cd2b19c-f5c5-40b4-ad41-cc7aa3e955b2',
|
||||
relationTargetObjectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
universalIdentifier: '20202020-af4d-4eb0-babc-eb960a45b356',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: 'c17fe20f-fcd1-4b21-ac5c-c595473a3af8',
|
||||
standardId: '20202020-af4d-4eb0-babc-eb960a45b356',
|
||||
objectMetadataId: '06d95e96-b050-443f-946e-dd276d291a2f',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'timelineActivities',
|
||||
label: 'Timeline Activities',
|
||||
defaultValue: null,
|
||||
description: 'Timeline activities linked to the run',
|
||||
icon: null,
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: true,
|
||||
relationTargetFieldMetadataId: '1cd2b19c-f5c5-40b4-ad41-cc7aa3e955b2',
|
||||
relationTargetObjectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
universalIdentifier: '20202020-af4d-4eb0-babc-eb960a45b356',
|
||||
}),
|
||||
}),
|
||||
rocket: getFlatFieldMetadataMock({
|
||||
id: 'eebb9590-817b-4a51-88f7-9792aa8e0a59',
|
||||
@@ -763,31 +754,30 @@ export const TIMELINEACTIVITY_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '53a223cc-a445-420d-8698-1a9137039448',
|
||||
relationTargetObjectMetadataId: 'd78ec657-74a4-4652-a350-1f44ff62970a',
|
||||
universalIdentifier: '20202020-0be6-444e-88f0-12e0c64ac27d',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '53a223cc-a445-420d-8698-1a9137039448',
|
||||
standardId: '20202020-f1ef-4ba4-8f33-1a4577afa477',
|
||||
objectMetadataId: 'd78ec657-74a4-4652-a350-1f44ff62970a',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'timelineActivities',
|
||||
label: 'TimelineActivities',
|
||||
defaultValue: null,
|
||||
description: 'TimelineActivities tied to the Rocket',
|
||||
icon: 'IconTimelineEvent',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '53a223cc-a445-420d-8698-1a9137039448',
|
||||
standardId: '20202020-f1ef-4ba4-8f33-1a4577afa477',
|
||||
objectMetadataId: 'd78ec657-74a4-4652-a350-1f44ff62970a',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'timelineActivities',
|
||||
label: 'TimelineActivities',
|
||||
defaultValue: null,
|
||||
description: 'TimelineActivities tied to the Rocket',
|
||||
icon: 'IconTimelineEvent',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
pet: getFlatFieldMetadataMock({
|
||||
id: '3cb86390-4ee7-42fa-bd1e-bd6326b47610',
|
||||
@@ -816,31 +806,30 @@ export const TIMELINEACTIVITY_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: '4eb74f21-1cb4-46b5-b3bb-4e41108e70d9',
|
||||
relationTargetObjectMetadataId: 'd34e0f07-1b8c-4de0-938e-599cf05e1f7f',
|
||||
universalIdentifier: '20202020-d88f-4020-8c85-d6c600903762',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: '4eb74f21-1cb4-46b5-b3bb-4e41108e70d9',
|
||||
standardId: '20202020-f1ef-4ba4-8f33-1a4577afa477',
|
||||
objectMetadataId: 'd34e0f07-1b8c-4de0-938e-599cf05e1f7f',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'timelineActivities',
|
||||
label: 'TimelineActivities',
|
||||
defaultValue: null,
|
||||
description: 'TimelineActivities tied to the Pet',
|
||||
icon: 'IconTimelineEvent',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: '4eb74f21-1cb4-46b5-b3bb-4e41108e70d9',
|
||||
standardId: '20202020-f1ef-4ba4-8f33-1a4577afa477',
|
||||
objectMetadataId: 'd34e0f07-1b8c-4de0-938e-599cf05e1f7f',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'timelineActivities',
|
||||
label: 'TimelineActivities',
|
||||
defaultValue: null,
|
||||
description: 'TimelineActivities tied to the Pet',
|
||||
icon: 'IconTimelineEvent',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
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',
|
||||
}),
|
||||
}),
|
||||
surveyResult: getFlatFieldMetadataMock({
|
||||
id: '06010d88-dc3c-4172-92c9-8c73924f950d',
|
||||
@@ -869,30 +858,29 @@ export const TIMELINEACTIVITY_FLAT_FIELDS_MOCK = {
|
||||
relationTargetFieldMetadataId: 'd544ccb4-b0df-43bb-b70c-57ae477838c4',
|
||||
relationTargetObjectMetadataId: '713da753-0340-49b5-b1fa-add34d2dc9a8',
|
||||
universalIdentifier: '20202020-d13a-4342-8df0-df48bd783787',
|
||||
flatRelationTargetFieldMetadata:
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
id: 'd544ccb4-b0df-43bb-b70c-57ae477838c4',
|
||||
standardId: '20202020-f1ef-4ba4-8f33-1a4577afa477',
|
||||
objectMetadataId: '713da753-0340-49b5-b1fa-add34d2dc9a8',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'timelineActivities',
|
||||
label: 'TimelineActivities',
|
||||
defaultValue: null,
|
||||
description: 'TimelineActivities tied to the Survey result',
|
||||
icon: 'IconTimelineEvent',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: '06010d88-dc3c-4172-92c9-8c73924f950d',
|
||||
relationTargetObjectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
universalIdentifier: '20202020-f1ef-4ba4-8f33-1a4577afa477',
|
||||
}),
|
||||
flatRelationTargetFieldMetadata: getRelationTargetFlatFieldMetadataMock({
|
||||
id: 'd544ccb4-b0df-43bb-b70c-57ae477838c4',
|
||||
standardId: '20202020-f1ef-4ba4-8f33-1a4577afa477',
|
||||
objectMetadataId: '713da753-0340-49b5-b1fa-add34d2dc9a8',
|
||||
type: FieldMetadataType.RELATION,
|
||||
name: 'timelineActivities',
|
||||
label: 'TimelineActivities',
|
||||
defaultValue: null,
|
||||
description: 'TimelineActivities tied to the Survey result',
|
||||
icon: 'IconTimelineEvent',
|
||||
standardOverrides: null,
|
||||
options: null,
|
||||
settings: { relationType: RelationType.ONE_TO_MANY },
|
||||
isCustom: false,
|
||||
isActive: true,
|
||||
isSystem: true,
|
||||
isNullable: true,
|
||||
isUnique: false,
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
isLabelSyncedWithName: false,
|
||||
relationTargetFieldMetadataId: '06010d88-dc3c-4172-92c9-8c73924f950d',
|
||||
relationTargetObjectMetadataId: '3090f830-c4b1-41a1-8e18-815760830bec',
|
||||
universalIdentifier: '20202020-f1ef-4ba4-8f33-1a4577afa477',
|
||||
}),
|
||||
}),
|
||||
} as const satisfies Record<string, FlatFieldMetadata>;
|
||||
|
||||
+10
@@ -137,6 +137,7 @@ exports[`fromCreateFieldInputToFlatFieldMetadatasToCreate MORPH_RELATION test su
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": null,
|
||||
"label": "newFieldLabel",
|
||||
"morphId": Any<String>,
|
||||
"name": "newField",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -192,6 +193,7 @@ exports[`fromCreateFieldInputToFlatFieldMetadatasToCreate MORPH_RELATION test su
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": null,
|
||||
"label": "Pet",
|
||||
"morphId": null,
|
||||
"name": "pet",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -249,6 +251,7 @@ exports[`fromCreateFieldInputToFlatFieldMetadatasToCreate MORPH_RELATION test su
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": null,
|
||||
"label": "newFieldLabel",
|
||||
"morphId": Any<String>,
|
||||
"name": "newField",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -313,6 +316,7 @@ exports[`fromCreateFieldInputToFlatFieldMetadatasToCreate MORPH_RELATION test su
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": null,
|
||||
"label": "newFieldLabel",
|
||||
"morphId": Any<String>,
|
||||
"name": "newField",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -368,6 +372,7 @@ exports[`fromCreateFieldInputToFlatFieldMetadatasToCreate MORPH_RELATION test su
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": null,
|
||||
"label": "Pet",
|
||||
"morphId": null,
|
||||
"name": "pet",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -438,6 +443,7 @@ exports[`fromCreateFieldInputToFlatFieldMetadatasToCreate MORPH_RELATION test su
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": null,
|
||||
"label": "newFieldLabel",
|
||||
"morphId": Any<String>,
|
||||
"name": "newField",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -493,6 +499,7 @@ exports[`fromCreateFieldInputToFlatFieldMetadatasToCreate MORPH_RELATION test su
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": null,
|
||||
"label": "Company",
|
||||
"morphId": null,
|
||||
"name": "company",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -550,6 +557,7 @@ exports[`fromCreateFieldInputToFlatFieldMetadatasToCreate MORPH_RELATION test su
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": null,
|
||||
"label": "newFieldLabel",
|
||||
"morphId": Any<String>,
|
||||
"name": "newField",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -614,6 +622,7 @@ exports[`fromCreateFieldInputToFlatFieldMetadatasToCreate MORPH_RELATION test su
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": null,
|
||||
"label": "newFieldLabel",
|
||||
"morphId": Any<String>,
|
||||
"name": "newField",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -669,6 +678,7 @@ exports[`fromCreateFieldInputToFlatFieldMetadatasToCreate MORPH_RELATION test su
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": null,
|
||||
"label": "Company",
|
||||
"morphId": null,
|
||||
"name": "company",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
import { type FieldMetadataType } from 'twenty-shared/types';
|
||||
|
||||
import { type FieldMetadataEntity } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity';
|
||||
import { type AssignTypeIfIsRelationFieldMetadataType } from 'src/engine/metadata-modules/field-metadata/types/assign-type-if-is-relation-field-metadata-type.type';
|
||||
import { type AssignTypeIfIsMorphOrRelationFieldMetadataType } from 'src/engine/metadata-modules/field-metadata/types/assign-type-if-is-morph-or-relation-field-metadata-type.type';
|
||||
import { type MorphOrRelationFieldMetadataType } from 'src/engine/metadata-modules/field-metadata/types/morph-or-relation-field-metadata-type.type';
|
||||
import { type FlatObjectMetadataWithoutFields } from 'src/engine/metadata-modules/flat-object-metadata/types/flat-object-metadata.type';
|
||||
|
||||
@@ -19,14 +19,14 @@ export type FieldMetadataEntityRelationProperties =
|
||||
export type FlatFieldMetadata<T extends FieldMetadataType = FieldMetadataType> =
|
||||
Omit<FieldMetadataEntity<T>, FieldMetadataEntityRelationProperties> & {
|
||||
universalIdentifier: string;
|
||||
flatRelationTargetFieldMetadata: AssignTypeIfIsRelationFieldMetadataType<
|
||||
flatRelationTargetFieldMetadata: AssignTypeIfIsMorphOrRelationFieldMetadataType<
|
||||
Omit<
|
||||
FlatFieldMetadata<MorphOrRelationFieldMetadataType>,
|
||||
'flatRelationTargetFieldMetadata' | 'flatRelationTargetObjectMetadata'
|
||||
>,
|
||||
T
|
||||
>;
|
||||
flatRelationTargetObjectMetadata: AssignTypeIfIsRelationFieldMetadataType<
|
||||
flatRelationTargetObjectMetadata: AssignTypeIfIsMorphOrRelationFieldMetadataType<
|
||||
FlatObjectMetadataWithoutFields,
|
||||
T
|
||||
>;
|
||||
|
||||
+3
-1
@@ -4,6 +4,7 @@ import {
|
||||
computeMorphRelationFieldJoinColumnName,
|
||||
isDefined,
|
||||
} from 'twenty-shared/utils';
|
||||
import { v4 } from 'uuid';
|
||||
|
||||
import { type CreateFieldInput } from 'src/engine/metadata-modules/field-metadata/dtos/create-field.input';
|
||||
import { FieldMetadataExceptionCode } from 'src/engine/metadata-modules/field-metadata/field-metadata.exception';
|
||||
@@ -64,7 +65,7 @@ export const fromMorphRelationCreateFieldInputToFlatFieldMetadatas = async ({
|
||||
|
||||
const morphRelationCreationPayload =
|
||||
morphRelationCreationPayloadValidation.result;
|
||||
|
||||
const morphId = v4();
|
||||
const flatFieldMetadatas = morphRelationCreationPayload.flatMap(
|
||||
({ relationCreationPayload, targetFlatObjectMetadata }) => {
|
||||
const sourceFlatObjectMetadataJoinColumnName =
|
||||
@@ -83,6 +84,7 @@ export const fromMorphRelationCreateFieldInputToFlatFieldMetadatas = async ({
|
||||
sourceFlatObjectMetadata,
|
||||
targetFlatObjectMetadata,
|
||||
workspaceId,
|
||||
morphId,
|
||||
});
|
||||
},
|
||||
);
|
||||
|
||||
+3
@@ -40,6 +40,7 @@ type GenerateMorphOrRelationFlatFieldMetadataPairArgs = {
|
||||
Pick<CreateFieldInput, 'relationCreationPayload' | 'type' | 'name'>
|
||||
> & { type: MorphOrRelationFieldMetadataType };
|
||||
workspaceId: string;
|
||||
morphId?: string | null;
|
||||
};
|
||||
export const generateMorphOrRelationFlatFieldMetadataPair = ({
|
||||
createFieldInput,
|
||||
@@ -47,6 +48,7 @@ export const generateMorphOrRelationFlatFieldMetadataPair = ({
|
||||
targetFlatObjectMetadata,
|
||||
workspaceId,
|
||||
sourceFlatObjectMetadataJoinColumnName,
|
||||
morphId = null,
|
||||
}: GenerateMorphOrRelationFlatFieldMetadataPairArgs): FlatFieldMetadata<MorphOrRelationFieldMetadataType>[] => {
|
||||
const { relationCreationPayload } = createFieldInput;
|
||||
|
||||
@@ -66,6 +68,7 @@ export const generateMorphOrRelationFlatFieldMetadataPair = ({
|
||||
workspaceId,
|
||||
fieldMetadataId: sourceRelationTargetFieldMetadataId,
|
||||
}),
|
||||
morphId,
|
||||
objectMetadataId: sourceFlatObjectMetadata.id,
|
||||
icon: createFieldInput.icon ?? 'IconRelationOneToMany',
|
||||
type: createFieldInput.type,
|
||||
|
||||
+1
@@ -54,5 +54,6 @@ export const getDefaultFlatFieldMetadata = ({
|
||||
createdAt,
|
||||
updatedAt: createdAt,
|
||||
isUIReadOnly: createFieldInput.isUIReadOnly ?? false,
|
||||
morphId: null,
|
||||
} as const satisfies FlatFieldMetadata;
|
||||
};
|
||||
|
||||
+8
@@ -47,6 +47,7 @@ export const buildDefaultFlatFieldMetadatasForCustomObject = ({
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
settings: null,
|
||||
morphId: null,
|
||||
};
|
||||
|
||||
const nameField: FlatFieldMetadata<FieldMetadataType.TEXT> = {
|
||||
@@ -78,6 +79,7 @@ export const buildDefaultFlatFieldMetadatasForCustomObject = ({
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
settings: null,
|
||||
morphId: null,
|
||||
};
|
||||
|
||||
const createdAtField: FlatFieldMetadata<FieldMetadataType.DATE_TIME> = {
|
||||
@@ -109,6 +111,7 @@ export const buildDefaultFlatFieldMetadatasForCustomObject = ({
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
settings: null,
|
||||
morphId: null,
|
||||
};
|
||||
|
||||
const updatedAtField: FlatFieldMetadata<FieldMetadataType.DATE_TIME> = {
|
||||
@@ -140,6 +143,7 @@ export const buildDefaultFlatFieldMetadatasForCustomObject = ({
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
settings: null,
|
||||
morphId: null,
|
||||
};
|
||||
|
||||
const deletedAtField: FlatFieldMetadata<FieldMetadataType.DATE_TIME> = {
|
||||
@@ -171,6 +175,7 @@ export const buildDefaultFlatFieldMetadatasForCustomObject = ({
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
settings: null,
|
||||
morphId: null,
|
||||
};
|
||||
|
||||
const createdByField: FlatFieldMetadata<FieldMetadataType.ACTOR> = {
|
||||
@@ -202,6 +207,7 @@ export const buildDefaultFlatFieldMetadatasForCustomObject = ({
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
settings: null,
|
||||
morphId: null,
|
||||
};
|
||||
|
||||
const positionField: FlatFieldMetadata<FieldMetadataType.POSITION> = {
|
||||
@@ -233,6 +239,7 @@ export const buildDefaultFlatFieldMetadatasForCustomObject = ({
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
settings: null,
|
||||
morphId: null,
|
||||
};
|
||||
|
||||
const searchVectorField: FlatFieldMetadata<FieldMetadataType.TS_VECTOR> = {
|
||||
@@ -267,6 +274,7 @@ export const buildDefaultFlatFieldMetadatasForCustomObject = ({
|
||||
asExpression: getTsVectorColumnExpressionFromFields([nameField]),
|
||||
generatedType: 'STORED',
|
||||
},
|
||||
morphId: null,
|
||||
};
|
||||
|
||||
return {
|
||||
|
||||
+2
@@ -92,6 +92,7 @@ const generateSourceFlatFieldMetadata = ({
|
||||
type: FieldMetadataType.RELATION,
|
||||
universalIdentifier: standardId,
|
||||
workspaceId,
|
||||
morphId: null,
|
||||
};
|
||||
};
|
||||
|
||||
@@ -124,6 +125,7 @@ const generateTargetFlatFieldMetadata = ({
|
||||
});
|
||||
|
||||
return {
|
||||
morphId: null,
|
||||
id: sourceFlatFieldMetadata.relationTargetFieldMetadataId,
|
||||
name: sourceFlatObjectMetadata.nameSingular,
|
||||
label: sourceFlatObjectMetadata.labelSingular,
|
||||
|
||||
+75
@@ -31,6 +31,7 @@ exports[`Workspace migration builder field actions test suite It should build an
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "flat field metadata label",
|
||||
"morphId": null,
|
||||
"name": "flatFieldMetadataName",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -70,6 +71,7 @@ exports[`Workspace migration builder field actions test suite It should build an
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "flat field metadata label",
|
||||
"morphId": null,
|
||||
"name": "flatFieldMetadataName",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -125,6 +127,7 @@ exports[`Workspace migration builder field actions test suite It should build an
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "flat field metadata label",
|
||||
"morphId": null,
|
||||
"name": "flatFieldMetadataName",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -191,6 +194,7 @@ exports[`Workspace migration builder field actions test suite It should build an
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "flat field metadata label",
|
||||
"morphId": null,
|
||||
"name": "flatFieldMetadataName",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -246,6 +250,7 @@ exports[`Workspace migration builder field actions test suite It should build an
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "flat field metadata label",
|
||||
"morphId": null,
|
||||
"name": "flatFieldMetadataName",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -417,6 +422,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Id",
|
||||
"morphId": null,
|
||||
"name": "id",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -449,6 +455,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Name",
|
||||
"morphId": null,
|
||||
"name": "name",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -481,6 +488,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Creation date",
|
||||
"morphId": null,
|
||||
"name": "createdAt",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -513,6 +521,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Last update",
|
||||
"morphId": null,
|
||||
"name": "updatedAt",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -545,6 +554,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Deleted at",
|
||||
"morphId": null,
|
||||
"name": "deletedAt",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -580,6 +590,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Created by",
|
||||
"morphId": null,
|
||||
"name": "createdBy",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -612,6 +623,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Position",
|
||||
"morphId": null,
|
||||
"name": "position",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -646,6 +658,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Rocket",
|
||||
"morphId": null,
|
||||
"name": "rocket",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -674,6 +687,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "TimelineActivities",
|
||||
"morphId": null,
|
||||
"name": "timelineActivities",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -710,6 +724,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Rocket",
|
||||
"morphId": null,
|
||||
"name": "rocket",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -738,6 +753,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Favorites",
|
||||
"morphId": null,
|
||||
"name": "favorites",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -774,6 +790,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Rocket",
|
||||
"morphId": null,
|
||||
"name": "rocket",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -802,6 +819,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Attachments",
|
||||
"morphId": null,
|
||||
"name": "attachments",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -838,6 +856,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Rocket",
|
||||
"morphId": null,
|
||||
"name": "rocket",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -866,6 +885,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "NoteTargets",
|
||||
"morphId": null,
|
||||
"name": "noteTargets",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -902,6 +922,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Rocket",
|
||||
"morphId": null,
|
||||
"name": "rocket",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -930,6 +951,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "TaskTargets",
|
||||
"morphId": null,
|
||||
"name": "taskTargets",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -964,6 +986,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Search vector",
|
||||
"morphId": null,
|
||||
"name": "searchVector",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -1115,6 +1138,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Pet",
|
||||
"morphId": null,
|
||||
"name": "pet",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -1143,6 +1167,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "NoteTargets",
|
||||
"morphId": null,
|
||||
"name": "noteTargets",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -1177,6 +1202,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Id",
|
||||
"morphId": null,
|
||||
"name": "id",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -1209,6 +1235,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Name",
|
||||
"morphId": null,
|
||||
"name": "name",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -1241,6 +1268,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Creation date",
|
||||
"morphId": null,
|
||||
"name": "createdAt",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -1273,6 +1301,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Last update",
|
||||
"morphId": null,
|
||||
"name": "updatedAt",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -1305,6 +1334,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Deleted at",
|
||||
"morphId": null,
|
||||
"name": "deletedAt",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -1340,6 +1370,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Created by",
|
||||
"morphId": null,
|
||||
"name": "createdBy",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -1372,6 +1403,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Position",
|
||||
"morphId": null,
|
||||
"name": "position",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -1406,6 +1438,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Pet",
|
||||
"morphId": null,
|
||||
"name": "pet",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -1434,6 +1467,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "TimelineActivities",
|
||||
"morphId": null,
|
||||
"name": "timelineActivities",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -1470,6 +1504,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Pet",
|
||||
"morphId": null,
|
||||
"name": "pet",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -1498,6 +1533,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Favorites",
|
||||
"morphId": null,
|
||||
"name": "favorites",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -1534,6 +1570,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Pet",
|
||||
"morphId": null,
|
||||
"name": "pet",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -1562,6 +1599,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Attachments",
|
||||
"morphId": null,
|
||||
"name": "attachments",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -1598,6 +1636,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Pet",
|
||||
"morphId": null,
|
||||
"name": "pet",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -1626,6 +1665,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "TaskTargets",
|
||||
"morphId": null,
|
||||
"name": "taskTargets",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -1660,6 +1700,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Search vector",
|
||||
"morphId": null,
|
||||
"name": "searchVector",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -1692,6 +1733,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Species",
|
||||
"morphId": null,
|
||||
"name": "species",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": [
|
||||
@@ -1767,6 +1809,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Traits",
|
||||
"morphId": null,
|
||||
"name": "traits",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": [
|
||||
@@ -1842,6 +1885,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Comments",
|
||||
"morphId": null,
|
||||
"name": "comments",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -1874,6 +1918,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Age",
|
||||
"morphId": null,
|
||||
"name": "age",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -1915,6 +1960,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Location",
|
||||
"morphId": null,
|
||||
"name": "location",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -1952,6 +1998,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Vet phone",
|
||||
"morphId": null,
|
||||
"name": "vetPhone",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -1987,6 +2034,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Vet email",
|
||||
"morphId": null,
|
||||
"name": "vetEmail",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -2019,6 +2067,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Birthday",
|
||||
"morphId": null,
|
||||
"name": "birthday",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -2051,6 +2100,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Is good with kids",
|
||||
"morphId": null,
|
||||
"name": "isGoodWithKids",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -2087,6 +2137,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Pictures",
|
||||
"morphId": null,
|
||||
"name": "pictures",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -2122,6 +2173,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Average cost of kibble per month",
|
||||
"morphId": null,
|
||||
"name": "averageCostOfKibblePerMonth",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -2157,6 +2209,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Makes its owner think of",
|
||||
"morphId": null,
|
||||
"name": "makesOwnerThinkOf",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -2189,6 +2242,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Sound swag (bark style, meow style, etc.)",
|
||||
"morphId": null,
|
||||
"name": "soundSwag",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": [
|
||||
@@ -2252,6 +2306,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Bio",
|
||||
"morphId": null,
|
||||
"name": "bio",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -2284,6 +2339,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Interesting facts",
|
||||
"morphId": null,
|
||||
"name": "interestingFacts",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -2316,6 +2372,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Extra data",
|
||||
"morphId": null,
|
||||
"name": "extraData",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -2561,6 +2618,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Id",
|
||||
"morphId": null,
|
||||
"name": "id",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -2593,6 +2651,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Name",
|
||||
"morphId": null,
|
||||
"name": "name",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -2625,6 +2684,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Creation date",
|
||||
"morphId": null,
|
||||
"name": "createdAt",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -2657,6 +2717,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Last update",
|
||||
"morphId": null,
|
||||
"name": "updatedAt",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -2689,6 +2750,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Deleted at",
|
||||
"morphId": null,
|
||||
"name": "deletedAt",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -2724,6 +2786,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Created by",
|
||||
"morphId": null,
|
||||
"name": "createdBy",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -2756,6 +2819,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Position",
|
||||
"morphId": null,
|
||||
"name": "position",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -2790,6 +2854,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Rocket",
|
||||
"morphId": null,
|
||||
"name": "rocket",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -2818,6 +2883,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "TimelineActivities",
|
||||
"morphId": null,
|
||||
"name": "timelineActivities",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -2854,6 +2920,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Rocket",
|
||||
"morphId": null,
|
||||
"name": "rocket",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -2882,6 +2949,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Favorites",
|
||||
"morphId": null,
|
||||
"name": "favorites",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -2918,6 +2986,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Rocket",
|
||||
"morphId": null,
|
||||
"name": "rocket",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -2946,6 +3015,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Attachments",
|
||||
"morphId": null,
|
||||
"name": "attachments",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -2982,6 +3052,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Rocket",
|
||||
"morphId": null,
|
||||
"name": "rocket",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -3010,6 +3081,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "NoteTargets",
|
||||
"morphId": null,
|
||||
"name": "noteTargets",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -3046,6 +3118,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Rocket",
|
||||
"morphId": null,
|
||||
"name": "rocket",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -3074,6 +3147,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "TaskTargets",
|
||||
"morphId": null,
|
||||
"name": "taskTargets",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
@@ -3108,6 +3182,7 @@ exports[`Workspace migration builder object actions test suite It should build a
|
||||
"isUIReadOnly": false,
|
||||
"isUnique": false,
|
||||
"label": "Search vector",
|
||||
"morphId": null,
|
||||
"name": "searchVector",
|
||||
"objectMetadataId": Any<String>,
|
||||
"options": null,
|
||||
|
||||
+2
-2
@@ -6,7 +6,7 @@ import { RelationType } from 'src/engine/metadata-modules/field-metadata/interfa
|
||||
|
||||
import { COMPANY_FLAT_FIELDS_MOCK } from 'src/engine/metadata-modules/flat-field-metadata/__mocks__/company-flat-fields.mock';
|
||||
import { getFlatFieldMetadataMock } from 'src/engine/metadata-modules/flat-field-metadata/__mocks__/get-flat-field-metadata.mock';
|
||||
import { getMorphOrRelationTargetFlatFieldMetadataMock } from 'src/engine/metadata-modules/flat-field-metadata/__mocks__/get-morph-or-relation-target-flat-field-metadata-mock';
|
||||
import { getRelationTargetFlatFieldMetadataMock } from 'src/engine/metadata-modules/flat-field-metadata/__mocks__/get-morph-or-relation-target-flat-field-metadata-mock';
|
||||
import { OPPORTUNITY_FLAT_FIELDS_MOCK } from 'src/engine/metadata-modules/flat-field-metadata/__mocks__/opportunity-flat-fields.mock';
|
||||
import { PET_FLAT_FIELDS_MOCK } from 'src/engine/metadata-modules/flat-field-metadata/__mocks__/pet-flat-fields.mock';
|
||||
import { type FlatFieldMetadata } from 'src/engine/metadata-modules/flat-field-metadata/types/flat-field-metadata.type';
|
||||
@@ -30,7 +30,7 @@ const relationTestCases: WorkspaceMigrationBuilderTestCase[] = [
|
||||
const targetRelationId = faker.string.uuid();
|
||||
const sourceRelationId = faker.string.uuid();
|
||||
const draftSourceRelationFlatField =
|
||||
getMorphOrRelationTargetFlatFieldMetadataMock({
|
||||
getRelationTargetFlatFieldMetadataMock({
|
||||
id: sourceRelationId,
|
||||
universalIdentifier: 'field-metadata-unique-identifier-1',
|
||||
objectMetadataId: PET_FLAT_OBJECT_MOCK.id,
|
||||
|
||||
+2
@@ -161,6 +161,7 @@ export class StandardFieldFactory {
|
||||
relationTargetFieldMetadataId: null,
|
||||
relationTargetObjectMetadata: null,
|
||||
relationTargetObjectMetadataId: null,
|
||||
morphId: null,
|
||||
},
|
||||
];
|
||||
}
|
||||
@@ -210,6 +211,7 @@ export class StandardFieldFactory {
|
||||
relationTargetObjectMetadataId: null,
|
||||
settings: null, // accurate ? looks weird for this to be undefined even for standard fields ?
|
||||
standardOverrides: null,
|
||||
morphId: null,
|
||||
});
|
||||
|
||||
return fieldMetadataCollection;
|
||||
|
||||
+1
@@ -57,6 +57,7 @@ export const computeStandardFields = (
|
||||
relationTargetObjectMetadataId: null,
|
||||
settings: null,
|
||||
standardOverrides: null,
|
||||
morphId: null,
|
||||
});
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -19,6 +19,7 @@ export const getMockFieldMetadataEntity = <
|
||||
overrides: GetMockFieldMetadataEntityOverride<T>,
|
||||
): FieldMetadataEntity => {
|
||||
return {
|
||||
morphId: null,
|
||||
fieldPermissions: [],
|
||||
icon: null,
|
||||
indexFieldMetadatas: {} as IndexFieldMetadataEntity,
|
||||
|
||||
Reference in New Issue
Block a user