@dhis2/app-service-data 3.9.0 → 3.9.2

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.
@@ -1,3 +1,3 @@
1
1
  import type { Query, QueryOptions } from '../../engine';
2
2
  import type { QueryRenderInput } from '../../types';
3
- export declare const useDataQuery: (query: Query, { onComplete: userOnSuccess, onError: userOnError, variables: initialVariables, lazy: initialLazy, }?: QueryOptions) => QueryRenderInput;
3
+ export declare const useDataQuery: <TQueryResult = import("../../engine").JsonMap>(query: Query, { onComplete: userOnSuccess, onError: userOnError, variables: initialVariables, lazy: initialLazy, }?: QueryOptions) => QueryRenderInput<TQueryResult>;
@@ -32,14 +32,14 @@ export interface ExecuteHookResult<ReturnType> {
32
32
  error?: FetchError;
33
33
  data?: ReturnType;
34
34
  }
35
- export interface QueryState {
35
+ export interface QueryState<TQueryResult> {
36
36
  called: boolean;
37
37
  loading: boolean;
38
38
  fetching: boolean;
39
39
  error?: FetchError;
40
- data?: QueryResult;
40
+ data?: TQueryResult;
41
41
  }
42
- export interface QueryRenderInput extends QueryState {
42
+ export interface QueryRenderInput<TQueryResult = QueryResult> extends QueryState<TQueryResult> {
43
43
  engine: DataEngine;
44
44
  refetch: QueryRefetchFunction;
45
45
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhis2/app-service-data",
3
- "version": "3.9.0",
3
+ "version": "3.9.2",
4
4
  "main": "./build/cjs/index.js",
5
5
  "module": "./build/es/index.js",
6
6
  "types": "build/types/index.d.ts",
@@ -22,7 +22,7 @@
22
22
  "build/**"
23
23
  ],
24
24
  "peerDependencies": {
25
- "@dhis2/app-service-config": "3.9.0",
25
+ "@dhis2/app-service-config": "3.9.2",
26
26
  "@dhis2/cli-app-scripts": "^7.1.1",
27
27
  "prop-types": "^15.7.2",
28
28
  "react": "^16.8",