node-type-registry 0.40.0 → 0.42.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/authz/authz-member-owner.d.ts +2 -0
- package/authz/authz-member-owner.js +51 -0
- package/authz/index.d.ts +1 -0
- package/authz/index.js +3 -1
- package/blueprint-types.generated.d.ts +289 -63
- package/blueprint-types.generated.js +16 -4
- package/codegen/generate-types.js +119 -6
- package/data/data-member-owner.d.ts +2 -0
- package/data/data-member-owner.js +53 -0
- package/data/index.d.ts +1 -0
- package/data/index.js +3 -1
- package/esm/authz/authz-member-owner.d.ts +2 -0
- package/esm/authz/authz-member-owner.js +48 -0
- package/esm/authz/index.d.ts +1 -0
- package/esm/authz/index.js +1 -0
- package/esm/blueprint-types.generated.d.ts +289 -63
- package/esm/blueprint-types.generated.js +16 -4
- package/esm/codegen/generate-types.js +119 -6
- package/esm/data/data-member-owner.d.ts +2 -0
- package/esm/data/data-member-owner.js +50 -0
- package/esm/data/index.d.ts +1 -0
- package/esm/data/index.js +1 -0
- package/esm/job/trigger.js +28 -0
- package/esm/module-presets/full.d.ts +6 -6
- package/esm/module-presets/full.js +71 -16
- package/esm/process/chunks.js +16 -0
- package/esm/process/extraction.js +16 -0
- package/esm/process/file-embedding.js +16 -0
- package/esm/process/image-embedding.js +16 -0
- package/esm/process/image-versions.js +16 -0
- package/job/trigger.js +28 -0
- package/module-presets/full.d.ts +6 -6
- package/module-presets/full.js +71 -16
- package/package.json +4 -4
- package/process/chunks.js +16 -0
- package/process/extraction.js +16 -0
- package/process/file-embedding.js +16 -0
- package/process/image-embedding.js +16 -0
- package/process/image-versions.js +16 -0
package/module-presets/full.js
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PresetFull = void 0;
|
|
4
4
|
/**
|
|
5
|
-
* `full` — install
|
|
6
|
-
* `provision_database_modules(v_modules => ARRAY['all'])` behavior.
|
|
5
|
+
* `full` — install every standard module.
|
|
7
6
|
*
|
|
8
7
|
* This is the maximalist preset: every module Constructive ships, including
|
|
9
|
-
* `storage_module` for file uploads
|
|
10
|
-
* wallet-based sign-in.
|
|
11
|
-
*
|
|
12
|
-
*
|
|
8
|
+
* `storage_module:full` for file uploads with all feature flags and
|
|
9
|
+
* `crypto_addresses_module` for wallet-based sign-in.
|
|
10
|
+
*
|
|
11
|
+
* Usage logging modules (compute_log, inference_log, transfer_log,
|
|
12
|
+
* storage_log, db_usage) are NOT included — they are opt-in only.
|
|
13
13
|
*
|
|
14
14
|
* Prefer a more targeted preset for anything production-bound — installing
|
|
15
15
|
* a module you'll never use still costs tables, triggers, and grants.
|
|
@@ -17,25 +17,80 @@ exports.PresetFull = void 0;
|
|
|
17
17
|
exports.PresetFull = {
|
|
18
18
|
name: 'full',
|
|
19
19
|
display_name: 'Full (every module)',
|
|
20
|
-
summary:
|
|
21
|
-
description: 'Installs every module in the catalog: everything in `b2b` plus
|
|
22
|
-
'for file uploads
|
|
23
|
-
'wallet-based sign-in
|
|
24
|
-
'
|
|
25
|
-
'
|
|
26
|
-
'
|
|
20
|
+
summary: 'Install every standard Constructive module with explicit module list.',
|
|
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), ' +
|
|
23
|
+
'`crypto_addresses_module` for wallet-based sign-in, `plans_module` and `billing_module` ' +
|
|
24
|
+
'for subscription management, `notifications_module` for in-app notifications, and ' +
|
|
25
|
+
'`events_module` at both app and org scopes. Usage logging modules are opt-in only — ' +
|
|
26
|
+
'add them explicitly if needed.',
|
|
27
27
|
good_for: [
|
|
28
28
|
'Reference / demo databases that showcase every Constructive feature',
|
|
29
29
|
'Greenfield apps where the product scope is still open-ended',
|
|
30
|
-
'
|
|
30
|
+
'Integration tests that need the full module stack'
|
|
31
31
|
],
|
|
32
32
|
not_for: [
|
|
33
33
|
'Production apps with a defined feature set — pick the narrowest preset that fits',
|
|
34
34
|
'Resource-constrained environments — every module costs schema bloat, RLS policies, and grants'
|
|
35
35
|
],
|
|
36
|
-
modules: [
|
|
36
|
+
modules: [
|
|
37
|
+
// Core
|
|
38
|
+
'users_module',
|
|
39
|
+
'membership_types_module',
|
|
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',
|
|
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',
|
|
52
|
+
// Hierarchy
|
|
53
|
+
'hierarchy_module:org',
|
|
54
|
+
// Billing & Plans
|
|
55
|
+
'plans_module',
|
|
56
|
+
'billing_module',
|
|
57
|
+
'rate_limit_meters_module',
|
|
58
|
+
'billing_provider_module',
|
|
59
|
+
// Auth infrastructure
|
|
60
|
+
'user_state_module',
|
|
61
|
+
'sessions_module',
|
|
62
|
+
'session_secrets_module',
|
|
63
|
+
'rate_limits_module',
|
|
64
|
+
'devices_module',
|
|
65
|
+
'config_secrets_user_module',
|
|
66
|
+
'rls_module',
|
|
67
|
+
// Contact modules
|
|
68
|
+
'emails_module',
|
|
69
|
+
'phone_numbers_module',
|
|
70
|
+
'crypto_addresses_module',
|
|
71
|
+
'webauthn_credentials_module',
|
|
72
|
+
'notifications_module',
|
|
73
|
+
// Connected accounts
|
|
74
|
+
'connected_accounts_module',
|
|
75
|
+
'identity_providers_module',
|
|
76
|
+
// Invites & Auth
|
|
77
|
+
'invites_module:app',
|
|
78
|
+
'invites_module:org',
|
|
79
|
+
'user_auth_module',
|
|
80
|
+
'webauthn_auth_module',
|
|
81
|
+
// Storage (full features)
|
|
82
|
+
'storage_module:full',
|
|
83
|
+
],
|
|
37
84
|
includes_notes: {
|
|
38
|
-
|
|
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.'
|
|
39
94
|
},
|
|
40
95
|
extends: ['b2b']
|
|
41
96
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-type-registry",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.42.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",
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"@babel/generator": "^7.29.0",
|
|
34
34
|
"@babel/types": "^7.29.0",
|
|
35
35
|
"@pgsql/types": "^17.6.2",
|
|
36
|
-
"@pgsql/utils": "^17.8.
|
|
37
|
-
"pgsql-deparser": "^17.18.
|
|
36
|
+
"@pgsql/utils": "^17.8.17",
|
|
37
|
+
"pgsql-deparser": "^17.18.3",
|
|
38
38
|
"schema-typescript": "^0.14.3"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"registry",
|
|
48
48
|
"graphile"
|
|
49
49
|
],
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "72ffa0944cbf0386b9f2f5dfd6640879bb30e38d"
|
|
51
51
|
}
|
package/process/chunks.js
CHANGED
|
@@ -96,6 +96,22 @@ exports.ProcessChunks = {
|
|
|
96
96
|
'Omit to mirror the parent table\'s text search indexes. ' +
|
|
97
97
|
'Set explicitly to override (e.g. ["fulltext", "bm25"]).'
|
|
98
98
|
},
|
|
99
|
+
// ── Entity billing scope ──────────────────────────────────────
|
|
100
|
+
entity_field: {
|
|
101
|
+
type: 'string',
|
|
102
|
+
format: 'column-ref',
|
|
103
|
+
description: 'Column on the parent table that holds (or references) the entity_id for billing scope. Forwarded to the chunking job trigger.'
|
|
104
|
+
},
|
|
105
|
+
entity_lookup: {
|
|
106
|
+
type: 'object',
|
|
107
|
+
description: 'FK lookup configuration for resolving entity_id through a related table. Forwarded to the chunking job trigger.',
|
|
108
|
+
properties: {
|
|
109
|
+
obj_table: { type: 'string', description: 'Name of the related table to look up entity_id from' },
|
|
110
|
+
obj_schema: { type: 'string', description: 'Schema of the related table (user-facing name, optional)' },
|
|
111
|
+
obj_field: { type: 'string', format: 'column-ref', description: 'Column on the related table that holds the entity_id' }
|
|
112
|
+
},
|
|
113
|
+
required: ['obj_table', 'obj_field']
|
|
114
|
+
},
|
|
99
115
|
// ── Job trigger ────────────────────────────────────────────────
|
|
100
116
|
enqueue_chunking_job: {
|
|
101
117
|
type: 'boolean',
|
package/process/extraction.js
CHANGED
|
@@ -85,6 +85,22 @@ exports.ProcessExtraction = {
|
|
|
85
85
|
}
|
|
86
86
|
},
|
|
87
87
|
trigger_conditions: conditions_1.triggerConditionsProperty,
|
|
88
|
+
// ── Entity billing scope ──────────────────────────────────────
|
|
89
|
+
entity_field: {
|
|
90
|
+
type: 'string',
|
|
91
|
+
format: 'column-ref',
|
|
92
|
+
description: 'Column on the trigger table that holds (or references) the entity_id for billing scope. Forwarded to the composed JobTrigger.'
|
|
93
|
+
},
|
|
94
|
+
entity_lookup: {
|
|
95
|
+
type: 'object',
|
|
96
|
+
description: 'FK lookup configuration for resolving entity_id through a related table. Forwarded to the composed JobTrigger.',
|
|
97
|
+
properties: {
|
|
98
|
+
obj_table: { type: 'string', description: 'Name of the related table to look up entity_id from' },
|
|
99
|
+
obj_schema: { type: 'string', description: 'Schema of the related table (user-facing name, optional)' },
|
|
100
|
+
obj_field: { type: 'string', format: 'column-ref', description: 'Column on the related table that holds the entity_id' }
|
|
101
|
+
},
|
|
102
|
+
required: ['obj_table', 'obj_field']
|
|
103
|
+
},
|
|
88
104
|
// ── Job options ───────────────────────────────────────────────
|
|
89
105
|
queue_name: {
|
|
90
106
|
type: 'string',
|
|
@@ -92,6 +92,22 @@ exports.ProcessFileEmbedding = {
|
|
|
92
92
|
}
|
|
93
93
|
},
|
|
94
94
|
trigger_conditions: conditions_1.triggerConditionsProperty,
|
|
95
|
+
// ── Entity billing scope ──────────────────────────────────────
|
|
96
|
+
entity_field: {
|
|
97
|
+
type: 'string',
|
|
98
|
+
format: 'column-ref',
|
|
99
|
+
description: 'Column on the trigger table that holds (or references) the entity_id for billing scope. Forwarded to the composed JobTrigger.'
|
|
100
|
+
},
|
|
101
|
+
entity_lookup: {
|
|
102
|
+
type: 'object',
|
|
103
|
+
description: 'FK lookup configuration for resolving entity_id through a related table. Forwarded to the composed JobTrigger.',
|
|
104
|
+
properties: {
|
|
105
|
+
obj_table: { type: 'string', description: 'Name of the related table to look up entity_id from' },
|
|
106
|
+
obj_schema: { type: 'string', description: 'Schema of the related table (user-facing name, optional)' },
|
|
107
|
+
obj_field: { type: 'string', format: 'column-ref', description: 'Column on the related table that holds the entity_id' }
|
|
108
|
+
},
|
|
109
|
+
required: ['obj_table', 'obj_field']
|
|
110
|
+
},
|
|
95
111
|
// ── Extraction config (optional — enables extract mode) ────────
|
|
96
112
|
extraction: {
|
|
97
113
|
type: 'object',
|
|
@@ -99,6 +99,22 @@ exports.ProcessImageEmbedding = {
|
|
|
99
99
|
}
|
|
100
100
|
},
|
|
101
101
|
trigger_conditions: conditions_1.triggerConditionsProperty,
|
|
102
|
+
// ── Entity billing scope ──────────────────────────────────────
|
|
103
|
+
entity_field: {
|
|
104
|
+
type: 'string',
|
|
105
|
+
format: 'column-ref',
|
|
106
|
+
description: 'Column on the trigger table that holds (or references) the entity_id for billing scope. Forwarded to the composed JobTrigger.'
|
|
107
|
+
},
|
|
108
|
+
entity_lookup: {
|
|
109
|
+
type: 'object',
|
|
110
|
+
description: 'FK lookup configuration for resolving entity_id through a related table. Forwarded to the composed JobTrigger.',
|
|
111
|
+
properties: {
|
|
112
|
+
obj_table: { type: 'string', description: 'Name of the related table to look up entity_id from' },
|
|
113
|
+
obj_schema: { type: 'string', description: 'Schema of the related table (user-facing name, optional)' },
|
|
114
|
+
obj_field: { type: 'string', format: 'column-ref', description: 'Column on the related table that holds the entity_id' }
|
|
115
|
+
},
|
|
116
|
+
required: ['obj_table', 'obj_field']
|
|
117
|
+
},
|
|
102
118
|
// ── Extraction config (optional — enables extract mode) ────────
|
|
103
119
|
extraction: {
|
|
104
120
|
type: 'object',
|
|
@@ -104,6 +104,22 @@ exports.ProcessImageVersions = {
|
|
|
104
104
|
}
|
|
105
105
|
},
|
|
106
106
|
trigger_conditions: conditions_1.triggerConditionsProperty,
|
|
107
|
+
// ── Entity billing scope ──────────────────────────────────────
|
|
108
|
+
entity_field: {
|
|
109
|
+
type: 'string',
|
|
110
|
+
format: 'column-ref',
|
|
111
|
+
description: 'Column on the trigger table that holds (or references) the entity_id for billing scope. Forwarded to the composed JobTrigger.'
|
|
112
|
+
},
|
|
113
|
+
entity_lookup: {
|
|
114
|
+
type: 'object',
|
|
115
|
+
description: 'FK lookup configuration for resolving entity_id through a related table. Forwarded to the composed JobTrigger.',
|
|
116
|
+
properties: {
|
|
117
|
+
obj_table: { type: 'string', description: 'Name of the related table to look up entity_id from' },
|
|
118
|
+
obj_schema: { type: 'string', description: 'Schema of the related table (user-facing name, optional)' },
|
|
119
|
+
obj_field: { type: 'string', format: 'column-ref', description: 'Column on the related table that holds the entity_id' }
|
|
120
|
+
},
|
|
121
|
+
required: ['obj_table', 'obj_field']
|
|
122
|
+
},
|
|
107
123
|
// ── Job options ───────────────────────────────────────────────
|
|
108
124
|
queue_name: {
|
|
109
125
|
type: 'string',
|