Deprecate ObjectMetadataInterface and improve entity typing (#13310)
# Introduction Following `FieldMetadataInterface` deprecation in https://github.com/twentyhq/twenty/pull/13264 As for the previous PR will rename and remove all the file in a secondary PR to avoid conflicts and over loading this one ## Improvements Removed optional properties from the `objectMetadataEntity` model and added utils to retrieve test data ## Notes By touching to `ObjectMetadataDTO` I would have expected a twenty-front codegenerated types mutation, but it does not seem to be granular enough to null/undefined coercion
This commit is contained in:
+3
-2
@@ -1,9 +1,9 @@
|
||||
import { DatabaseEventAction } from 'src/engine/api/graphql/graphql-query-runner/enums/database-event-action';
|
||||
import { ObjectMetadataInfo } from 'src/modules/workflow/common/workspace-services/workflow-common.workspace-service';
|
||||
import {
|
||||
BaseOutputSchema,
|
||||
RecordOutputSchema,
|
||||
} from 'src/modules/workflow/workflow-builder/workflow-schema/types/output-schema.type';
|
||||
import { ObjectMetadataInfo } from 'src/modules/workflow/common/workspace-services/workflow-common.workspace-service';
|
||||
import { generateObjectRecordFields } from 'src/modules/workflow/workflow-builder/workflow-schema/utils/generate-object-record-fields';
|
||||
|
||||
const generateFakeObjectRecordEventWithPrefix = ({
|
||||
@@ -26,7 +26,8 @@ const generateFakeObjectRecordEventWithPrefix = ({
|
||||
return {
|
||||
object: {
|
||||
isLeaf: true,
|
||||
icon: objectMetadataInfo.objectMetadataItemWithFieldsMaps.icon,
|
||||
icon:
|
||||
objectMetadataInfo.objectMetadataItemWithFieldsMaps.icon ?? undefined,
|
||||
label: objectMetadataInfo.objectMetadataItemWithFieldsMaps.labelSingular,
|
||||
value: objectMetadataInfo.objectMetadataItemWithFieldsMaps.description,
|
||||
nameSingular:
|
||||
|
||||
+2
-1
@@ -12,7 +12,8 @@ export const generateFakeObjectRecord = ({
|
||||
return {
|
||||
object: {
|
||||
isLeaf: true,
|
||||
icon: objectMetadataInfo.objectMetadataItemWithFieldsMaps.icon,
|
||||
icon:
|
||||
objectMetadataInfo.objectMetadataItemWithFieldsMaps.icon ?? undefined,
|
||||
label: objectMetadataInfo.objectMetadataItemWithFieldsMaps.labelSingular,
|
||||
value: objectMetadataInfo.objectMetadataItemWithFieldsMaps.description,
|
||||
nameSingular:
|
||||
|
||||
Reference in New Issue
Block a user