not-node 6.3.43 → 6.3.45
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/package.json
CHANGED
|
@@ -2,13 +2,19 @@
|
|
|
2
2
|
const Form = require("../form/form");
|
|
3
3
|
|
|
4
4
|
//form
|
|
5
|
-
const
|
|
5
|
+
const STANDART_FIELDS = [["identity", "not-node//identity"]];
|
|
6
6
|
|
|
7
|
-
module.exports = ({ MODULE_NAME, MODEL_NAME, actionName }) => {
|
|
7
|
+
module.exports = ({ MODULE_NAME, MODEL_NAME, actionName, FIELDS = [] }) => {
|
|
8
8
|
const FORM_NAME = Form.createName(MODULE_NAME, MODEL_NAME, actionName);
|
|
9
9
|
return class extends Form {
|
|
10
10
|
constructor(params) {
|
|
11
|
-
super({
|
|
11
|
+
super({
|
|
12
|
+
...params,
|
|
13
|
+
MODULE_NAME,
|
|
14
|
+
MODEL_NAME,
|
|
15
|
+
FIELDS: [...STANDART_FIELDS, ...FIELDS],
|
|
16
|
+
FORM_NAME,
|
|
17
|
+
});
|
|
12
18
|
}
|
|
13
19
|
|
|
14
20
|
async extract(req) {
|
package/src/types.js
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {object} notAppResponse
|
|
3
|
+
* @property {string} status ok or error
|
|
4
|
+
* @property {string} message
|
|
5
|
+
* @property {Array<string>|Object<string, Array<string>>} [errors]
|
|
6
|
+
* @property {object} [result]
|
|
7
|
+
* @property {string} [redirect]
|
|
8
|
+
*/
|
|
9
|
+
|
|
1
10
|
/**
|
|
2
11
|
* @typedef {object} Query
|
|
3
12
|
* @property {number} skip
|