sodas-sdk 1.0.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/dist/SODAS_SDK_CLASS/DCAT/dcatResource.d.ts +6 -13
  2. package/dist/SODAS_SDK_CLASS/dcatClass.d.ts +1 -0
  3. package/dist/SODAS_SDK_FILE/sodasSDKFile.d.ts +1 -0
  4. package/dist/__tests__/core/auth.medium.test.d.ts +1 -0
  5. package/dist/core/auth.d.ts +46 -0
  6. package/dist/core/error.d.ts +1 -18
  7. package/dist/core/init.d.ts +0 -13
  8. package/dist/core/type.d.ts +1 -1
  9. package/dist/index.browser.js +1363 -4822
  10. package/dist/index.browser.js.map +1 -1
  11. package/dist/index.d.ts +6 -34
  12. package/dist/index.legacy.browser.js +1359 -4828
  13. package/dist/index.legacy.browser.js.map +1 -1
  14. package/dist/index.legacy.node.cjs +1355 -4813
  15. package/dist/index.legacy.node.cjs.map +1 -1
  16. package/dist/index.node.js +1360 -4819
  17. package/dist/index.node.js.map +1 -1
  18. package/package.json +3 -3
  19. package/dist/SODAS_SDK_CLASS/PROF/options.d.ts +0 -98
  20. package/dist/SODAS_SDK_CLASS/PROF/profile.d.ts +0 -74
  21. package/dist/SODAS_SDK_CLASS/PROF/resourceDescriptor.d.ts +0 -83
  22. package/dist/SODAS_SDK_CLASS/SODAS/template.d.ts +0 -56
  23. package/dist/SODAS_SDK_CLASS/SODAS/templateArtifact.d.ts +0 -36
  24. package/dist/SODAS_SDK_CLASS/SODAS/templateDetail.d.ts +0 -42
  25. package/dist/__tests__/SODAS_SDK_CLASS/DCAT/profile.small.test.d.ts +0 -1
  26. package/dist/__tests__/SODAS_SDK_CLASS/PROF/functionality/ai_mappping.test.d.ts +0 -1
  27. package/dist/__tests__/SODAS_SDK_CLASS/PROF/functionality/common.test.d.ts +0 -1
  28. package/dist/__tests__/SODAS_SDK_CLASS/PROF/functionality/constraint.test.d.ts +0 -1
  29. package/dist/__tests__/SODAS_SDK_CLASS/PROF/functionality/example.test.d.ts +0 -1
  30. package/dist/__tests__/SODAS_SDK_CLASS/PROF/functionality/mapping.test.d.ts +0 -1
  31. package/dist/__tests__/SODAS_SDK_CLASS/PROF/functionality/schema.test.d.ts +0 -1
  32. package/dist/__tests__/SODAS_SDK_CLASS/PROF/functionality/schema.utiliity.d.ts +0 -6
  33. package/dist/__tests__/SODAS_SDK_CLASS/PROF/functionality/specification.test.d.ts +0 -1
  34. package/dist/__tests__/SODAS_SDK_CLASS/PROF/functionality/staticOptions.test.d.ts +0 -1
  35. package/dist/__tests__/SODAS_SDK_CLASS/PROF/functionality/type.test.d.ts +0 -1
  36. package/dist/__tests__/SODAS_SDK_CLASS/PROF/functionality/type.utility.d.ts +0 -8
  37. package/dist/__tests__/SODAS_SDK_CLASS/PROF/functionality/validation.test.d.ts +0 -1
  38. package/dist/__tests__/SODAS_SDK_CLASS/PROF/functionality/vocabulary.test.d.ts +0 -1
  39. package/dist/__tests__/SODAS_SDK_CLASS/PROF/profile/CRUD.medium.test.d.ts +0 -1
  40. package/dist/__tests__/SODAS_SDK_CLASS/PROF/profile/LIST.big.test.d.ts +0 -1
  41. package/dist/__tests__/SODAS_SDK_CLASS/PROF/profile/deleteAssociated.medium.test.d.ts +0 -1
  42. package/dist/__tests__/SODAS_SDK_CLASS/PROF/profile/extended.small.test.d.ts +0 -2
  43. package/dist/__tests__/SODAS_SDK_CLASS/PROF/profile/small.test.d.ts +0 -1
  44. package/dist/__tests__/SODAS_SDK_CLASS/PROF/profile/updateWithResourceDescriptor.medium.test.d.ts +0 -1
  45. package/dist/__tests__/SODAS_SDK_CLASS/PROF/profile/withResourceDescriptor.medium.test.d.ts +0 -1
  46. package/dist/__tests__/SODAS_SDK_CLASS/PROF/resourceDescriptor/CRUD.medium.test.d.ts +0 -1
  47. package/dist/__tests__/SODAS_SDK_CLASS/PROF/resourceDescriptor/LIST.big.test.d.ts +0 -1
  48. package/dist/__tests__/SODAS_SDK_CLASS/PROF/resourceDescriptor/deleteAssociated.medium.test.d.ts +0 -1
  49. package/dist/__tests__/SODAS_SDK_CLASS/PROF/resourceDescriptor/extended.small.test.d.ts +0 -2
  50. package/dist/__tests__/SODAS_SDK_CLASS/PROF/resourceDescriptor/small.test.d.ts +0 -1
  51. package/dist/__tests__/SODAS_SDK_CLASS/PROF/resourceDescriptor/updateWithFileArtifact.medium.test.d.ts +0 -1
  52. package/dist/__tests__/SODAS_SDK_CLASS/PROF/resourceDescriptor/updateWithTemplateArtifact.medium.test.d.ts +0 -1
  53. package/dist/__tests__/SODAS_SDK_CLASS/PROF/resourceDescriptor/withFileArtifact.CRD.medium.test.d.ts +0 -1
  54. package/dist/__tests__/SODAS_SDK_CLASS/PROF/resourceDescriptor/withTemplateArtifact.CRD.medium.test.d.ts +0 -1
  55. package/dist/__tests__/SODAS_SDK_CLASS/SODAS/template/CRUD.medium.test.d.ts +0 -1
  56. package/dist/__tests__/SODAS_SDK_CLASS/SODAS/template/LIST.big.test.d.ts +0 -1
  57. package/dist/__tests__/SODAS_SDK_CLASS/SODAS/template/defaultTemplate.medium.test.d.ts +0 -1
  58. package/dist/__tests__/SODAS_SDK_CLASS/SODAS/template/deleteAssociated.medium.test.d.ts +0 -1
  59. package/dist/__tests__/SODAS_SDK_CLASS/SODAS/template/small.test.d.ts +0 -1
  60. package/dist/__tests__/SODAS_SDK_CLASS/SODAS/template/updateWithDetail.medium.test.d.ts +0 -1
  61. package/dist/__tests__/SODAS_SDK_CLASS/SODAS/template/withDetail.medium.test.d.ts +0 -1
  62. package/dist/__tests__/SODAS_SDK_CLASS/SODAS/templateArtifact/CRUD.medium.test.d.ts +0 -1
  63. package/dist/__tests__/SODAS_SDK_CLASS/SODAS/templateArtifact/LIST.big.test.d.ts +0 -1
  64. package/dist/__tests__/SODAS_SDK_CLASS/SODAS/templateArtifact/deleteAssociated.medium.test.d.ts +0 -1
  65. package/dist/__tests__/SODAS_SDK_CLASS/SODAS/templateArtifact/small.test.d.ts +0 -1
  66. package/dist/__tests__/SODAS_SDK_CLASS/SODAS/templateDetail/CRUD.medium.test.d.ts +0 -1
  67. package/dist/__tests__/SODAS_SDK_CLASS/SODAS/templateDetail/LIST.big.test.d.ts +0 -1
  68. package/dist/__tests__/SODAS_SDK_CLASS/SODAS/templateDetail/small.test.d.ts +0 -1
  69. package/dist/__tests__/utility/profile.d.ts +0 -12
  70. package/dist/__tests__/utility/resourceDescriptor.d.ts +0 -15
  71. package/dist/__tests__/utility/template.d.ts +0 -9
  72. package/dist/__tests__/utility/templateArtifact.d.ts +0 -11
  73. package/dist/__tests__/utility/templateDetail.d.ts +0 -8
  74. package/dist/utility/createDefaultTemplates.d.ts +0 -2
  75. package/dist/utility/defaultTemplates/constraint.d.ts +0 -14
  76. package/dist/utility/defaultTemplates/example.d.ts +0 -9
  77. package/dist/utility/defaultTemplates/mapping.d.ts +0 -9
  78. package/dist/utility/defaultTemplates/schema.d.ts +0 -28
  79. package/dist/utility/defaultTemplates/specification.d.ts +0 -8
  80. package/dist/utility/defaultTemplates/type.d.ts +0 -9
  81. package/dist/utility/defaultTemplates/validation.d.ts +0 -8
  82. package/dist/utility/defaultTemplates/vocabulary.d.ts +0 -11
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sodas-sdk",
3
- "version": "1.0.0",
3
+ "version": "1.1.1",
4
4
  "scripts": {
5
5
  "clean": "rm -rf dist",
6
6
  "check": "tsc --noEmit",
@@ -10,12 +10,12 @@
10
10
  "build:browser:legacy": "webpack --config webpack.legacy.browser.config.mjs",
11
11
  "build:node:legacy": "webpack --config webpack.legacy.node.config.mjs",
12
12
  "build": "npm run clean && npm run build:browser && npm run build:node && npm run build:browser:legacy && npm run build:node:legacy",
13
+ "test:core": "ENV_PATH=.env.local jest --bail --no-cache --testMatch '**/core/**.test.ts' --maxWorkers=1",
14
+ "test:core:debug": "ENV_PATH=.env.local node --inspect ./node_modules/.bin/jest --runInBand --bail --no-cache --testMatch '**/core/**.test.ts' --maxWorkers=1",
13
15
  "test:unit": "ENV_PATH=.env.local jest --bail --no-cache --testMatch '**/*unit.test.ts'",
14
16
  "test:unit:debug": "ENV_PATH=.env.local node --inspect ./node_modules/.bin/jest --runInBand --bail --no-cache --testMatch '**/*unit.test.ts'",
15
17
  "test:small": "ENV_PATH=.env.local jest --bail --no-cache --testMatch '**/*small.test.ts' --maxWorkers=1",
16
18
  "test:small:debug": "ENV_PATH=.env.local node --inspect ./node_modules/.bin/jest --runInBand --bail --no-cache --testMatch '**/*small.test.ts' --maxWorkers=1",
17
- "test:func": "ENV_PATH=.env.local jest --bail --no-cache --testMatch '**/functionality/*.test.ts' --maxWorkers=1",
18
- "test:func:debug": "ENV_PATH=.env.local node --inspect ./node_modules/.bin/jest --runInBand --bail --testMatch '**/functionality/*.test.ts'",
19
19
  "test:medium": "ENV_PATH=.env.local jest --bail --no-cache --testMatch '**/*medium.test.ts' --maxWorkers=1",
20
20
  "test:medium:debug": "ENV_PATH=.env.local node --inspect ./node_modules/.bin/jest --runInBand --bail --testMatch '**/*medium.test.ts'",
21
21
  "test:big": "ENV_PATH=.env.local jest --bail --no-cache --testMatch '**/*/*big.test.ts' --maxWorkers=1",
@@ -1,98 +0,0 @@
1
- import { ArtifactType, IRIType, ProfileType, ResourceDescriptorRole, TemplateDetailFunctionality } from "../../core/type";
2
- import { BASIC_TYPE_VALUES, CONVERSION_VALUES, MEASURE_VALUES, ORIGIN_VALUES } from "../../core/values";
3
- import Vocabulary from "../dictionary/vocabulary";
4
- import ResourceDescriptor from "./resourceDescriptor";
5
- export declare const MAPPING_REQUIRED_SCHEMA_FUINCIONALITY_LIST: TemplateDetailFunctionality[];
6
- export declare const MAPPING_REQUIRED_MAPPING_FUINCIONALITY_LIST: TemplateDetailFunctionality[];
7
- export declare function enumToOptions<VALUE_TYPE>(enumObject: Record<string, VALUE_TYPE>): OPTIONS<VALUE_TYPE>;
8
- export declare const ROLE_OPTIONS: ROLE_OPTIONS_TYPE;
9
- export declare const BASIC_TYPE_OPTIONS: TYPE_OPTIONS_TYPE;
10
- export declare const PROFILE_TYPE_OPTIONS: PROFILE_TYPE_OPTIONS_TYPE;
11
- export declare const ARTIFACT_TYPE_OPTIONS: ARTIFACT_TYPE_OPTIONS_TYPE;
12
- export declare const FUNCTIONALITY_OPTIONS: FUNCTIONALITY_OPTIONS_TYPE;
13
- export type OPTION<VALUE_TYPE> = {
14
- name: string;
15
- value: VALUE_TYPE;
16
- };
17
- export type OPTIONS<VALUE_TYPE> = OPTION<VALUE_TYPE>[];
18
- export type FUNCTIONALITY_OPTIONS_TYPE = OPTIONS<TemplateDetailFunctionality>;
19
- export type ROLE_OPTIONS_TYPE = OPTIONS<ResourceDescriptorRole>;
20
- export type PROFILE_TYPE_OPTIONS_TYPE = OPTIONS<ProfileType>;
21
- export type ARTIFACT_TYPE_OPTIONS_TYPE = OPTIONS<ArtifactType>;
22
- export type ORIGIN_OPTIONS_TYPE = OPTIONS<ORIGIN_VALUES>;
23
- export type TYPE_OPTIONS_TYPE = OPTIONS<BASIC_TYPE_VALUES | string>;
24
- export type CUSTOM_TYPE_OPTIONS_TYPE = OPTIONS<string>;
25
- export type CUSTOM_TYPE_DICTIONARY_TYPE = {
26
- [typeName: string]: CUSTOM_TYPE_OPTIONS_TYPE;
27
- };
28
- export type NAMESPACE_OPTIONS_TYPE = OPTIONS<IRIType>;
29
- export type TERM_OPTIONS_TYPE = OPTIONS<string>;
30
- export type TERM_DICTIONARY_TYPE = {
31
- [namespaceIRI: string]: TERM_OPTIONS_TYPE;
32
- };
33
- export type REQUIRED_OPTIONS_TYPE = OPTIONS<boolean>;
34
- export type DEFAULT_OPTIONS_TYPE = OPTIONS<boolean>;
35
- export type FIELD_OPTIONS_TYPE = OPTIONS<string>;
36
- export type TARGET_FIELD_DICTIONARY_TYPE = {
37
- [profileIRI: IRIType]: FIELD_OPTIONS_TYPE;
38
- };
39
- export type TARGET_PROFILE_OPTIONS_TYPE = OPTIONS<IRIType>;
40
- export type MEASURE_OPTIONS_TYPE = OPTIONS<MEASURE_VALUES>;
41
- export type CONVERSION_OPTIONS_TYPE = OPTIONS<CONVERSION_VALUES>;
42
- declare class ProfileOptions {
43
- static OriginOptions: ORIGIN_OPTIONS_TYPE;
44
- static MeasureOptions: MEASURE_OPTIONS_TYPE;
45
- static ConversionOptions: CONVERSION_OPTIONS_TYPE;
46
- static RequiredOptions: REQUIRED_OPTIONS_TYPE;
47
- static DefaultOptions: DEFAULT_OPTIONS_TYPE;
48
- private TypeOptions;
49
- private CustomTypeOptions;
50
- private CustomTypeOptionsDictionary;
51
- private NamespaceOptions;
52
- private TermDictionaryForVocabulary;
53
- private TermDictionaryForSchema;
54
- private FieldOptions;
55
- private TargetProfileOptions;
56
- private TargetFieldDictionary;
57
- private vocabularies;
58
- constructor();
59
- setInitialOptions(type: ProfileType): Promise<void>;
60
- setTermDictionaries(vocabularyIRI: IRIType): Promise<void>;
61
- get TYPE_OPTIONS(): TYPE_OPTIONS_TYPE;
62
- get CUSTOM_TYPE_OPTIONS_DICTIONARY(): CUSTOM_TYPE_DICTIONARY_TYPE;
63
- getCustomTypeOptions(typeName: string): CUSTOM_TYPE_OPTIONS_TYPE;
64
- get TERM_DICTIONARY_FOR_VOCABULARY(): TERM_DICTIONARY_TYPE;
65
- getTermOptionsForVocabulary(namespaceIRI: IRIType): TERM_OPTIONS_TYPE;
66
- get TERM_DICTIONARY_FOR_SCHEMA(): TERM_DICTIONARY_TYPE;
67
- getTermOptionsForSchema(namespaceIRI: IRIType): TERM_DICTIONARY_TYPE;
68
- get NAMESPACE_OPTIONS(): NAMESPACE_OPTIONS_TYPE;
69
- get FIELD_OPTIONS(): FIELD_OPTIONS_TYPE;
70
- get TARGET_PROFILE_OPTIONS(): TARGET_PROFILE_OPTIONS_TYPE;
71
- get TARGET_FIELD_DICTIONARY(): TARGET_FIELD_DICTIONARY_TYPE;
72
- getTargetFieldOptions(profileIRI: IRIType): FIELD_OPTIONS_TYPE;
73
- update(resourceDescriptor: ResourceDescriptor): void;
74
- private checkRequiredFunctionalityList;
75
- private checkRequiredFunctionality;
76
- private updateTypeOptions;
77
- private updateCustomTypeOptions;
78
- private craeteCustomTypeOptionsDictionary;
79
- private updateTermDictionaryForSchema;
80
- private updateFieldOptions;
81
- private updateMeasureOptions;
82
- private updateTargetFieldOptions;
83
- private updateTargetProfileOptions;
84
- validate(resourceDescriptor: ResourceDescriptor): void;
85
- private validateTypeResourceDescriptor;
86
- private validateVocabularyResourceDescriptor;
87
- private validateDCATSchemaResourceDescriptor;
88
- private validateDATASchemaResourceDescriptor;
89
- private validateDCATConstraintResourceDescriptor;
90
- private validateDATAConstraintResourceDescriptor;
91
- private validateValidationResourceDescriptor;
92
- private validateMappingResourceDescriptor;
93
- private validateExampleResourceDescriptor;
94
- private validateSpecificationResourceDescriptor;
95
- private validateGuidanceResourceDescriptor;
96
- getVocabulary(namespaceIRI: IRIType): Vocabulary;
97
- }
98
- export default ProfileOptions;
@@ -1,74 +0,0 @@
1
- import { IRIType, MultiLanguageKeywords, PaginatedResponse, ProfileType, ResourceDescriptorRole, SortOrder, TemplateArtifactValue, TemplateDetailFunctionality } from "../../core/type";
2
- import GOVERNANCE_MODEL, { GOVERNANCE_MODEL_DTO } from "../governanceClass";
3
- import ProfileOptions from "./options";
4
- import ResourceDescriptor, { ResourceDescriptorFormData } from "./resourceDescriptor";
5
- export interface ProfileFormData {
6
- type: ProfileType;
7
- keywords: string[];
8
- name: string;
9
- description: string;
10
- resourceDescriptors: ResourceDescriptorFormData[];
11
- }
12
- export interface ProfileDTO extends GOVERNANCE_MODEL_DTO {
13
- type: ProfileType;
14
- isProfileOf?: string;
15
- keywordMl?: MultiLanguageKeywords;
16
- name: string;
17
- description?: string;
18
- hasToken?: string;
19
- }
20
- export type DEFAULT_MAPPING_API_RESPONSE_ITEM = {
21
- [TemplateDetailFunctionality.FIELD]: string;
22
- [TemplateDetailFunctionality.TARGET_FIELD]: string;
23
- };
24
- declare class Profile extends GOVERNANCE_MODEL {
25
- static MAPPING_API_URL: string;
26
- private Type;
27
- private IsProfileOf;
28
- private KeywordML;
29
- private Name;
30
- private Description;
31
- private HasToken;
32
- private FetchedResourceDescriptorIRIs;
33
- private ResourceDescriptors;
34
- Options: ProfileOptions;
35
- constructor();
36
- static configureAPIURL(url: string): void;
37
- static configureMappingAPIURL(url: string): void;
38
- toDTO(): ProfileDTO;
39
- static createProfile(type: ProfileType): Promise<Profile>;
40
- initilizeOptions(): Promise<void>;
41
- populateFromFormData(data: ProfileFormData): Promise<void>;
42
- populateFromDTO(dto: GOVERNANCE_MODEL_DTO): Promise<void>;
43
- private populateResourceDescriptorsFromDTO;
44
- createDBRecord(): Promise<void>;
45
- private validateTemplateResourceDescriptors;
46
- private deleteNotMaintainedResourceDescriptors;
47
- updateDBRecord(): Promise<void>;
48
- deleteDBRecord(): Promise<void>;
49
- static listDBRecords(pageNumber?: number, pageSize?: number, sortOrder?: SortOrder, type?: ProfileType, name?: string): Promise<PaginatedResponse<Profile>>;
50
- static getAllProfiles(type: ProfileType): Promise<Profile[]>;
51
- createResourceDescriptor(role: ResourceDescriptorRole): ResourceDescriptor;
52
- getResourceDescriptorUsingIndex(index: number): ResourceDescriptor;
53
- getTemplateDescriptorValueOfRole(role: ResourceDescriptorRole): TemplateArtifactValue;
54
- getResourceDescriptorOfRole(role: ResourceDescriptorRole): ResourceDescriptor | null;
55
- removeResourceDescriptorUsingIndex(index: number): void;
56
- removeResourceDescriptorUsingRole(role: ResourceDescriptorRole): void;
57
- getExtended(): Profile;
58
- setMappingResourceDescriptorUsingAI(targetProfile: Profile): Promise<void>;
59
- get resourceDescriptors(): ResourceDescriptor[];
60
- get type(): ProfileType;
61
- set type(value: ProfileType);
62
- get isProfileOf(): IRIType;
63
- get name(): string;
64
- set name(value: string);
65
- get description(): string;
66
- set description(value: string);
67
- get hasToken(): string;
68
- set hasToken(value: string);
69
- setKeywords(keywords: string[], languageCode?: string): void;
70
- addKeyword(keyword: string, languageCode?: string): void;
71
- removeKeyword(keyword: string, languageCode?: string): void;
72
- getKeywords(languageCode?: string): string[];
73
- }
74
- export default Profile;
@@ -1,83 +0,0 @@
1
- import ArtifactFile from "../../SODAS_SDK_FILE/artifactFile";
2
- import { ArtifactType, IDType, IRIType, PaginatedResponse, ResourceDescriptorRole, SortOrder, TemplateArtifactValue, TemplateDetailFunctionality } from "../../core/type";
3
- import Template from "../SODAS/template";
4
- import TemplateArtifact from "../SODAS/templateArtifact";
5
- import GOVERNANCE_MODEL, { GOVERNANCE_MODEL_DTO } from "../governanceClass";
6
- import Profile from "./profile";
7
- export interface ResourceDescriptorFormData {
8
- hasRole: ResourceDescriptorRole;
9
- format: string;
10
- artifactType: ArtifactType;
11
- templateIRI: string;
12
- artifactFile: File;
13
- artifactValue: TemplateArtifactValue;
14
- }
15
- export interface ResourceDescriptorDTO extends GOVERNANCE_MODEL_DTO {
16
- profileId: string;
17
- hasRole: ResourceDescriptorRole;
18
- isInheritedFrom?: string;
19
- hasArtifact?: string;
20
- conformsTo?: string;
21
- format?: string;
22
- useTemplate: boolean;
23
- }
24
- declare class ResourceDescriptor extends GOVERNANCE_MODEL {
25
- private FileArtifact;
26
- private ProfileID;
27
- private HasRole;
28
- private IsInheritedFrom;
29
- private HasArtifact;
30
- private ConformsTo;
31
- private Format;
32
- private UseTemplate;
33
- private Profile;
34
- private TemplateArtifact;
35
- static configureAPIURL(url: string): void;
36
- toDTO(): ResourceDescriptorDTO;
37
- populateFromFormData(data: ResourceDescriptorFormData): Promise<void>;
38
- populateFromDTO(dto: GOVERNANCE_MODEL_DTO): Promise<void>;
39
- private populateTemplateArtifactFromDTO;
40
- hasDBRecord(): boolean;
41
- static listDBRecords(pageNumber?: number, pageSize?: number, sortOrder?: SortOrder, hasRole?: ResourceDescriptorRole, profileId?: string): Promise<PaginatedResponse<ResourceDescriptor>>;
42
- createDBRecord(): Promise<void>;
43
- private changeVocabularyArtifactWhenCreateDBRecord;
44
- updateDBRecord(): Promise<void>;
45
- deleteDBRecord(): Promise<void>;
46
- getExtended(): ResourceDescriptor;
47
- setToUseFile(): void;
48
- setToUseTemplate(): void;
49
- private createTemplateArtifact;
50
- setTemplate(template: Template): void;
51
- getArtifactValue(): TemplateArtifactValue;
52
- appendEmptyArtifactRow(): void;
53
- setArtifactField(index: number, functionality: TemplateDetailFunctionality, value: any): void;
54
- setArtifactValue(templateArtifactValue: TemplateArtifactValue): void;
55
- validateArtifactValue(): void;
56
- setFileArtifactForBrowser(file: File): void;
57
- setFileArtifactForNode(filePath: string): void;
58
- get profile(): Profile;
59
- get profileID(): IDType;
60
- set profileID(profileID: string);
61
- get isInheritedFrom(): IRIType;
62
- get hasArtifact(): string;
63
- get conformsTo(): string;
64
- set conformsTo(inputConformsTo: string);
65
- get format(): string;
66
- set format(inputFormat: string);
67
- get hasRole(): ResourceDescriptorRole;
68
- get template(): Template;
69
- get useTemplate(): boolean;
70
- toJSON(): {
71
- FileArtifact: ArtifactFile;
72
- ProfileID: IDType;
73
- HasRole: ResourceDescriptorRole;
74
- IsInheritedFrom: IRIType;
75
- HasArtifact: string;
76
- ConformsTo: string;
77
- Format: string;
78
- UseTemplate: boolean;
79
- ProfileWithoutResourceDescriptors: Profile;
80
- TemplateArtifact: TemplateArtifact;
81
- };
82
- }
83
- export default ResourceDescriptor;
@@ -1,56 +0,0 @@
1
- import { PaginatedResponse, ProfileType, ResourceDescriptorRole, SortOrder, TemplateDetailFunctionality } from "../../core/type";
2
- import GOVERNANCE_MODEL, { GOVERNANCE_MODEL_DTO } from "../governanceClass";
3
- import TemplateDetail, { TemplateDetailFormData } from "./templateDetail";
4
- export interface TemplateFormData {
5
- role: ResourceDescriptorRole;
6
- type: ProfileType;
7
- name: string;
8
- description?: string;
9
- defaultTemplate: string;
10
- details: TemplateDetailFormData[];
11
- }
12
- export interface TemplateDTO extends GOVERNANCE_MODEL_DTO {
13
- role: ResourceDescriptorRole;
14
- type: ProfileType;
15
- name: string;
16
- description?: string;
17
- defaultTemplate: boolean;
18
- }
19
- declare class Template extends GOVERNANCE_MODEL {
20
- private Role;
21
- private Type;
22
- private Name;
23
- private Description;
24
- private DefaultTemplate;
25
- private FetchedTemplateDetailIRIs;
26
- private TemplateDetails;
27
- static configureAPIURL(url: string): void;
28
- toDTO(): TemplateDTO;
29
- populateFromFormData(data: TemplateFormData): Promise<void>;
30
- populateFromDTO(dto: GOVERNANCE_MODEL_DTO): Promise<void>;
31
- private populateDetailsFromDTO;
32
- createDBRecord(): Promise<void>;
33
- private deleteNotMaintainedDetails;
34
- updateDBRecord(): Promise<void>;
35
- deleteDBRecord(): Promise<void>;
36
- static listDBRecords(pageNumber?: number, pageSize?: number, sortOrder?: SortOrder, role?: ResourceDescriptorRole, type?: ProfileType): Promise<PaginatedResponse<Template>>;
37
- static getDefaultTemplate(role: ResourceDescriptorRole, type: ProfileType): Promise<Template>;
38
- getDetailUsingIndex(index: number): TemplateDetail;
39
- createDetail(functionality: TemplateDetailFunctionality): TemplateDetail;
40
- removeDetailUsingIndex(index: number): void;
41
- private sortDetailsUsingOrdering;
42
- get role(): ResourceDescriptorRole;
43
- set role(value: ResourceDescriptorRole);
44
- get type(): ProfileType;
45
- set type(value: ProfileType);
46
- get name(): string;
47
- set name(value: string);
48
- get description(): string;
49
- set description(value: string);
50
- get defaultTemplate(): boolean;
51
- set defaultTemplate(value: boolean);
52
- get details(): TemplateDetail[];
53
- get functionalityList(): TemplateDetailFunctionality[];
54
- checkHasRequiredFunctionalityList(requiredFunctionaliyList: TemplateDetailFunctionality[]): void;
55
- }
56
- export default Template;
@@ -1,36 +0,0 @@
1
- import { IRIType, PaginatedResponse, SortOrder, TemplateArtifactRow, TemplateArtifactValue, TemplateDetailFunctionality } from "../../core/type";
2
- import GOVERNANCE_MODEL, { GOVERNANCE_MODEL_DTO } from "../governanceClass";
3
- import Template from "./template";
4
- export declare enum MappingPriority {
5
- MANDATORY = "mandatory",
6
- OPTIONAL = "optional"
7
- }
8
- export interface TemplateArtifactDTO extends GOVERNANCE_MODEL_DTO {
9
- resourceDescriptorIri?: string;
10
- templateIri: string;
11
- value: TemplateArtifactValue;
12
- }
13
- declare class TemplateArtifact extends GOVERNANCE_MODEL {
14
- private ResourceDescriptorIRI;
15
- private TemplateIRI;
16
- private Value;
17
- private Template;
18
- static configureAPIURL(url: string): void;
19
- toDTO(): TemplateArtifactDTO;
20
- populateFromFormData(data: any): Promise<void>;
21
- populateFromDTO(dto: GOVERNANCE_MODEL_DTO): Promise<void>;
22
- private populateTemplateFromDTO;
23
- static listDBRecords(pageNumber?: number, pageSize?: number, sortOrder?: SortOrder, templateIri?: string): Promise<PaginatedResponse<TemplateArtifact>>;
24
- getValue(): TemplateArtifactValue;
25
- setValue(templateArtifactValue: TemplateArtifactValue): void;
26
- private validateRowKeys;
27
- appendEmptyRow(): void;
28
- getRow(index: number): TemplateArtifactRow;
29
- setField(index: number, functionality: TemplateDetailFunctionality, value: any): void;
30
- removeRow(index: number): void;
31
- setTemplate(inputTemplate: Template): void;
32
- get template(): Template;
33
- get resourceDescriptorIRI(): IRIType;
34
- get templateIRI(): IRIType;
35
- }
36
- export default TemplateArtifact;
@@ -1,42 +0,0 @@
1
- import { IDType, PaginatedResponse, SortOrder, TemplateDetailFunctionality } from "../../core/type";
2
- import GOVERNANCE_MODEL, { GOVERNANCE_MODEL_DTO } from "../governanceClass";
3
- export interface TemplateDetailFormData {
4
- functionality: TemplateDetailFunctionality;
5
- columnName: string;
6
- placeholder: string;
7
- relativeWidth: string;
8
- }
9
- export interface TemplateDetailDTO extends GOVERNANCE_MODEL_DTO {
10
- templateId: string;
11
- ordering: number;
12
- functionality: TemplateDetailFunctionality;
13
- columnName: string;
14
- relativeWidth: number;
15
- placeholder?: string;
16
- }
17
- declare class TemplateDetail extends GOVERNANCE_MODEL {
18
- private TemplateID;
19
- private Ordering;
20
- private Functionality;
21
- private ColumnName;
22
- private RelativeWidth;
23
- private Placeholder;
24
- static configureAPIURL(url: string): void;
25
- populateFromFormData(data: TemplateDetailFormData): Promise<void>;
26
- toDTO(): TemplateDetailDTO;
27
- populateFromDTO(dto: GOVERNANCE_MODEL_DTO): Promise<void>;
28
- static listDBRecords(pageNumber?: number, pageSize?: number, sortOrder?: SortOrder, templateId?: string): Promise<PaginatedResponse<TemplateDetail>>;
29
- get templateID(): IDType;
30
- set templateID(value: string);
31
- get ordering(): number;
32
- set ordering(value: number);
33
- get functionality(): TemplateDetailFunctionality;
34
- set functionality(value: TemplateDetailFunctionality);
35
- get columnName(): string;
36
- set columnName(value: string);
37
- get relativeWidth(): number;
38
- set relativeWidth(value: number);
39
- get placeholder(): string;
40
- set placeholder(value: string);
41
- }
42
- export default TemplateDetail;
@@ -1,6 +0,0 @@
1
- import { DEFAULT_DATA_SCHEMA_TEMPLATE_ROW_TYPE, DEFAULT_DCAT_SCHEMA_TEMPLATE_ROW_TYPE } from "../../../../utility/defaultTemplates/schema";
2
- export declare const fieldName1 = "FIELD_NAME1";
3
- export declare const fieldName2 = "FIELD_NAME2";
4
- export declare const notExistingFieldName = "NOT_EXISTING_FIELD_NAME";
5
- export declare const TwoFieldsDATASchemaValue: DEFAULT_DATA_SCHEMA_TEMPLATE_ROW_TYPE[];
6
- export declare function getTwoFieldsDCATSchemaValue(): Promise<DEFAULT_DCAT_SCHEMA_TEMPLATE_ROW_TYPE[]>;
@@ -1,8 +0,0 @@
1
- export declare const CreatedTypeName = "CREATED_TYPE_NAME";
2
- export declare const CreatedTypeLabel = "CREATED_TYPE_LABEL";
3
- export declare const CreatedTypeValue = "CREATED_TYPE_NAME";
4
- export declare const SimpleTypeValue: {
5
- name: string;
6
- label: string;
7
- value: string;
8
- }[];
@@ -1,2 +0,0 @@
1
- import Profile from "../../../../SODAS_SDK_CLASS/PROF/profile";
2
- export declare function checkInheritedFieldOfProfile(extended: Profile, source: Profile): void;
@@ -1,2 +0,0 @@
1
- import ResourceDescriptor from "../../../../SODAS_SDK_CLASS/PROF/resourceDescriptor";
2
- export declare function checkInheritedFieldOfResourceDescriptor(extended: ResourceDescriptor, source: ResourceDescriptor): void;
@@ -1,12 +0,0 @@
1
- import Profile from "../../SODAS_SDK_CLASS/PROF/profile";
2
- import { ProfileType } from "../../core/type";
3
- import { ProfileDTO } from "../../SODAS_SDK_CLASS/PROF/profile";
4
- export declare const ProfileComparingExceptFields: string[];
5
- export declare function getTestCreateProfileDTO(index?: number, type?: ProfileType): ProfileDTO;
6
- export declare function getTestUpdateProfileDTO(index?: number, type?: ProfileType): ProfileDTO;
7
- export declare function createTestProfile(index?: number, type?: ProfileType, name?: string): Promise<Profile>;
8
- export declare function createNumberOfTestProfiles(number?: number, type?: ProfileType, name?: string): Promise<Profile[]>;
9
- export declare function deleteAllDCATProfiles(): Promise<void>;
10
- export declare function deleteAllDATAProfiles(): Promise<void>;
11
- export declare function deleteAllProfiles(): Promise<void>;
12
- export declare function compareProfilesExceptOptionsField(expected: Profile, received: Profile): void;
@@ -1,15 +0,0 @@
1
- import { ResourceDescriptorRole } from "../../core/type";
2
- import Profile from "../../SODAS_SDK_CLASS/PROF/profile";
3
- import ResourceDescriptor, { ResourceDescriptorDTO } from "../../SODAS_SDK_CLASS/PROF/resourceDescriptor";
4
- import Template from "../../SODAS_SDK_CLASS/SODAS/template";
5
- export declare const ResourceDescriptorComparingExceptFields: string[];
6
- export declare const UpdatedResourceDescriptorComparingExceptFields: string[];
7
- export declare function setTestExampleResourceDescriptor(resourceDescriptor: ResourceDescriptor, template: Template, updateFlag?: boolean): void;
8
- export declare function getTestCreateResourceDescriptorDTO(profile: Profile, hasArtifact?: string, index?: number, role?: ResourceDescriptorRole): ResourceDescriptorDTO;
9
- export declare function getTestUpdateResourceDescriptorDTO(profile: Profile, hasArtifact?: string, index?: number, role?: ResourceDescriptorRole): ResourceDescriptorDTO;
10
- export declare function createTestResourceDescriptor(profile: Profile, hasArtifact?: string, index?: number, role?: ResourceDescriptorRole): Promise<ResourceDescriptor>;
11
- export declare function createTestTemplateResourceDescriptor(profile: Profile, hasArtifact?: string, index?: number, role?: ResourceDescriptorRole): Promise<ResourceDescriptor>;
12
- export declare function createTestFileArtifactResourceDescriptor(profile: Profile, hasArtifact?: string, index?: number, role?: ResourceDescriptorRole): Promise<ResourceDescriptor>;
13
- export declare function createNumberOfTestResourceDescriptors(profile: Profile, number?: number, role?: ResourceDescriptorRole): Promise<ResourceDescriptor[]>;
14
- export declare function createNumberOfDifferentRoleTestResourceDescriptors(profile: Profile, number?: number): Promise<ResourceDescriptor[]>;
15
- export declare function deleteAllResourceDescriptors(): Promise<void>;
@@ -1,9 +0,0 @@
1
- import { ProfileType, ResourceDescriptorRole } from "../../core/type";
2
- import Template, { TemplateDTO } from "../../SODAS_SDK_CLASS/SODAS/template";
3
- export declare function getTestCreateTemplateDTO(index?: number, role?: ResourceDescriptorRole, type?: ProfileType): TemplateDTO;
4
- export declare function getTestUpdateTemplateDTO(index?: number, role?: ResourceDescriptorRole, type?: ProfileType): TemplateDTO;
5
- export declare function createTestTemplateAlone(index?: number, role?: ResourceDescriptorRole, type?: ProfileType): Promise<Template>;
6
- export declare function createTestTemplatWithoutOneFinalFunctionality(index?: number, role?: ResourceDescriptorRole, type?: ProfileType): Promise<Template>;
7
- export declare function createTestTemplateWithAllFunctionalities(index?: number, role?: ResourceDescriptorRole, type?: ProfileType): Promise<Template>;
8
- export declare function createNumberOfTestTemplates(number?: number, role?: ResourceDescriptorRole, type?: ProfileType): Promise<Template[]>;
9
- export declare function deleteAllTemplates(): Promise<void>;
@@ -1,11 +0,0 @@
1
- import { TemplateArtifactValue } from "../../core/type";
2
- import Template from "../../SODAS_SDK_CLASS/SODAS/template";
3
- import TemplateArtifact, { TemplateArtifactDTO } from "../../SODAS_SDK_CLASS/SODAS/templateArtifact";
4
- export declare const TemplateArtifactComparingExceptFields: string[];
5
- export declare function getTestCreateTemplateArtifactValue(template: Template, length?: number): TemplateArtifactValue;
6
- export declare function getTestUpdateTemplateArtifactValue(template: Template, length?: number): any[];
7
- export declare function getTestCreateTemplateArtifactDTO(template: Template, index?: number): TemplateArtifactDTO;
8
- export declare function getTestUpdateTemplateArtifactDTO(template: Template, index?: number): TemplateArtifactDTO;
9
- export declare function createTestTemplateArtifact(template: Template, index?: number): Promise<TemplateArtifact>;
10
- export declare function createNumberOfTestTemplateArtifacts(template: Template, number?: number): Promise<TemplateArtifact[]>;
11
- export declare function deleteAllTemplateArtifacts(): Promise<void>;