tsv2-library 1.0.61-alpha.131 → 1.0.61-alpha.132

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.
@@ -9,11 +9,21 @@ export type QueryParams = {
9
9
  [key: string]: unknown;
10
10
  };
11
11
 
12
- export type FetchResponse = {
13
- data: Data[];
12
+ export type FetchResponse<T = Data> = {
13
+ data: T[];
14
14
  totalRecords: number;
15
15
  };
16
16
 
17
+ export type TableFetchResponse<T = Data> = {
18
+ message: string;
19
+ data: FetchResponse<T>;
20
+ };
21
+
22
+ export type ShortFetchResponse<T = Data> = {
23
+ message: string;
24
+ data: T;
25
+ };
26
+
17
27
  export type TableCellComponent = {
18
28
  component: string | Component;
19
29
  props?: object;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tsv2-library",
3
3
  "author": "fixedassetv2-fe",
4
- "version": "1.0.61-alpha.131",
4
+ "version": "1.0.61-alpha.132",
5
5
  "license": "ISC",
6
6
  "homepage": "https://github.com/fixedassetv2-fe/tsv2-library#readme",
7
7
  "repository": {
@@ -9,11 +9,21 @@ export type QueryParams = {
9
9
  [key: string]: unknown;
10
10
  };
11
11
 
12
- export type FetchResponse = {
13
- data: Data[];
12
+ export type FetchResponse<T = Data> = {
13
+ data: T[];
14
14
  totalRecords: number;
15
15
  };
16
16
 
17
+ export type TableFetchResponse<T = Data> = {
18
+ message: string;
19
+ data: FetchResponse<T>;
20
+ };
21
+
22
+ export type ShortFetchResponse<T = Data> = {
23
+ message: string;
24
+ data: T;
25
+ };
26
+
17
27
  export type TableCellComponent = {
18
28
  component: string | Component;
19
29
  props?: object;