node-type-registry 0.47.0 → 0.48.0
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/codegen/generate-types.js +1 -1
- package/esm/codegen/generate-types.js +1 -1
- package/esm/guard/index.d.ts +1 -0
- package/esm/guard/index.js +1 -0
- package/esm/guard/step-up.d.ts +2 -0
- package/esm/guard/step-up.js +37 -0
- package/esm/index.d.ts +1 -0
- package/esm/index.js +3 -0
- package/guard/index.d.ts +1 -0
- package/guard/index.js +5 -0
- package/guard/step-up.d.ts +2 -0
- package/guard/step-up.js +40 -0
- package/index.d.ts +1 -0
- package/index.js +3 -0
- package/package.json +2 -2
|
@@ -827,7 +827,7 @@ function buildProgram(meta) {
|
|
|
827
827
|
statements.push(buildFieldTypeInterface());
|
|
828
828
|
statements.push(buildFieldDefaultInterface());
|
|
829
829
|
// -- Parameter interfaces grouped by category --
|
|
830
|
-
const categoryOrder = ['billing', 'check', 'data', 'event', 'limit', 'limit_enforce', 'limit_track', 'limit_warning', 'search', 'job', 'process', 'authz', 'relation', 'view'];
|
|
830
|
+
const categoryOrder = ['billing', 'check', 'data', 'event', 'guard', 'limit', 'limit_enforce', 'limit_track', 'limit_warning', 'search', 'job', 'process', 'authz', 'relation', 'view'];
|
|
831
831
|
for (const cat of categoryOrder) {
|
|
832
832
|
const nts = categories.get(cat);
|
|
833
833
|
if (!nts || nts.length === 0)
|
|
@@ -792,7 +792,7 @@ function buildProgram(meta) {
|
|
|
792
792
|
statements.push(buildFieldTypeInterface());
|
|
793
793
|
statements.push(buildFieldDefaultInterface());
|
|
794
794
|
// -- Parameter interfaces grouped by category --
|
|
795
|
-
const categoryOrder = ['billing', 'check', 'data', 'event', 'limit', 'limit_enforce', 'limit_track', 'limit_warning', 'search', 'job', 'process', 'authz', 'relation', 'view'];
|
|
795
|
+
const categoryOrder = ['billing', 'check', 'data', 'event', 'guard', 'limit', 'limit_enforce', 'limit_track', 'limit_warning', 'search', 'job', 'process', 'authz', 'relation', 'view'];
|
|
796
796
|
for (const cat of categoryOrder) {
|
|
797
797
|
const nts = categories.get(cat);
|
|
798
798
|
if (!nts || nts.length === 0)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { GuardStepUp } from './step-up';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { GuardStepUp } from './step-up';
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { conditionDefs, conditionProperties } from '../conditions';
|
|
2
|
+
export const GuardStepUp = {
|
|
3
|
+
name: 'GuardStepUp',
|
|
4
|
+
slug: 'guard_step_up',
|
|
5
|
+
category: 'guard',
|
|
6
|
+
display_name: 'Guard Step-Up',
|
|
7
|
+
description: 'Attaches a BEFORE trigger that calls require_step_up() to enforce recent ' +
|
|
8
|
+
'password or MFA verification before allowing mutations. Requires a ' +
|
|
9
|
+
'provisioned sessions_module (with app_settings_auth) for the target database. ' +
|
|
10
|
+
'The step_up_window is read from app_settings_auth at runtime (default 30 minutes). ' +
|
|
11
|
+
'Supports compound conditions (AND/OR/NOT), watch_fields (fire only when specific ' +
|
|
12
|
+
'fields change), and simple condition_field/condition_value leaf conditions.',
|
|
13
|
+
parameter_schema: {
|
|
14
|
+
type: 'object',
|
|
15
|
+
$defs: conditionDefs,
|
|
16
|
+
properties: {
|
|
17
|
+
step_up_type: {
|
|
18
|
+
type: 'string',
|
|
19
|
+
enum: ['password', 'mfa', 'password_or_mfa'],
|
|
20
|
+
description: 'Which verification method satisfies the step-up requirement',
|
|
21
|
+
default: 'password_or_mfa',
|
|
22
|
+
},
|
|
23
|
+
events: {
|
|
24
|
+
type: 'array',
|
|
25
|
+
items: {
|
|
26
|
+
type: 'string',
|
|
27
|
+
enum: ['INSERT', 'UPDATE', 'DELETE'],
|
|
28
|
+
},
|
|
29
|
+
description: 'Which DML events require step-up verification',
|
|
30
|
+
default: ['UPDATE', 'DELETE'],
|
|
31
|
+
},
|
|
32
|
+
...conditionProperties,
|
|
33
|
+
},
|
|
34
|
+
required: [],
|
|
35
|
+
},
|
|
36
|
+
tags: ['guard', 'triggers', 'auth', 'step-up', 'mfa', 'security'],
|
|
37
|
+
};
|
package/esm/index.d.ts
CHANGED
package/esm/index.js
CHANGED
|
@@ -3,6 +3,7 @@ export * from './blueprint-types.generated';
|
|
|
3
3
|
export * from './conditions';
|
|
4
4
|
export * from './data';
|
|
5
5
|
export * from './event';
|
|
6
|
+
export * from './guard';
|
|
6
7
|
export * from './job';
|
|
7
8
|
export * from './limit';
|
|
8
9
|
export * from './module-presets';
|
|
@@ -12,6 +13,7 @@ export * from './view';
|
|
|
12
13
|
import * as authz from './authz';
|
|
13
14
|
import * as data from './data';
|
|
14
15
|
import * as event from './event';
|
|
16
|
+
import * as guard from './guard';
|
|
15
17
|
import * as job from './job';
|
|
16
18
|
import * as limit from './limit';
|
|
17
19
|
import * as process from './process';
|
|
@@ -21,6 +23,7 @@ export const allNodeTypes = [
|
|
|
21
23
|
...Object.values(authz),
|
|
22
24
|
...Object.values(data),
|
|
23
25
|
...Object.values(event),
|
|
26
|
+
...Object.values(guard),
|
|
24
27
|
...Object.values(job),
|
|
25
28
|
...Object.values(limit),
|
|
26
29
|
...Object.values(process),
|
package/guard/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { GuardStepUp } from './step-up';
|
package/guard/index.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GuardStepUp = void 0;
|
|
4
|
+
var step_up_1 = require("./step-up");
|
|
5
|
+
Object.defineProperty(exports, "GuardStepUp", { enumerable: true, get: function () { return step_up_1.GuardStepUp; } });
|
package/guard/step-up.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GuardStepUp = void 0;
|
|
4
|
+
const conditions_1 = require("../conditions");
|
|
5
|
+
exports.GuardStepUp = {
|
|
6
|
+
name: 'GuardStepUp',
|
|
7
|
+
slug: 'guard_step_up',
|
|
8
|
+
category: 'guard',
|
|
9
|
+
display_name: 'Guard Step-Up',
|
|
10
|
+
description: 'Attaches a BEFORE trigger that calls require_step_up() to enforce recent ' +
|
|
11
|
+
'password or MFA verification before allowing mutations. Requires a ' +
|
|
12
|
+
'provisioned sessions_module (with app_settings_auth) for the target database. ' +
|
|
13
|
+
'The step_up_window is read from app_settings_auth at runtime (default 30 minutes). ' +
|
|
14
|
+
'Supports compound conditions (AND/OR/NOT), watch_fields (fire only when specific ' +
|
|
15
|
+
'fields change), and simple condition_field/condition_value leaf conditions.',
|
|
16
|
+
parameter_schema: {
|
|
17
|
+
type: 'object',
|
|
18
|
+
$defs: conditions_1.conditionDefs,
|
|
19
|
+
properties: {
|
|
20
|
+
step_up_type: {
|
|
21
|
+
type: 'string',
|
|
22
|
+
enum: ['password', 'mfa', 'password_or_mfa'],
|
|
23
|
+
description: 'Which verification method satisfies the step-up requirement',
|
|
24
|
+
default: 'password_or_mfa',
|
|
25
|
+
},
|
|
26
|
+
events: {
|
|
27
|
+
type: 'array',
|
|
28
|
+
items: {
|
|
29
|
+
type: 'string',
|
|
30
|
+
enum: ['INSERT', 'UPDATE', 'DELETE'],
|
|
31
|
+
},
|
|
32
|
+
description: 'Which DML events require step-up verification',
|
|
33
|
+
default: ['UPDATE', 'DELETE'],
|
|
34
|
+
},
|
|
35
|
+
...conditions_1.conditionProperties,
|
|
36
|
+
},
|
|
37
|
+
required: [],
|
|
38
|
+
},
|
|
39
|
+
tags: ['guard', 'triggers', 'auth', 'step-up', 'mfa', 'security'],
|
|
40
|
+
};
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -42,6 +42,7 @@ __exportStar(require("./blueprint-types.generated"), exports);
|
|
|
42
42
|
__exportStar(require("./conditions"), exports);
|
|
43
43
|
__exportStar(require("./data"), exports);
|
|
44
44
|
__exportStar(require("./event"), exports);
|
|
45
|
+
__exportStar(require("./guard"), exports);
|
|
45
46
|
__exportStar(require("./job"), exports);
|
|
46
47
|
__exportStar(require("./limit"), exports);
|
|
47
48
|
__exportStar(require("./module-presets"), exports);
|
|
@@ -51,6 +52,7 @@ __exportStar(require("./view"), exports);
|
|
|
51
52
|
const authz = __importStar(require("./authz"));
|
|
52
53
|
const data = __importStar(require("./data"));
|
|
53
54
|
const event = __importStar(require("./event"));
|
|
55
|
+
const guard = __importStar(require("./guard"));
|
|
54
56
|
const job = __importStar(require("./job"));
|
|
55
57
|
const limit = __importStar(require("./limit"));
|
|
56
58
|
const process = __importStar(require("./process"));
|
|
@@ -60,6 +62,7 @@ exports.allNodeTypes = [
|
|
|
60
62
|
...Object.values(authz),
|
|
61
63
|
...Object.values(data),
|
|
62
64
|
...Object.values(event),
|
|
65
|
+
...Object.values(guard),
|
|
63
66
|
...Object.values(job),
|
|
64
67
|
...Object.values(limit),
|
|
65
68
|
...Object.values(process),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-type-registry",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.48.0",
|
|
4
4
|
"description": "Node type definitions for the Constructive blueprint system. Single source of truth for all Authz*, Data*, Relation*, and View* node types.",
|
|
5
5
|
"author": "Constructive <developers@constructive.io>",
|
|
6
6
|
"main": "index.js",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"registry",
|
|
48
48
|
"graphile"
|
|
49
49
|
],
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "d6a34a51d5e889443c2345c80ccfcea050875bda"
|
|
51
51
|
}
|