@etsoo/appscript 1.2.39 → 1.2.40
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,18 +1,10 @@
|
|
|
1
|
+
import { DataTypes } from '@etsoo/shared';
|
|
1
2
|
/**
|
|
2
3
|
* Result data
|
|
3
4
|
* Indexable type
|
|
4
5
|
*/
|
|
5
6
|
export interface IResultData {
|
|
6
|
-
readonly [key: string]:
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Result data with id, follow this style to extend for specific model
|
|
10
|
-
*/
|
|
11
|
-
export interface IdResultData extends IResultData {
|
|
12
|
-
/**
|
|
13
|
-
* Id
|
|
14
|
-
*/
|
|
15
|
-
id: number | string;
|
|
7
|
+
readonly [key: string]: unknown;
|
|
16
8
|
}
|
|
17
9
|
/**
|
|
18
10
|
* Result errors
|
|
@@ -65,4 +57,6 @@ export interface IActionResult<D extends IResultData = IResultData> {
|
|
|
65
57
|
/**
|
|
66
58
|
* Action result with id data
|
|
67
59
|
*/
|
|
68
|
-
export declare type
|
|
60
|
+
export declare type IdActionResult<T extends DataTypes.IdType = number> = IActionResult<{
|
|
61
|
+
id: T;
|
|
62
|
+
}>;
|
|
@@ -1,18 +1,10 @@
|
|
|
1
|
+
import { DataTypes } from '@etsoo/shared';
|
|
1
2
|
/**
|
|
2
3
|
* Result data
|
|
3
4
|
* Indexable type
|
|
4
5
|
*/
|
|
5
6
|
export interface IResultData {
|
|
6
|
-
readonly [key: string]:
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Result data with id, follow this style to extend for specific model
|
|
10
|
-
*/
|
|
11
|
-
export interface IdResultData extends IResultData {
|
|
12
|
-
/**
|
|
13
|
-
* Id
|
|
14
|
-
*/
|
|
15
|
-
id: number | string;
|
|
7
|
+
readonly [key: string]: unknown;
|
|
16
8
|
}
|
|
17
9
|
/**
|
|
18
10
|
* Result errors
|
|
@@ -65,4 +57,6 @@ export interface IActionResult<D extends IResultData = IResultData> {
|
|
|
65
57
|
/**
|
|
66
58
|
* Action result with id data
|
|
67
59
|
*/
|
|
68
|
-
export declare type
|
|
60
|
+
export declare type IdActionResult<T extends DataTypes.IdType = number> = IActionResult<{
|
|
61
|
+
id: T;
|
|
62
|
+
}>;
|
package/package.json
CHANGED
|
@@ -1,19 +1,11 @@
|
|
|
1
|
+
import { DataTypes } from '@etsoo/shared';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* Result data
|
|
3
5
|
* Indexable type
|
|
4
6
|
*/
|
|
5
7
|
export interface IResultData {
|
|
6
|
-
readonly [key: string]:
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Result data with id, follow this style to extend for specific model
|
|
11
|
-
*/
|
|
12
|
-
export interface IdResultData extends IResultData {
|
|
13
|
-
/**
|
|
14
|
-
* Id
|
|
15
|
-
*/
|
|
16
|
-
id: number | string;
|
|
8
|
+
readonly [key: string]: unknown;
|
|
17
9
|
}
|
|
18
10
|
|
|
19
11
|
/**
|
|
@@ -77,4 +69,7 @@ export interface IActionResult<D extends IResultData = IResultData> {
|
|
|
77
69
|
/**
|
|
78
70
|
* Action result with id data
|
|
79
71
|
*/
|
|
80
|
-
export type
|
|
72
|
+
export type IdActionResult<T extends DataTypes.IdType = number> =
|
|
73
|
+
IActionResult<{
|
|
74
|
+
id: T;
|
|
75
|
+
}>;
|