node-type-registry 0.44.0 → 0.47.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/README.md +4 -0
- package/blueprint-types.generated.d.ts +62 -37
- package/codegen/generate-types.js +16 -7
- package/data/data-i18n.d.ts +2 -0
- package/data/data-i18n.js +47 -0
- package/data/index.d.ts +1 -0
- package/data/index.js +3 -1
- package/esm/blueprint-types.generated.d.ts +62 -37
- package/esm/codegen/generate-types.js +16 -7
- package/esm/data/data-i18n.d.ts +2 -0
- package/esm/data/data-i18n.js +44 -0
- package/esm/data/index.d.ts +1 -0
- package/esm/data/index.js +1 -0
- package/esm/module-presets/auth-email-magic.js +6 -14
- package/esm/module-presets/auth-email.d.ts +3 -3
- package/esm/module-presets/auth-email.js +10 -29
- package/esm/module-presets/auth-hardened.js +6 -21
- package/esm/module-presets/auth-passkey.js +6 -15
- package/esm/module-presets/auth-sso.d.ts +1 -1
- package/esm/module-presets/auth-sso.js +8 -18
- package/esm/module-presets/b2b-storage.js +16 -22
- package/esm/module-presets/b2b.js +20 -38
- package/esm/module-presets/full.d.ts +1 -1
- package/esm/module-presets/full.js +25 -28
- package/esm/module-presets/minimal.js +1 -12
- package/esm/module-presets/types.d.ts +9 -15
- package/module-presets/auth-email-magic.js +6 -14
- package/module-presets/auth-email.d.ts +3 -3
- package/module-presets/auth-email.js +10 -29
- package/module-presets/auth-hardened.js +6 -21
- package/module-presets/auth-passkey.js +6 -15
- package/module-presets/auth-sso.d.ts +1 -1
- package/module-presets/auth-sso.js +8 -18
- package/module-presets/b2b-storage.js +16 -22
- package/module-presets/b2b.js +20 -38
- package/module-presets/full.d.ts +1 -1
- package/module-presets/full.js +25 -28
- package/module-presets/minimal.js +1 -12
- package/module-presets/types.d.ts +9 -15
- package/package.json +2 -2
package/module-presets/b2b.js
CHANGED
|
@@ -18,11 +18,11 @@ exports.PresetB2b = {
|
|
|
18
18
|
display_name: 'B2B SaaS (orgs + invites + permissions)',
|
|
19
19
|
summary: '`auth:hardened` + orgs, invites, fine-grained permissions, levels, profiles, hierarchy.',
|
|
20
20
|
description: 'Everything in `auth:hardened`, plus the full org/team/permission stack at both app and ' +
|
|
21
|
-
'org membership scopes. You get:
|
|
22
|
-
'
|
|
23
|
-
'
|
|
24
|
-
'for per-scope user display info,
|
|
25
|
-
'
|
|
21
|
+
'org membership scopes. You get: memberships at org scope, permissions at app and org ' +
|
|
22
|
+
'scopes for fine-grained RBAC, limits at app and org scopes for per-scope quota ' +
|
|
23
|
+
'enforcement, levels at app and org scopes for role bundles, profiles at app and org ' +
|
|
24
|
+
'scopes for per-scope user display info, hierarchy at org scope for nested org structures, ' +
|
|
25
|
+
'and invites at app and org scopes for invite flows. Choose this when the app has ' +
|
|
26
26
|
'the concept of a "workspace" / "team" / "tenant" that users belong to and act within.',
|
|
27
27
|
good_for: [
|
|
28
28
|
'B2B SaaS with multi-tenant workspaces / teams',
|
|
@@ -37,11 +37,12 @@ exports.PresetB2b = {
|
|
|
37
37
|
modules: [
|
|
38
38
|
'users_module',
|
|
39
39
|
'membership_types_module',
|
|
40
|
-
'memberships_module:app',
|
|
41
|
-
'memberships_module:org',
|
|
40
|
+
['memberships_module', { scope: 'app' }],
|
|
41
|
+
['memberships_module', { scope: 'org' }],
|
|
42
42
|
'sessions_module',
|
|
43
43
|
'user_state_module',
|
|
44
|
-
'
|
|
44
|
+
'user_credentials_module',
|
|
45
|
+
'config_secrets_module',
|
|
45
46
|
'emails_module',
|
|
46
47
|
'rls_module',
|
|
47
48
|
'user_auth_module',
|
|
@@ -52,37 +53,18 @@ exports.PresetB2b = {
|
|
|
52
53
|
'webauthn_credentials_module',
|
|
53
54
|
'webauthn_auth_module',
|
|
54
55
|
'phone_numbers_module',
|
|
55
|
-
'permissions_module:app',
|
|
56
|
-
'permissions_module:org',
|
|
57
|
-
'limits_module:app',
|
|
58
|
-
'limits_module:org',
|
|
59
|
-
'levels_module:app',
|
|
60
|
-
'levels_module:org',
|
|
61
|
-
'profiles_module:app',
|
|
62
|
-
'profiles_module:org',
|
|
63
|
-
'hierarchy_module:org',
|
|
64
|
-
'invites_module:app',
|
|
65
|
-
'invites_module:org',
|
|
56
|
+
['permissions_module', { scope: 'app' }],
|
|
57
|
+
['permissions_module', { scope: 'org' }],
|
|
58
|
+
['limits_module', { scope: 'app' }],
|
|
59
|
+
['limits_module', { scope: 'org' }],
|
|
60
|
+
['levels_module', { scope: 'app' }],
|
|
61
|
+
['levels_module', { scope: 'org' }],
|
|
62
|
+
['profiles_module', { scope: 'app' }],
|
|
63
|
+
['profiles_module', { scope: 'org' }],
|
|
64
|
+
['hierarchy_module', { scope: 'org' }],
|
|
65
|
+
['invites_module', { scope: 'app' }],
|
|
66
|
+
['invites_module', { scope: 'org' }],
|
|
66
67
|
'devices_module'
|
|
67
68
|
],
|
|
68
|
-
includes_notes: {
|
|
69
|
-
'memberships_module:org': 'Org-scoped membership rows — every user in an org gets one.',
|
|
70
|
-
'permissions_module:app': 'App-wide permission grants (e.g. platform admins).',
|
|
71
|
-
'permissions_module:org': 'Org-scoped permission grants (per-workspace admins, members, viewers, ...).',
|
|
72
|
-
'limits_module:app': 'App-level quotas (e.g. max users per plan).',
|
|
73
|
-
'limits_module:org': 'Org-level quotas (e.g. per-workspace API call caps).',
|
|
74
|
-
'levels_module:app': 'Role/level bundles at the app scope.',
|
|
75
|
-
'levels_module:org': 'Role/level bundles at the org scope (admin / member / viewer, etc.).',
|
|
76
|
-
'profiles_module:app': 'App-scoped user profile (one per user).',
|
|
77
|
-
'profiles_module:org': 'Org-scoped user profile (per org a user belongs to).',
|
|
78
|
-
'hierarchy_module:org': 'Nested org structures (parent / child orgs).',
|
|
79
|
-
'invites_module:app': 'App-level invites (rare — usually platform admin adds another admin).',
|
|
80
|
-
'invites_module:org': 'Org-level invites (the common case — invite a teammate into a workspace).',
|
|
81
|
-
devices_module: 'Device tracking and trusted-device MFA bypass.'
|
|
82
|
-
},
|
|
83
|
-
omits_notes: {
|
|
84
|
-
storage_module: 'Add separately if you need file uploads tied to orgs.',
|
|
85
|
-
crypto_addresses_module: 'Not a web3 preset.'
|
|
86
|
-
},
|
|
87
69
|
extends: ['auth:hardened']
|
|
88
70
|
};
|
package/module-presets/full.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { ModulePreset } from './types';
|
|
|
3
3
|
* `full` — install every standard module.
|
|
4
4
|
*
|
|
5
5
|
* This is the maximalist preset: every module Constructive ships, including
|
|
6
|
-
* `storage_module
|
|
6
|
+
* `storage_module` with all feature flags enabled and
|
|
7
7
|
* `crypto_addresses_module` for wallet-based sign-in.
|
|
8
8
|
*
|
|
9
9
|
* Usage logging modules (compute_log, inference_log, transfer_log,
|
package/module-presets/full.js
CHANGED
|
@@ -5,7 +5,7 @@ exports.PresetFull = void 0;
|
|
|
5
5
|
* `full` — install every standard module.
|
|
6
6
|
*
|
|
7
7
|
* This is the maximalist preset: every module Constructive ships, including
|
|
8
|
-
* `storage_module
|
|
8
|
+
* `storage_module` with all feature flags enabled and
|
|
9
9
|
* `crypto_addresses_module` for wallet-based sign-in.
|
|
10
10
|
*
|
|
11
11
|
* Usage logging modules (compute_log, inference_log, transfer_log,
|
|
@@ -19,7 +19,7 @@ exports.PresetFull = {
|
|
|
19
19
|
display_name: 'Full (every module)',
|
|
20
20
|
summary: 'Install every standard Constructive module with explicit module list.',
|
|
21
21
|
description: 'Installs every standard module in the catalog: everything in `b2b` plus ' +
|
|
22
|
-
'`storage_module
|
|
22
|
+
'`storage_module` with all feature flags (versioning, content hash, custom keys, audit log), ' +
|
|
23
23
|
'`crypto_addresses_module` for wallet-based sign-in, `plans_module` and `billing_module` ' +
|
|
24
24
|
'for subscription management, `notifications_module` for in-app notifications, and ' +
|
|
25
25
|
'`events_module` at both app and org scopes. Usage logging modules are opt-in only — ' +
|
|
@@ -38,19 +38,19 @@ exports.PresetFull = {
|
|
|
38
38
|
'users_module',
|
|
39
39
|
'membership_types_module',
|
|
40
40
|
// App-level (membership_type = 1)
|
|
41
|
-
'permissions_module:app',
|
|
42
|
-
'limits_module:app',
|
|
43
|
-
'memberships_module:app',
|
|
44
|
-
'events_module:app',
|
|
45
|
-
'profiles_module:app',
|
|
41
|
+
['permissions_module', { scope: 'app' }],
|
|
42
|
+
['limits_module', { scope: 'app' }],
|
|
43
|
+
['memberships_module', { scope: 'app' }],
|
|
44
|
+
['events_module', { scope: 'app' }],
|
|
45
|
+
['profiles_module', { scope: 'app' }],
|
|
46
46
|
// Org-level (membership_type = 2)
|
|
47
|
-
'permissions_module:org',
|
|
48
|
-
'limits_module:org',
|
|
49
|
-
'memberships_module:org',
|
|
50
|
-
'events_module:org',
|
|
51
|
-
'profiles_module:org',
|
|
47
|
+
['permissions_module', { scope: 'org' }],
|
|
48
|
+
['limits_module', { scope: 'org' }],
|
|
49
|
+
['memberships_module', { scope: 'org' }],
|
|
50
|
+
['events_module', { scope: 'org' }],
|
|
51
|
+
['profiles_module', { scope: 'org' }],
|
|
52
52
|
// Hierarchy
|
|
53
|
-
'hierarchy_module:org',
|
|
53
|
+
['hierarchy_module', { scope: 'org' }],
|
|
54
54
|
// Billing & Plans
|
|
55
55
|
'plans_module',
|
|
56
56
|
'billing_module',
|
|
@@ -62,35 +62,32 @@ exports.PresetFull = {
|
|
|
62
62
|
'session_secrets_module',
|
|
63
63
|
'rate_limits_module',
|
|
64
64
|
'devices_module',
|
|
65
|
-
'
|
|
65
|
+
'user_credentials_module',
|
|
66
|
+
'config_secrets_module',
|
|
66
67
|
'rls_module',
|
|
67
68
|
// Contact modules
|
|
68
69
|
'emails_module',
|
|
69
70
|
'phone_numbers_module',
|
|
70
71
|
'crypto_addresses_module',
|
|
71
72
|
'webauthn_credentials_module',
|
|
73
|
+
// User settings + notifications (user_settings_module must precede notifications_module)
|
|
74
|
+
'user_settings_module',
|
|
72
75
|
'notifications_module',
|
|
73
76
|
// Connected accounts
|
|
74
77
|
'connected_accounts_module',
|
|
75
78
|
'identity_providers_module',
|
|
76
79
|
// Invites & Auth
|
|
77
|
-
'invites_module:app',
|
|
78
|
-
'invites_module:org',
|
|
80
|
+
['invites_module', { scope: 'app' }],
|
|
81
|
+
['invites_module', { scope: 'org' }],
|
|
79
82
|
'user_auth_module',
|
|
80
83
|
'webauthn_auth_module',
|
|
84
|
+
// Internationalization
|
|
85
|
+
'i18n_module',
|
|
81
86
|
// Storage (full features)
|
|
82
|
-
'storage_module:
|
|
87
|
+
['storage_module', { has_versioning: true, has_content_hash: true, has_custom_keys: true, has_audit_log: true }],
|
|
88
|
+
// Infrastructure (functions, namespaces)
|
|
89
|
+
'namespace_module',
|
|
90
|
+
'function_module',
|
|
83
91
|
],
|
|
84
|
-
includes_notes: {
|
|
85
|
-
'storage_module:full': 'All storage feature flags enabled: versioning, content hash, custom keys, audit log.',
|
|
86
|
-
billing_module: 'Metered billing with credits waterfall and period reset.',
|
|
87
|
-
plans_module: 'Subscription plan management with plan-governed caps.',
|
|
88
|
-
notifications_module: 'In-app notification system with read/unread tracking.'
|
|
89
|
-
},
|
|
90
|
-
omits_notes: {
|
|
91
|
-
compute_log_module: 'Usage logging is opt-in. Add explicitly if needed.',
|
|
92
|
-
inference_log_module: 'Usage logging is opt-in. Add explicitly if needed.',
|
|
93
|
-
agent_module: 'Agent infrastructure is opt-in.'
|
|
94
|
-
},
|
|
95
92
|
extends: ['b2b']
|
|
96
93
|
};
|
|
@@ -36,16 +36,5 @@ exports.PresetMinimal = {
|
|
|
36
36
|
'sessions_module',
|
|
37
37
|
'rls_module',
|
|
38
38
|
'user_state_module'
|
|
39
|
-
]
|
|
40
|
-
includes_notes: {
|
|
41
|
-
users_module: 'The canonical users table. Required by every preset.',
|
|
42
|
-
sessions_module: 'Session/token storage; needed so whatever upstream auth can mint a session row.',
|
|
43
|
-
rls_module: 'RLS policy infrastructure. Without it, row-level security is not enforced.',
|
|
44
|
-
user_state_module: 'API-key storage. Optional for this preset but almost always wanted alongside upstream auth.'
|
|
45
|
-
},
|
|
46
|
-
omits_notes: {
|
|
47
|
-
user_auth_module: 'No server-side sign_up/sign_in procedures in this preset.',
|
|
48
|
-
emails_module: 'Not needed without password/magic-link flows; upstream auth handles identity.',
|
|
49
|
-
memberships_module: 'No memberships without a user_auth_module wiring them up.'
|
|
50
|
-
}
|
|
39
|
+
]
|
|
51
40
|
};
|
|
@@ -34,24 +34,18 @@ export interface ModulePreset {
|
|
|
34
34
|
/** Scenarios where this preset is the wrong choice — point at alternatives. */
|
|
35
35
|
not_for: string[];
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
38
|
-
*
|
|
37
|
+
* List of modules to install. Each entry is either a plain module name
|
|
38
|
+
* (string) or a Babel-style tuple [name, options] for modules that need
|
|
39
|
+
* configuration. Module names must match the canonical list accepted by
|
|
39
40
|
* `metaschema_generators.provision_database_modules` in constructive-db.
|
|
40
41
|
* Order doesn't matter — provisioning resolves dependencies.
|
|
42
|
+
*
|
|
43
|
+
* Examples:
|
|
44
|
+
* 'users_module' — simple module
|
|
45
|
+
* ['permissions_module', { scope: 'app' }] — scoped module
|
|
46
|
+
* ['agent_module', { has_plans: true }] — feature-flagged module
|
|
41
47
|
*/
|
|
42
|
-
modules: string[];
|
|
43
|
-
/**
|
|
44
|
-
* Optional per-module justifications. Map from module name to a short
|
|
45
|
-
* "why this module is in this preset" note. Rendered in docs and CLI
|
|
46
|
-
* `--explain` output.
|
|
47
|
-
*/
|
|
48
|
-
includes_notes?: Record<string, string>;
|
|
49
|
-
/**
|
|
50
|
-
* Optional per-module "why we deliberately leave this out" notes. Only
|
|
51
|
-
* list modules that a user might reasonably expect to be here; don't
|
|
52
|
-
* enumerate every omitted module.
|
|
53
|
-
*/
|
|
54
|
-
omits_notes?: Record<string, string>;
|
|
48
|
+
modules: (string | [string, Record<string, unknown>])[];
|
|
55
49
|
/**
|
|
56
50
|
* Optional: name(s) of presets this one builds on. Purely documentary —
|
|
57
51
|
* not enforced at runtime, `modules` must still be the full flat list.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-type-registry",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.47.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": "c9ff6a6cec5d8cb455010b190b78c3d055097981"
|
|
51
51
|
}
|