@epam/statgpt-sdmx-toolkit 0.1.0-rc.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/LICENSE +21 -0
- package/README.md +68 -0
- package/api/availability-api.d.ts +8 -0
- package/api/dataset-api.d.ts +13 -0
- package/api/index.d.ts +4 -0
- package/api/sdmx-api-client.d.ts +13 -0
- package/api/sdmx-config.d.ts +6 -0
- package/constants/attributes.d.ts +1 -0
- package/constants/dataset-data-url.d.ts +1 -0
- package/constants/filter-operators.d.ts +2 -0
- package/constants/frequency-dimension.d.ts +1 -0
- package/constants/index.d.ts +2 -0
- package/index.cjs +1 -0
- package/index.d.ts +6 -0
- package/index.mjs +1031 -0
- package/models/data/data-message.d.ts +9 -0
- package/models/data/dataset.d.ts +13 -0
- package/models/data/index.d.ts +4 -0
- package/models/data/structure.d.ts +29 -0
- package/models/data/time-series.d.ts +18 -0
- package/models/dataset-query-filters.d.ts +4 -0
- package/models/dimension-group.d.ts +11 -0
- package/models/index.d.ts +14 -0
- package/models/series-filter.d.ts +6 -0
- package/models/splitted-urn.d.ts +8 -0
- package/models/structural-metadata/codelist.d.ts +8 -0
- package/models/structural-metadata/common-artefact-properties.d.ts +9 -0
- package/models/structural-metadata/concept-scheme.d.ts +9 -0
- package/models/structural-metadata/constraints.d.ts +16 -0
- package/models/structural-metadata/data-structure.d.ts +89 -0
- package/models/structural-metadata/dataflow.d.ts +4 -0
- package/models/structural-metadata/representation.d.ts +8 -0
- package/models/structural-metadata-base.d.ts +26 -0
- package/models/structural-metadata.d.ts +16 -0
- package/package.json +21 -0
- package/parsers/index.d.ts +5 -0
- package/parsers/request-parser/data-response-parser.d.ts +12 -0
- package/parsers/time-period-parser/define-period.d.ts +18 -0
- package/parsers/time-period-parser/get-periodic-date.d.ts +7 -0
- package/parsers/time-period-parser/period-sorting.d.ts +1 -0
- package/parsers/time-period-parser/time-period.d.ts +2 -0
- package/types/annotations.d.ts +4 -0
- package/types/attribute-index-value.d.ts +1 -0
- package/types/data-query-params.d.ts +3 -0
- package/types/details.d.ts +4 -0
- package/types/files.d.ts +14 -0
- package/types/index.d.ts +9 -0
- package/types/logical-operator-type.d.ts +12 -0
- package/types/periods.d.ts +5 -0
- package/types/references.d.ts +9 -0
- package/types/representation-text-type.d.ts +11 -0
- package/types/series.d.ts +4 -0
- package/utils/annotations.d.ts +2 -0
- package/utils/constraint.d.ts +8 -0
- package/utils/create-readable-stream.d.ts +1 -0
- package/utils/download.d.ts +3 -0
- package/utils/find-codelist-by-dimension.d.ts +4 -0
- package/utils/get-attached-dimensions-series.d.ts +8 -0
- package/utils/get-attributes-value.d.ts +3 -0
- package/utils/get-available-codes.d.ts +4 -0
- package/utils/get-concept.d.ts +7 -0
- package/utils/get-converted-meta-attributes.d.ts +2 -0
- package/utils/get-dataset.d.ts +2 -0
- package/utils/get-dimension-title.d.ts +3 -0
- package/utils/get-dimensions.d.ts +8 -0
- package/utils/get-file-headers.d.ts +1 -0
- package/utils/get-filtered-items.d.ts +4 -0
- package/utils/get-localized-name.d.ts +2 -0
- package/utils/get-structure-components.d.ts +4 -0
- package/utils/index.d.ts +21 -0
- package/utils/query-filters.d.ts +7 -0
- package/utils/time-series-count.d.ts +2 -0
- package/utils/urn.d.ts +5 -0
- package/utils/weekly-periods.utils.d.ts +9 -0
- package/utils/wildcards.d.ts +6 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Series, SeriesObservations } from '../../types/series';
|
|
2
|
+
export interface DataSet {
|
|
3
|
+
annotations?: number[];
|
|
4
|
+
attributes?: (number | null)[];
|
|
5
|
+
observations?: SeriesObservations;
|
|
6
|
+
series?: Series;
|
|
7
|
+
structure?: number;
|
|
8
|
+
dimensionGroupAttributes?: SeriesObservations;
|
|
9
|
+
}
|
|
10
|
+
export interface SeriesDeclaration {
|
|
11
|
+
attributes: (number | string)[];
|
|
12
|
+
observations: SeriesObservations;
|
|
13
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export interface Structure {
|
|
2
|
+
attributes?: StructureContent<StructureAttribute>;
|
|
3
|
+
dimensions: StructureContent<StructureItemBase>;
|
|
4
|
+
measures: StructureContent<StructureItemBase>;
|
|
5
|
+
}
|
|
6
|
+
export interface StructureContent<T> {
|
|
7
|
+
dataSet?: T[];
|
|
8
|
+
observation?: T[];
|
|
9
|
+
series?: T[];
|
|
10
|
+
dimensionGroup?: T[];
|
|
11
|
+
}
|
|
12
|
+
export interface StructureItemBase {
|
|
13
|
+
id: string;
|
|
14
|
+
values: DimensionValue[];
|
|
15
|
+
}
|
|
16
|
+
export interface StructureAttribute extends StructureItemBase {
|
|
17
|
+
relationship: Relationship;
|
|
18
|
+
}
|
|
19
|
+
export interface Relationship {
|
|
20
|
+
dataflow: Record<string, string>;
|
|
21
|
+
observation: Record<string, string>;
|
|
22
|
+
dimensions?: string[];
|
|
23
|
+
}
|
|
24
|
+
export interface DimensionValue {
|
|
25
|
+
id?: string;
|
|
26
|
+
value?: string;
|
|
27
|
+
ids?: string[];
|
|
28
|
+
values?: string[];
|
|
29
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { DimensionGroupAttribute } from '../dimension-group';
|
|
2
|
+
export interface TimeSeries {
|
|
3
|
+
name: string;
|
|
4
|
+
parsedTimeSeriesValue: string[];
|
|
5
|
+
values: TimeSeriesValue[];
|
|
6
|
+
attributes: TimeSeriesObservation[];
|
|
7
|
+
dataSetAttrs?: TimeSeriesObservation[];
|
|
8
|
+
dimensionGroupAttributes?: DimensionGroupAttribute[];
|
|
9
|
+
}
|
|
10
|
+
export interface TimeSeriesValue {
|
|
11
|
+
values: TimeSeriesObservation[];
|
|
12
|
+
dimensionAtObservation: string;
|
|
13
|
+
obsAttributes: TimeSeriesObservation[];
|
|
14
|
+
}
|
|
15
|
+
export interface TimeSeriesObservation {
|
|
16
|
+
name: string;
|
|
17
|
+
value: string;
|
|
18
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { DimensionValue, StructureAttribute } from './data/structure';
|
|
2
|
+
export interface DimensionGroup {
|
|
3
|
+
values: number[];
|
|
4
|
+
decodedSeriesKey: string;
|
|
5
|
+
codedSeriesKey: string;
|
|
6
|
+
}
|
|
7
|
+
export interface DimensionGroupAttribute {
|
|
8
|
+
dimensionGroupData: DimensionGroup;
|
|
9
|
+
attribute: StructureAttribute;
|
|
10
|
+
dimensionGroupValue: DimensionValue;
|
|
11
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export * from './dataset-query-filters';
|
|
2
|
+
export * from './dimension-group';
|
|
3
|
+
export * from './series-filter';
|
|
4
|
+
export * from './splitted-urn';
|
|
5
|
+
export * from './structural-metadata';
|
|
6
|
+
export * from './data';
|
|
7
|
+
export * from './structural-metadata/codelist';
|
|
8
|
+
export * from './structural-metadata/common-artefact-properties';
|
|
9
|
+
export * from './structural-metadata/concept-scheme';
|
|
10
|
+
export * from './structural-metadata/constraints';
|
|
11
|
+
export * from './structural-metadata/data-structure';
|
|
12
|
+
export * from './structural-metadata/dataflow';
|
|
13
|
+
export * from './structural-metadata/representation';
|
|
14
|
+
export * from './structural-metadata-base';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CommonArtefactProperty } from './common-artefact-properties';
|
|
2
|
+
import { ElementBase } from '../structural-metadata-base';
|
|
3
|
+
export interface Codelist extends CommonArtefactProperty {
|
|
4
|
+
codes?: Code[];
|
|
5
|
+
}
|
|
6
|
+
export interface Code extends ElementBase {
|
|
7
|
+
parent?: boolean;
|
|
8
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Annotation, ElementBase, Link } from '../structural-metadata-base';
|
|
2
|
+
export interface CommonArtefactProperty extends ElementBase {
|
|
3
|
+
agencyID?: string;
|
|
4
|
+
version?: string;
|
|
5
|
+
urn?: string;
|
|
6
|
+
annotations?: Annotation[];
|
|
7
|
+
links?: Link[];
|
|
8
|
+
structure?: string;
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CommonArtefactProperty } from './common-artefact-properties';
|
|
2
|
+
import { Representation } from './representation';
|
|
3
|
+
import { ElementBase } from '../structural-metadata-base';
|
|
4
|
+
export interface ConceptScheme extends CommonArtefactProperty {
|
|
5
|
+
concepts?: Concept[];
|
|
6
|
+
}
|
|
7
|
+
export interface Concept extends ElementBase {
|
|
8
|
+
coreRepresentation?: Representation;
|
|
9
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CommonArtefactProperty } from './common-artefact-properties';
|
|
2
|
+
export interface DataConstraints extends CommonArtefactProperty {
|
|
3
|
+
cubeRegions?: CubeRegion[];
|
|
4
|
+
}
|
|
5
|
+
export interface CubeRegion {
|
|
6
|
+
isIncluded?: boolean;
|
|
7
|
+
memberSelection?: MemberSelection[];
|
|
8
|
+
}
|
|
9
|
+
export interface MemberSelection {
|
|
10
|
+
included: boolean;
|
|
11
|
+
componentId: string;
|
|
12
|
+
selectionValues: MemberSelectionValue[];
|
|
13
|
+
}
|
|
14
|
+
export interface MemberSelectionValue {
|
|
15
|
+
memberValue: string;
|
|
16
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { CommonArtefactProperty } from './common-artefact-properties';
|
|
2
|
+
import { Annotation, Link } from '../structural-metadata-base';
|
|
3
|
+
import { Representation } from './representation';
|
|
4
|
+
export interface DataStructure extends CommonArtefactProperty {
|
|
5
|
+
dataStructureComponents?: DataStructureComponents;
|
|
6
|
+
metadata?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface MetadataStructure extends CommonArtefactProperty {
|
|
9
|
+
metadataStructureComponents?: MetadataStructureComponents;
|
|
10
|
+
}
|
|
11
|
+
export interface DSDComponentBase {
|
|
12
|
+
id?: string;
|
|
13
|
+
name?: string;
|
|
14
|
+
annotations?: Annotation[];
|
|
15
|
+
links?: Link[];
|
|
16
|
+
conceptRoles?: string[];
|
|
17
|
+
assignmentStatus?: AssignmentStatus;
|
|
18
|
+
}
|
|
19
|
+
export interface DSDComponentConceptBase extends DSDComponentBase {
|
|
20
|
+
isMandatory?: boolean;
|
|
21
|
+
conceptIdentity: string;
|
|
22
|
+
localRepresentation?: Representation;
|
|
23
|
+
}
|
|
24
|
+
export interface DataStructureComponents {
|
|
25
|
+
attributeList?: AttributeList;
|
|
26
|
+
dimensionList: DimensionList;
|
|
27
|
+
measureList: MeasureList;
|
|
28
|
+
}
|
|
29
|
+
export interface AttributeList extends DSDComponentBase {
|
|
30
|
+
attributes?: Attribute[];
|
|
31
|
+
metadataAttributeUsages?: MetadataDsdAttribute[];
|
|
32
|
+
}
|
|
33
|
+
export interface MetadataDsdAttribute extends DSDComponentConceptBase {
|
|
34
|
+
metadataAttributeReference: string;
|
|
35
|
+
attributeRelationship: AttributeRelationship;
|
|
36
|
+
}
|
|
37
|
+
export interface Attribute extends DSDComponentConceptBase {
|
|
38
|
+
attributeRelationship: AttributeRelationship;
|
|
39
|
+
}
|
|
40
|
+
export declare enum AssignmentStatus {
|
|
41
|
+
CONDITIONAL = "Conditional",
|
|
42
|
+
MANDATORY = "Mandatory"
|
|
43
|
+
}
|
|
44
|
+
export interface AttributeRelationship {
|
|
45
|
+
attachmentGroups?: string[];
|
|
46
|
+
dimensions?: string[];
|
|
47
|
+
group?: string;
|
|
48
|
+
none?: Record<string, string>;
|
|
49
|
+
observation?: Record<string, string>;
|
|
50
|
+
}
|
|
51
|
+
export interface DimensionList extends DSDComponentBase {
|
|
52
|
+
dimensions?: Dimension[];
|
|
53
|
+
timeDimensions?: TimeDimension[];
|
|
54
|
+
}
|
|
55
|
+
export interface Dimension extends DSDComponentConceptBase {
|
|
56
|
+
position?: number;
|
|
57
|
+
type?: DimensionType;
|
|
58
|
+
}
|
|
59
|
+
export declare enum DimensionType {
|
|
60
|
+
DIMENSION = "Dimension",
|
|
61
|
+
MEASURE_DIMENSION = "MeasureDimension",
|
|
62
|
+
TIME_DIMENSION = "TimeDimension"
|
|
63
|
+
}
|
|
64
|
+
export interface MeasureList extends DSDComponentBase {
|
|
65
|
+
measures?: DSDComponentConceptBase[];
|
|
66
|
+
}
|
|
67
|
+
export interface TimeDimension extends DSDComponentBase {
|
|
68
|
+
conceptIdentity: string;
|
|
69
|
+
localRepresentation: Representation;
|
|
70
|
+
position?: number;
|
|
71
|
+
type?: DimensionType;
|
|
72
|
+
}
|
|
73
|
+
export interface MetadataStructureComponents {
|
|
74
|
+
metadataAttributeList?: ReportStructure;
|
|
75
|
+
}
|
|
76
|
+
export interface ReportStructure extends DSDComponentBase {
|
|
77
|
+
metadataAttributes?: MetadataAttribute[];
|
|
78
|
+
metadataTargets: string[];
|
|
79
|
+
}
|
|
80
|
+
export interface MetadataAttribute extends DSDComponentConceptBase {
|
|
81
|
+
isPresentational?: boolean;
|
|
82
|
+
localRepresentation?: Representation;
|
|
83
|
+
maxOccurs?: OccurrenceType | number;
|
|
84
|
+
metadataAttributes?: MetadataAttribute[];
|
|
85
|
+
minOccurs?: number;
|
|
86
|
+
}
|
|
87
|
+
export declare enum OccurrenceType {
|
|
88
|
+
UNBOUNDED = "unbounded"
|
|
89
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { RepresentationTextType } from '../../types/representation-text-type';
|
|
2
|
+
export interface Representation {
|
|
3
|
+
enumeration?: string;
|
|
4
|
+
format?: RepresentationTextFormat;
|
|
5
|
+
}
|
|
6
|
+
export interface RepresentationTextFormat {
|
|
7
|
+
dataType?: RepresentationTextType;
|
|
8
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface ElementBase {
|
|
2
|
+
id: string;
|
|
3
|
+
name?: string;
|
|
4
|
+
names?: Record<string, string>;
|
|
5
|
+
description?: string;
|
|
6
|
+
descriptions?: Record<string, string>;
|
|
7
|
+
}
|
|
8
|
+
export interface Link {
|
|
9
|
+
href?: string;
|
|
10
|
+
hreflang?: string;
|
|
11
|
+
rel: string;
|
|
12
|
+
title?: string;
|
|
13
|
+
titles?: Record<string, string>;
|
|
14
|
+
type?: string;
|
|
15
|
+
uri?: string;
|
|
16
|
+
urn?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface Annotation {
|
|
19
|
+
id?: string;
|
|
20
|
+
links?: Link[];
|
|
21
|
+
text?: string;
|
|
22
|
+
texts?: Record<string, string>;
|
|
23
|
+
title?: string;
|
|
24
|
+
type?: string;
|
|
25
|
+
value?: string;
|
|
26
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Codelist } from './structural-metadata/codelist';
|
|
2
|
+
import { ConceptScheme } from './structural-metadata/concept-scheme';
|
|
3
|
+
import { DataConstraints } from './structural-metadata/constraints';
|
|
4
|
+
import { DataStructure, MetadataStructure } from './structural-metadata/data-structure';
|
|
5
|
+
import { Dataflow } from './structural-metadata/dataflow';
|
|
6
|
+
export interface StructuralMetaData {
|
|
7
|
+
data: StructuralData;
|
|
8
|
+
}
|
|
9
|
+
export interface StructuralData {
|
|
10
|
+
codelists?: Codelist[];
|
|
11
|
+
conceptSchemes?: ConceptScheme[];
|
|
12
|
+
dataConstraints?: DataConstraints[];
|
|
13
|
+
dataflows?: Dataflow[];
|
|
14
|
+
dataStructures?: DataStructure[];
|
|
15
|
+
metadataStructures?: MetadataStructure[];
|
|
16
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@epam/statgpt-sdmx-toolkit",
|
|
3
|
+
"version": "0.1.0-rc.0",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"exports": {
|
|
6
|
+
".": {
|
|
7
|
+
"import": "./index.mjs",
|
|
8
|
+
"require": "./index.cjs",
|
|
9
|
+
"types": "./index.d.ts"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"main": "./index.cjs",
|
|
13
|
+
"browser": "./index.mjs",
|
|
14
|
+
"module": "./index.mjs",
|
|
15
|
+
"types": "./index.d.ts",
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@epam/statgpt-dial-toolkit": "0.1.0-rc.0",
|
|
18
|
+
"@epam/statgpt-shared-toolkit": "0.1.0-rc.0",
|
|
19
|
+
"compare-versions": "^6.1.1"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export * from './request-parser/data-response-parser';
|
|
2
|
+
export * from './time-period-parser/define-period';
|
|
3
|
+
export * from './time-period-parser/get-periodic-date';
|
|
4
|
+
export * from './time-period-parser/period-sorting';
|
|
5
|
+
export * from './time-period-parser/time-period';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DataMessage } from '../../models/data/data-message';
|
|
2
|
+
import { TimeSeries, TimeSeriesObservation } from '../../models/data/time-series';
|
|
3
|
+
import { StructureItemBase } from '../../models/data/structure';
|
|
4
|
+
export declare const OBSERVATION_KEY = "Observation";
|
|
5
|
+
export declare const getParsedResponse: (data: DataMessage) => TimeSeries[];
|
|
6
|
+
export declare const getSeriesName: (key: string, dimensions?: StructureItemBase[]) => {
|
|
7
|
+
name: string;
|
|
8
|
+
parsedTimeSeriesValue: string[];
|
|
9
|
+
};
|
|
10
|
+
export declare const getSeriesAttributes: (declarations: StructureItemBase[], getPositions: (i: number) => number | string) => TimeSeriesObservation[];
|
|
11
|
+
export declare const getTimeSeriesId: (parsedTimeSeriesValue: string[]) => string;
|
|
12
|
+
export declare const decodeDimensionId: (dimensionId: string) => string;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const quarterPattern: RegExp;
|
|
2
|
+
export declare const weeklyPattern: RegExp;
|
|
3
|
+
export declare const semiAnnuallyPattern: RegExp;
|
|
4
|
+
export declare const yearlyPattern: RegExp;
|
|
5
|
+
export declare const dailyPattern: RegExp;
|
|
6
|
+
export declare const monthlyPattern: RegExp;
|
|
7
|
+
export declare const getYearlyRegExp: (date: string) => RegExpExecArray | null;
|
|
8
|
+
export declare const isYearly: (date: string) => boolean;
|
|
9
|
+
export declare const getSemiAnnuallyRegExp: (date: string) => RegExpExecArray | null;
|
|
10
|
+
export declare const isSemiAnnually: (date: string) => boolean;
|
|
11
|
+
export declare const getMonthlyRegExp: (date: string) => RegExpExecArray | null;
|
|
12
|
+
export declare const isMonthly: (date: string) => boolean;
|
|
13
|
+
export declare const getQuarterlyRegExp: (date: string) => RegExpExecArray | null;
|
|
14
|
+
export declare const isQuarterly: (date: string) => boolean;
|
|
15
|
+
export declare const getDailyRegExp: (date: string) => RegExpExecArray | null;
|
|
16
|
+
export declare const isDaily: (date: string) => boolean;
|
|
17
|
+
export declare const getWeeklyRegExp: (date: string) => RegExpExecArray | null;
|
|
18
|
+
export declare const isWeekly: (date: string) => boolean;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const getQuartersData: (year: number, startMonth?: number, endMonth?: number, includeBorderValues?: boolean, quarterSymbol?: string) => string[];
|
|
2
|
+
export declare const getSemiAnnualData: (year: number, startMonth?: number, endMonth?: number, semiAnnualSymbol?: string) => string[];
|
|
3
|
+
export declare const getQuarterByMonth: (month: number) => number;
|
|
4
|
+
export declare const getMonthlyData: (year: number, startMonth?: number, endMonth?: number, monthSymbol?: string) => string[];
|
|
5
|
+
export declare const getMonthlyDataByQuarter: (year: number, quarter: number, monthSymbol?: string) => string[];
|
|
6
|
+
export declare const getYears: (end: number | string, start: number | string) => number[];
|
|
7
|
+
export declare const getPeriodDate: (period: number | string, isStart?: boolean) => Date;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const sortPeriods: (a: string, b: string) => number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type AttributeIndexValue = number | string | null | undefined | string[];
|
package/types/files.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare enum SdmxDataFormat {
|
|
2
|
+
CSV = "csv",
|
|
3
|
+
JSON = "json",
|
|
4
|
+
XML = "xml"
|
|
5
|
+
}
|
|
6
|
+
export declare enum FileColumnsAttribute {
|
|
7
|
+
ID = "id",
|
|
8
|
+
NAME = "name",
|
|
9
|
+
ID_NAME = "both"
|
|
10
|
+
}
|
|
11
|
+
export declare enum DownloadType {
|
|
12
|
+
FULL_DATASET = "full",
|
|
13
|
+
DATA_IN_TABLE = "query"
|
|
14
|
+
}
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './annotations';
|
|
2
|
+
export * from './attribute-index-value';
|
|
3
|
+
export * from './data-query-params';
|
|
4
|
+
export * from './details';
|
|
5
|
+
export * from './files';
|
|
6
|
+
export * from './logical-operator-type';
|
|
7
|
+
export * from './references';
|
|
8
|
+
export * from './representation-text-type';
|
|
9
|
+
export * from './series';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare enum RepresentationTextType {
|
|
2
|
+
BOOLEAN = "Boolean",
|
|
3
|
+
DATE_TIME = "DateTime",
|
|
4
|
+
DECIMAL = "Decimal",
|
|
5
|
+
INTEGER = "Integer",
|
|
6
|
+
OBSERVATION_TIME_PERIOD = "ObservationalTimePeriod",
|
|
7
|
+
STRING = "String",
|
|
8
|
+
TIME = "Time",
|
|
9
|
+
TIME_RANGE = "TimeRange",
|
|
10
|
+
URI = "URI"
|
|
11
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DataConstraints } from '../models/structural-metadata/constraints';
|
|
2
|
+
import { Annotation } from '../models/structural-metadata-base';
|
|
3
|
+
import { TimeRange } from '../../../shared-toolkit/src/models/time-range';
|
|
4
|
+
import { Codelist } from '../models/structural-metadata/codelist';
|
|
5
|
+
export declare const TIME_PERIOD_END = "time_period_end";
|
|
6
|
+
export declare const TIME_PERIOD_START = "time_period_start";
|
|
7
|
+
export declare const getAnnotationPeriod: (annotations: Annotation[] | undefined) => TimeRange;
|
|
8
|
+
export declare const getAvailableCodesFromConstrains: (codes: Codelist[] | undefined, dimensionId: string | undefined, contentConstraints: DataConstraints[] | undefined, locale?: string, filters?: string[]) => Codelist[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const createReadableStream: (stream: ReadableStream<Uint8Array>) => ReadableStream;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { DatasetQueryFilters } from '../models';
|
|
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;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ConceptScheme } from '../models/structural-metadata/concept-scheme';
|
|
2
|
+
import { Dimension } from '../models/structural-metadata/data-structure';
|
|
3
|
+
import { Codelist } from '../models/structural-metadata/codelist';
|
|
4
|
+
export declare const findCodelistByDimension: (codeLists?: Codelist[], conceptSchemes?: ConceptScheme[], dimension?: Dimension) => Codelist | undefined;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DataMessage } from '../models/data/data-message';
|
|
2
|
+
import { DimensionGroup } from '../models/dimension-group';
|
|
3
|
+
export declare const getAttachedDimensionsSeriesByTsId: (dataMessage: DataMessage | undefined, timeSeriesIds: string[]) => Record<string, DimensionGroup>;
|
|
4
|
+
export declare const getAttachedDimensionsSeriesKey: (dataMessage: DataMessage | undefined, timeSeriesIds: string[], attachedDimensions?: string[]) => {
|
|
5
|
+
codedSeriesKey: string;
|
|
6
|
+
decodedSeriesKey: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const getAttachedDimensionsSeriesByDimension: (dataMessage?: DataMessage, dimensionId?: string, dimensionValue?: string) => Record<string, DimensionGroup>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { DimensionValue, StructureAttribute } from '../models/data/structure';
|
|
2
|
+
import { AttributeIndexValue } from '../types/attribute-index-value';
|
|
3
|
+
export declare const getAttributeValueFromDataQueryResponse: (attribute: StructureAttribute, valueIndex?: AttributeIndexValue) => DimensionValue | undefined;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Dimension } from '../models/structural-metadata/data-structure';
|
|
2
|
+
import { StructureItemBase } from '../models/data/structure';
|
|
3
|
+
import { Codelist } from '../models/structural-metadata/codelist';
|
|
4
|
+
export declare const getAvailableCodes: (dimension?: Dimension, structureDimensions?: StructureItemBase[], codes?: Codelist[], locale?: string) => Codelist[];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Concept, ConceptScheme } from '../models/structural-metadata/concept-scheme';
|
|
2
|
+
export declare const getConcept: (conceptIdentity: string, conceptSchemes: ConceptScheme[]) => Concept | undefined;
|
|
3
|
+
export declare const getConceptWithScheme: (conceptIdentity: string, conceptSchemes: ConceptScheme[]) => {
|
|
4
|
+
scheme: ConceptScheme | undefined;
|
|
5
|
+
concept: Concept | undefined;
|
|
6
|
+
};
|
|
7
|
+
export declare const getConceptByUrn: (concepts: Concept[], childId: string | undefined) => Concept | undefined;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ConceptScheme } from '../models/structural-metadata/concept-scheme';
|
|
2
|
+
import { Dimension } from '../models/structural-metadata/data-structure';
|
|
3
|
+
export declare const getDimensionTitle: (conceptSchemes?: ConceptScheme[], dimension?: Dimension, locale?: string) => string | undefined;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { StructuralData } from '../models/structural-metadata';
|
|
2
|
+
import { Dimension, DimensionList } from '../models/structural-metadata/data-structure';
|
|
3
|
+
import { DataMessage } from '../models/data/data-message';
|
|
4
|
+
import { StructureItemBase } from '../models/data/structure';
|
|
5
|
+
export declare function getDimensions(structures: StructuralData): DimensionList | undefined;
|
|
6
|
+
export declare function getStructureDimensions(structure: DataMessage | null): StructureItemBase[];
|
|
7
|
+
export declare function getTimePeriods(structure: DataMessage | null): string[];
|
|
8
|
+
export declare function getTimeDimension(dimensions: Dimension[]): Dimension;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getRequestAcceptHeader: (format: string, attribute: string) => string;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { StructuralData } from '../models/structural-metadata';
|
|
2
|
+
import { Codelist } from '../models/structural-metadata/codelist';
|
|
3
|
+
import { ElementBase } from '../models/structural-metadata-base';
|
|
4
|
+
export declare const getStructureComponentsMap: (data?: StructuralData) => Map<string, Codelist | ElementBase>;
|
package/utils/index.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export * from './annotations';
|
|
2
|
+
export * from './constraint';
|
|
3
|
+
export * from './find-codelist-by-dimension';
|
|
4
|
+
export * from './get-attached-dimensions-series';
|
|
5
|
+
export * from './get-attributes-value';
|
|
6
|
+
export * from './get-available-codes';
|
|
7
|
+
export * from './get-concept';
|
|
8
|
+
export * from './get-converted-meta-attributes';
|
|
9
|
+
export * from './get-dataset';
|
|
10
|
+
export * from './get-dimension-title';
|
|
11
|
+
export * from './get-dimensions';
|
|
12
|
+
export * from './get-file-headers';
|
|
13
|
+
export * from './get-localized-name';
|
|
14
|
+
export * from './get-structure-components';
|
|
15
|
+
export * from './wildcards';
|
|
16
|
+
export * from './time-series-count';
|
|
17
|
+
export * from './weekly-periods.utils';
|
|
18
|
+
export * from './urn';
|
|
19
|
+
export * from './download';
|
|
20
|
+
export * from './get-filtered-items';
|
|
21
|
+
export * from './query-filters';
|