stadata-js 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -366,10 +366,10 @@ interface DerivedVariableListParams extends BaseListParams {
366
366
  }
367
367
  interface DynamicTableParams extends BaseListParams {
368
368
  variableId: number;
369
- periodId: number | string;
369
+ periodId: string;
370
370
  derivedVariableId?: number;
371
371
  verticalVariableId?: number;
372
- derivedPeriodId?: number;
372
+ derivedPeriodId?: string;
373
373
  }
374
374
  interface StatisticClassificationListParams extends BaseListParams {
375
375
  type?: ClassificationType;
@@ -750,7 +750,8 @@ declare class Subject extends BaseEntity {
750
750
  readonly id: number;
751
751
  readonly name: string;
752
752
  readonly categoryId: number;
753
- constructor(id: number, name: string, categoryId: number);
753
+ readonly category: string;
754
+ constructor(id: number, name: string, categoryId: number, category: string);
754
755
  toJson(): Record<string, unknown>;
755
756
  static fromJson(json: Record<string, unknown>): Subject;
756
757
  }
@@ -835,11 +836,17 @@ declare class Variable extends BaseEntity {
835
836
  readonly id: number;
836
837
  readonly title: string;
837
838
  readonly subjectId: number;
839
+ readonly subjectName: string;
840
+ readonly statisticClassificationId: number;
841
+ readonly statisticClassificationName: string;
842
+ readonly definition: string;
843
+ readonly notes: string;
838
844
  readonly unit: string;
839
845
  readonly verticalVariableCount: number;
840
846
  readonly derivedVariableCount: number;
841
- readonly graph: string[];
842
- constructor(id: number, title: string, subjectId: number, unit: string, verticalVariableCount: number, derivedVariableCount: number, graph: string[]);
847
+ readonly graphId: number;
848
+ readonly graphName: string;
849
+ constructor(id: number, title: string, subjectId: number, subjectName: string, statisticClassificationId: number, statisticClassificationName: string, definition: string, notes: string, unit: string, verticalVariableCount: number, derivedVariableCount: number, graphId: number, graphName: string);
843
850
  toJson(): Record<string, unknown>;
844
851
  static fromJson(json: Record<string, unknown>): Variable;
845
852
  }
@@ -1164,6 +1171,33 @@ declare class DynamicTable extends BaseEntity {
1164
1171
  toJson(): Record<string, unknown>;
1165
1172
  static fromJson(json: Record<string, unknown>): DynamicTable;
1166
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
+ };
1167
1201
  }
1168
1202
 
1169
1203
  interface DynamicTableRepository {
package/dist/index.d.ts CHANGED
@@ -366,10 +366,10 @@ interface DerivedVariableListParams extends BaseListParams {
366
366
  }
367
367
  interface DynamicTableParams extends BaseListParams {
368
368
  variableId: number;
369
- periodId: number | string;
369
+ periodId: string;
370
370
  derivedVariableId?: number;
371
371
  verticalVariableId?: number;
372
- derivedPeriodId?: number;
372
+ derivedPeriodId?: string;
373
373
  }
374
374
  interface StatisticClassificationListParams extends BaseListParams {
375
375
  type?: ClassificationType;
@@ -750,7 +750,8 @@ declare class Subject extends BaseEntity {
750
750
  readonly id: number;
751
751
  readonly name: string;
752
752
  readonly categoryId: number;
753
- constructor(id: number, name: string, categoryId: number);
753
+ readonly category: string;
754
+ constructor(id: number, name: string, categoryId: number, category: string);
754
755
  toJson(): Record<string, unknown>;
755
756
  static fromJson(json: Record<string, unknown>): Subject;
756
757
  }
@@ -835,11 +836,17 @@ declare class Variable extends BaseEntity {
835
836
  readonly id: number;
836
837
  readonly title: string;
837
838
  readonly subjectId: number;
839
+ readonly subjectName: string;
840
+ readonly statisticClassificationId: number;
841
+ readonly statisticClassificationName: string;
842
+ readonly definition: string;
843
+ readonly notes: string;
838
844
  readonly unit: string;
839
845
  readonly verticalVariableCount: number;
840
846
  readonly derivedVariableCount: number;
841
- readonly graph: string[];
842
- constructor(id: number, title: string, subjectId: number, unit: string, verticalVariableCount: number, derivedVariableCount: number, graph: string[]);
847
+ readonly graphId: number;
848
+ readonly graphName: string;
849
+ constructor(id: number, title: string, subjectId: number, subjectName: string, statisticClassificationId: number, statisticClassificationName: string, definition: string, notes: string, unit: string, verticalVariableCount: number, derivedVariableCount: number, graphId: number, graphName: string);
843
850
  toJson(): Record<string, unknown>;
844
851
  static fromJson(json: Record<string, unknown>): Variable;
845
852
  }
@@ -1164,6 +1171,33 @@ declare class DynamicTable extends BaseEntity {
1164
1171
  toJson(): Record<string, unknown>;
1165
1172
  static fromJson(json: Record<string, unknown>): DynamicTable;
1166
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
+ };
1167
1201
  }
1168
1202
 
1169
1203
  interface DynamicTableRepository {