stadata-js 0.4.0 → 2.0.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 CHANGED
@@ -48,19 +48,6 @@ interface NetworkInterceptor {
48
48
  onResponse?(response: Response): Response | Promise<Response>;
49
49
  onError?(error: Error): Error | Promise<Error> | null;
50
50
  }
51
- declare abstract class BaseNetworkInterceptor implements NetworkInterceptor {
52
- onRequest?(url: string, init: RequestInit): InterceptedRequest | Promise<InterceptedRequest>;
53
- onResponse?(response: Response): Response | Promise<Response>;
54
- onError?(error: Error): Error | Promise<Error> | null;
55
- }
56
-
57
- declare class AuthInterceptor extends BaseNetworkInterceptor {
58
- private apiKey;
59
- constructor(apiKey: string);
60
- onRequest(url: string, init: RequestInit): InterceptedRequest;
61
- setApiKey(apiKey: string): void;
62
- getApiKey(): string;
63
- }
64
51
 
65
52
  declare enum LogLevel {
66
53
  DEBUG = 0,
@@ -70,73 +57,6 @@ declare enum LogLevel {
70
57
  FATAL = 4,
71
58
  NONE = 5
72
59
  }
73
- interface LogEntry {
74
- level: LogLevel;
75
- message: string;
76
- timestamp: Date;
77
- data?: unknown;
78
- error?: Error;
79
- }
80
- interface LogPrinter {
81
- print(entry: LogEntry): void;
82
- }
83
- interface LogFilter {
84
- shouldLog(entry: LogEntry): boolean;
85
- }
86
- declare class ConsoleLogPrinter implements LogPrinter {
87
- print(entry: LogEntry): void;
88
- }
89
- declare class ProductionLogFilter implements LogFilter {
90
- private minLevel;
91
- constructor(minLevel?: LogLevel);
92
- shouldLog(entry: LogEntry): boolean;
93
- }
94
- declare class Logger {
95
- private static instance;
96
- private printer;
97
- private filter;
98
- private enabled;
99
- private constructor();
100
- static getInstance(): Logger;
101
- configure(options: {
102
- printer?: LogPrinter;
103
- filter?: LogFilter;
104
- enabled?: boolean;
105
- }): void;
106
- debug(message: string, data?: unknown): void;
107
- info(message: string, data?: unknown): void;
108
- warn(message: string, data?: unknown): void;
109
- error(message: string, error?: unknown): void;
110
- fatal(message: string, error?: unknown): void;
111
- private log;
112
- enable(): void;
113
- disable(): void;
114
- }
115
-
116
- declare class LoggingInterceptor extends BaseNetworkInterceptor {
117
- private logger;
118
- constructor(logger?: Logger);
119
- onRequest(url: string, init: RequestInit): InterceptedRequest;
120
- onResponse(response: Response): Response;
121
- onError(error: Error): Error;
122
- }
123
-
124
- interface RetryConfig {
125
- maxRetries: number;
126
- retryDelay: number;
127
- retryableStatusCodes?: number[];
128
- exponentialBackoff?: boolean;
129
- }
130
- declare class RetryInterceptor extends BaseNetworkInterceptor {
131
- private logger;
132
- private config;
133
- private retryCount;
134
- constructor(config?: Partial<RetryConfig>, logger?: Logger);
135
- onResponse(response: Response): Promise<Response>;
136
- private sleep;
137
- resetRetryCount(url: string): void;
138
- clearAllRetryCounts(): void;
139
- }
140
60
 
141
61
  declare class CancelToken {
142
62
  private abortController;
@@ -155,17 +75,6 @@ declare class CancelToken {
155
75
  };
156
76
  }
157
77
 
158
- declare class DateHelper {
159
- static parse(dateString: string | null | undefined): Date | null;
160
- static format(date: Date | null | undefined): string | null;
161
- static formatReadable(date: Date | null | undefined): string | null;
162
- static isValid(dateString: string): boolean;
163
- static toTimestamp(dateString: string): number | null;
164
- static fromTimestamp(timestamp: number): Date;
165
- static now(): string;
166
- static nowTimestamp(): number;
167
- }
168
-
169
78
  interface NetworkClientConfig {
170
79
  baseURL?: string;
171
80
  timeout?: number;
@@ -210,13 +119,13 @@ declare abstract class BaseEntity implements IBaseEntity {
210
119
  copyWith(updates: Partial<Record<string, unknown>>): this;
211
120
  }
212
121
 
213
- declare abstract class UseCase<Params, Type> {
214
- abstract execute(params: Params): Promise<Result<Type, Failure>>;
215
- dispose?(): void;
216
- }
217
- declare abstract class NoParamsUseCase<Type> extends UseCase<void, Type> {
218
- abstract execute(): Promise<Result<Type, Failure>>;
219
- call(): Promise<Result<Type, Failure>>;
122
+ declare class Domain extends BaseEntity {
123
+ readonly id: string;
124
+ readonly name: string;
125
+ readonly url: string;
126
+ constructor(id: string, name: string, url: string);
127
+ toJson(): Record<string, unknown>;
128
+ static fromJson(json: Record<string, unknown>): Domain;
220
129
  }
221
130
 
222
131
  declare class Pagination extends BaseEntity {
@@ -234,18 +143,6 @@ declare class Pagination extends BaseEntity {
234
143
  static fromJson(json: Record<string, unknown>): Pagination;
235
144
  }
236
145
 
237
- declare class ApiResponse<T> extends BaseEntity {
238
- readonly data: T[];
239
- readonly dataAvailability: string;
240
- readonly pagination?: Pagination | undefined;
241
- constructor(data: T[], dataAvailability: string, pagination?: Pagination | undefined);
242
- get isAvailable(): boolean;
243
- get totalItems(): number;
244
- get hasData(): boolean;
245
- toJson(): Record<string, unknown>;
246
- static fromJson<T>(json: Record<string, unknown>, itemFactory: (item: Record<string, unknown>) => T): ApiResponse<T>;
247
- }
248
-
249
146
  declare class ListResult<T> extends BaseEntity {
250
147
  readonly data: T[];
251
148
  readonly pagination: Pagination;
@@ -423,38 +320,10 @@ type ResponseData<T> = {
423
320
  };
424
321
  };
425
322
 
426
- declare class Domain extends BaseEntity {
427
- readonly id: string;
428
- readonly name: string;
429
- readonly url: string;
430
- constructor(id: string, name: string, url: string);
431
- toJson(): Record<string, unknown>;
432
- static fromJson(json: Record<string, unknown>): Domain;
433
- }
434
-
435
- interface DomainRepository {
436
- getAll(params?: DomainListParams): Promise<Result<ListResult<Domain>, ApiFailure>>;
437
- }
438
-
439
- declare class GetAllDomains extends UseCase<DomainListParams | undefined, ListResult<Domain>> {
440
- private repository;
441
- constructor(repository: DomainRepository);
442
- execute(params?: DomainListParams): Promise<Result<ListResult<Domain>, ApiFailure>>;
443
- }
444
-
445
- declare class Injector {
446
- private static instance;
447
- private container;
448
- private factories;
449
- private constructor();
450
- static getInstance(): Injector;
451
- register<T>(key: string, instance: T): void;
452
- registerFactory<T>(key: string, factory: () => T): void;
453
- resolve<T>(key: string): T;
454
- has(key: string): boolean;
455
- clear(): void;
456
- remove(key: string): void;
323
+ interface UseDomains {
324
+ fetchDomainList: (params: DomainListParams) => Promise<Result<ListResult<Domain>, ApiFailure>>;
457
325
  }
326
+ declare function useDomains(client?: StadataClient): UseDomains;
458
327
 
459
328
  declare class RelatedPublication extends BaseEntity {
460
329
  readonly id: string;
@@ -486,51 +355,11 @@ declare class Publication extends BaseEntity {
486
355
  static fromJson(json: Record<string, unknown>): Publication;
487
356
  }
488
357
 
489
- interface PublicationRepository {
490
- getAll(params: PublicationListParams): Promise<Result<ListResult<Publication>, ApiFailure>>;
491
- getById(params: ViewParams): Promise<Result<Publication, ApiFailure>>;
492
- }
493
-
494
- declare class GetAllPublications {
495
- private readonly repository;
496
- constructor(repository: PublicationRepository);
497
- execute(params: PublicationListParams): Promise<Result<ListResult<Publication>, ApiFailure>>;
498
- }
499
-
500
- declare class GetPublicationById {
501
- private readonly repository;
502
- constructor(repository: PublicationRepository);
503
- execute(params: ViewParams): Promise<Result<Publication, ApiFailure>>;
504
- }
505
-
506
- declare class Infographic extends BaseEntity {
507
- readonly id: string;
508
- readonly title: string;
509
- readonly image: string;
510
- readonly category: number;
511
- readonly downloadUrl: string;
512
- readonly description: string | null;
513
- constructor(id: string, title: string, image: string, category: number, downloadUrl: string, description: string | null);
514
- toJson(): Record<string, unknown>;
515
- static fromJson(json: Record<string, unknown>): Infographic;
516
- }
517
-
518
- interface InfographicRepository {
519
- getAll(params: InfographicListParams): Promise<Result<ListResult<Infographic>, ApiFailure>>;
520
- getById(params: ViewParams): Promise<Result<Infographic, ApiFailure>>;
521
- }
522
-
523
- declare class GetAllInfographics {
524
- private readonly repository;
525
- constructor(repository: InfographicRepository);
526
- execute(params: InfographicListParams): Promise<Result<ListResult<Infographic>, ApiFailure>>;
527
- }
528
-
529
- declare class GetInfographicById {
530
- private readonly repository;
531
- constructor(repository: InfographicRepository);
532
- execute(params: ViewParams): Promise<Result<Infographic, ApiFailure>>;
358
+ interface UsePublications {
359
+ fetchPublicationList: (params: PublicationListParams) => Promise<Result<ListResult<Publication>, ApiFailure>>;
360
+ fetchPublicationDetail: (params: ViewParams) => Promise<Result<Publication, ApiFailure>>;
533
361
  }
362
+ declare function usePublications(client?: StadataClient): UsePublications;
534
363
 
535
364
  declare const ApiConstant: {
536
365
  readonly BASE_URL: "https://webapi.bps.go.id/v1/api";
@@ -578,111 +407,6 @@ declare const ApiEndpoint: {
578
407
  readonly TRADE: "/dataexim";
579
408
  };
580
409
 
581
- declare const QueryParamConstant: {
582
- readonly KEY: "key";
583
- readonly DOMAIN: "domain";
584
- readonly LANG: "lang";
585
- readonly PAGE: "page";
586
- readonly PER_PAGE: "per_page";
587
- readonly KEYWORD: "keyword";
588
- readonly MONTH: "month";
589
- readonly YEAR: "year";
590
- readonly SUBJECT: "subj";
591
- readonly VARIABLE: "var";
592
- readonly TURVAR: "turvar";
593
- readonly TURTH: "turth";
594
- readonly PERIOD: "th";
595
- readonly TYPE: "type";
596
- readonly TABLE: "table";
597
- readonly MODEL: "model";
598
- readonly ID: "id";
599
- readonly SHOW_DELETED: "show_deleted";
600
- };
601
-
602
- declare class StadataException extends Error {
603
- constructor(message: string);
604
- }
605
- declare class ApiException extends StadataException {
606
- readonly statusCode?: number | undefined;
607
- readonly response?: unknown | undefined;
608
- constructor(message: string, statusCode?: number | undefined, response?: unknown | undefined);
609
- }
610
- declare class CancelledException extends StadataException {
611
- constructor(message?: string);
612
- }
613
- declare class NetworkException extends StadataException {
614
- constructor(message: string);
615
- }
616
- declare class TimeoutException extends StadataException {
617
- constructor(message?: string);
618
- }
619
- declare class NotFoundException extends ApiException {
620
- constructor(message?: string);
621
- }
622
- declare class UnauthorizedException extends ApiException {
623
- constructor(message?: string);
624
- }
625
- declare class ForbiddenException extends ApiException {
626
- constructor(message?: string);
627
- }
628
- declare class ServerException extends ApiException {
629
- constructor(message?: string, statusCode?: number);
630
- }
631
-
632
- declare class News extends BaseEntity {
633
- readonly id: string;
634
- readonly title: string;
635
- readonly content: string;
636
- readonly releaseDate: string;
637
- readonly categoryId: number;
638
- readonly picture: string | null;
639
- constructor(id: string, title: string, content: string, releaseDate: string, categoryId: number, picture: string | null);
640
- toJson(): Record<string, unknown>;
641
- static fromJson(json: Record<string, unknown>): News;
642
- }
643
-
644
- interface NewsRepository {
645
- getAll(params: NewsListParams): Promise<Result<ListResult<News>, ApiFailure>>;
646
- getById(params: ViewParams): Promise<Result<News, ApiFailure>>;
647
- }
648
-
649
- declare class GetAllNews {
650
- private readonly repository;
651
- constructor(repository: NewsRepository);
652
- execute(params: NewsListParams): Promise<Result<ListResult<News>, ApiFailure>>;
653
- }
654
-
655
- declare class GetNewsById {
656
- private readonly repository;
657
- constructor(repository: NewsRepository);
658
- execute(params: ViewParams): Promise<Result<News, ApiFailure>>;
659
- }
660
-
661
- declare class NewsCategory extends BaseEntity {
662
- readonly id: string;
663
- readonly name: string;
664
- constructor(id: string, name: string);
665
- toJson(): Record<string, unknown>;
666
- static fromJson(json: Record<string, unknown>): NewsCategory;
667
- }
668
-
669
- interface NewsCategoryRepository {
670
- getAll(params?: NewsCategoryListParams): Promise<Result<ListResult<NewsCategory>, ApiFailure>>;
671
- getById(params: ViewParams): Promise<Result<NewsCategory, ApiFailure>>;
672
- }
673
-
674
- declare class GetAllNewsCategories implements UseCase<NewsCategoryListParams | undefined, ListResult<NewsCategory>> {
675
- private readonly repository;
676
- constructor(repository: NewsCategoryRepository);
677
- execute(params?: NewsCategoryListParams): Promise<Result<ListResult<NewsCategory>, ApiFailure>>;
678
- }
679
-
680
- declare class GetNewsCategoryById implements UseCase<ViewParams, NewsCategory> {
681
- private readonly repository;
682
- constructor(repository: NewsCategoryRepository);
683
- execute(params: ViewParams): Promise<Result<NewsCategory, ApiFailure>>;
684
- }
685
-
686
410
  declare class PressRelease extends BaseEntity {
687
411
  readonly id: number;
688
412
  readonly subjectId: number;
@@ -700,22 +424,11 @@ declare class PressRelease extends BaseEntity {
700
424
  static fromJson(json: Record<string, unknown>): PressRelease;
701
425
  }
702
426
 
703
- interface PressReleaseRepository {
704
- getAll(params: PressReleaseListParams): Promise<Result<ListResult<PressRelease>, ApiFailure>>;
705
- getById(params: ViewParams): Promise<Result<PressRelease, ApiFailure>>;
706
- }
707
-
708
- declare class GetAllPressReleases {
709
- private readonly repository;
710
- constructor(repository: PressReleaseRepository);
711
- execute(params: PressReleaseListParams): Promise<Result<ListResult<PressRelease>, ApiFailure>>;
712
- }
713
-
714
- declare class GetPressReleaseById {
715
- private readonly repository;
716
- constructor(repository: PressReleaseRepository);
717
- execute(params: ViewParams): Promise<Result<PressRelease, ApiFailure>>;
427
+ interface UsePressReleases {
428
+ fetchPressReleaseList: (params: PressReleaseListParams) => Promise<Result<ListResult<PressRelease>, ApiFailure>>;
429
+ fetchPressReleaseDetail: (params: ViewParams) => Promise<Result<PressRelease, ApiFailure>>;
718
430
  }
431
+ declare function usePressReleases(client?: StadataClient): UsePressReleases;
719
432
 
720
433
  declare class StaticTable extends BaseEntity {
721
434
  readonly id: string;
@@ -729,108 +442,148 @@ declare class StaticTable extends BaseEntity {
729
442
  static fromJson(json: Record<string, unknown>): StaticTable;
730
443
  }
731
444
 
732
- interface StaticTableRepository {
733
- getAll(params: StaticTableListParams): Promise<Result<ListResult<StaticTable>, ApiFailure>>;
734
- getById(params: ViewParams): Promise<Result<StaticTable, ApiFailure>>;
445
+ interface UseStaticTables {
446
+ fetchStaticTableList: (params: StaticTableListParams) => Promise<Result<ListResult<StaticTable>, ApiFailure>>;
447
+ fetchStaticTableDetail: (params: ViewParams) => Promise<Result<StaticTable, ApiFailure>>;
735
448
  }
449
+ declare function useStaticTables(client?: StadataClient): UseStaticTables;
736
450
 
737
- declare class GetAllStaticTables {
738
- private readonly repository;
739
- constructor(repository: StaticTableRepository);
740
- execute(params: StaticTableListParams): Promise<Result<ListResult<StaticTable>, ApiFailure>>;
741
- }
742
-
743
- declare class GetStaticTableById {
744
- private readonly repository;
745
- constructor(repository: StaticTableRepository);
746
- execute(params: ViewParams): Promise<Result<StaticTable, ApiFailure>>;
451
+ declare class VariableInfo extends BaseEntity {
452
+ readonly value: number;
453
+ readonly label: string;
454
+ readonly unit: string;
455
+ readonly subject: string;
456
+ readonly definition: string;
457
+ readonly notes: string;
458
+ readonly decimal?: number | undefined;
459
+ constructor(value: number, label: string, unit: string, subject: string, definition: string, notes: string, decimal?: number | undefined);
460
+ toJson(): Record<string, unknown>;
461
+ static fromJson(json: Record<string, unknown>): VariableInfo;
747
462
  }
748
-
749
- declare class Subject extends BaseEntity {
750
- readonly id: number;
751
- readonly name: string;
752
- readonly categoryId: number;
753
- readonly category: string;
754
- constructor(id: number, name: string, categoryId: number, category: string);
463
+ declare class VerticalVariableInfo extends BaseEntity {
464
+ readonly value: number | string;
465
+ readonly label: string;
466
+ constructor(value: number | string, label: string);
755
467
  toJson(): Record<string, unknown>;
756
- static fromJson(json: Record<string, unknown>): Subject;
468
+ static fromJson(json: Record<string, unknown>): VerticalVariableInfo;
757
469
  }
758
-
759
- interface SubjectRepository {
760
- getAll(params?: SubjectListParams): Promise<Result<ListResult<Subject>, ApiFailure>>;
761
- getById(params: ViewParams): Promise<Result<Subject, ApiFailure>>;
470
+ declare class PeriodInfo extends VerticalVariableInfo {
471
+ static fromJson(json: Record<string, unknown>): PeriodInfo;
762
472
  }
763
-
764
- declare class GetAllSubjects implements UseCase<SubjectListParams | undefined, ListResult<Subject>> {
765
- private readonly repository;
766
- constructor(repository: SubjectRepository);
767
- execute(params?: SubjectListParams): Promise<Result<ListResult<Subject>, ApiFailure>>;
473
+ declare class SubjectInfo extends BaseEntity {
474
+ readonly value: number;
475
+ readonly label: string;
476
+ constructor(value: number, label: string);
477
+ toJson(): Record<string, unknown>;
478
+ static fromJson(json: Record<string, unknown>): SubjectInfo;
768
479
  }
769
-
770
- declare class GetSubjectById implements UseCase<ViewParams, Subject> {
771
- private readonly repository;
772
- constructor(repository: SubjectRepository);
773
- execute(params: ViewParams): Promise<Result<Subject, ApiFailure>>;
480
+ declare class RelatedTable extends BaseEntity {
481
+ readonly id: string;
482
+ readonly title: string;
483
+ readonly tableSource: number;
484
+ readonly lastUpdate: string | null;
485
+ readonly link: string;
486
+ constructor(id: string, title: string, tableSource: number, lastUpdate: string | null, link: string);
487
+ toJson(): Record<string, unknown>;
488
+ static fromJson(json: Record<string, unknown>): RelatedTable;
774
489
  }
775
490
 
776
- declare class SubjectCategory extends BaseEntity {
777
- readonly id: number;
778
- readonly name: string;
779
- constructor(id: number, name: string);
491
+ declare class DynamicTable extends BaseEntity {
492
+ readonly subjects: SubjectInfo[];
493
+ readonly variables: VariableInfo[];
494
+ readonly verticalVariables: VerticalVariableInfo[];
495
+ readonly verticalVariableLabel: string;
496
+ readonly periods: PeriodInfo[];
497
+ readonly derivedVariables: VerticalVariableInfo[];
498
+ readonly derivedPeriods: VerticalVariableInfo[];
499
+ readonly dataContent: Record<string, unknown>;
500
+ readonly related: RelatedTable[];
501
+ readonly lastUpdate?: string | null | undefined;
502
+ 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);
780
503
  toJson(): Record<string, unknown>;
781
- static fromJson(json: Record<string, unknown>): SubjectCategory;
504
+ static fromJson(json: Record<string, unknown>): DynamicTable;
505
+ getDataValue(vervarValue: number | string, varValue: number | string, turvarValue: number | string, tahunValue: number | string, turtahunValue: number | string): unknown;
506
+ toStructuredData(): {
507
+ subject_id: number;
508
+ subject_label: string;
509
+ variable_id: number;
510
+ variable_label: string;
511
+ variable_unit: string;
512
+ vertical_variable_label: string;
513
+ last_update: string | null | undefined;
514
+ data: Array<{
515
+ id: number | string;
516
+ label: string;
517
+ data: Array<{
518
+ id: number | string;
519
+ label: string;
520
+ data: Array<{
521
+ id: number | string;
522
+ label: string;
523
+ value?: unknown;
524
+ data?: Array<{
525
+ id: number | string;
526
+ label: string;
527
+ value: unknown;
528
+ }>;
529
+ }>;
530
+ }>;
531
+ }>;
532
+ };
782
533
  }
783
534
 
784
- interface SubjectCategoryRepository {
785
- getAll(params?: SubjectCategoryListParams): Promise<Result<ListResult<SubjectCategory>, ApiFailure>>;
786
- getById(params: ViewParams): Promise<Result<SubjectCategory, ApiFailure>>;
535
+ interface UseDynamicTables {
536
+ fetchDynamicTableList: (params: DynamicTableParams) => Promise<Result<DynamicTable, ApiFailure>>;
787
537
  }
538
+ declare function useDynamicTables(client?: StadataClient): UseDynamicTables;
788
539
 
789
- declare class GetAllSubjectCategories implements UseCase<SubjectCategoryListParams | undefined, ListResult<SubjectCategory>> {
790
- private readonly repository;
791
- constructor(repository: SubjectCategoryRepository);
792
- execute(params?: SubjectCategoryListParams): Promise<Result<ListResult<SubjectCategory>, ApiFailure>>;
540
+ declare class Infographic extends BaseEntity {
541
+ readonly id: string;
542
+ readonly title: string;
543
+ readonly image: string;
544
+ readonly category: number;
545
+ readonly downloadUrl: string;
546
+ readonly description: string | null;
547
+ constructor(id: string, title: string, image: string, category: number, downloadUrl: string, description: string | null);
548
+ toJson(): Record<string, unknown>;
549
+ static fromJson(json: Record<string, unknown>): Infographic;
793
550
  }
794
551
 
795
- declare class GetSubjectCategoryById implements UseCase<ViewParams, SubjectCategory> {
796
- private readonly repository;
797
- constructor(repository: SubjectCategoryRepository);
798
- execute(params: ViewParams): Promise<Result<SubjectCategory, ApiFailure>>;
552
+ interface UseInfographics {
553
+ fetchInfographicList: (params: InfographicListParams) => Promise<Result<ListResult<Infographic>, ApiFailure>>;
799
554
  }
555
+ declare function useInfographics(client?: StadataClient): UseInfographics;
800
556
 
801
- declare class StrategicIndicator extends BaseEntity {
802
- readonly variableId: number;
803
- readonly indicatorId: number;
804
- readonly subjectCsa: number;
557
+ declare class News extends BaseEntity {
558
+ readonly id: string;
805
559
  readonly title: string;
806
- readonly name: string;
807
- readonly dataSource: string;
808
- readonly value: number;
809
- readonly unit: string;
810
- readonly category: number;
811
- readonly hashId: string;
812
- readonly period: string;
813
- constructor(variableId: number, indicatorId: number, subjectCsa: number, title: string, name: string, dataSource: string, value: number, unit: string, category: number, hashId: string, period: string);
560
+ readonly content: string;
561
+ readonly releaseDate: string;
562
+ readonly categoryId: number;
563
+ readonly picture: string | null;
564
+ constructor(id: string, title: string, content: string, releaseDate: string, categoryId: number, picture: string | null);
814
565
  toJson(): Record<string, unknown>;
815
- static fromJson(json: Record<string, unknown>): StrategicIndicator;
566
+ static fromJson(json: Record<string, unknown>): News;
816
567
  }
817
568
 
818
- interface StrategicIndicatorRepository {
819
- getAll(params?: StrategicIndicatorListParams): Promise<Result<ListResult<StrategicIndicator>, ApiFailure>>;
820
- getById(params: ViewParams): Promise<Result<StrategicIndicator, ApiFailure>>;
569
+ interface UseNews {
570
+ fetchNewList: (params: NewsListParams) => Promise<Result<ListResult<News>, ApiFailure>>;
571
+ fetchNewDetail: (params: ViewParams) => Promise<Result<News, ApiFailure>>;
821
572
  }
573
+ declare function useNews(client?: StadataClient): UseNews;
822
574
 
823
- declare class GetAllStrategicIndicators implements UseCase<StrategicIndicatorListParams | undefined, ListResult<StrategicIndicator>> {
824
- private readonly repository;
825
- constructor(repository: StrategicIndicatorRepository);
826
- execute(params?: StrategicIndicatorListParams): Promise<Result<ListResult<StrategicIndicator>, ApiFailure>>;
575
+ declare class NewsCategory extends BaseEntity {
576
+ readonly id: string;
577
+ readonly name: string;
578
+ constructor(id: string, name: string);
579
+ toJson(): Record<string, unknown>;
580
+ static fromJson(json: Record<string, unknown>): NewsCategory;
827
581
  }
828
582
 
829
- declare class GetStrategicIndicatorById implements UseCase<ViewParams, StrategicIndicator> {
830
- private readonly repository;
831
- constructor(repository: StrategicIndicatorRepository);
832
- execute(params: ViewParams): Promise<Result<StrategicIndicator, ApiFailure>>;
583
+ interface UseNewsCategories {
584
+ fetchNewsCategoryList: (params: NewsCategoryListParams) => Promise<Result<ListResult<NewsCategory>, ApiFailure>>;
833
585
  }
586
+ declare function useNewsCategories(client?: StadataClient): UseNewsCategories;
834
587
 
835
588
  declare class Variable extends BaseEntity {
836
589
  readonly id: number;
@@ -851,22 +604,11 @@ declare class Variable extends BaseEntity {
851
604
  static fromJson(json: Record<string, unknown>): Variable;
852
605
  }
853
606
 
854
- interface VariableRepository {
855
- getAll(params?: VariableListParams): Promise<Result<ListResult<Variable>, ApiFailure>>;
856
- getById(params: ViewParams): Promise<Result<Variable, ApiFailure>>;
857
- }
858
-
859
- declare class GetAllVariables implements UseCase<VariableListParams | undefined, ListResult<Variable>> {
860
- private readonly repository;
861
- constructor(repository: VariableRepository);
862
- execute(params?: VariableListParams): Promise<Result<ListResult<Variable>, ApiFailure>>;
863
- }
864
-
865
- declare class GetVariableById implements UseCase<ViewParams, Variable> {
866
- private readonly repository;
867
- constructor(repository: VariableRepository);
868
- execute(params: ViewParams): Promise<Result<Variable, ApiFailure>>;
607
+ interface UseVariables {
608
+ fetchVariableList: (params: VariableListParams) => Promise<Result<ListResult<Variable>, ApiFailure>>;
609
+ fetchVariableDetail: (params: ViewParams) => Promise<Result<Variable, ApiFailure>>;
869
610
  }
611
+ declare function useVariables(client?: StadataClient): UseVariables;
870
612
 
871
613
  declare class VerticalVariable extends BaseEntity {
872
614
  readonly id: number;
@@ -879,47 +621,68 @@ declare class VerticalVariable extends BaseEntity {
879
621
  static fromJson(json: Record<string, unknown>): VerticalVariable;
880
622
  }
881
623
 
882
- interface VerticalVariableRepository {
883
- getAll(params: VerticalVariableListParams): Promise<Result<ListResult<VerticalVariable>, ApiFailure>>;
884
- getById(params: ViewParams): Promise<Result<VerticalVariable, ApiFailure>>;
624
+ interface UseVerticalVariables {
625
+ fetchVerticalVariableList: (params: VerticalVariableListParams) => Promise<Result<ListResult<VerticalVariable>, ApiFailure>>;
626
+ }
627
+ declare function useVerticalVariables(client?: StadataClient): UseVerticalVariables;
628
+
629
+ declare class DerivedVariable extends BaseEntity {
630
+ readonly id: number;
631
+ readonly name: string;
632
+ readonly groupId: number;
633
+ readonly groupName: string;
634
+ constructor(id: number, name: string, groupId: number, groupName: string);
635
+ toJson(): Record<string, unknown>;
636
+ static fromJson(json: Record<string, unknown>): DerivedVariable;
637
+ }
638
+
639
+ interface UseDerivedVariables {
640
+ fetchDerivedVariableList: (params: DerivedVariableListParams) => Promise<Result<ListResult<DerivedVariable>, ApiFailure>>;
885
641
  }
642
+ declare function useDerivedVariables(client?: StadataClient): UseDerivedVariables;
886
643
 
887
- declare class GetAllVerticalVariables implements UseCase<VerticalVariableListParams, ListResult<VerticalVariable>> {
888
- private readonly repository;
889
- constructor(repository: VerticalVariableRepository);
890
- execute(params: VerticalVariableListParams): Promise<Result<ListResult<VerticalVariable>, ApiFailure>>;
644
+ declare class Subject extends BaseEntity {
645
+ readonly id: number;
646
+ readonly name: string;
647
+ readonly categoryId: number;
648
+ readonly category: string;
649
+ constructor(id: number, name: string, categoryId: number, category: string);
650
+ toJson(): Record<string, unknown>;
651
+ static fromJson(json: Record<string, unknown>): Subject;
891
652
  }
892
653
 
893
- declare class GetVerticalVariableById implements UseCase<ViewParams, VerticalVariable> {
894
- private readonly repository;
895
- constructor(repository: VerticalVariableRepository);
896
- execute(params: ViewParams): Promise<Result<VerticalVariable, ApiFailure>>;
654
+ interface UseSubjects {
655
+ fetchSubjectList: (params: SubjectListParams) => Promise<Result<ListResult<Subject>, ApiFailure>>;
656
+ fetchSubjectDetail: (params: ViewParams) => Promise<Result<Subject, ApiFailure>>;
897
657
  }
658
+ declare function useSubjects(client?: StadataClient): UseSubjects;
898
659
 
899
- declare class Unit extends BaseEntity {
660
+ declare class SubjectCategory extends BaseEntity {
900
661
  readonly id: number;
901
662
  readonly name: string;
902
663
  constructor(id: number, name: string);
903
664
  toJson(): Record<string, unknown>;
904
- static fromJson(json: Record<string, unknown>): Unit;
665
+ static fromJson(json: Record<string, unknown>): SubjectCategory;
905
666
  }
906
667
 
907
- interface UnitRepository {
908
- getAll(params?: UnitListParams): Promise<Result<ListResult<Unit>, ApiFailure>>;
909
- getById(params: ViewParams): Promise<Result<Unit, ApiFailure>>;
668
+ interface UseSubjectCategories {
669
+ fetchSubjectCategoryList: (params: SubjectCategoryListParams) => Promise<Result<ListResult<SubjectCategory>, ApiFailure>>;
910
670
  }
671
+ declare function useSubjectCategories(client?: StadataClient): UseSubjectCategories;
911
672
 
912
- declare class GetAllUnits implements UseCase<UnitListParams | undefined, ListResult<Unit>> {
913
- private readonly repository;
914
- constructor(repository: UnitRepository);
915
- execute(params?: UnitListParams): Promise<Result<ListResult<Unit>, ApiFailure>>;
673
+ declare class Unit extends BaseEntity {
674
+ readonly id: number;
675
+ readonly name: string;
676
+ constructor(id: number, name: string);
677
+ toJson(): Record<string, unknown>;
678
+ static fromJson(json: Record<string, unknown>): Unit;
916
679
  }
917
680
 
918
- declare class GetUnitById implements UseCase<ViewParams, Unit> {
919
- private readonly repository;
920
- constructor(repository: UnitRepository);
921
- execute(params: ViewParams): Promise<Result<Unit, ApiFailure>>;
681
+ interface UseUnits {
682
+ fetchUnitList: (params: UnitListParams) => Promise<Result<ListResult<Unit>, ApiFailure>>;
683
+ fetchUnitDetail: (params: ViewParams) => Promise<Result<Unit, ApiFailure>>;
922
684
  }
685
+ declare function useUnits(client?: StadataClient): UseUnits;
923
686
 
924
687
  declare class Period extends BaseEntity {
925
688
  readonly id: number;
@@ -929,22 +692,10 @@ declare class Period extends BaseEntity {
929
692
  static fromJson(json: Record<string, unknown>): Period;
930
693
  }
931
694
 
932
- interface PeriodRepository {
933
- getAll(params: PeriodListParams): Promise<Result<ListResult<Period>, ApiFailure>>;
934
- getById(params: ViewParams): Promise<Result<Period, ApiFailure>>;
935
- }
936
-
937
- declare class GetAllPeriods implements UseCase<PeriodListParams, ListResult<Period>> {
938
- private readonly repository;
939
- constructor(repository: PeriodRepository);
940
- execute(params: PeriodListParams): Promise<Result<ListResult<Period>, ApiFailure>>;
941
- }
942
-
943
- declare class GetPeriodById implements UseCase<ViewParams, Period> {
944
- private readonly repository;
945
- constructor(repository: PeriodRepository);
946
- execute(params: ViewParams): Promise<Result<Period, ApiFailure>>;
695
+ interface UsePeriods {
696
+ fetchPeriodList: (params: PeriodListParams) => Promise<Result<ListResult<Period>, ApiFailure>>;
947
697
  }
698
+ declare function usePeriods(client?: StadataClient): UsePeriods;
948
699
 
949
700
  declare class DerivedPeriod extends BaseEntity {
950
701
  readonly id: number;
@@ -956,49 +707,33 @@ declare class DerivedPeriod extends BaseEntity {
956
707
  static fromJson(json: Record<string, unknown>): DerivedPeriod;
957
708
  }
958
709
 
959
- interface DerivedPeriodRepository {
960
- getAll(params: DerivedPeriodListParams): Promise<Result<ListResult<DerivedPeriod>, ApiFailure>>;
961
- getById(params: ViewParams): Promise<Result<DerivedPeriod, ApiFailure>>;
962
- }
963
-
964
- declare class GetAllDerivedPeriods {
965
- private readonly repository;
966
- constructor(repository: DerivedPeriodRepository);
967
- execute(params: DerivedPeriodListParams): Promise<Result<ListResult<DerivedPeriod>, ApiFailure>>;
710
+ interface UseDerivedPeriods {
711
+ fetchDerivedPeriodList: (params: DerivedPeriodListParams) => Promise<Result<ListResult<DerivedPeriod>, ApiFailure>>;
968
712
  }
713
+ declare function useDerivedPeriods(client?: StadataClient): UseDerivedPeriods;
969
714
 
970
- declare class GetDerivedPeriodById {
971
- private readonly repository;
972
- constructor(repository: DerivedPeriodRepository);
973
- execute(params: ViewParams): Promise<Result<DerivedPeriod, ApiFailure>>;
974
- }
975
-
976
- declare class DerivedVariable extends BaseEntity {
977
- readonly id: number;
715
+ declare class StrategicIndicator extends BaseEntity {
716
+ readonly variableId: number;
717
+ readonly indicatorId: number;
718
+ readonly subjectCsa: number;
719
+ readonly title: string;
978
720
  readonly name: string;
979
- readonly groupId: number;
980
- readonly groupName: string;
981
- constructor(id: number, name: string, groupId: number, groupName: string);
721
+ readonly dataSource: string;
722
+ readonly value: number;
723
+ readonly unit: string;
724
+ readonly category: number;
725
+ readonly hashId: string;
726
+ readonly period: string;
727
+ constructor(variableId: number, indicatorId: number, subjectCsa: number, title: string, name: string, dataSource: string, value: number, unit: string, category: number, hashId: string, period: string);
982
728
  toJson(): Record<string, unknown>;
983
- static fromJson(json: Record<string, unknown>): DerivedVariable;
984
- }
985
-
986
- interface DerivedVariableRepository {
987
- getAll(params: DerivedVariableListParams): Promise<Result<ListResult<DerivedVariable>, ApiFailure>>;
988
- getById(params: ViewParams): Promise<Result<DerivedVariable, ApiFailure>>;
989
- }
990
-
991
- declare class GetAllDerivedVariables {
992
- private readonly repository;
993
- constructor(repository: DerivedVariableRepository);
994
- execute(params: DerivedVariableListParams): Promise<Result<ListResult<DerivedVariable>, ApiFailure>>;
729
+ static fromJson(json: Record<string, unknown>): StrategicIndicator;
995
730
  }
996
731
 
997
- declare class GetDerivedVariableById {
998
- private readonly repository;
999
- constructor(repository: DerivedVariableRepository);
1000
- execute(params: ViewParams): Promise<Result<DerivedVariable, ApiFailure>>;
732
+ interface UseStrategicIndicators {
733
+ fetchStrategicIndicatorList: (params: StrategicIndicatorListParams) => Promise<Result<ListResult<StrategicIndicator>, ApiFailure>>;
734
+ fetchStrategicIndicatorDetail: (params: ViewParams) => Promise<Result<StrategicIndicator, ApiFailure>>;
1001
735
  }
736
+ declare function useStrategicIndicators(client?: StadataClient): UseStrategicIndicators;
1002
737
 
1003
738
  declare class StatisticClassification extends BaseEntity {
1004
739
  readonly id: string;
@@ -1008,22 +743,11 @@ declare class StatisticClassification extends BaseEntity {
1008
743
  static fromJson(json: Record<string, unknown>): StatisticClassification;
1009
744
  }
1010
745
 
1011
- interface StatisticClassificationRepository {
1012
- getAll(params?: StatisticClassificationListParams): Promise<Result<ListResult<StatisticClassification>, ApiFailure>>;
1013
- getById(params: ViewParams): Promise<Result<StatisticClassification, ApiFailure>>;
1014
- }
1015
-
1016
- declare class GetAllStatisticClassifications {
1017
- private readonly repository;
1018
- constructor(repository: StatisticClassificationRepository);
1019
- execute(params?: StatisticClassificationListParams): Promise<Result<ListResult<StatisticClassification>, ApiFailure>>;
1020
- }
1021
-
1022
- declare class GetStatisticClassificationById {
1023
- private readonly repository;
1024
- constructor(repository: StatisticClassificationRepository);
1025
- execute(params: ViewParams): Promise<Result<StatisticClassification, ApiFailure>>;
746
+ interface UseStatisticClassifications {
747
+ fetchStatisticClassificationList: (params: StatisticClassificationListParams) => Promise<Result<ListResult<StatisticClassification>, ApiFailure>>;
748
+ fetchStatisticClassificationDetail: (params: ViewParams) => Promise<Result<StatisticClassification, ApiFailure>>;
1026
749
  }
750
+ declare function useStatisticClassifications(client?: StadataClient): UseStatisticClassifications;
1027
751
 
1028
752
  declare class CensusCategory extends BaseEntity {
1029
753
  readonly id: string;
@@ -1098,117 +822,55 @@ declare class CensusData extends BaseEntity {
1098
822
  static fromJson(json: Record<string, unknown>): CensusData;
1099
823
  }
1100
824
 
1101
- interface CensusRepository {
1102
- getAll(params?: CensusListParams): Promise<Result<ListResult<CensusEvent | CensusTopic | CensusArea | CensusDataset | CensusData>, ApiFailure>>;
1103
- getById(params: ViewParams): Promise<Result<CensusEvent, ApiFailure>>;
825
+ interface UseCensus {
826
+ fetchCensusList: (params: CensusListParams) => Promise<Result<ListResult<CensusEvent | CensusTopic | CensusArea | CensusDataset | CensusData>, ApiFailure>>;
1104
827
  }
828
+ declare function useCensus(client?: StadataClient): UseCensus;
1105
829
 
1106
- type CensusEntity = CensusEvent | CensusTopic | CensusArea | CensusDataset | CensusData;
1107
- declare class GetAllCensuses implements UseCase<CensusListParams | undefined, ListResult<CensusEntity>> {
1108
- private repository;
1109
- constructor(repository: CensusRepository);
1110
- execute(params?: CensusListParams): Promise<Result<ListResult<CensusEntity>, ApiFailure>>;
830
+ interface UseTrade {
831
+ fetchTradeData: (params: TradeParams) => Promise<Result<ResponseData<Record<string, unknown>>, ApiFailure>>;
1111
832
  }
833
+ declare function useTrade(client?: StadataClient): UseTrade;
1112
834
 
1113
- declare class GetCensusById implements UseCase<ViewParams, CensusEvent> {
1114
- private repository;
1115
- constructor(repository: CensusRepository);
1116
- execute(params: ViewParams): Promise<Result<CensusEvent, ApiFailure>>;
1117
- }
1118
-
1119
- declare class VariableInfo extends BaseEntity {
1120
- readonly value: number;
1121
- readonly label: string;
1122
- readonly unit: string;
1123
- readonly subject: string;
1124
- readonly definition: string;
1125
- readonly notes: string;
1126
- readonly decimal?: number | undefined;
1127
- constructor(value: number, label: string, unit: string, subject: string, definition: string, notes: string, decimal?: number | undefined);
1128
- toJson(): Record<string, unknown>;
1129
- static fromJson(json: Record<string, unknown>): VariableInfo;
1130
- }
1131
- declare class VerticalVariableInfo extends BaseEntity {
1132
- readonly value: number | string;
1133
- readonly label: string;
1134
- constructor(value: number | string, label: string);
1135
- toJson(): Record<string, unknown>;
1136
- static fromJson(json: Record<string, unknown>): VerticalVariableInfo;
1137
- }
1138
- declare class PeriodInfo extends VerticalVariableInfo {
1139
- static fromJson(json: Record<string, unknown>): PeriodInfo;
1140
- }
1141
- declare class SubjectInfo extends BaseEntity {
1142
- readonly value: number;
1143
- readonly label: string;
1144
- constructor(value: number, label: string);
1145
- toJson(): Record<string, unknown>;
1146
- static fromJson(json: Record<string, unknown>): SubjectInfo;
1147
- }
1148
- declare class RelatedTable extends BaseEntity {
1149
- readonly id: string;
1150
- readonly title: string;
1151
- readonly tableSource: number;
1152
- readonly lastUpdate: string | null;
1153
- readonly link: string;
1154
- constructor(id: string, title: string, tableSource: number, lastUpdate: string | null, link: string);
1155
- toJson(): Record<string, unknown>;
1156
- static fromJson(json: Record<string, unknown>): RelatedTable;
1157
- }
1158
-
1159
- declare class DynamicTable extends BaseEntity {
1160
- readonly subjects: SubjectInfo[];
1161
- readonly variables: VariableInfo[];
1162
- readonly verticalVariables: VerticalVariableInfo[];
1163
- readonly verticalVariableLabel: string;
1164
- readonly periods: PeriodInfo[];
1165
- readonly derivedVariables: VerticalVariableInfo[];
1166
- readonly derivedPeriods: VerticalVariableInfo[];
1167
- readonly dataContent: Record<string, unknown>;
1168
- readonly related: RelatedTable[];
1169
- readonly lastUpdate?: string | null | undefined;
1170
- 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);
1171
- toJson(): Record<string, unknown>;
1172
- static fromJson(json: Record<string, unknown>): DynamicTable;
1173
- getDataValue(vervarValue: number | string, varValue: number | string, turvarValue: number | string, tahunValue: number | string, turtahunValue: number | string): unknown;
1174
- toStructuredData(): {
1175
- subject_id: number;
1176
- subject_label: string;
1177
- variable_id: number;
1178
- variable_label: string;
1179
- variable_unit: string;
1180
- vertical_variable_label: string;
1181
- last_update: string | null | undefined;
1182
- data: Array<{
1183
- id: number | string;
1184
- label: string;
1185
- data: Array<{
1186
- id: number | string;
1187
- label: string;
1188
- data: Array<{
1189
- id: number | string;
1190
- label: string;
1191
- value?: unknown;
1192
- data?: Array<{
1193
- id: number | string;
1194
- label: string;
1195
- value: unknown;
1196
- }>;
1197
- }>;
1198
- }>;
1199
- }>;
1200
- };
1201
- }
1202
-
1203
- interface DynamicTableRepository {
1204
- getAll(params: DynamicTableParams): Promise<Result<DynamicTable, ApiFailure>>;
1205
- }
1206
-
1207
- declare class GetAllDynamicTables implements UseCase<DynamicTableParams, DynamicTable> {
1208
- private repository;
1209
- constructor(repository: DynamicTableRepository);
1210
- execute(params: DynamicTableParams): Promise<Result<DynamicTable, ApiFailure>>;
835
+ interface StadataClientConfig {
836
+ apiKey: string;
837
+ baseURL?: string;
838
+ timeout?: number;
839
+ interceptors?: NetworkInterceptor[];
840
+ debug?: boolean;
841
+ logLevel?: LogLevel;
1211
842
  }
843
+ interface StadataClient {
844
+ readonly networkClient: NetworkClient;
845
+ readonly config: StadataClientConfig;
846
+ }
847
+ interface StadataClientInstance extends StadataClient {
848
+ useDomains: () => ReturnType<typeof useDomains>;
849
+ usePublications: () => ReturnType<typeof usePublications>;
850
+ usePressReleases: () => ReturnType<typeof usePressReleases>;
851
+ useStaticTables: () => ReturnType<typeof useStaticTables>;
852
+ useDynamicTables: () => ReturnType<typeof useDynamicTables>;
853
+ useInfographics: () => ReturnType<typeof useInfographics>;
854
+ useNews: () => ReturnType<typeof useNews>;
855
+ useNewsCategories: () => ReturnType<typeof useNewsCategories>;
856
+ useVariables: () => ReturnType<typeof useVariables>;
857
+ useVerticalVariables: () => ReturnType<typeof useVerticalVariables>;
858
+ useDerivedVariables: () => ReturnType<typeof useDerivedVariables>;
859
+ useSubjects: () => ReturnType<typeof useSubjects>;
860
+ useSubjectCategories: () => ReturnType<typeof useSubjectCategories>;
861
+ useUnits: () => ReturnType<typeof useUnits>;
862
+ usePeriods: () => ReturnType<typeof usePeriods>;
863
+ useDerivedPeriods: () => ReturnType<typeof useDerivedPeriods>;
864
+ useStrategicIndicators: () => ReturnType<typeof useStrategicIndicators>;
865
+ useStatisticClassifications: () => ReturnType<typeof useStatisticClassifications>;
866
+ useCensus: () => ReturnType<typeof useCensus>;
867
+ useTrade: () => ReturnType<typeof useTrade>;
868
+ }
869
+ declare function createStadataClient(config: StadataClientConfig): StadataClientInstance;
870
+
871
+ declare function initStadata(config: StadataClientConfig): StadataClientInstance;
872
+ declare function getGlobalClient(): StadataClientInstance;
873
+ declare function resetGlobalClient(): void;
1212
874
 
1213
875
  interface StadataList {
1214
876
  domains(params?: DomainListParams): Promise<Result<ListResult<Domain>, ApiFailure>>;
@@ -1312,14 +974,4 @@ declare class Trade extends BaseEntity {
1312
974
  static fromJson(json: Record<string, unknown>): Trade;
1313
975
  }
1314
976
 
1315
- interface TradeRepository {
1316
- get(params: TradeParams): Promise<Result<ResponseData<Record<string, unknown>>, ApiFailure>>;
1317
- }
1318
-
1319
- declare class GetTrade implements UseCase<TradeParams, ResponseData<Record<string, unknown>>> {
1320
- private repository;
1321
- constructor(repository: TradeRepository);
1322
- execute(params: TradeParams): Promise<Result<ResponseData<Record<string, unknown>>, ApiFailure>>;
1323
- }
1324
-
1325
- 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 };
977
+ export { ApiConstant, ApiEndpoint, ApiFailure, type BaseListParams, CancelToken, CancelledFailure, CensusArea, CensusCategory, CensusData, CensusDataset, CensusEvent, type CensusListParams, CensusTopic, ClassificationType, DataAvailability, DataLanguage, DerivedPeriod, type DerivedPeriodListParams, DerivedVariable, type DerivedVariableListParams, Domain, type DomainListParams, DomainType, DynamicTable, type DynamicTableParams, ForbiddenFailure, HSCodeType, Infographic, type InfographicListParams, type JSON, KBKILevel, KBLILevel, ListResult, LogLevel, NetworkClient, type NetworkClientConfig, NetworkFailure, type NetworkInterceptor, News, NewsCategory, type NewsCategoryListParams, type NewsListParams, NotFoundFailure, Pagination, ParseFailure, Period, type PeriodListParams, PressRelease, type PressReleaseListParams, Publication, type PublicationListParams, RelatedPublication, type RequestData, type RequestOptions, type ResponseData, ServerFailure, type StadataClient, type StadataClientConfig, type StadataClientInstance, StadataJS, type StadataJSConfig, StaticTable, type StaticTableListParams, StatisticClassification, type StatisticClassificationListParams, StrategicIndicator, type StrategicIndicatorListParams, Subject, SubjectCategory, type SubjectCategoryListParams, type SubjectListParams, TimeoutFailure, Trade, type TradeParams, TradePeriod, TradeSource, UnauthorizedFailure, Unit, type UnitListParams, type UseCensus, type UseDerivedPeriods, type UseDerivedVariables, type UseDomains, type UseDynamicTables, type UseInfographics, type UseNews, type UseNewsCategories, type UsePeriods, type UsePressReleases, type UsePublications, type UseStaticTables, type UseStatisticClassifications, type UseStrategicIndicators, type UseSubjectCategories, type UseSubjects, type UseTrade, type UseUnits, type UseVariables, type UseVerticalVariables, ValidationFailure, Variable, type VariableListParams, VerticalVariable, type VerticalVariableListParams, type ViewParams, createStadataClient, getGlobalClient, initStadata, resetGlobalClient, useCensus, useDerivedPeriods, useDerivedVariables, useDomains, useDynamicTables, useInfographics, useNews, useNewsCategories, usePeriods, usePressReleases, usePublications, useStaticTables, useStatisticClassifications, useStrategicIndicators, useSubjectCategories, useSubjects, useTrade, useUnits, useVariables, useVerticalVariables };