From ff4bc94d38c92e70a8a1acb1124fd43ee4f3f4a7 Mon Sep 17 00:00:00 2001 From: volar Date: Wed, 15 Nov 2023 10:14:22 +0100 Subject: [PATCH] wip --- package.json | 10 +- .../coreDam/factory/UploadQueueItemFactory.ts | 65 ------------ .../DamConfigDistributionCustomFormService.ts | 6 +- .../api/coreDam/assetCustomFormApi.ts | 4 +- src/services/api/coreDam/distributionApi.ts | 4 +- .../api/coreDam/distributionCustomApi.ts | 4 +- src/services/api/coreDam/distributionJwApi.ts | 4 +- .../api/coreDam/distributionYoutubeApi.ts | 12 +-- src/services/upload/mimeTypeService.ts | 12 --- .../coreDam/distributionCategoryStore.ts | 4 +- src/stores/coreDam/distributionListStore.ts | 10 +- src/stores/coreDam/uploadQueuesStore.ts | 9 +- src/types/coreDam/DamConfig.ts | 9 +- src/types/coreDam/Distribution.ts | 12 +-- src/types/coreDam/DistributionAuth.ts | 4 +- .../coreDam/DistributionCategorySelect.ts | 4 +- src/types/coreDam/UploadQueue.ts | 13 --- .../distribution/DistributionBlockedBy.vue | 5 +- .../DistributionCustomMetadataForm.vue | 8 +- .../DistributionNewDialogCustom.vue | 5 +- .../DistributionNewDialogEmpty.vue | 5 +- .../distribution/DistributionNewDialogJw.vue | 5 +- .../DistributionNewDialogYoutube.vue | 4 +- ...stributionNewDialogYoutubeLogoutButton.vue | 4 +- .../DistributionYoutubeLanguageSelect.vue | 4 +- .../DistributionYoutubePlaylistSelect.vue | 4 +- .../assetDetailDistributionDialog.ts | 4 +- yarn.lock | 100 +++++++++--------- 28 files changed, 123 insertions(+), 211 deletions(-) delete mode 100644 src/model/coreDam/factory/UploadQueueItemFactory.ts delete mode 100644 src/services/upload/mimeTypeService.ts delete mode 100644 src/types/coreDam/UploadQueue.ts diff --git a/package.json b/package.json index a6ac801b..c1ee1d89 100644 --- a/package.json +++ b/package.json @@ -21,13 +21,13 @@ "cy:open": "CYPRESS_CACHE_FOLDER='node_modules/.cache/Cypress' yarn cypress open -C cypress/config/cypress.config.ts" }, "dependencies": { - "@anzusystems/common-admin": "^1.38.0", + "@anzusystems/common-admin": "^1.39.0", "@mdi/font": "7.3.67", "@vuelidate/core": "^2.0.3", "@vuelidate/validators": "^2.0.4", "@vueuse/core": "10.6.1", "@vueuse/integrations": "10.6.1", - "axios": "^1.6.1", + "axios": "^1.6.2", "js-sha1": "^0.6.0", "jwt-decode": "^4.0.0", "pinia": "^2.1.7", @@ -38,7 +38,7 @@ "vue-cropperjs": "^5.0.0", "vue-i18n": "^9.6.5", "vue-router": "^4.2.5", - "vuetify": "^3.4.0" + "vuetify": "^3.4.1" }, "devDependencies": { "@cypress/grep": "^4.0.1", @@ -47,12 +47,12 @@ "@types/node": "^18.18.9", "@types/sortablejs": "^1.15.5", "@types/uuid": "^9.0.7", - "@typescript-eslint/parser": "^6.10.0", + "@typescript-eslint/parser": "^6.11.0", "@vitejs/plugin-vue": "^4.4.1", "@vue/eslint-config-prettier": "^8.0.0", "@vue/eslint-config-typescript": "^12.0.0", "@vue/tsconfig": "^0.1.3", - "cypress": "^13.5.0", + "cypress": "^13.5.1", "cypress-downloadfile": "1.2.3", "cypress-mochawesome-reporter": "^3.6.1", "eslint": "8.52.0", diff --git a/src/model/coreDam/factory/UploadQueueItemFactory.ts b/src/model/coreDam/factory/UploadQueueItemFactory.ts deleted file mode 100644 index 68f3567a..00000000 --- a/src/model/coreDam/factory/UploadQueueItemFactory.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { - AssetFileFailReason, - type IntegerId, - type UploadQueueItem, - type UploadQueueItemStatus, - type UploadQueueItemType, -} from '@anzusystems/common-admin' -import { DamAssetStatus } from '@/model/coreDam/valueObject/DamAssetStatus' -import type { DamAssetType } from '@/model/coreDam/valueObject/DamAssetType' - -export function useUploadQueueItemFactory() { - const createDefault = ( - key: string, - type: UploadQueueItemType, - status: UploadQueueItemStatus, - assetType: DamAssetType, - chunkSize: number, - licenceId: IntegerId - ): UploadQueueItem => { - return { - key: key, - type: type, - file: null, - status: status, - isDuplicate: false, - duplicateAssetId: null, - assetType: assetType, - assetStatus: DamAssetStatus.Default, - displayTitle: '', - assetId: null, - fileId: null, - externalProviderAssetId: null, - externalProviderName: null, - externalProviderMetadata: {}, - keywords: [], - authors: [], - authorConflicts: [], - customData: {}, - chunks: [], - chunkSize: chunkSize, - currentChunkIndex: 0, - chunkTotalCount: 0, - licenceId: licenceId, - imagePreview: undefined, - progress: { - remainingTime: null, - progressPercent: null, - speed: null, - }, - canEditMetadata: false, - error: { - hasError: false, - message: '', - assetFileFailReason: AssetFileFailReason.Default, - }, - notificationFallbackTimer: undefined, - notificationFallbackTry: 1, - slotName: null, - } - } - - return { - createDefault, - } -} diff --git a/src/services/DamConfigDistributionCustomFormService.ts b/src/services/DamConfigDistributionCustomFormService.ts index 493a0512..bef75eac 100644 --- a/src/services/DamConfigDistributionCustomFormService.ts +++ b/src/services/DamConfigDistributionCustomFormService.ts @@ -1,10 +1,10 @@ import { type Ref, ref } from 'vue' import { fetchDistributionCustomFormElements } from '@/services/api/coreDam/assetCustomFormApi' -import type { DistributionServiceName } from '@/types/coreDam/DamConfig' +import type { DamDistributionServiceName } from '@anzusystems/common-admin' -export const damConfigDistributionCustomFormElements: Ref> = ref({}) +export const damConfigDistributionCustomFormElements: Ref> = ref({}) -export const loadDamConfigDistributionCustomFormElements = (distributionServiceName: DistributionServiceName) => { +export const loadDamConfigDistributionCustomFormElements = (distributionServiceName: DamDistributionServiceName) => { return new Promise((resolve, reject) => { if (damConfigDistributionCustomFormElements.value[distributionServiceName]) { resolve(true) diff --git a/src/services/api/coreDam/assetCustomFormApi.ts b/src/services/api/coreDam/assetCustomFormApi.ts index e754a278..f525133a 100644 --- a/src/services/api/coreDam/assetCustomFormApi.ts +++ b/src/services/api/coreDam/assetCustomFormApi.ts @@ -3,7 +3,7 @@ import { apiFetchOne } from '@anzusystems/common-admin' import { damClient } from '@/services/api/clients/damClient' import { SYSTEM_CORE_DAM } from '@/model/systems' import type { DamAssetType } from '@/model/coreDam/valueObject/DamAssetType' -import type { DistributionServiceName } from '@/types/coreDam/DamConfig' +import type { DamDistributionServiceName } from '@anzusystems/common-admin' const END_POINT = '/adm/v1/asset-custom-form' const ENTITY = 'assetCustomForm' @@ -19,7 +19,7 @@ export const fetchAssetCustomFormElements = (extSystem: IntegerId, assetType: Da ) // todo limit set to 100 for now, add load for pagination? -export const fetchDistributionCustomFormElements = (distributionService: DistributionServiceName) => +export const fetchDistributionCustomFormElements = (distributionService: DamDistributionServiceName) => apiFetchOne<{ data: CustomDataFormElement[] }>( damClient, END_POINT + '/distribution-service/:distributionService/element?order[position]=asc&limit=100', diff --git a/src/services/api/coreDam/distributionApi.ts b/src/services/api/coreDam/distributionApi.ts index 12351522..7a637ec8 100644 --- a/src/services/api/coreDam/distributionApi.ts +++ b/src/services/api/coreDam/distributionApi.ts @@ -8,7 +8,7 @@ import type { DistributionJwItem, DistributionYoutubeItem, } from '@/types/coreDam/Distribution' -import type { DistributionServiceName } from '@/types/coreDam/DamConfig' +import type { DamDistributionServiceName } from '@anzusystems/common-admin' const END_POINT = '/adm/v1/distribution' export const ENTITY = 'distribution' @@ -54,7 +54,7 @@ export const fetchAssetFileDistributionList = < ENTITY ) -export const distributionIsAuthorized = (distributionServiceName: DistributionServiceName) => +export const distributionIsAuthorized = (distributionServiceName: DamDistributionServiceName) => apiFetchOne( damClient, END_POINT + '/:distributionServiceName/authorized', diff --git a/src/services/api/coreDam/distributionCustomApi.ts b/src/services/api/coreDam/distributionCustomApi.ts index 8eba82ab..80d496d1 100644 --- a/src/services/api/coreDam/distributionCustomApi.ts +++ b/src/services/api/coreDam/distributionCustomApi.ts @@ -2,7 +2,7 @@ import type { DocId } from '@anzusystems/common-admin' import { apiCreateOne, apiDeleteOne, apiFetchOne, apiUpdateOne } from '@anzusystems/common-admin' import { damClient } from '@/services/api/clients/damClient' import { SYSTEM_CORE_DAM } from '@/model/systems' -import type { DistributionServiceName } from '@/types/coreDam/DamConfig' +import type { DamDistributionServiceName } from '@anzusystems/common-admin' import type { DistributionCustomCreateRedistributeDto, DistributionCustomItem } from '@/types/coreDam/Distribution' const END_POINT = '/adm/v1/custom-distribution' @@ -30,7 +30,7 @@ export const redistributeCustomDistribution = (distributionId: DocId, data: Dist export const prepareFormDataCustomDistribution = ( assetFileId: DocId, - distributionServiceName: DistributionServiceName + distributionServiceName: DamDistributionServiceName ) => apiFetchOne( damClient, diff --git a/src/services/api/coreDam/distributionJwApi.ts b/src/services/api/coreDam/distributionJwApi.ts index 6e75c05f..284f7403 100644 --- a/src/services/api/coreDam/distributionJwApi.ts +++ b/src/services/api/coreDam/distributionJwApi.ts @@ -2,7 +2,7 @@ import type { DocId } from '@anzusystems/common-admin' import { apiCreateOne, apiFetchOne, apiUpdateOne } from '@anzusystems/common-admin' import { damClient } from '@/services/api/clients/damClient' import { SYSTEM_CORE_DAM } from '@/model/systems' -import type { DistributionServiceName } from '@/types/coreDam/DamConfig' +import type { DamDistributionServiceName } from '@anzusystems/common-admin' import type { DistributionJwCreateRedistributeDto, DistributionJwItem } from '@/types/coreDam/Distribution' const END_POINT = '/adm/v1/jw-distribution' @@ -28,7 +28,7 @@ export const redistributeJwDistribution = (distributionId: DocId, data: Distribu ENTITY ) -export const prepareFormDataJwDistribution = (assetFileId: DocId, distributionServiceName: DistributionServiceName) => +export const prepareFormDataJwDistribution = (assetFileId: DocId, distributionServiceName: DamDistributionServiceName) => apiFetchOne( damClient, END_POINT + '/asset-file/:assetFileId/prepare-payload/:distributionServiceName', diff --git a/src/services/api/coreDam/distributionYoutubeApi.ts b/src/services/api/coreDam/distributionYoutubeApi.ts index e0820e3a..ce94fab5 100644 --- a/src/services/api/coreDam/distributionYoutubeApi.ts +++ b/src/services/api/coreDam/distributionYoutubeApi.ts @@ -9,7 +9,7 @@ import { } from '@anzusystems/common-admin' import { damClient } from '@/services/api/clients/damClient' import { SYSTEM_CORE_DAM } from '@/model/systems' -import type { DistributionServiceName } from '@/types/coreDam/DamConfig' +import type { DamDistributionServiceName } from '@anzusystems/common-admin' import type { DistributionAuthUrl, DistributionYoutubeCreateRedistributeDto, @@ -46,7 +46,7 @@ export const redistributeYoutubeDistribution = ( export const prepareFormDataYoutubeDistribution = ( assetFileId: DocId, - distributionServiceName: DistributionServiceName + distributionServiceName: DamDistributionServiceName ) => apiFetchOne( damClient, @@ -56,7 +56,7 @@ export const prepareFormDataYoutubeDistribution = ( ENTITY ) -export const getYoutubeAuthUrl = (distributionServiceName: DistributionServiceName) => +export const getYoutubeAuthUrl = (distributionServiceName: DamDistributionServiceName) => apiFetchOne( damClient, END_POINT + '/:distributionServiceName/auth-url', @@ -65,7 +65,7 @@ export const getYoutubeAuthUrl = (distributionServiceName: DistributionServiceNa ENTITY ) -export const fetchYoutubeLanguages = (distributionServiceName: DistributionServiceName) => { +export const fetchYoutubeLanguages = (distributionServiceName: DamDistributionServiceName) => { const pagination = usePagination() return apiFetchList( damClient, @@ -78,7 +78,7 @@ export const fetchYoutubeLanguages = (distributionServiceName: DistributionServi ) } -export const fetchYoutubePlaylists = (distributionServiceName: DistributionServiceName, forceReload = false) => { +export const fetchYoutubePlaylists = (distributionServiceName: DamDistributionServiceName, forceReload = false) => { const pagination = usePagination() return apiFetchList( damClient, @@ -91,7 +91,7 @@ export const fetchYoutubePlaylists = (distributionServiceName: DistributionServi ) } -export const logoutYoutube = (distributionServiceName: DistributionServiceName) => +export const logoutYoutube = (distributionServiceName: DamDistributionServiceName) => apiFetchOne( damClient, END_POINT + '/:distributionServiceName/logout', diff --git a/src/services/upload/mimeTypeService.ts b/src/services/upload/mimeTypeService.ts deleted file mode 100644 index 31992ed2..00000000 --- a/src/services/upload/mimeTypeService.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { damConfigExtSystem } from '@/services/DamConfigExtSystemService' -import { DamAssetType } from '@/model/coreDam/valueObject/DamAssetType' - -export const getAssetTypeByMimeType = (mimeType: string): DamAssetType | null => { - for (const [key, values] of Object.entries(damConfigExtSystem)) { - if (!Object.values(DamAssetType).includes(key as DamAssetType)) continue - for (let i = 0; i < values.mimeTypes.length; i++) { - if (mimeType === values.mimeTypes[i]) return key as DamAssetType - } - } - return null -} diff --git a/src/stores/coreDam/distributionCategoryStore.ts b/src/stores/coreDam/distributionCategoryStore.ts index 2aef953c..aa44176e 100644 --- a/src/stores/coreDam/distributionCategoryStore.ts +++ b/src/stores/coreDam/distributionCategoryStore.ts @@ -3,14 +3,14 @@ import { useDistributionCategoryFactory } from '@/model/coreDam/factory/Distribu import type { DistributionCategory } from '@/types/coreDam/DistributionCategory' import type { DistributionCategorySelect } from '@/types/coreDam/DistributionCategorySelect' import type { DistributionCategoryOption } from '@/types/coreDam/DistributionCategoryOption' -import type { DistributionServiceName } from '@/types/coreDam/DamConfig' +import type { DamDistributionServiceName } from '@anzusystems/common-admin' const { createDefault } = useDistributionCategoryFactory() interface State { distributionCategory: DistributionCategory distributionCategorySelects: DistributionCategorySelect[] - distributionCategorySelectedOptions: Partial> + distributionCategorySelectedOptions: Partial> } export const useDistributionCategoryOneStore = defineStore('distributionCategoryOneStore', { diff --git a/src/stores/coreDam/distributionListStore.ts b/src/stores/coreDam/distributionListStore.ts index 6afba6c8..51a40624 100644 --- a/src/stores/coreDam/distributionListStore.ts +++ b/src/stores/coreDam/distributionListStore.ts @@ -1,6 +1,6 @@ import { acceptHMRUpdate, defineStore } from 'pinia' import type { DistributionCustomItem, DistributionJwItem, DistributionYoutubeItem } from '@/types/coreDam/Distribution' -import type { DistributionServiceName } from '@/types/coreDam/DamConfig' +import type { DamDistributionServiceName } from '@anzusystems/common-admin' import type { DocId } from '@anzusystems/common-admin' import { isNull } from '@anzusystems/common-admin' import { DistributionStatus } from '@/model/coreDam/valueObject/DistributionStatus' @@ -22,7 +22,7 @@ export const useDistributionListStore = defineStore('damDistributionListStore', }), getters: { getDistributionAuth: (state) => { - return (distributionService: DistributionServiceName) => { + return (distributionService: DamDistributionServiceName) => { const foundIndex = state.auth.findIndex((item) => item.distributionService === distributionService) if (foundIndex > -1) return state.auth[foundIndex] return null @@ -39,7 +39,7 @@ export const useDistributionListStore = defineStore('damDistributionListStore', setList(items: Array) { this.list = items }, - authorizationMessage(distributionService: DistributionServiceName, success: boolean) { + authorizationMessage(distributionService: DamDistributionServiceName, success: boolean) { const found = this.getDistributionAuth(distributionService) if (found) { found.status = success ? DistributionAuthStatus.Success : DistributionAuthStatus.Error @@ -73,7 +73,7 @@ export const useDistributionListStore = defineStore('damDistributionListStore', } } }, - setAuthStatus(distributionService: DistributionServiceName, status = DistributionAuthStatus.Idle) { + setAuthStatus(distributionService: DamDistributionServiceName, status = DistributionAuthStatus.Idle) { const authItem = this.getDistributionAuth(distributionService) if (authItem) { authItem.status = status @@ -84,7 +84,7 @@ export const useDistributionListStore = defineStore('damDistributionListStore', resetList() { this.list = [] }, - resetAuth(distributionService: DistributionServiceName | null = null) { + resetAuth(distributionService: DamDistributionServiceName | null = null) { if (isNull(distributionService)) { this.auth = [] return diff --git a/src/stores/coreDam/uploadQueuesStore.ts b/src/stores/coreDam/uploadQueuesStore.ts index 012717f3..584bd925 100644 --- a/src/stores/coreDam/uploadQueuesStore.ts +++ b/src/stores/coreDam/uploadQueuesStore.ts @@ -1,5 +1,5 @@ import { acceptHMRUpdate, defineStore } from 'pinia' -import type { AssetFileNullable } from '@anzusystems/common-admin' +import { type AssetFileNullable, getAssetTypeByMimeType, useUploadQueueItemFactory } from '@anzusystems/common-admin' import { type AssetDetailItemDto, type AssetFileFailReason, @@ -15,9 +15,8 @@ import { import { uploadStop, useUpload } from '@/services/upload/uploadService' import { fetchImageFile } from '@/services/api/coreDam/imageApi' import { fetchAsset, fetchAssetListByIds } from '@/services/api/coreDam/assetApi' -import type { UploadQueue } from '@/types/coreDam/UploadQueue' +import type { UploadQueue } from '@anzusystems/common-admin' import { DamAssetStatus } from '@/model/coreDam/valueObject/DamAssetStatus' -import { getAssetTypeByMimeType } from '@/services/upload/mimeTypeService' import { DamAssetType } from '@/model/coreDam/valueObject/DamAssetType' import { fetchAudioFile } from '@/services/api/coreDam/audioApi' import { fetchVideoFile } from '@/services/api/coreDam/videoApi' @@ -26,12 +25,12 @@ import type { AssetExternalProviderId, AssetExternalProviderListDto } from '@/ty import { externalProviderImport } from '@/services/upload/externalProviderImportService' import { useExternalProviders } from '@/composables/system/externalProviders' import { useCurrentAssetLicence } from '@/composables/system/currentExtSystem' -import { useUploadQueueItemFactory } from '@/model/coreDam/factory/UploadQueueItemFactory' import { useCachedAuthors } from '@/views/coreDam/author/composables/cachedAuthors' import { useCachedKeywords } from '@/views/coreDam/keyword/composables/cachedKeywords' import { getAuthorConflicts, updateNewNames } from '@/services/AssetSuggestionsService' import { useAssetDetailStore } from '@/stores/coreDam/assetDetailStore' import { fileTypeFix } from '@/services/fileType' +import { damConfigExtSystem } from '@/services/DamConfigExtSystemService' interface State { queues: { [queueId: string]: UploadQueue } @@ -124,7 +123,7 @@ export const useUploadQueuesStore = defineStore('damUploadQueuesStore', { async addByFiles(queueId: string, files: File[]) { const { currentAssetLicenceId } = useCurrentAssetLicence() for await (const file of files) { - const type = getAssetTypeByMimeType(fileTypeFix(file)) + const type = getAssetTypeByMimeType(fileTypeFix(file), damConfigExtSystem) if (!type) continue const queueItem = createDefault( 'file_' + file.name, diff --git a/src/types/coreDam/DamConfig.ts b/src/types/coreDam/DamConfig.ts index ec413f0e..809423a3 100644 --- a/src/types/coreDam/DamConfig.ts +++ b/src/types/coreDam/DamConfig.ts @@ -1,5 +1,6 @@ import type { DamAssetType } from '@/model/coreDam/valueObject/DamAssetType' import type { DistributionStatus } from '@/model/coreDam/valueObject/DistributionStatus' +import type { DamDistributionServiceName } from '@anzusystems/common-admin' export enum DistributionServiceType { Youtube = 'youtubeDistribution', @@ -47,8 +48,6 @@ export enum UserAuthType { Default = JsonCredentials, } -export type DistributionServiceName = string - export type ExternalProviderAssetName = string export type ExternalProviderAssetConfig = Record @@ -74,14 +73,14 @@ export enum DistributionRequirementStrategy { export interface DistributionRequirementsConfig { title: string requiredAuth: boolean - blockedBy: Array + blockedBy: Array categorySelect: DistributionRequirementsCategorySelectConfig strategy: DistributionRequirementStrategy } export interface DistributionConfig { - distributionServices: Array - distributionRequirements: Record + distributionServices: Array + distributionRequirements: Record } export interface ExtSystemConfig { diff --git a/src/types/coreDam/Distribution.ts b/src/types/coreDam/Distribution.ts index 9b9d0a5c..4aedb6b3 100644 --- a/src/types/coreDam/Distribution.ts +++ b/src/types/coreDam/Distribution.ts @@ -1,4 +1,4 @@ -import type { DistributionServiceName } from '@/types/coreDam/DamConfig' +import type { DamDistributionServiceName } from '@anzusystems/common-admin' import type { DatetimeUTCNullable, DocId } from '@anzusystems/common-admin' import { isDefined } from '@anzusystems/common-admin' import type { DistributionStatus } from '@/model/coreDam/valueObject/DistributionStatus' @@ -38,7 +38,7 @@ interface FlagsYoutube { export interface DistributionAuthorized { authorized: boolean - distributionService: DistributionServiceName + distributionService: DamDistributionServiceName } export interface DistributionAuthUrl { @@ -50,7 +50,7 @@ export interface DistributionItem { assetId: DocId assetFileId: DocId extId: string - distributionService: DistributionServiceName + distributionService: DamDistributionServiceName status: DistributionStatus failReason: DistributionFailReason blockedBy: DocId[] @@ -62,7 +62,7 @@ export interface DistributionJwCreateRedistributeDto { id: DocId publishAt: DatetimeUTCNullable texts: TextsJw - distributionService: DistributionServiceName + distributionService: DamDistributionServiceName blockedBy: DocId[] } @@ -72,7 +72,7 @@ export interface DistributionCustomCreateRedistributeDto { id: DocId publishAt: DatetimeUTCNullable customData: Record - distributionService: DistributionServiceName + distributionService: DamDistributionServiceName blockedBy: DocId[] } @@ -80,7 +80,7 @@ export interface DistributionYoutubeCreateRedistributeDto { id: DocId publishAt: DatetimeUTCNullable texts: TextsYoutube - distributionService: DistributionServiceName + distributionService: DamDistributionServiceName privacy: DistributionYoutubePrivacy language: string playlist: string diff --git a/src/types/coreDam/DistributionAuth.ts b/src/types/coreDam/DistributionAuth.ts index 5f53f07e..545a938d 100644 --- a/src/types/coreDam/DistributionAuth.ts +++ b/src/types/coreDam/DistributionAuth.ts @@ -1,4 +1,4 @@ -import type { DistributionServiceName } from '@/types/coreDam/DamConfig' +import type { DamDistributionServiceName } from '@anzusystems/common-admin' export enum DistributionAuthStatus { Idle = 'idle', @@ -9,6 +9,6 @@ export enum DistributionAuthStatus { } export interface DistributionAuth { - distributionService: DistributionServiceName + distributionService: DamDistributionServiceName status: DistributionAuthStatus } diff --git a/src/types/coreDam/DistributionCategorySelect.ts b/src/types/coreDam/DistributionCategorySelect.ts index 57103ddf..bb181864 100644 --- a/src/types/coreDam/DistributionCategorySelect.ts +++ b/src/types/coreDam/DistributionCategorySelect.ts @@ -1,11 +1,11 @@ import type { AnzuUserAndTimeTrackingAware, DocId, IntegerId, ResourceNameSystemAware } from '@anzusystems/common-admin' import type { DistributionCategoryOption } from '@/types/coreDam/DistributionCategoryOption' import type { DamAssetType } from '@/model/coreDam/valueObject/DamAssetType' -import type { DistributionServiceName } from '@/types/coreDam/DamConfig' +import type { DamDistributionServiceName } from '@anzusystems/common-admin' export interface DistributionCategorySelect extends AnzuUserAndTimeTrackingAware, ResourceNameSystemAware { id: DocId - serviceSlug: DistributionServiceName + serviceSlug: DamDistributionServiceName type: DamAssetType extSystem: IntegerId options: DistributionCategoryOption[] diff --git a/src/types/coreDam/UploadQueue.ts b/src/types/coreDam/UploadQueue.ts deleted file mode 100644 index de76a953..00000000 --- a/src/types/coreDam/UploadQueue.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type { UploadQueueItem } from '@anzusystems/common-admin' - -export interface UploadQueue { - items: UploadQueueItem[] - totalCount: number - processedCount: number - fileInputKey: number // used to reset html input file element - - suggestions: { - newKeywordNames: Set - newAuthorNames: Set - } -} diff --git a/src/views/coreDam/asset/detail/components/distribution/DistributionBlockedBy.vue b/src/views/coreDam/asset/detail/components/distribution/DistributionBlockedBy.vue index 82234c65..58687d5d 100644 --- a/src/views/coreDam/asset/detail/components/distribution/DistributionBlockedBy.vue +++ b/src/views/coreDam/asset/detail/components/distribution/DistributionBlockedBy.vue @@ -1,5 +1,6 @@