From c4c95ae365b5001386ae803b77c35651e5ba60b7 Mon Sep 17 00:00:00 2001 From: Kim Lan Phan Hoang Date: Thu, 12 Dec 2024 16:56:46 +0100 Subject: [PATCH] feat: remove old cc license (#724) * feat: remove old cc license * refactor: do not export old cc license --- src/enums/ccLicenses.ts | 7 ------- src/index.ts | 5 +---- src/item/itemSettings.ts | 12 ++---------- 3 files changed, 3 insertions(+), 21 deletions(-) diff --git a/src/enums/ccLicenses.ts b/src/enums/ccLicenses.ts index 54153cd8..69f18995 100644 --- a/src/enums/ccLicenses.ts +++ b/src/enums/ccLicenses.ts @@ -7,10 +7,3 @@ export enum CCLicenseAdaptions { CC_BY_NC_ND = 'CC BY-NC-ND', CC0 = 'CC0', } -/** - * @deprecated old license format that might be removed at some point - */ -export enum OldCCLicenseAdaptations { - allow = 'allow', - alike = 'alike', -} diff --git a/src/index.ts b/src/index.ts index 02f19679..5be41e5d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -53,10 +53,7 @@ export * from './enums/permissionLevel/permissionLevel.js'; /** * Creative common licenses */ -export { - CCLicenseAdaptions, - OldCCLicenseAdaptations, -} from './enums/ccLicenses.js'; +export { CCLicenseAdaptions } from './enums/ccLicenses.js'; /** * Graasp Services diff --git a/src/item/itemSettings.ts b/src/item/itemSettings.ts index 69d75a0a..f7589f9f 100644 --- a/src/item/itemSettings.ts +++ b/src/item/itemSettings.ts @@ -1,7 +1,4 @@ -import { - CCLicenseAdaptions, - OldCCLicenseAdaptations, -} from '@/enums/ccLicenses.js'; +import { CCLicenseAdaptions } from '@/enums/ccLicenses.js'; import { DescriptionPlacementType } from '@/enums/descriptionPlacement.js'; import { Nullable } from '@/typeUtils.js'; @@ -20,11 +17,6 @@ export type ItemSettings = { tags?: string[]; displayCoEditors?: boolean; // allow null to delete setting in the backend - ccLicenseAdaption?: Nullable< - | `${CCLicenseAdaptions}` - | CCLicenseAdaptions - // TODO: these are the old licenses, we might remove them at some point. - | `${OldCCLicenseAdaptations}` - >; + ccLicenseAdaption?: Nullable<`${CCLicenseAdaptions}` | CCLicenseAdaptions>; descriptionPlacement?: DescriptionPlacementType; };