Skip to content

Commit 5f3f273

Browse files
patch: Updated api client to latest api specification (#1043)
* generated api-client with npm run build-api-client * refactor: rename TableService to TablesService * fix format * refactor: update CodeListType to CodelistType in imports and usage * refactor: remove unused imports and references to FolderContentItemTypeEnum in tests * refactor: update Table category import to TableCategory in tests * Remove unused mapper * refactor: update codeList to codelist in DrawerSave, TableDataProvider, and TableSelectionResponseMapper * refactor: update codeLists to codelists in JsonStat2ResponseMapper * refactor: update codeList to codelist in TableSelectionResponseMapper test * Remove unused type from shared-types and export from index * Fixing case sensitivity file names, pt1 * Fixing case sensitivity file names, pt2 * Changed name for service in queryTablesByKeyword function * ran npm build-api-client for savedquery response change --------- Co-authored-by: Sjur Sutterud Sagen <sjs@ssb.no>
1 parent 6f9d68f commit 5f3f273

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+328
-525
lines changed

packages/pxweb2-api-client/src/index.ts

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ export { Adjustment } from './models/Adjustment';
1111
export type { ApiFeature } from './models/ApiFeature';
1212
export type { BasePeriod } from './models/BasePeriod';
1313
export { ClassType } from './models/ClassType';
14-
export type { codeListId } from './models/codeListId';
15-
export type { CodeListInformation } from './models/CodeListInformation';
16-
export type { CodeListMetadata } from './models/CodeListMetadata';
17-
export type { CodeListResponse } from './models/CodeListResponse';
18-
export type { CodeLists } from './models/CodeLists';
19-
export type { CodeListsResponse } from './models/CodeListsResponse';
20-
export { CodeListType } from './models/CodeListType';
14+
export type { codelistId } from './models/codelistId';
15+
export type { CodelistInformation } from './models/CodelistInformation';
16+
export type { CodelistMetadata } from './models/CodelistMetadata';
17+
export type { CodelistResponse } from './models/CodelistResponse';
18+
export type { Codelists } from './models/Codelists';
19+
export type { CodelistsResponse } from './models/CodelistsResponse';
20+
export { CodelistType } from './models/CodelistType';
2121
export type { ConfigResponse } from './models/ConfigResponse';
2222
export type { Contact } from './models/Contact';
2323
export { Dataset } from './models/Dataset';
@@ -26,14 +26,9 @@ export type { Discontinued } from './models/Discontinued';
2626
export type { extension } from './models/extension';
2727
export type { extension_dimension } from './models/extension_dimension';
2828
export type { extension_root } from './models/extension_root';
29-
export type { FolderContentItem } from './models/FolderContentItem';
30-
export { FolderContentItemTypeEnum } from './models/FolderContentItemTypeEnum';
31-
export type { FolderInformation } from './models/FolderInformation';
32-
export type { FolderResponse } from './models/FolderResponse';
33-
export type { Heading } from './models/Heading';
3429
export type { href } from './models/href';
3530
export type { id } from './models/id';
36-
export type { include_discontinued } from './models/include_discontinued';
31+
export type { includeDiscontinued } from './models/includeDiscontinued';
3732
export type { jsonstat_category } from './models/jsonstat_category';
3833
export type { jsonstat_extension_link } from './models/jsonstat_extension_link';
3934
export type { jsonstat_link } from './models/jsonstat_link';
@@ -60,12 +55,14 @@ export type { Problem } from './models/Problem';
6055
export type { query } from './models/query';
6156
export type { Role } from './models/Role';
6257
export type { SavedQuery } from './models/SavedQuery';
58+
export type { SavedQueryResponse } from './models/SavedQueryResponse';
6359
export type { SelectionResponse } from './models/SelectionResponse';
6460
export type { source } from './models/source';
6561
export type { SourceReference } from './models/SourceReference';
6662
export type { strarray } from './models/strarray';
6763
export type { strarray_by_str_dict } from './models/strarray_by_str_dict';
68-
export { Table } from './models/Table';
64+
export type { Table } from './models/Table';
65+
export { TableCategory } from './models/TableCategory';
6966
export type { TableResponse } from './models/TableResponse';
7067
export type { TablesResponse } from './models/TablesResponse';
7168
export { TimeUnit } from './models/TimeUnit';
@@ -75,7 +72,7 @@ export type { VariablePlacementType } from './models/VariablePlacementType';
7572
export type { VariableSelection } from './models/VariableSelection';
7673
export type { VariablesSelection } from './models/VariablesSelection';
7774

75+
export { CodelistsService } from './services/CodelistsService';
7876
export { ConfigurationService } from './services/ConfigurationService';
79-
export { NavigationService } from './services/NavigationService';
8077
export { SavedQueriesService } from './services/SavedQueriesService';
81-
export { TableService } from './services/TableService';
78+
export { TablesService } from './services/TablesService';

packages/pxweb2-api-client/src/models/CodeListInformation.ts

Lines changed: 0 additions & 22 deletions
This file was deleted.

packages/pxweb2-api-client/src/models/CodeListResponse.ts

Lines changed: 0 additions & 37 deletions
This file was deleted.

packages/pxweb2-api-client/src/models/CodeListsResponse.ts

Lines changed: 0 additions & 15 deletions
This file was deleted.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/* generated using openapi-typescript-codegen -- do not edit */
2+
/* istanbul ignore file */
3+
/* tslint:disable */
4+
/* eslint-disable */
5+
import type { CodelistType } from './CodelistType';
6+
import type { Link } from './Link';
7+
export type CodelistInformation = {
8+
/**
9+
* The identity of the codelist
10+
*/
11+
id: string;
12+
/**
13+
* A textual name for the codelist
14+
*/
15+
label: string;
16+
type: CodelistType;
17+
/**
18+
* Links to associated information about the code list
19+
*/
20+
links: Array<Link>;
21+
};
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/* generated using openapi-typescript-codegen -- do not edit */
2+
/* istanbul ignore file */
3+
/* tslint:disable */
4+
/* eslint-disable */
5+
import type { CodelistType } from './CodelistType';
6+
import type { Link } from './Link';
7+
export type CodelistMetadata = {
8+
/**
9+
* The identiyer for the codelist
10+
*/
11+
id: string;
12+
/**
13+
* The textual name for the codelist.
14+
*/
15+
label: string;
16+
type: CodelistType;
17+
links: Array<Link>;
18+
};
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/* generated using openapi-typescript-codegen -- do not edit */
2+
/* istanbul ignore file */
3+
/* tslint:disable */
4+
/* eslint-disable */
5+
import type { CodelistType } from './CodelistType';
6+
import type { Link } from './Link';
7+
import type { ValueMap } from './ValueMap';
8+
export type CodelistResponse = {
9+
/**
10+
* The identiyer for the codelist
11+
*/
12+
id: string;
13+
/**
14+
* The textual name for the codelist.
15+
*/
16+
label: string;
17+
/**
18+
* The language code for the language used in this response
19+
*/
20+
language: string;
21+
/**
22+
* The languages that the codelist is available in
23+
*/
24+
languages: Array<string>;
25+
/**
26+
* If the codelist is eliminatable
27+
*/
28+
elimination?: boolean;
29+
/**
30+
* The value code that should be used for elimination. If not set the variable will be eliminated by summing up all values.
31+
*/
32+
eliminationValueCode?: string;
33+
type: CodelistType;
34+
values: Array<ValueMap>;
35+
links: Array<Link>;
36+
};

packages/pxweb2-api-client/src/models/CodeListType.ts renamed to packages/pxweb2-api-client/src/models/CodelistType.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/**
66
* Type of codelist
77
*/
8-
export enum CodeListType {
8+
export enum CodelistType {
99
AGGREGATION = 'Aggregation',
1010
VALUESET = 'Valueset',
1111
}

packages/pxweb2-api-client/src/models/CodeLists.ts renamed to packages/pxweb2-api-client/src/models/Codelists.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
/* istanbul ignore file */
33
/* tslint:disable */
44
/* eslint-disable */
5-
import type { CodeListInformation } from './CodeListInformation';
5+
import type { CodelistInformation } from './CodelistInformation';
66
/**
77
* Available codelists for this dimension
88
*/
9-
export type CodeLists = Array<CodeListInformation>;
9+
export type Codelists = Array<CodelistInformation>;
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/* generated using openapi-typescript-codegen -- do not edit */
2+
/* istanbul ignore file */
3+
/* tslint:disable */
4+
/* eslint-disable */
5+
import type { CodelistMetadata } from './CodelistMetadata';
6+
import type { Link } from './Link';
7+
export type CodelistsResponse = {
8+
/**
9+
* The language code for the language used in this response
10+
*/
11+
language: string;
12+
codelists?: Array<CodelistMetadata>;
13+
links?: Array<Link>;
14+
};

0 commit comments

Comments
 (0)