forest-express-sequelize 8.5.13 → 8.5.14

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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [8.5.14](https://github.com/ForestAdmin/forest-express-sequelize/compare/v8.5.13...v8.5.14) (2022-10-25)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **type:** add generic for SmartActionRequestBody ([#1024](https://github.com/ForestAdmin/forest-express-sequelize/issues/1024)) ([bcd16af](https://github.com/ForestAdmin/forest-express-sequelize/commit/bcd16af41f70d953258f8f5b745eab30e89d08bb))
7
+
1
8
  ## [8.5.13](https://github.com/ForestAdmin/forest-express-sequelize/compare/v8.5.12...v8.5.13) (2022-09-28)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "forest-express-sequelize",
3
3
  "description": "Official Express/Sequelize Liana for Forest",
4
- "version": "8.5.13",
4
+ "version": "8.5.14",
5
5
  "author": "Sandro Munda <sandro@munda.me>",
6
6
  "contributors": [
7
7
  "Arnaud Besnier <arnaudibesnier@gmail.com>",
package/types/index.d.ts CHANGED
@@ -72,9 +72,9 @@ interface ActionRequestBody {
72
72
  }
73
73
 
74
74
  // Base body from requests for classic smart action routes
75
- interface SmartActionRequestBody {
75
+ interface SmartActionRequestBody<T extends Record<string, any> = Record<string, any>> {
76
76
  data: {
77
- attributes: ActionRequestAttributes & { values: Record<string, any> },
77
+ attributes: ActionRequestAttributes & { values: T },
78
78
  type: 'custom-action-requests',
79
79
  },
80
80
  }
@@ -91,8 +91,8 @@ interface SmartActionHookRequestBody {
91
91
  }
92
92
 
93
93
  // Concrete smart action request for classic smart action routes
94
- export interface SmartActionRequest extends ForestRequest {
95
- body: SmartActionRequestBody,
94
+ export interface SmartActionRequest<T extends Record<string, any> = Record<string, any>> extends ForestRequest {
95
+ body: SmartActionRequestBody<T>,
96
96
  }
97
97
 
98
98
  // Request passed to smart action load hooks