Browse Source

Add services for download to the plugin

pull/1310/head
Hironsan 3 years ago
parent
commit
7d0559f131
1 changed files with 12 additions and 0 deletions
  1. 12
      frontend/plugins/services.ts

12
frontend/plugins/services.ts

@ -35,6 +35,10 @@ import { TemplateApplicationService } from '~/services/application/autoLabeling/
import { APITextClassificationRepository } from '~/repositories/tasks/textClassification/apiTextClassification' import { APITextClassificationRepository } from '~/repositories/tasks/textClassification/apiTextClassification'
import { TextClassificationApplicationService } from '~/services/application/tasks/textClassification/textClassificationApplicationService' import { TextClassificationApplicationService } from '~/services/application/tasks/textClassification/textClassificationApplicationService'
import { AuthApplicationService } from '~/services/application/auth/authApplicationService' import { AuthApplicationService } from '~/services/application/auth/authApplicationService'
import { APIDownloadFormatRepository } from '~/repositories/download/apiDownloadFormatRepository'
import { APIDownloadRepository } from '~/repositories/download/apiDownloadRepository'
import { DownloadApplicationService } from '~/services/application/download/downloadApplicationService'
import { DownloadFormatApplicationService } from '~/services/application/download/downloadFormatApplicationService'
export interface Services { export interface Services {
label: LabelApplicationService, label: LabelApplicationService,
@ -55,6 +59,8 @@ export interface Services {
catalog: CatalogApplicationService, catalog: CatalogApplicationService,
parse: ParseApplicationService, parse: ParseApplicationService,
taskStatus: TaskStatusApplicationService, taskStatus: TaskStatusApplicationService,
downloadFormat: DownloadFormatApplicationService,
download: DownloadApplicationService,
} }
declare module 'vue/types/vue' { declare module 'vue/types/vue' {
@ -82,6 +88,8 @@ const plugin: Plugin = (context, inject) => {
const catalogRepository = new APICatalogRepository() const catalogRepository = new APICatalogRepository()
const parseRepository = new APIParseRepository() const parseRepository = new APIParseRepository()
const taskStatusRepository = new APITaskStatusRepository() const taskStatusRepository = new APITaskStatusRepository()
const downloadFormatRepository = new APIDownloadFormatRepository()
const downloadRepository = new APIDownloadRepository()
const label = new LabelApplicationService(labelRepository) const label = new LabelApplicationService(labelRepository)
const member = new MemberApplicationService(memberRepository) const member = new MemberApplicationService(memberRepository)
@ -101,6 +109,8 @@ const plugin: Plugin = (context, inject) => {
const catalog = new CatalogApplicationService(catalogRepository) const catalog = new CatalogApplicationService(catalogRepository)
const parse = new ParseApplicationService(parseRepository) const parse = new ParseApplicationService(parseRepository)
const taskStatus = new TaskStatusApplicationService(taskStatusRepository) const taskStatus = new TaskStatusApplicationService(taskStatusRepository)
const downloadFormat = new DownloadFormatApplicationService(downloadFormatRepository)
const download = new DownloadApplicationService(downloadRepository)
const services: Services = { const services: Services = {
label, label,
@ -121,6 +131,8 @@ const plugin: Plugin = (context, inject) => {
catalog, catalog,
parse, parse,
taskStatus, taskStatus,
downloadFormat,
download,
} }
inject('services', services) inject('services', services)
} }

Loading…
Cancel
Save