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:
@ -13,6 +13,7 @@ import { ObjectMetadataService } from 'src/engine/metadata-modules/object-metada
|
||||
import { RoleEntity } from 'src/engine/metadata-modules/role/role.entity';
|
||||
import { WorkspacePermissionsCacheService } from 'src/engine/metadata-modules/workspace-permissions-cache/workspace-permissions-cache.service';
|
||||
import { TwentyORMGlobalManager } from 'src/engine/twenty-orm/twenty-orm-global.manager';
|
||||
import { getMockObjectMetadataEntity } from 'src/utils/__test__/get-object-metadata-entity.mock';
|
||||
|
||||
export interface AgentToolTestContext {
|
||||
module: TestingModule;
|
||||
@ -130,7 +131,7 @@ export const createAgentToolTestModule =
|
||||
isEditable: true,
|
||||
} as RoleEntity;
|
||||
|
||||
const testObjectMetadata = {
|
||||
const testObjectMetadata = getMockObjectMetadataEntity({
|
||||
id: 'test-object-id',
|
||||
standardId: null,
|
||||
dataSourceId: 'test-data-source-id',
|
||||
@ -158,7 +159,7 @@ export const createAgentToolTestModule =
|
||||
dataSource: {} as any,
|
||||
objectPermissions: [],
|
||||
fieldPermissions: [],
|
||||
};
|
||||
});
|
||||
|
||||
return {
|
||||
module,
|
||||
|
||||
Reference in New Issue
Block a user