refactor(core): Switch Tags queries from QueryBuilder to Repository API (no-changelog) (#5819)

Co-authored-by: Omar Ajoue <krynble@gmail.com>
This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-03-30 16:25:51 +02:00
committed by GitHub
parent f8f584c136
commit 41cdee7bc7
9 changed files with 58 additions and 81 deletions

View File

@@ -48,8 +48,9 @@ import type { User } from '@db/entities/User';
import type { WebhookEntity } from '@db/entities/WebhookEntity';
import type { WorkflowEntity } from '@db/entities/WorkflowEntity';
import type { WorkflowStatistics } from '@db/entities/WorkflowStatistics';
import type { WorkflowTagMapping } from '@db/entities/WorkflowTagMapping';
import type { EventDestinations } from '@db/entities/MessageEventBusDestinationEntity';
import type { ExecutionMetadata } from './databases/entities/ExecutionMetadata';
import type { ExecutionMetadata } from '@db/entities/ExecutionMetadata';
export interface IActivationError {
time: number;
@@ -81,6 +82,7 @@ export interface IDatabaseCollections {
Workflow: Repository<WorkflowEntity>;
Webhook: Repository<WebhookEntity>;
Tag: Repository<TagEntity>;
WorkflowTagMapping: Repository<WorkflowTagMapping>;
Role: Repository<Role>;
User: Repository<User>;
SharedCredentials: Repository<SharedCredentials>;
@@ -108,7 +110,8 @@ export type UsageCount = {
usageCount: number;
};
export type ITagWithCountDb = TagEntity & UsageCount;
export type ITagWithCountDb = Pick<TagEntity, 'id' | 'name' | 'createdAt' | 'updatedAt'> &
UsageCount;
// ----------------------------------
// workflows