@etsoo/shared 1.2.51 → 1.2.52

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/README.md CHANGED
@@ -15,7 +15,7 @@ Using yarn:
15
15
  $ yarn add @etsoo/shared
16
16
  ```
17
17
 
18
- ## ActionResult / IActionResult, IdActionResult, DynamicActionResult
18
+ ## ActionResult / IActionResult, IdActionResult, MsgActionResult, IdMsgActionResult, DynamicActionResult
19
19
  |Name|Description|
20
20
  |---:|---|
21
21
  |static create|Create a result from error|
@@ -48,11 +48,24 @@ export interface IActionResult<D extends object = {}> {
48
48
  readonly ok: boolean;
49
49
  }
50
50
  /**
51
- * Action result with id data
51
+ * Action result with id
52
52
  */
53
53
  export type IdActionResult<T extends IdType = number> = IActionResult<{
54
54
  id: T;
55
55
  }>;
56
+ /**
57
+ * Action result with message data
58
+ */
59
+ export type MsgActionResult = IActionResult<{
60
+ msg: string;
61
+ }>;
62
+ /**
63
+ * Action result with id, message data
64
+ */
65
+ export type IdMsgActionResult = IActionResult<{
66
+ id: number;
67
+ msg: string;
68
+ }>;
56
69
  /**
57
70
  * Action result with dynamic data
58
71
  */
@@ -48,11 +48,24 @@ export interface IActionResult<D extends object = {}> {
48
48
  readonly ok: boolean;
49
49
  }
50
50
  /**
51
- * Action result with id data
51
+ * Action result with id
52
52
  */
53
53
  export type IdActionResult<T extends IdType = number> = IActionResult<{
54
54
  id: T;
55
55
  }>;
56
+ /**
57
+ * Action result with message data
58
+ */
59
+ export type MsgActionResult = IActionResult<{
60
+ msg: string;
61
+ }>;
62
+ /**
63
+ * Action result with id, message data
64
+ */
65
+ export type IdMsgActionResult = IActionResult<{
66
+ id: number;
67
+ msg: string;
68
+ }>;
56
69
  /**
57
70
  * Action result with dynamic data
58
71
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/shared",
3
- "version": "1.2.51",
3
+ "version": "1.2.52",
4
4
  "description": "TypeScript shared utilities and functions",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/mjs/index.js",
@@ -54,7 +54,7 @@
54
54
  },
55
55
  "homepage": "https://github.com/ETSOO/Shared#readme",
56
56
  "devDependencies": {
57
- "@types/jest": "^29.5.13",
57
+ "@types/jest": "^29.5.14",
58
58
  "@types/lodash.isequal": "^4.5.8",
59
59
  "jest": "^29.7.0",
60
60
  "jest-environment-jsdom": "^29.7.0",
@@ -59,12 +59,27 @@ export interface IActionResult<D extends object = {}> {
59
59
  }
60
60
 
61
61
  /**
62
- * Action result with id data
62
+ * Action result with id
63
63
  */
64
64
  export type IdActionResult<T extends IdType = number> = IActionResult<{
65
65
  id: T;
66
66
  }>;
67
67
 
68
+ /**
69
+ * Action result with message data
70
+ */
71
+ export type MsgActionResult = IActionResult<{
72
+ msg: string;
73
+ }>;
74
+
75
+ /**
76
+ * Action result with id, message data
77
+ */
78
+ export type IdMsgActionResult = IActionResult<{
79
+ id: number;
80
+ msg: string;
81
+ }>;
82
+
68
83
  /**
69
84
  * Action result with dynamic data
70
85
  */