node-type-registry 0.44.0 → 0.46.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.
Files changed (36) hide show
  1. package/README.md +4 -0
  2. package/data/data-i18n.d.ts +2 -0
  3. package/data/data-i18n.js +47 -0
  4. package/data/index.d.ts +1 -0
  5. package/data/index.js +3 -1
  6. package/esm/data/data-i18n.d.ts +2 -0
  7. package/esm/data/data-i18n.js +44 -0
  8. package/esm/data/index.d.ts +1 -0
  9. package/esm/data/index.js +1 -0
  10. package/esm/module-presets/auth-email-magic.js +6 -14
  11. package/esm/module-presets/auth-email.d.ts +3 -3
  12. package/esm/module-presets/auth-email.js +10 -29
  13. package/esm/module-presets/auth-hardened.js +6 -21
  14. package/esm/module-presets/auth-passkey.js +6 -15
  15. package/esm/module-presets/auth-sso.d.ts +1 -1
  16. package/esm/module-presets/auth-sso.js +8 -18
  17. package/esm/module-presets/b2b-storage.js +16 -22
  18. package/esm/module-presets/b2b.js +20 -38
  19. package/esm/module-presets/full.d.ts +1 -1
  20. package/esm/module-presets/full.js +25 -28
  21. package/esm/module-presets/minimal.js +1 -12
  22. package/esm/module-presets/types.d.ts +9 -15
  23. package/module-presets/auth-email-magic.js +6 -14
  24. package/module-presets/auth-email.d.ts +3 -3
  25. package/module-presets/auth-email.js +10 -29
  26. package/module-presets/auth-hardened.js +6 -21
  27. package/module-presets/auth-passkey.js +6 -15
  28. package/module-presets/auth-sso.d.ts +1 -1
  29. package/module-presets/auth-sso.js +8 -18
  30. package/module-presets/b2b-storage.js +16 -22
  31. package/module-presets/b2b.js +20 -38
  32. package/module-presets/full.d.ts +1 -1
  33. package/module-presets/full.js +25 -28
  34. package/module-presets/minimal.js +1 -12
  35. package/module-presets/types.d.ts +9 -15
  36. package/package.json +2 -2
@@ -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:full` for file uploads with all feature flags and
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:full` for file uploads (versioning, content hash, custom keys, audit log), ' +
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
- 'config_secrets_user_module',
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:full'
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
- * Flat list of module names to install. Module names must match the
38
- * canonical list accepted by
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.44.0",
3
+ "version": "0.46.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": "0503916f414a3b8a6f6cbe46e03a59988b2f3cb5"
50
+ "gitHead": "025f9c4283cf3629e8d74f87ee699b375293c81d"
51
51
  }