chore: extend root eslint config in twenty-server (#5101)
Reopening @thaisguigon work from https://github.com/twentyhq/twenty/pull/4781 --------- Co-authored-by: Thaïs Guigon <guigon.thais@gmail.com>
This commit is contained in:
@ -1,8 +1,8 @@
|
||||
import { Relation } from 'src/engine/workspace-manager/workspace-sync-metadata/interfaces/relation.interface';
|
||||
|
||||
import { FieldMetadataType } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity';
|
||||
import { attachmentStandardFieldIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids';
|
||||
import { standardObjectIds } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
|
||||
import { ATTACHMENT_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids';
|
||||
import { STANDARD_OBJECT_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
|
||||
import { CustomObjectMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/custom-objects/custom.object-metadata';
|
||||
import { DynamicRelationFieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/dynamic-field-metadata.interface';
|
||||
import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator';
|
||||
@ -18,7 +18,7 @@ import { WorkspaceMemberObjectMetadata } from 'src/modules/workspace-member/stan
|
||||
import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-not-audit-logged.decorator';
|
||||
|
||||
@ObjectMetadata({
|
||||
standardId: standardObjectIds.attachment,
|
||||
standardId: STANDARD_OBJECT_IDS.attachment,
|
||||
namePlural: 'attachments',
|
||||
labelSingular: 'Attachment',
|
||||
labelPlural: 'Attachments',
|
||||
@ -29,7 +29,7 @@ import { IsNotAuditLogged } from 'src/engine/workspace-manager/workspace-sync-me
|
||||
@IsNotAuditLogged()
|
||||
export class AttachmentObjectMetadata extends BaseObjectMetadata {
|
||||
@FieldMetadata({
|
||||
standardId: attachmentStandardFieldIds.name,
|
||||
standardId: ATTACHMENT_STANDARD_FIELD_IDS.name,
|
||||
type: FieldMetadataType.TEXT,
|
||||
label: 'Name',
|
||||
description: 'Attachment name',
|
||||
@ -38,7 +38,7 @@ export class AttachmentObjectMetadata extends BaseObjectMetadata {
|
||||
name: string;
|
||||
|
||||
@FieldMetadata({
|
||||
standardId: attachmentStandardFieldIds.fullPath,
|
||||
standardId: ATTACHMENT_STANDARD_FIELD_IDS.fullPath,
|
||||
type: FieldMetadataType.TEXT,
|
||||
label: 'Full path',
|
||||
description: 'Attachment full path',
|
||||
@ -47,7 +47,7 @@ export class AttachmentObjectMetadata extends BaseObjectMetadata {
|
||||
fullPath: string;
|
||||
|
||||
@FieldMetadata({
|
||||
standardId: attachmentStandardFieldIds.type,
|
||||
standardId: ATTACHMENT_STANDARD_FIELD_IDS.type,
|
||||
type: FieldMetadataType.TEXT,
|
||||
label: 'Type',
|
||||
description: 'Attachment type',
|
||||
@ -56,7 +56,7 @@ export class AttachmentObjectMetadata extends BaseObjectMetadata {
|
||||
type: string;
|
||||
|
||||
@FieldMetadata({
|
||||
standardId: attachmentStandardFieldIds.author,
|
||||
standardId: ATTACHMENT_STANDARD_FIELD_IDS.author,
|
||||
type: FieldMetadataType.RELATION,
|
||||
label: 'Author',
|
||||
description: 'Attachment author',
|
||||
@ -66,7 +66,7 @@ export class AttachmentObjectMetadata extends BaseObjectMetadata {
|
||||
author: Relation<WorkspaceMemberObjectMetadata>;
|
||||
|
||||
@FieldMetadata({
|
||||
standardId: attachmentStandardFieldIds.activity,
|
||||
standardId: ATTACHMENT_STANDARD_FIELD_IDS.activity,
|
||||
type: FieldMetadataType.RELATION,
|
||||
label: 'Activity',
|
||||
description: 'Attachment activity',
|
||||
@ -77,7 +77,7 @@ export class AttachmentObjectMetadata extends BaseObjectMetadata {
|
||||
activity: Relation<ActivityObjectMetadata>;
|
||||
|
||||
@FieldMetadata({
|
||||
standardId: attachmentStandardFieldIds.person,
|
||||
standardId: ATTACHMENT_STANDARD_FIELD_IDS.person,
|
||||
type: FieldMetadataType.RELATION,
|
||||
label: 'Person',
|
||||
description: 'Attachment person',
|
||||
@ -88,7 +88,7 @@ export class AttachmentObjectMetadata extends BaseObjectMetadata {
|
||||
person: Relation<PersonObjectMetadata>;
|
||||
|
||||
@FieldMetadata({
|
||||
standardId: attachmentStandardFieldIds.company,
|
||||
standardId: ATTACHMENT_STANDARD_FIELD_IDS.company,
|
||||
type: FieldMetadataType.RELATION,
|
||||
label: 'Company',
|
||||
description: 'Attachment company',
|
||||
@ -99,7 +99,7 @@ export class AttachmentObjectMetadata extends BaseObjectMetadata {
|
||||
company: Relation<CompanyObjectMetadata>;
|
||||
|
||||
@FieldMetadata({
|
||||
standardId: attachmentStandardFieldIds.opportunity,
|
||||
standardId: ATTACHMENT_STANDARD_FIELD_IDS.opportunity,
|
||||
type: FieldMetadataType.RELATION,
|
||||
label: 'Opportunity',
|
||||
description: 'Attachment opportunity',
|
||||
@ -110,7 +110,7 @@ export class AttachmentObjectMetadata extends BaseObjectMetadata {
|
||||
opportunity: Relation<OpportunityObjectMetadata>;
|
||||
|
||||
@DynamicRelationFieldMetadata((oppositeObjectMetadata) => ({
|
||||
standardId: attachmentStandardFieldIds.custom,
|
||||
standardId: ATTACHMENT_STANDARD_FIELD_IDS.custom,
|
||||
name: oppositeObjectMetadata.nameSingular,
|
||||
label: oppositeObjectMetadata.labelSingular,
|
||||
description: `Attachment ${oppositeObjectMetadata.labelSingular}`,
|
||||
|
||||
Reference in New Issue
Block a user