2023-10-27 19:10:21 +02:00
|
|
|
import { DescriptionTemplateFieldDataExternalDatasetType } from "@app/core/common/enum/description-template-field-data-external-dataset-type";
|
|
|
|
import { DescriptionTemplateFieldType } from "@app/core/common/enum/description-template-field-type";
|
|
|
|
import { DescriptionTemplateFieldValidationType } from "@app/core/common/enum/description-template-field-validation-type";
|
2023-10-30 14:30:46 +01:00
|
|
|
import { DescriptionTemplateStatus } from "@app/core/common/enum/description-template-status";
|
2023-11-24 17:42:23 +01:00
|
|
|
import { UserDescriptionTemplateRole } from "@app/core/common/enum/user-description-template-role";
|
2023-10-27 19:10:21 +02:00
|
|
|
import { BaseEntity } from "@common/base/base-entity.model";
|
2023-10-27 17:56:19 +02:00
|
|
|
import { Guid } from "@common/types/guid";
|
2023-10-27 19:10:21 +02:00
|
|
|
import { DescriptionTemplateType } from "../description-template-type/description-template-type";
|
2023-11-24 17:42:23 +01:00
|
|
|
import { User } from "../user/user";
|
2023-10-27 17:56:19 +02:00
|
|
|
|
|
|
|
|
|
|
|
export interface DescriptionTemplate extends BaseEntity {
|
|
|
|
label: string;
|
|
|
|
description: string;
|
2023-10-27 19:10:21 +02:00
|
|
|
groupId: Guid;
|
|
|
|
version: string;
|
|
|
|
language: string;
|
|
|
|
type: DescriptionTemplateType;
|
2023-10-30 14:30:46 +01:00
|
|
|
status: DescriptionTemplateStatus;
|
2023-10-27 19:10:21 +02:00
|
|
|
definition: DescriptionTemplateDefinition;
|
2023-11-24 17:42:23 +01:00
|
|
|
users: UserDescriptionTemplate[];
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface UserDescriptionTemplate extends BaseEntity {
|
|
|
|
descriptionTemplate?: DescriptionTemplate;
|
|
|
|
role?: UserDescriptionTemplateRole;
|
|
|
|
user?: User;
|
2023-10-27 17:56:19 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface DescriptionTemplateDefinition {
|
2023-10-27 19:10:21 +02:00
|
|
|
pages?: DescriptionTemplatePage[];
|
|
|
|
sections?: DescriptionTemplateSection[];
|
2023-10-27 17:56:19 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-10-27 19:10:21 +02:00
|
|
|
export interface DescriptionTemplatePage {
|
2023-10-27 17:56:19 +02:00
|
|
|
id: Guid;
|
|
|
|
ordinal: number;
|
2023-10-27 19:10:21 +02:00
|
|
|
title: string;
|
2023-10-27 17:56:19 +02:00
|
|
|
}
|
|
|
|
|
2023-10-27 19:10:21 +02:00
|
|
|
export interface DescriptionTemplateSection {
|
2023-10-27 17:56:19 +02:00
|
|
|
id: Guid;
|
2023-10-27 19:10:21 +02:00
|
|
|
ordinal: number;
|
|
|
|
defaultVisibility: boolean;
|
|
|
|
multiplicity: boolean;
|
|
|
|
numbering: string;
|
|
|
|
page: string;
|
|
|
|
title: string;
|
|
|
|
description: string;
|
|
|
|
extendedDescription: string;
|
|
|
|
|
|
|
|
sections?: DescriptionTemplateSection[];
|
|
|
|
fieldSets: DescriptionTemplateFieldSet[];
|
2023-10-27 17:56:19 +02:00
|
|
|
}
|
|
|
|
|
2023-10-27 19:10:21 +02:00
|
|
|
export interface DescriptionTemplateFieldSet {
|
2023-10-27 17:56:19 +02:00
|
|
|
id: Guid;
|
2023-10-27 19:10:21 +02:00
|
|
|
ordinal: number;
|
|
|
|
numbering: string;
|
|
|
|
title: string;
|
2023-10-27 17:56:19 +02:00
|
|
|
description: string;
|
2023-10-27 19:10:21 +02:00
|
|
|
extendedDescription: string;
|
|
|
|
additionalInformation: string;
|
|
|
|
multiplicity: DescriptionTemplateMultiplicity
|
|
|
|
hasCommentField: boolean;
|
|
|
|
fields: DescriptionTemplateField[];
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface DescriptionTemplateField {
|
|
|
|
id: Guid;
|
2023-10-27 17:56:19 +02:00
|
|
|
ordinal: number;
|
2023-11-24 17:42:23 +01:00
|
|
|
numbering?: string;
|
|
|
|
schematics?: string[];
|
|
|
|
defaultValue?: string;
|
|
|
|
visibilityRules?: DescriptionTemplateRule[];
|
|
|
|
validations?: DescriptionTemplateFieldValidationType[];
|
2023-10-27 19:10:21 +02:00
|
|
|
includeInExport: boolean;
|
2023-11-24 17:42:23 +01:00
|
|
|
data?: DescriptionTemplateBaseFieldData;
|
2023-10-27 17:56:19 +02:00
|
|
|
}
|
|
|
|
|
2023-10-27 19:10:21 +02:00
|
|
|
export interface DescriptionTemplateRule {
|
|
|
|
target: string;
|
|
|
|
value: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface DescriptionTemplateMultiplicity {
|
|
|
|
min: number;
|
|
|
|
max: number;
|
|
|
|
placeholder: string;
|
|
|
|
tableView: boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface DescriptionTemplateBaseFieldData {
|
2023-10-27 17:56:19 +02:00
|
|
|
label: string;
|
2023-11-24 17:42:23 +01:00
|
|
|
fieldType: DescriptionTemplateFieldType;
|
2023-10-27 17:56:19 +02:00
|
|
|
}
|
|
|
|
|
2023-10-27 19:10:21 +02:00
|
|
|
|
|
|
|
//
|
|
|
|
// Field Types
|
|
|
|
//
|
2023-11-24 17:42:23 +01:00
|
|
|
export interface DescriptionTemplateAutoCompleteData extends DescriptionTemplateBaseFieldData {
|
2023-10-27 19:10:21 +02:00
|
|
|
multiAutoComplete: boolean;
|
|
|
|
autoCompleteSingleDataList: DescriptionTemplateAutoCompleteSingleData[];
|
2023-10-27 17:56:19 +02:00
|
|
|
}
|
|
|
|
|
2023-10-27 19:10:21 +02:00
|
|
|
export interface DescriptionTemplateBooleanDecisionData extends DescriptionTemplateBaseFieldData {
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface DescriptionTemplateCheckBoxData extends DescriptionTemplateBaseFieldData {
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface DescriptionTemplateCurrencyData extends DescriptionTemplateBaseFieldData {
|
|
|
|
}
|
|
|
|
|
2023-11-24 17:42:23 +01:00
|
|
|
export interface DescriptionTemplateDataRepositoryData extends DescriptionTemplatePlaceholderAndMultiplicityData {
|
2023-10-27 19:10:21 +02:00
|
|
|
}
|
|
|
|
|
2023-11-24 17:42:23 +01:00
|
|
|
export interface DescriptionTemplateDatasetAutoCompleteData extends DescriptionTemplatePlaceholderAndMultiplicityData {
|
2023-10-27 19:10:21 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface DescriptionTemplateDatasetIdentifierData extends DescriptionTemplateBaseFieldData {
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface DescriptionTemplateDatePickerData extends DescriptionTemplateBaseFieldData {
|
|
|
|
}
|
|
|
|
|
2023-11-24 17:42:23 +01:00
|
|
|
export interface DescriptionTemplateDmpAutoCompleteData extends DescriptionTemplatePlaceholderAndMultiplicityData {
|
2023-10-27 19:10:21 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface DescriptionTemplateExternalDatasetData extends DescriptionTemplateBaseFieldData {
|
|
|
|
multiAutoComplete: boolean;
|
2023-11-24 17:42:23 +01:00
|
|
|
type?: DescriptionTemplateFieldDataExternalDatasetType;
|
2023-10-27 19:10:21 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface DescriptionTemplateFreeTextData extends DescriptionTemplateBaseFieldData {
|
|
|
|
}
|
|
|
|
|
2023-11-24 17:42:23 +01:00
|
|
|
export interface DescriptionTemplatePlaceholderAndMultiplicityData extends DescriptionTemplateBaseFieldData {
|
|
|
|
multiAutoComplete: boolean;
|
2023-10-27 19:10:21 +02:00
|
|
|
}
|
|
|
|
|
2023-11-24 17:42:23 +01:00
|
|
|
export interface DescriptionTemplateLicenseData extends DescriptionTemplatePlaceholderAndMultiplicityData {
|
2023-10-27 19:10:21 +02:00
|
|
|
}
|
|
|
|
|
2023-11-24 17:42:23 +01:00
|
|
|
export interface DescriptionTemplateOrganizationData extends DescriptionTemplatePlaceholderAndMultiplicityData {
|
2023-10-27 19:10:21 +02:00
|
|
|
}
|
|
|
|
|
2023-11-24 17:42:23 +01:00
|
|
|
export interface DescriptionTemplatePublicationData extends DescriptionTemplatePlaceholderAndMultiplicityData {
|
2023-10-27 19:10:21 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface DescriptionTemplateRadioBoxData extends DescriptionTemplateBaseFieldData {
|
2023-11-24 17:42:23 +01:00
|
|
|
options: DescriptionTemplateRadioBoxOption[];
|
2023-10-27 19:10:21 +02:00
|
|
|
}
|
|
|
|
|
2023-11-24 17:42:23 +01:00
|
|
|
export interface DescriptionTemplateRegistryData extends DescriptionTemplatePlaceholderAndMultiplicityData {
|
2023-10-27 19:10:21 +02:00
|
|
|
}
|
|
|
|
|
2023-11-24 17:42:23 +01:00
|
|
|
export interface DescriptionTemplateResearcherAutoCompleteData extends DescriptionTemplatePlaceholderAndMultiplicityData {
|
2023-10-27 19:10:21 +02:00
|
|
|
}
|
|
|
|
|
2023-11-24 17:42:23 +01:00
|
|
|
export interface DescriptionTemplateResearcherData extends DescriptionTemplatePlaceholderAndMultiplicityData {
|
2023-10-27 19:10:21 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface DescriptionTemplateRichTextAreaData extends DescriptionTemplateBaseFieldData {
|
|
|
|
}
|
|
|
|
|
2023-11-24 17:42:23 +01:00
|
|
|
export interface DescriptionTemplateServiceData extends DescriptionTemplatePlaceholderAndMultiplicityData {
|
2023-10-27 19:10:21 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface DescriptionTemplateTagData extends DescriptionTemplateBaseFieldData {
|
|
|
|
}
|
|
|
|
|
2023-11-24 17:42:23 +01:00
|
|
|
export interface DescriptionTemplateTaxonomyData extends DescriptionTemplatePlaceholderAndMultiplicityData {
|
2023-10-27 19:10:21 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface DescriptionTemplateTextAreaData extends DescriptionTemplateBaseFieldData {
|
|
|
|
}
|
|
|
|
|
2023-11-24 17:42:23 +01:00
|
|
|
export interface DescriptionTemplateUploadData extends DescriptionTemplateBaseFieldData {
|
2023-10-27 19:10:21 +02:00
|
|
|
types: DescriptionTemplateUploadOption[];
|
2023-11-24 17:42:23 +01:00
|
|
|
maxFileSizeInMB: number;
|
2023-10-27 19:10:21 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface DescriptionTemplateValidationData extends DescriptionTemplateBaseFieldData {
|
|
|
|
}
|
|
|
|
|
2023-11-24 17:42:23 +01:00
|
|
|
export interface DescriptionTemplateWordListData extends DescriptionTemplateBaseFieldData {
|
2023-10-27 19:10:21 +02:00
|
|
|
options: DescriptionTemplateComboBoxOption[];
|
|
|
|
multiList: boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
|
|
|
// Others
|
|
|
|
//
|
|
|
|
export interface DescriptionTemplateAutoCompleteSingleData {
|
|
|
|
autocompleteType: string;
|
|
|
|
url: string;
|
|
|
|
autoCompleteOptions: DescriptionTemplateComboBoxOption;
|
|
|
|
optionsRoot: string;
|
|
|
|
hasAuth: boolean;
|
|
|
|
auth: DescriptionTemplateAuthAutoCompleteData
|
|
|
|
method: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface DescriptionTemplateAuthAutoCompleteData {
|
|
|
|
url: string;
|
|
|
|
method: string;
|
|
|
|
body: string;
|
|
|
|
path: string;
|
|
|
|
type: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface DescriptionTemplateComboBoxOption {
|
2023-10-27 17:56:19 +02:00
|
|
|
label: string;
|
2023-10-27 19:10:21 +02:00
|
|
|
value: string;
|
|
|
|
source: string;
|
|
|
|
uri: string;
|
2023-10-27 17:56:19 +02:00
|
|
|
}
|
|
|
|
|
2023-10-27 19:10:21 +02:00
|
|
|
export interface DescriptionTemplateRadioBoxOption {
|
2023-10-27 17:56:19 +02:00
|
|
|
label: string;
|
2023-10-27 19:10:21 +02:00
|
|
|
value: string;
|
2023-10-27 17:56:19 +02:00
|
|
|
}
|
|
|
|
|
2023-10-27 19:10:21 +02:00
|
|
|
export interface DescriptionTemplateUploadOption {
|
2023-10-27 17:56:19 +02:00
|
|
|
label: string;
|
2023-10-27 19:10:21 +02:00
|
|
|
value: string;
|
2023-10-27 17:56:19 +02:00
|
|
|
}
|