stadata-js 0.1.1 → 0.2.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/dist/index.d.mts +274 -100
- package/dist/index.d.ts +274 -100
- package/dist/index.global.js +3 -0
- package/dist/index.js +3 -2
- package/dist/index.mjs +3 -2
- package/package.json +5 -2
package/dist/index.d.mts
CHANGED
|
@@ -39,13 +39,17 @@ declare class ValidationFailure extends Failure {
|
|
|
39
39
|
constructor(message: string);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
+
interface InterceptedRequest {
|
|
43
|
+
url: string;
|
|
44
|
+
init: RequestInit;
|
|
45
|
+
}
|
|
42
46
|
interface NetworkInterceptor {
|
|
43
|
-
onRequest?(url: string, init: RequestInit):
|
|
47
|
+
onRequest?(url: string, init: RequestInit): InterceptedRequest | Promise<InterceptedRequest>;
|
|
44
48
|
onResponse?(response: Response): Response | Promise<Response>;
|
|
45
49
|
onError?(error: Error): Error | Promise<Error> | null;
|
|
46
50
|
}
|
|
47
51
|
declare abstract class BaseNetworkInterceptor implements NetworkInterceptor {
|
|
48
|
-
onRequest?(url: string, init: RequestInit):
|
|
52
|
+
onRequest?(url: string, init: RequestInit): InterceptedRequest | Promise<InterceptedRequest>;
|
|
49
53
|
onResponse?(response: Response): Response | Promise<Response>;
|
|
50
54
|
onError?(error: Error): Error | Promise<Error> | null;
|
|
51
55
|
}
|
|
@@ -53,7 +57,7 @@ declare abstract class BaseNetworkInterceptor implements NetworkInterceptor {
|
|
|
53
57
|
declare class AuthInterceptor extends BaseNetworkInterceptor {
|
|
54
58
|
private apiKey;
|
|
55
59
|
constructor(apiKey: string);
|
|
56
|
-
onRequest(url: string, init: RequestInit):
|
|
60
|
+
onRequest(url: string, init: RequestInit): InterceptedRequest;
|
|
57
61
|
setApiKey(apiKey: string): void;
|
|
58
62
|
getApiKey(): string;
|
|
59
63
|
}
|
|
@@ -112,7 +116,7 @@ declare class Logger {
|
|
|
112
116
|
declare class LoggingInterceptor extends BaseNetworkInterceptor {
|
|
113
117
|
private logger;
|
|
114
118
|
constructor(logger?: Logger);
|
|
115
|
-
onRequest(url: string, init: RequestInit):
|
|
119
|
+
onRequest(url: string, init: RequestInit): InterceptedRequest;
|
|
116
120
|
onResponse(response: Response): Response;
|
|
117
121
|
onError(error: Error): Error;
|
|
118
122
|
}
|
|
@@ -265,6 +269,38 @@ declare enum DataAvailability {
|
|
|
265
269
|
LIST_NOT_AVAILABLE = "list-not-available"
|
|
266
270
|
}
|
|
267
271
|
|
|
272
|
+
declare enum ClassificationType {
|
|
273
|
+
KBLI_2009 = "kbli2009",
|
|
274
|
+
KBLI_2015 = "kbli2015",
|
|
275
|
+
KBLI_2017 = "kbli2017",
|
|
276
|
+
KBLI_2020 = "kbli2020",
|
|
277
|
+
KBKI_2015 = "kbki2015"
|
|
278
|
+
}
|
|
279
|
+
declare enum KBLILevel {
|
|
280
|
+
CATEGORY = "kategori",
|
|
281
|
+
PRIMARY_GROUP = "golongan pokok",
|
|
282
|
+
GROUP = "golongan",
|
|
283
|
+
SUB_GROUP = "subgolongan",
|
|
284
|
+
CLUSTER = "kelompok"
|
|
285
|
+
}
|
|
286
|
+
declare enum KBKILevel {
|
|
287
|
+
SECTION = "seksi",
|
|
288
|
+
DIVISION = "divisi",
|
|
289
|
+
GROUP = "kelompok",
|
|
290
|
+
CLASSES = "kelas",
|
|
291
|
+
SUB_CLASS = "subkelas",
|
|
292
|
+
COMMODITY_GROUP = "kelompok komoditas",
|
|
293
|
+
COMMODITY = "komoditas"
|
|
294
|
+
}
|
|
295
|
+
type ClassificationLevel = KBLILevel | KBKILevel;
|
|
296
|
+
|
|
297
|
+
declare enum DomainType {
|
|
298
|
+
ALL = "all",
|
|
299
|
+
PROVINCE = "prov",
|
|
300
|
+
REGENCY = "kab",
|
|
301
|
+
REGENCY_BY_PROVINCE = "kabbyprov"
|
|
302
|
+
}
|
|
303
|
+
|
|
268
304
|
type JSON = Record<string, unknown>;
|
|
269
305
|
interface BaseListParams {
|
|
270
306
|
domain?: string;
|
|
@@ -274,6 +310,8 @@ interface BaseListParams {
|
|
|
274
310
|
cancelToken?: CancelToken;
|
|
275
311
|
}
|
|
276
312
|
interface DomainListParams extends Omit<BaseListParams, 'domain'> {
|
|
313
|
+
type: DomainType;
|
|
314
|
+
provinceCode?: string;
|
|
277
315
|
keyword?: string;
|
|
278
316
|
}
|
|
279
317
|
interface PublicationListParams extends BaseListParams {
|
|
@@ -313,30 +351,38 @@ interface VariableListParams extends BaseListParams {
|
|
|
313
351
|
showDeleted?: boolean;
|
|
314
352
|
}
|
|
315
353
|
interface VerticalVariableListParams extends BaseListParams {
|
|
316
|
-
variableId
|
|
354
|
+
variableId?: number;
|
|
317
355
|
}
|
|
318
356
|
interface UnitListParams extends BaseListParams {
|
|
319
357
|
}
|
|
320
358
|
interface PeriodListParams extends BaseListParams {
|
|
321
|
-
variableId
|
|
359
|
+
variableId?: number;
|
|
322
360
|
}
|
|
323
361
|
interface DerivedPeriodListParams extends BaseListParams {
|
|
324
|
-
variableId
|
|
362
|
+
variableId?: number;
|
|
325
363
|
}
|
|
326
364
|
interface DerivedVariableListParams extends BaseListParams {
|
|
327
|
-
variableId
|
|
365
|
+
variableId?: number;
|
|
328
366
|
}
|
|
329
367
|
interface DynamicTableParams extends BaseListParams {
|
|
330
|
-
tableId: string;
|
|
331
368
|
variableId: number;
|
|
332
|
-
periodId
|
|
369
|
+
periodId: number | string;
|
|
333
370
|
derivedVariableId?: number;
|
|
371
|
+
verticalVariableId?: number;
|
|
334
372
|
derivedPeriodId?: number;
|
|
335
373
|
}
|
|
336
374
|
interface StatisticClassificationListParams extends BaseListParams {
|
|
375
|
+
type?: ClassificationType;
|
|
376
|
+
level?: ClassificationLevel;
|
|
337
377
|
keyword?: string;
|
|
338
378
|
}
|
|
339
|
-
interface CensusListParams
|
|
379
|
+
interface CensusListParams {
|
|
380
|
+
type?: 'events' | 'topics' | 'areas' | 'datasets' | 'data';
|
|
381
|
+
censusId?: string;
|
|
382
|
+
topicId?: number;
|
|
383
|
+
censusAreaId?: string;
|
|
384
|
+
datasetId?: string;
|
|
385
|
+
cancelToken?: CancelToken;
|
|
340
386
|
}
|
|
341
387
|
interface ViewParams {
|
|
342
388
|
id: number | string;
|
|
@@ -388,7 +434,6 @@ declare class Domain extends BaseEntity {
|
|
|
388
434
|
|
|
389
435
|
interface DomainRepository {
|
|
390
436
|
getAll(params?: DomainListParams): Promise<Result<ListResult<Domain>, ApiFailure>>;
|
|
391
|
-
getById(params: ViewParams): Promise<Result<Domain, ApiFailure>>;
|
|
392
437
|
}
|
|
393
438
|
|
|
394
439
|
declare class GetAllDomains extends UseCase<DomainListParams | undefined, ListResult<Domain>> {
|
|
@@ -397,12 +442,6 @@ declare class GetAllDomains extends UseCase<DomainListParams | undefined, ListRe
|
|
|
397
442
|
execute(params?: DomainListParams): Promise<Result<ListResult<Domain>, ApiFailure>>;
|
|
398
443
|
}
|
|
399
444
|
|
|
400
|
-
declare class GetDomainById extends UseCase<ViewParams, Domain> {
|
|
401
|
-
private repository;
|
|
402
|
-
constructor(repository: DomainRepository);
|
|
403
|
-
execute(params: ViewParams): Promise<Result<Domain, ApiFailure>>;
|
|
404
|
-
}
|
|
405
|
-
|
|
406
445
|
declare class Injector {
|
|
407
446
|
private static instance;
|
|
408
447
|
private container;
|
|
@@ -502,43 +541,40 @@ declare const ApiConstant: {
|
|
|
502
541
|
};
|
|
503
542
|
|
|
504
543
|
declare const ApiEndpoint: {
|
|
505
|
-
readonly DOMAIN_LIST: "/
|
|
506
|
-
readonly
|
|
507
|
-
readonly
|
|
508
|
-
readonly
|
|
509
|
-
readonly
|
|
510
|
-
readonly
|
|
511
|
-
readonly
|
|
512
|
-
readonly
|
|
513
|
-
readonly
|
|
514
|
-
readonly
|
|
515
|
-
readonly
|
|
516
|
-
readonly
|
|
517
|
-
readonly
|
|
518
|
-
readonly
|
|
519
|
-
readonly
|
|
520
|
-
readonly
|
|
521
|
-
readonly
|
|
522
|
-
readonly
|
|
523
|
-
readonly
|
|
524
|
-
readonly
|
|
525
|
-
readonly
|
|
526
|
-
readonly
|
|
527
|
-
readonly
|
|
528
|
-
readonly
|
|
529
|
-
readonly
|
|
530
|
-
readonly
|
|
531
|
-
readonly
|
|
532
|
-
readonly
|
|
533
|
-
readonly
|
|
534
|
-
readonly
|
|
535
|
-
readonly
|
|
536
|
-
readonly
|
|
537
|
-
readonly
|
|
538
|
-
readonly
|
|
539
|
-
readonly STATISTIC_CLASSIFICATION_VIEW: "/view/kbli";
|
|
540
|
-
readonly CENSUS_LIST: "/list/sensus";
|
|
541
|
-
readonly CENSUS_VIEW: "/view/sensus";
|
|
544
|
+
readonly DOMAIN_LIST: "/domain";
|
|
545
|
+
readonly PUBLICATION_LIST: "/list/model/publication";
|
|
546
|
+
readonly PUBLICATION_VIEW: "/view/model/publication";
|
|
547
|
+
readonly INFOGRAPHIC_LIST: "/list/model/infographic";
|
|
548
|
+
readonly INFOGRAPHIC_VIEW: "/view/model/infographic";
|
|
549
|
+
readonly STATIC_TABLE_LIST: "/list/model/statictable";
|
|
550
|
+
readonly STATIC_TABLE_VIEW: "/view/model/statictable";
|
|
551
|
+
readonly NEWS_LIST: "/list/model/news";
|
|
552
|
+
readonly NEWS_VIEW: "/view/model/news";
|
|
553
|
+
readonly NEWS_CATEGORY_LIST: "/list/model/newscategory";
|
|
554
|
+
readonly NEWS_CATEGORY_VIEW: "/view/model/newscategory";
|
|
555
|
+
readonly PRESS_RELEASE_LIST: "/list/model/pressrelease";
|
|
556
|
+
readonly PRESS_RELEASE_VIEW: "/view/model/pressrelease";
|
|
557
|
+
readonly SUBJECT_LIST: "/list/model/subject";
|
|
558
|
+
readonly SUBJECT_VIEW: "/view/model/subject";
|
|
559
|
+
readonly SUBJECT_CATEGORY_LIST: "/list/model/subcat";
|
|
560
|
+
readonly SUBJECT_CATEGORY_VIEW: "/view/model/subcat";
|
|
561
|
+
readonly STRATEGIC_INDICATOR_LIST: "/list/model/indicators";
|
|
562
|
+
readonly STRATEGIC_INDICATOR_VIEW: "/view/model/indicators";
|
|
563
|
+
readonly VARIABLE_LIST: "/list/model/var";
|
|
564
|
+
readonly VARIABLE_VIEW: "/view/model/var";
|
|
565
|
+
readonly VERTICAL_VARIABLE_LIST: "/list/model/vervar";
|
|
566
|
+
readonly VERTICAL_VARIABLE_VIEW: "/view/model/vervar";
|
|
567
|
+
readonly UNIT_LIST: "/list/model/unit";
|
|
568
|
+
readonly UNIT_VIEW: "/view/model/unit";
|
|
569
|
+
readonly PERIOD_LIST: "/list/model/th";
|
|
570
|
+
readonly PERIOD_VIEW: "/view/model/th";
|
|
571
|
+
readonly DERIVED_PERIOD_LIST: "/list/model/turth";
|
|
572
|
+
readonly DERIVED_PERIOD_VIEW: "/view/model/turth";
|
|
573
|
+
readonly DERIVED_VARIABLE_LIST: "/list/model/turvar";
|
|
574
|
+
readonly DERIVED_VARIABLE_VIEW: "/view/model/turvar";
|
|
575
|
+
readonly DYNAMIC_TABLE_LIST: "/list/model/data";
|
|
576
|
+
readonly statisticClassification: (type?: ClassificationType) => string;
|
|
577
|
+
readonly CENSUS: "/interoperabilitas/datasource/sensus";
|
|
542
578
|
readonly TRADE: "/dataexim";
|
|
543
579
|
};
|
|
544
580
|
|
|
@@ -648,12 +684,18 @@ declare class GetNewsCategoryById implements UseCase<ViewParams, NewsCategory> {
|
|
|
648
684
|
}
|
|
649
685
|
|
|
650
686
|
declare class PressRelease extends BaseEntity {
|
|
651
|
-
readonly id:
|
|
687
|
+
readonly id: number;
|
|
688
|
+
readonly subjectId: number;
|
|
689
|
+
readonly subject: string;
|
|
652
690
|
readonly title: string;
|
|
653
691
|
readonly abstract: string;
|
|
654
692
|
readonly releaseDate: string;
|
|
655
|
-
readonly
|
|
656
|
-
|
|
693
|
+
readonly updatedDate: string | null;
|
|
694
|
+
readonly pdf: string;
|
|
695
|
+
readonly size: string;
|
|
696
|
+
readonly slide: string;
|
|
697
|
+
readonly thumbnail: string;
|
|
698
|
+
constructor(id: number, subjectId: number, subject: string, title: string, abstract: string, releaseDate: string, updatedDate: string | null, pdf: string, size: string, slide: string, thumbnail: string);
|
|
657
699
|
toJson(): Record<string, unknown>;
|
|
658
700
|
static fromJson(json: Record<string, unknown>): PressRelease;
|
|
659
701
|
}
|
|
@@ -756,9 +798,18 @@ declare class GetSubjectCategoryById implements UseCase<ViewParams, SubjectCateg
|
|
|
756
798
|
}
|
|
757
799
|
|
|
758
800
|
declare class StrategicIndicator extends BaseEntity {
|
|
759
|
-
readonly
|
|
801
|
+
readonly variableId: number;
|
|
802
|
+
readonly indicatorId: number;
|
|
803
|
+
readonly subjectCsa: number;
|
|
804
|
+
readonly title: string;
|
|
760
805
|
readonly name: string;
|
|
761
|
-
|
|
806
|
+
readonly dataSource: string;
|
|
807
|
+
readonly value: number;
|
|
808
|
+
readonly unit: string;
|
|
809
|
+
readonly category: number;
|
|
810
|
+
readonly hashId: string;
|
|
811
|
+
readonly period: string;
|
|
812
|
+
constructor(variableId: number, indicatorId: number, subjectCsa: number, title: string, name: string, dataSource: string, value: number, unit: string, category: number, hashId: string, period: string);
|
|
762
813
|
toJson(): Record<string, unknown>;
|
|
763
814
|
static fromJson(json: Record<string, unknown>): StrategicIndicator;
|
|
764
815
|
}
|
|
@@ -812,10 +863,11 @@ declare class GetVariableById implements UseCase<ViewParams, Variable> {
|
|
|
812
863
|
|
|
813
864
|
declare class VerticalVariable extends BaseEntity {
|
|
814
865
|
readonly id: number;
|
|
815
|
-
readonly variableId: number;
|
|
816
866
|
readonly label: string;
|
|
817
|
-
readonly
|
|
818
|
-
|
|
867
|
+
readonly itemId: number;
|
|
868
|
+
readonly groupId: number;
|
|
869
|
+
readonly groupName: string;
|
|
870
|
+
constructor(id: number, label: string, itemId: number, groupId: number, groupName: string);
|
|
819
871
|
toJson(): Record<string, unknown>;
|
|
820
872
|
static fromJson(json: Record<string, unknown>): VerticalVariable;
|
|
821
873
|
}
|
|
@@ -864,8 +916,8 @@ declare class GetUnitById implements UseCase<ViewParams, Unit> {
|
|
|
864
916
|
|
|
865
917
|
declare class Period extends BaseEntity {
|
|
866
918
|
readonly id: number;
|
|
867
|
-
readonly
|
|
868
|
-
constructor(id: number,
|
|
919
|
+
readonly period: number;
|
|
920
|
+
constructor(id: number, period: number);
|
|
869
921
|
toJson(): Record<string, unknown>;
|
|
870
922
|
static fromJson(json: Record<string, unknown>): Period;
|
|
871
923
|
}
|
|
@@ -889,8 +941,10 @@ declare class GetPeriodById implements UseCase<ViewParams, Period> {
|
|
|
889
941
|
|
|
890
942
|
declare class DerivedPeriod extends BaseEntity {
|
|
891
943
|
readonly id: number;
|
|
892
|
-
readonly
|
|
893
|
-
|
|
944
|
+
readonly period: string;
|
|
945
|
+
readonly groupId: number;
|
|
946
|
+
readonly groupName: string;
|
|
947
|
+
constructor(id: number, period: string, groupId: number, groupName: string);
|
|
894
948
|
toJson(): Record<string, unknown>;
|
|
895
949
|
static fromJson(json: Record<string, unknown>): DerivedPeriod;
|
|
896
950
|
}
|
|
@@ -915,7 +969,9 @@ declare class GetDerivedPeriodById {
|
|
|
915
969
|
declare class DerivedVariable extends BaseEntity {
|
|
916
970
|
readonly id: number;
|
|
917
971
|
readonly name: string;
|
|
918
|
-
|
|
972
|
+
readonly groupId: number;
|
|
973
|
+
readonly groupName: string;
|
|
974
|
+
constructor(id: number, name: string, groupId: number, groupName: string);
|
|
919
975
|
toJson(): Record<string, unknown>;
|
|
920
976
|
static fromJson(json: Record<string, unknown>): DerivedVariable;
|
|
921
977
|
}
|
|
@@ -962,58 +1018,162 @@ declare class GetStatisticClassificationById {
|
|
|
962
1018
|
execute(params: ViewParams): Promise<Result<StatisticClassification, ApiFailure>>;
|
|
963
1019
|
}
|
|
964
1020
|
|
|
965
|
-
declare class
|
|
1021
|
+
declare class CensusCategory extends BaseEntity {
|
|
1022
|
+
readonly id: string;
|
|
1023
|
+
readonly name: string;
|
|
1024
|
+
readonly itemId: string;
|
|
1025
|
+
readonly itemCode: string;
|
|
1026
|
+
readonly itemName: string;
|
|
1027
|
+
constructor(id: string, name: string, itemId: string, itemCode: string, itemName: string);
|
|
1028
|
+
toJson(): Record<string, unknown>;
|
|
1029
|
+
toJSON(): Record<string, unknown>;
|
|
1030
|
+
static fromJson(json: Record<string, unknown>): CensusCategory;
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
declare class CensusEvent extends BaseEntity {
|
|
1034
|
+
readonly id: string;
|
|
1035
|
+
readonly name: string;
|
|
1036
|
+
readonly year: number;
|
|
1037
|
+
constructor(id: string, name: string, year: number);
|
|
1038
|
+
toJson(): Record<string, unknown>;
|
|
1039
|
+
toJSON(): Record<string, unknown>;
|
|
1040
|
+
static fromJson(json: Record<string, unknown>): CensusEvent;
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
declare class CensusTopic extends BaseEntity {
|
|
966
1044
|
readonly id: number;
|
|
967
|
-
readonly
|
|
968
|
-
readonly
|
|
969
|
-
|
|
1045
|
+
readonly topic: string;
|
|
1046
|
+
readonly eventId: string;
|
|
1047
|
+
readonly eventName: string;
|
|
1048
|
+
constructor(id: number, topic: string, eventId: string, eventName: string);
|
|
1049
|
+
toJson(): Record<string, unknown>;
|
|
1050
|
+
toJSON(): Record<string, unknown>;
|
|
1051
|
+
static fromJson(json: Record<string, unknown>): CensusTopic;
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
declare class CensusArea extends BaseEntity {
|
|
1055
|
+
readonly id: number;
|
|
1056
|
+
readonly mfdCode: string;
|
|
1057
|
+
readonly name: string;
|
|
1058
|
+
readonly slug: string;
|
|
1059
|
+
constructor(id: number, mfdCode: string, name: string, slug: string);
|
|
1060
|
+
toJson(): Record<string, unknown>;
|
|
1061
|
+
toJSON(): Record<string, unknown>;
|
|
1062
|
+
static fromJson(json: Record<string, unknown>): CensusArea;
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
declare class CensusDataset extends BaseEntity {
|
|
1066
|
+
readonly id: number;
|
|
1067
|
+
readonly topicId: number;
|
|
1068
|
+
readonly topic: string;
|
|
1069
|
+
readonly eventId: number;
|
|
1070
|
+
readonly name: string;
|
|
1071
|
+
readonly description?: string | null | undefined;
|
|
1072
|
+
constructor(id: number, topicId: number, topic: string, eventId: number, name: string, description?: string | null | undefined);
|
|
1073
|
+
toJson(): Record<string, unknown>;
|
|
1074
|
+
toJSON(): Record<string, unknown>;
|
|
1075
|
+
static fromJson(json: Record<string, unknown>): CensusDataset;
|
|
1076
|
+
}
|
|
1077
|
+
|
|
1078
|
+
declare class CensusData extends BaseEntity {
|
|
1079
|
+
readonly regionId: string;
|
|
1080
|
+
readonly regionCode: string;
|
|
1081
|
+
readonly regionName: string;
|
|
1082
|
+
readonly indicatorId: string;
|
|
1083
|
+
readonly indicatorName: string;
|
|
1084
|
+
readonly categories: CensusCategory[];
|
|
1085
|
+
readonly period: string;
|
|
1086
|
+
readonly value: number;
|
|
1087
|
+
readonly regionLevel?: string | null | undefined;
|
|
1088
|
+
constructor(regionId: string, regionCode: string, regionName: string, indicatorId: string, indicatorName: string, categories: CensusCategory[], period: string, value: number, regionLevel?: string | null | undefined);
|
|
970
1089
|
toJson(): Record<string, unknown>;
|
|
971
|
-
|
|
1090
|
+
toJSON(): Record<string, unknown>;
|
|
1091
|
+
static fromJson(json: Record<string, unknown>): CensusData;
|
|
972
1092
|
}
|
|
973
1093
|
|
|
974
1094
|
interface CensusRepository {
|
|
975
|
-
getAll(params?: CensusListParams): Promise<Result<ListResult<
|
|
976
|
-
getById(params: ViewParams): Promise<Result<
|
|
1095
|
+
getAll(params?: CensusListParams): Promise<Result<ListResult<CensusEvent | CensusTopic | CensusArea | CensusDataset | CensusData>, ApiFailure>>;
|
|
1096
|
+
getById(params: ViewParams): Promise<Result<CensusEvent, ApiFailure>>;
|
|
977
1097
|
}
|
|
978
1098
|
|
|
979
|
-
|
|
1099
|
+
type CensusEntity = CensusEvent | CensusTopic | CensusArea | CensusDataset | CensusData;
|
|
1100
|
+
declare class GetAllCensuses implements UseCase<CensusListParams | undefined, ListResult<CensusEntity>> {
|
|
980
1101
|
private repository;
|
|
981
1102
|
constructor(repository: CensusRepository);
|
|
982
|
-
execute(params?: CensusListParams): Promise<Result<ListResult<
|
|
1103
|
+
execute(params?: CensusListParams): Promise<Result<ListResult<CensusEntity>, ApiFailure>>;
|
|
983
1104
|
}
|
|
984
1105
|
|
|
985
|
-
declare class GetCensusById implements UseCase<ViewParams,
|
|
1106
|
+
declare class GetCensusById implements UseCase<ViewParams, CensusEvent> {
|
|
986
1107
|
private repository;
|
|
987
1108
|
constructor(repository: CensusRepository);
|
|
988
|
-
execute(params: ViewParams): Promise<Result<
|
|
1109
|
+
execute(params: ViewParams): Promise<Result<CensusEvent, ApiFailure>>;
|
|
989
1110
|
}
|
|
990
1111
|
|
|
991
|
-
declare class
|
|
992
|
-
readonly
|
|
993
|
-
readonly
|
|
994
|
-
readonly subjectId: number;
|
|
995
|
-
readonly subjectName: string;
|
|
996
|
-
readonly notes: string;
|
|
1112
|
+
declare class VariableInfo extends BaseEntity {
|
|
1113
|
+
readonly value: number;
|
|
1114
|
+
readonly label: string;
|
|
997
1115
|
readonly unit: string;
|
|
998
|
-
readonly
|
|
999
|
-
readonly
|
|
1000
|
-
readonly
|
|
1001
|
-
readonly
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1116
|
+
readonly subject: string;
|
|
1117
|
+
readonly definition: string;
|
|
1118
|
+
readonly notes: string;
|
|
1119
|
+
readonly decimal?: number | undefined;
|
|
1120
|
+
constructor(value: number, label: string, unit: string, subject: string, definition: string, notes: string, decimal?: number | undefined);
|
|
1121
|
+
toJson(): Record<string, unknown>;
|
|
1122
|
+
static fromJson(json: Record<string, unknown>): VariableInfo;
|
|
1123
|
+
}
|
|
1124
|
+
declare class VerticalVariableInfo extends BaseEntity {
|
|
1125
|
+
readonly value: number | string;
|
|
1126
|
+
readonly label: string;
|
|
1127
|
+
constructor(value: number | string, label: string);
|
|
1128
|
+
toJson(): Record<string, unknown>;
|
|
1129
|
+
static fromJson(json: Record<string, unknown>): VerticalVariableInfo;
|
|
1130
|
+
}
|
|
1131
|
+
declare class PeriodInfo extends VerticalVariableInfo {
|
|
1132
|
+
static fromJson(json: Record<string, unknown>): PeriodInfo;
|
|
1133
|
+
}
|
|
1134
|
+
declare class SubjectInfo extends BaseEntity {
|
|
1135
|
+
readonly value: number;
|
|
1136
|
+
readonly label: string;
|
|
1137
|
+
constructor(value: number, label: string);
|
|
1138
|
+
toJson(): Record<string, unknown>;
|
|
1139
|
+
static fromJson(json: Record<string, unknown>): SubjectInfo;
|
|
1140
|
+
}
|
|
1141
|
+
declare class RelatedTable extends BaseEntity {
|
|
1142
|
+
readonly id: string;
|
|
1143
|
+
readonly title: string;
|
|
1144
|
+
readonly tableSource: number;
|
|
1145
|
+
readonly lastUpdate: string | null;
|
|
1146
|
+
readonly link: string;
|
|
1147
|
+
constructor(id: string, title: string, tableSource: number, lastUpdate: string | null, link: string);
|
|
1148
|
+
toJson(): Record<string, unknown>;
|
|
1149
|
+
static fromJson(json: Record<string, unknown>): RelatedTable;
|
|
1150
|
+
}
|
|
1151
|
+
|
|
1152
|
+
declare class DynamicTable extends BaseEntity {
|
|
1153
|
+
readonly subjects: SubjectInfo[];
|
|
1154
|
+
readonly variables: VariableInfo[];
|
|
1155
|
+
readonly verticalVariables: VerticalVariableInfo[];
|
|
1156
|
+
readonly verticalVariableLabel: string;
|
|
1157
|
+
readonly periods: PeriodInfo[];
|
|
1158
|
+
readonly derivedVariables: VerticalVariableInfo[];
|
|
1159
|
+
readonly derivedPeriods: VerticalVariableInfo[];
|
|
1160
|
+
readonly dataContent: Record<string, unknown>;
|
|
1161
|
+
readonly related: RelatedTable[];
|
|
1162
|
+
readonly lastUpdate?: string | null | undefined;
|
|
1163
|
+
constructor(subjects: SubjectInfo[], variables: VariableInfo[], verticalVariables: VerticalVariableInfo[], verticalVariableLabel: string, periods: PeriodInfo[], derivedVariables: VerticalVariableInfo[], derivedPeriods: VerticalVariableInfo[], dataContent: Record<string, unknown>, related: RelatedTable[], lastUpdate?: string | null | undefined);
|
|
1005
1164
|
toJson(): Record<string, unknown>;
|
|
1006
1165
|
static fromJson(json: Record<string, unknown>): DynamicTable;
|
|
1166
|
+
getDataValue(vervarValue: number | string, varValue: number | string, turvarValue: number | string, tahunValue: number | string, turtahunValue: number | string): unknown;
|
|
1007
1167
|
}
|
|
1008
1168
|
|
|
1009
1169
|
interface DynamicTableRepository {
|
|
1010
|
-
getAll(params: DynamicTableParams): Promise<Result<
|
|
1170
|
+
getAll(params: DynamicTableParams): Promise<Result<DynamicTable, ApiFailure>>;
|
|
1011
1171
|
}
|
|
1012
1172
|
|
|
1013
|
-
declare class GetAllDynamicTables implements UseCase<DynamicTableParams,
|
|
1173
|
+
declare class GetAllDynamicTables implements UseCase<DynamicTableParams, DynamicTable> {
|
|
1014
1174
|
private repository;
|
|
1015
1175
|
constructor(repository: DynamicTableRepository);
|
|
1016
|
-
execute(params: DynamicTableParams): Promise<Result<
|
|
1176
|
+
execute(params: DynamicTableParams): Promise<Result<DynamicTable, ApiFailure>>;
|
|
1017
1177
|
}
|
|
1018
1178
|
|
|
1019
1179
|
interface StadataList {
|
|
@@ -1034,12 +1194,26 @@ interface StadataList {
|
|
|
1034
1194
|
derivedPeriods(params: DerivedPeriodListParams): Promise<Result<ListResult<DerivedPeriod>, ApiFailure>>;
|
|
1035
1195
|
derivedVariables(params: DerivedVariableListParams): Promise<Result<ListResult<DerivedVariable>, ApiFailure>>;
|
|
1036
1196
|
statisticClassifications(params?: StatisticClassificationListParams): Promise<Result<ListResult<StatisticClassification>, ApiFailure>>;
|
|
1037
|
-
|
|
1038
|
-
|
|
1197
|
+
censusEvents(): Promise<Result<ListResult<CensusEvent>, ApiFailure>>;
|
|
1198
|
+
censusTopics(params: {
|
|
1199
|
+
censusId: string;
|
|
1200
|
+
}): Promise<Result<ListResult<CensusTopic>, ApiFailure>>;
|
|
1201
|
+
censusEventAreas(params: {
|
|
1202
|
+
censusId: string;
|
|
1203
|
+
}): Promise<Result<ListResult<CensusArea>, ApiFailure>>;
|
|
1204
|
+
censusEventDatasets(params: {
|
|
1205
|
+
censusId: string;
|
|
1206
|
+
topicId: number;
|
|
1207
|
+
}): Promise<Result<ListResult<CensusDataset>, ApiFailure>>;
|
|
1208
|
+
censusData(params: {
|
|
1209
|
+
censusId: string;
|
|
1210
|
+
censusAreaId: string;
|
|
1211
|
+
datasetId: string;
|
|
1212
|
+
}): Promise<Result<ListResult<CensusData>, ApiFailure>>;
|
|
1213
|
+
dynamicTables(params: DynamicTableParams): Promise<Result<DynamicTable, ApiFailure>>;
|
|
1039
1214
|
}
|
|
1040
1215
|
|
|
1041
1216
|
interface StadataView {
|
|
1042
|
-
domain(params: ViewParams): Promise<Result<Domain, ApiFailure>>;
|
|
1043
1217
|
publication(params: ViewParams): Promise<Result<Publication, ApiFailure>>;
|
|
1044
1218
|
infographic(params: ViewParams): Promise<Result<Infographic, ApiFailure>>;
|
|
1045
1219
|
news(params: ViewParams): Promise<Result<News, ApiFailure>>;
|
|
@@ -1056,7 +1230,7 @@ interface StadataView {
|
|
|
1056
1230
|
derivedPeriod(params: ViewParams): Promise<Result<DerivedPeriod, ApiFailure>>;
|
|
1057
1231
|
derivedVariable(params: ViewParams): Promise<Result<DerivedVariable, ApiFailure>>;
|
|
1058
1232
|
statisticClassification(params: ViewParams): Promise<Result<StatisticClassification, ApiFailure>>;
|
|
1059
|
-
census(params: ViewParams): Promise<Result<
|
|
1233
|
+
census(params: ViewParams): Promise<Result<CensusEvent, ApiFailure>>;
|
|
1060
1234
|
}
|
|
1061
1235
|
|
|
1062
1236
|
interface StadataJSConfig {
|
|
@@ -1114,4 +1288,4 @@ declare class GetTrade implements UseCase<TradeParams, ResponseData<Record<strin
|
|
|
1114
1288
|
execute(params: TradeParams): Promise<Result<ResponseData<Record<string, unknown>>, ApiFailure>>;
|
|
1115
1289
|
}
|
|
1116
1290
|
|
|
1117
|
-
export { ApiConstant, ApiEndpoint, ApiException, ApiFailure, ApiResponse, AuthInterceptor, BaseEntity, type BaseListParams, CancelToken, CancelledException, CancelledFailure,
|
|
1291
|
+
export { ApiConstant, ApiEndpoint, ApiException, ApiFailure, ApiResponse, AuthInterceptor, BaseEntity, type BaseListParams, CancelToken, CancelledException, CancelledFailure, CensusArea, CensusCategory, CensusData, CensusDataset, CensusEvent, type CensusListParams, type CensusRepository, CensusTopic, ClassificationType, ConsoleLogPrinter, DataAvailability, DataLanguage, DateHelper, DerivedPeriod, type DerivedPeriodListParams, type DerivedPeriodRepository, DerivedVariable, type DerivedVariableListParams, type DerivedVariableRepository, Domain, type DomainListParams, type DomainRepository, DomainType, DynamicTable, type DynamicTableParams, type DynamicTableRepository, Failure, ForbiddenException, ForbiddenFailure, GetAllCensuses, GetAllDerivedPeriods, GetAllDerivedVariables, GetAllDomains, GetAllDynamicTables, GetAllInfographics, GetAllNews, GetAllNewsCategories, GetAllPeriods, GetAllPressReleases, GetAllPublications, GetAllStaticTables, GetAllStatisticClassifications, GetAllStrategicIndicators, GetAllSubjectCategories, GetAllSubjects, GetAllUnits, GetAllVariables, GetAllVerticalVariables, GetCensusById, GetDerivedPeriodById, GetDerivedVariableById, GetInfographicById, GetNewsById, GetNewsCategoryById, GetPeriodById, GetPressReleaseById, GetPublicationById, GetStaticTableById, GetStatisticClassificationById, GetStrategicIndicatorById, GetSubjectById, GetSubjectCategoryById, GetTrade, GetUnitById, GetVariableById, GetVerticalVariableById, HSCodeType, Infographic, type InfographicListParams, type InfographicRepository, Injector, type JSON, KBKILevel, KBLILevel, ListResult, type LogEntry, type LogFilter, LogLevel, type LogPrinter, Logger, LoggingInterceptor, NetworkClient, type NetworkClientConfig, NetworkException, NetworkFailure, type NetworkInterceptor, News, NewsCategory, type NewsCategoryListParams, type NewsCategoryRepository, type NewsListParams, type NewsRepository, NoParamsUseCase, NotFoundException, NotFoundFailure, Pagination, ParseFailure, Period, type PeriodListParams, type PeriodRepository, PressRelease, type PressReleaseListParams, type PressReleaseRepository, ProductionLogFilter, Publication, type PublicationListParams, type PublicationRepository, QueryParamConstant, RelatedPublication, type RequestData, type RequestOptions, type ResponseData, RetryInterceptor, ServerException, ServerFailure, StadataException, StadataJS, type StadataJSConfig, type StadataList, type StadataView, StaticTable, type StaticTableListParams, type StaticTableRepository, StatisticClassification, type StatisticClassificationListParams, type StatisticClassificationRepository, StrategicIndicator, type StrategicIndicatorListParams, type StrategicIndicatorRepository, Subject, SubjectCategory, type SubjectCategoryListParams, type SubjectCategoryRepository, type SubjectListParams, type SubjectRepository, TimeoutException, TimeoutFailure, Trade, type TradeParams, TradePeriod, type TradeRepository, TradeSource, UnauthorizedException, UnauthorizedFailure, Unit, type UnitListParams, type UnitRepository, UseCase, ValidationFailure, Variable, type VariableListParams, type VariableRepository, VerticalVariable, type VerticalVariableListParams, type VerticalVariableRepository, type ViewParams };
|