diff --git a/packages/twenty-server/src/engine/core-modules/calendar/dtos/timeline-calendar-event.dto.ts b/packages/twenty-server/src/engine/core-modules/calendar/dtos/timeline-calendar-event.dto.ts index c9e579ccd3..d82e1cd890 100644 --- a/packages/twenty-server/src/engine/core-modules/calendar/dtos/timeline-calendar-event.dto.ts +++ b/packages/twenty-server/src/engine/core-modules/calendar/dtos/timeline-calendar-event.dto.ts @@ -1,4 +1,4 @@ -import { ObjectType, Field, registerEnumType } from '@nestjs/graphql'; +import { Field, ObjectType, registerEnumType } from '@nestjs/graphql'; import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars'; import { TimelineCalendarEventParticipant } from 'src/engine/core-modules/calendar/dtos/timeline-calendar-event-participant.dto'; @@ -10,7 +10,7 @@ registerEnumType(CalendarChannelVisibility, { }); @ObjectType('LinkMetadata') -export class LinkMetadata { +class LinkMetadata { @Field() label: string; @@ -18,6 +18,18 @@ export class LinkMetadata { url: string; } +@ObjectType('LinksMetadata') +export class LinksMetadata { + @Field() + primaryLinkLabel: string; + + @Field() + primaryLinkUrl: string; + + @Field(() => [LinkMetadata], { nullable: true }) + secondaryLinks: object | null; +} + @ObjectType('TimelineCalendarEvent') export class TimelineCalendarEvent { @Field(() => UUIDScalarType) @@ -47,8 +59,8 @@ export class TimelineCalendarEvent { @Field() conferenceSolution: string; - @Field(() => LinkMetadata) - conferenceLink: LinkMetadata; + @Field(() => LinksMetadata) + conferenceLink: LinksMetadata; @Field(() => [TimelineCalendarEventParticipant]) participants: TimelineCalendarEventParticipant[]; diff --git a/packages/twenty-server/src/modules/calendar/common/standard-objects/calendar-event.workspace-entity.ts b/packages/twenty-server/src/modules/calendar/common/standard-objects/calendar-event.workspace-entity.ts index 4bec31c859..55ede657ae 100644 --- a/packages/twenty-server/src/modules/calendar/common/standard-objects/calendar-event.workspace-entity.ts +++ b/packages/twenty-server/src/modules/calendar/common/standard-objects/calendar-event.workspace-entity.ts @@ -1,6 +1,6 @@ import { Relation } from 'src/engine/workspace-manager/workspace-sync-metadata/interfaces/relation.interface'; -import { LinkMetadata } from 'src/engine/metadata-modules/field-metadata/composite-types/link.composite-type'; +import { LinksMetadata } from 'src/engine/metadata-modules/field-metadata/composite-types/links.composite-type'; import { FieldMetadataType } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity'; import { RelationMetadataType, @@ -143,7 +143,7 @@ export class CalendarEventWorkspaceEntity extends BaseWorkspaceEntity { icon: 'IconLink', }) @WorkspaceIsNullable() - conferenceLink: LinkMetadata; + conferenceLink: LinksMetadata; @WorkspaceField({ standardId: CALENDAR_EVENT_STANDARD_FIELD_IDS.recurringEventExternalId, diff --git a/packages/twenty-server/src/modules/company/standard-objects/company.workspace-entity.ts b/packages/twenty-server/src/modules/company/standard-objects/company.workspace-entity.ts index fa8034b41b..179e68c120 100644 --- a/packages/twenty-server/src/modules/company/standard-objects/company.workspace-entity.ts +++ b/packages/twenty-server/src/modules/company/standard-objects/company.workspace-entity.ts @@ -3,7 +3,7 @@ import { Address } from 'nodemailer/lib/mailer'; import { Relation } from 'src/engine/workspace-manager/workspace-sync-metadata/interfaces/relation.interface'; import { CurrencyMetadata } from 'src/engine/metadata-modules/field-metadata/composite-types/currency.composite-type'; -import { LinkMetadata } from 'src/engine/metadata-modules/field-metadata/composite-types/link.composite-type'; +import { LinksMetadata } from 'src/engine/metadata-modules/field-metadata/composite-types/links.composite-type'; import { FieldMetadataType } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity'; import { RelationMetadataType, @@ -74,7 +74,7 @@ export class CompanyWorkspaceEntity extends BaseWorkspaceEntity { icon: 'IconBrandLinkedin', }) @WorkspaceIsNullable() - linkedinLink: LinkMetadata | null; + linkedinLink: LinksMetadata | null; @WorkspaceField({ standardId: COMPANY_STANDARD_FIELD_IDS.xLink, @@ -84,7 +84,7 @@ export class CompanyWorkspaceEntity extends BaseWorkspaceEntity { icon: 'IconBrandX', }) @WorkspaceIsNullable() - xLink: LinkMetadata | null; + xLink: LinksMetadata | null; @WorkspaceField({ standardId: COMPANY_STANDARD_FIELD_IDS.annualRecurringRevenue, diff --git a/packages/twenty-server/src/modules/person/standard-objects/person.workspace-entity.ts b/packages/twenty-server/src/modules/person/standard-objects/person.workspace-entity.ts index ce46bb2c8e..d2119e50f3 100644 --- a/packages/twenty-server/src/modules/person/standard-objects/person.workspace-entity.ts +++ b/packages/twenty-server/src/modules/person/standard-objects/person.workspace-entity.ts @@ -1,7 +1,7 @@ import { Relation } from 'src/engine/workspace-manager/workspace-sync-metadata/interfaces/relation.interface'; import { FullNameMetadata } from 'src/engine/metadata-modules/field-metadata/composite-types/full-name.composite-type'; -import { LinkMetadata } from 'src/engine/metadata-modules/field-metadata/composite-types/link.composite-type'; +import { LinksMetadata } from 'src/engine/metadata-modules/field-metadata/composite-types/links.composite-type'; import { FieldMetadataType } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity'; import { RelationMetadataType, @@ -62,7 +62,7 @@ export class PersonWorkspaceEntity extends BaseWorkspaceEntity { icon: 'IconBrandLinkedin', }) @WorkspaceIsNullable() - linkedinLink: LinkMetadata | null; + linkedinLink: LinksMetadata | null; @WorkspaceField({ standardId: PERSON_STANDARD_FIELD_IDS.xLink, @@ -72,7 +72,7 @@ export class PersonWorkspaceEntity extends BaseWorkspaceEntity { icon: 'IconBrandX', }) @WorkspaceIsNullable() - xLink: LinkMetadata | null; + xLink: LinksMetadata | null; @WorkspaceField({ standardId: PERSON_STANDARD_FIELD_IDS.jobTitle,