@epam/statgpt-sdmx-toolkit 0.4.0-rc.9 → 0.4.0

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.
package/models/index.d.ts CHANGED
@@ -13,5 +13,6 @@ export * from './structural-metadata/constraints';
13
13
  export * from './structural-metadata/data-structure';
14
14
  export * from './structural-metadata/dataflow';
15
15
  export * from './structural-metadata/representation';
16
+ export * from './structural-metadata/hierarchy';
16
17
  export * from './datasets-metadata';
17
18
  export * from './dataset-dimensions-scheme';
@@ -0,0 +1,8 @@
1
+ import { CodelistItemBase } from './hierarchy';
2
+ export interface Glossary {
3
+ id: string;
4
+ agencyID?: string;
5
+ version?: string;
6
+ name?: string;
7
+ terms?: CodelistItemBase[];
8
+ }
@@ -0,0 +1,27 @@
1
+ import { CommonArtefactProperty } from './common-artefact-properties';
2
+ import { ElementBase } from './structural-metadata-base';
3
+ export interface HierarchicalCode extends ElementBase {
4
+ code: string;
5
+ hierarchicalCodes?: HierarchicalCode[];
6
+ level?: number;
7
+ parent?: string;
8
+ }
9
+ export interface Hierarchy extends CommonArtefactProperty {
10
+ hierarchicalCodes?: HierarchicalCode[];
11
+ }
12
+ export interface CodelistItemBase extends ElementBase {
13
+ parent?: string;
14
+ code?: string;
15
+ }
16
+ export interface CodelistData extends CommonArtefactProperty {
17
+ codes?: CodelistItemBase[];
18
+ }
19
+ export interface TreeNode<T> {
20
+ id?: string;
21
+ name?: string;
22
+ children: TreeNode<T>[];
23
+ isExpanded?: boolean;
24
+ disabled?: boolean;
25
+ parent?: string;
26
+ metadata: T;
27
+ }
@@ -3,6 +3,8 @@ import { ConceptScheme } from './concept-scheme';
3
3
  import { DataConstraints } from './constraints';
4
4
  import { DataStructure, MetadataStructure } from './data-structure';
5
5
  import { Dataflow } from './dataflow';
6
+ import { Hierarchy } from './hierarchy';
7
+ import { Glossary } from './glossary';
6
8
  export interface StructuralMetaData {
7
9
  data: StructuralData;
8
10
  }
@@ -13,4 +15,7 @@ export interface StructuralData {
13
15
  dataflows?: Dataflow[];
14
16
  dataStructures?: DataStructure[];
15
17
  metadataStructures?: MetadataStructure[];
18
+ hierarchies?: Hierarchy[];
19
+ /** SDMX-Plus API response format — used as a fallback when `codelists` is absent. */
20
+ glossaries?: Glossary[];
16
21
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epam/statgpt-sdmx-toolkit",
3
- "version": "0.4.0-rc.9",
3
+ "version": "0.4.0",
4
4
  "license": "MIT",
5
5
  "exports": {
6
6
  ".": {
@@ -14,8 +14,8 @@
14
14
  "module": "./index.mjs",
15
15
  "types": "./index.d.ts",
16
16
  "dependencies": {
17
- "@epam/statgpt-dial-toolkit": "0.4.0-rc.9",
18
- "@epam/statgpt-shared-toolkit": "0.4.0-rc.9",
17
+ "@epam/statgpt-dial-toolkit": "0.4.0",
18
+ "@epam/statgpt-shared-toolkit": "0.4.0",
19
19
  "compare-versions": "^6.1.1",
20
20
  "date-fns": "^4.1.0"
21
21
  }
@@ -1,3 +1,3 @@
1
1
  import { DatasetQueryFilters } from '../models';
2
2
  import { FileColumnsAttribute, SdmxDataFormat } from '../types';
3
- export declare const openDownloadWindow: (urn: string, format: SdmxDataFormat, language: string, attribute: FileColumnsAttribute, filters: DatasetQueryFilters, filename: string, isMetadata?: boolean) => void;
3
+ export declare const openDownloadWindow: (urn: string, format: SdmxDataFormat, language: string, attribute: FileColumnsAttribute, filters: DatasetQueryFilters, filename: string, isMetadata?: boolean) => Promise<void>;
@@ -0,0 +1,8 @@
1
+ import { CodelistItemBase, CodelistData, Hierarchy } from '../models/structural-metadata/hierarchy';
2
+ import { DataConstraints } from '../models/structural-metadata/constraints';
3
+ import { StructuralData } from '../models/structural-metadata/structural-metadata';
4
+ export declare function resolveCodelistsFromResponse(data?: StructuralData): CodelistData[];
5
+ export declare function urnMatchesIgnoreVersion(urnA: string, urnB: string): boolean;
6
+ export declare function getHierarchyCodes(hierarchy?: Hierarchy, codelists?: CodelistData[]): CodelistItemBase[];
7
+ export declare function getCodeListsData(codelists: CodelistData[]): Record<string, CodelistItemBase[]>;
8
+ export declare function getHierarchyAvailableCodes(codes: CodelistItemBase[], dimensionId: string, contentConstraints?: DataConstraints[]): CodelistItemBase[];
package/utils/index.d.ts CHANGED
@@ -21,3 +21,4 @@ export * from './get-filtered-items';
21
21
  export * from './query-filters';
22
22
  export * from './get-periods';
23
23
  export * from './build-dataset-dimensions-metadata-map';
24
+ export * from './hierarchy-utils';
@@ -2,5 +2,5 @@ import { CommonArtefactProperty } from '../models/structural-metadata/common-art
2
2
  export declare const SINGLE_WILDCARD_SYMBOL = "+";
3
3
  export declare const getArtifactByUrnWithWildCard: (urn: string | undefined, artifacts: CommonArtefactProperty[]) => CommonArtefactProperty | undefined;
4
4
  export declare const getResolvedVersionBySingleWildcard: (wildcard: string, versions: string[]) => string[];
5
- export declare const getWildCardRegexp: (wildcard: string) => RegExp;
5
+ export declare const getWildCardPrefix: (wildcard: string) => string;
6
6
  export declare const isWildCardVersionCorrect: (wildcard: string, version: string) => boolean;