chore(*): remove unused code (#6781)
The code removed in the PR was flagged as unused by the JetBrains inspector. I did a QA on the dev environment but other checks are highly recommended. There is one commit by scope to make the review easier. --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
@ -68,10 +68,6 @@ export class MetadataArgsStorage {
|
||||
target: Function | string,
|
||||
): WorkspaceExtendedEntityMetadataArgs | undefined;
|
||||
|
||||
filterExtendedEntities(
|
||||
target: (Function | string)[],
|
||||
): WorkspaceExtendedEntityMetadataArgs[];
|
||||
|
||||
filterExtendedEntities(
|
||||
target: (Function | string) | (Function | string)[],
|
||||
):
|
||||
@ -85,8 +81,6 @@ export class MetadataArgsStorage {
|
||||
|
||||
filterFields(target: Function | string): WorkspaceFieldMetadataArgs[];
|
||||
|
||||
filterFields(target: (Function | string)[]): WorkspaceFieldMetadataArgs[];
|
||||
|
||||
filterFields(
|
||||
target: (Function | string) | (Function | string)[],
|
||||
): WorkspaceFieldMetadataArgs[] {
|
||||
@ -107,8 +101,6 @@ export class MetadataArgsStorage {
|
||||
|
||||
filterIndexes(target: Function | string): WorkspaceIndexMetadataArgs[];
|
||||
|
||||
filterIndexes(target: (Function | string)[]): WorkspaceIndexMetadataArgs[];
|
||||
|
||||
filterIndexes(
|
||||
target: (Function | string) | (Function | string)[],
|
||||
): WorkspaceIndexMetadataArgs[] {
|
||||
@ -119,10 +111,6 @@ export class MetadataArgsStorage {
|
||||
target: Function | string,
|
||||
): WorkspaceDynamicRelationMetadataArgs[];
|
||||
|
||||
filterDynamicRelations(
|
||||
target: (Function | string)[],
|
||||
): WorkspaceDynamicRelationMetadataArgs[];
|
||||
|
||||
filterDynamicRelations(
|
||||
target: (Function | string) | (Function | string)[],
|
||||
): WorkspaceDynamicRelationMetadataArgs[] {
|
||||
@ -133,10 +121,6 @@ export class MetadataArgsStorage {
|
||||
target: Function | string,
|
||||
): WorkspaceJoinColumnsMetadataArgs[];
|
||||
|
||||
filterJoinColumns(
|
||||
target: (Function | string)[],
|
||||
): WorkspaceJoinColumnsMetadataArgs[];
|
||||
|
||||
filterJoinColumns(
|
||||
target: (Function | string) | (Function | string)[],
|
||||
): WorkspaceJoinColumnsMetadataArgs[] {
|
||||
|
||||
@ -6,15 +6,6 @@ export class WorkspaceEntitiesStorage {
|
||||
Map<string, EntitySchema>
|
||||
>();
|
||||
|
||||
static getEntitySchema(
|
||||
workspaceId: string,
|
||||
objectMetadataName: string,
|
||||
): EntitySchema | undefined {
|
||||
const workspace = this.workspaceEntities.get(workspaceId);
|
||||
|
||||
return workspace?.get(objectMetadataName);
|
||||
}
|
||||
|
||||
static setEntitySchema(
|
||||
workspaceId: string,
|
||||
objectMetadataName: string,
|
||||
@ -38,12 +29,4 @@ export class WorkspaceEntitiesStorage {
|
||||
([, schema]) => schema.options.name === target.options.name,
|
||||
)?.[0];
|
||||
}
|
||||
|
||||
static getEntities(workspaceId: string): EntitySchema[] {
|
||||
return Array.from(this.workspaceEntities.get(workspaceId)?.values() || []);
|
||||
}
|
||||
|
||||
static clearWorkspace(workspaceId: string): void {
|
||||
this.workspaceEntities.delete(workspaceId);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user