node-type-registry 0.33.1 → 0.35.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 (63) hide show
  1. package/blueprint-types.generated.d.ts +256 -59
  2. package/blueprint-types.generated.js +30 -0
  3. package/codegen/generate-types.js +3 -1
  4. package/data/data-aggregate-limit-counter.d.ts +1 -1
  5. package/data/data-aggregate-limit-counter.js +4 -4
  6. package/data/data-billing-meter.d.ts +1 -1
  7. package/data/data-billing-meter.js +4 -4
  8. package/data/data-bulk.d.ts +2 -0
  9. package/data/data-bulk.js +40 -0
  10. package/data/data-chunks.d.ts +2 -2
  11. package/data/data-chunks.js +6 -6
  12. package/data/data-feature-flag.d.ts +1 -1
  13. package/data/data-feature-flag.js +4 -4
  14. package/data/data-file-embedding.d.ts +1 -1
  15. package/data/data-file-embedding.js +8 -27
  16. package/data/data-image-embedding.d.ts +4 -4
  17. package/data/data-image-embedding.js +13 -31
  18. package/data/data-job-trigger.d.ts +1 -1
  19. package/data/data-job-trigger.js +4 -4
  20. package/data/data-limit-counter.d.ts +1 -1
  21. package/data/data-limit-counter.js +4 -4
  22. package/data/index.d.ts +11 -8
  23. package/data/index.js +15 -9
  24. package/data/process-extraction.d.ts +14 -0
  25. package/data/process-extraction.js +108 -0
  26. package/data/process-image-versions.d.ts +15 -0
  27. package/data/process-image-versions.js +139 -0
  28. package/data/search-vector.js +1 -16
  29. package/esm/blueprint-types.generated.d.ts +256 -59
  30. package/esm/blueprint-types.generated.js +30 -0
  31. package/esm/codegen/generate-types.js +3 -1
  32. package/esm/data/data-aggregate-limit-counter.d.ts +1 -1
  33. package/esm/data/data-aggregate-limit-counter.js +3 -3
  34. package/esm/data/data-billing-meter.d.ts +1 -1
  35. package/esm/data/data-billing-meter.js +3 -3
  36. package/esm/data/data-bulk.d.ts +2 -0
  37. package/esm/data/data-bulk.js +37 -0
  38. package/esm/data/data-chunks.d.ts +2 -2
  39. package/esm/data/data-chunks.js +5 -5
  40. package/esm/data/data-feature-flag.d.ts +1 -1
  41. package/esm/data/data-feature-flag.js +3 -3
  42. package/esm/data/data-file-embedding.d.ts +1 -1
  43. package/esm/data/data-file-embedding.js +7 -26
  44. package/esm/data/data-image-embedding.d.ts +4 -4
  45. package/esm/data/data-image-embedding.js +12 -30
  46. package/esm/data/data-job-trigger.d.ts +1 -1
  47. package/esm/data/data-job-trigger.js +3 -3
  48. package/esm/data/data-limit-counter.d.ts +1 -1
  49. package/esm/data/data-limit-counter.js +3 -3
  50. package/esm/data/index.d.ts +11 -8
  51. package/esm/data/index.js +11 -8
  52. package/esm/data/process-extraction.d.ts +14 -0
  53. package/esm/data/process-extraction.js +105 -0
  54. package/esm/data/process-image-versions.d.ts +15 -0
  55. package/esm/data/process-image-versions.js +136 -0
  56. package/esm/data/search-vector.js +1 -16
  57. package/esm/module-presets/auth-hardened.js +4 -2
  58. package/esm/module-presets/b2b-storage.js +4 -2
  59. package/esm/module-presets/b2b.js +4 -2
  60. package/module-presets/auth-hardened.js +4 -2
  61. package/module-presets/b2b-storage.js +4 -2
  62. package/module-presets/b2b.js +4 -2
  63. package/package.json +2 -2
@@ -0,0 +1,136 @@
1
+ /**
2
+ * Image version processing node.
3
+ *
4
+ * Composes a JobTrigger that fires when an image file transitions to
5
+ * status = 'uploaded' (or on INSERT if confirm_upload is not enabled).
6
+ * The trigger enqueues an image-processing job that generates resized,
7
+ * cropped, or reformatted variants of the source image.
8
+ *
9
+ * The image processing worker is external (Knative function) — this node
10
+ * only creates the trigger infrastructure. The worker generates the variants
11
+ * and writes them back to the storage system as new file records linked to
12
+ * the source file.
13
+ */
14
+ export const ProcessImageVersions = {
15
+ name: 'ProcessImageVersions',
16
+ slug: 'process_image_versions',
17
+ category: 'process',
18
+ display_name: 'Image Versions',
19
+ description: 'Creates a job trigger for image variant generation. ' +
20
+ 'Fires when an image file is uploaded (status = \'uploaded\') or on INSERT. ' +
21
+ 'The external worker generates resized, cropped, or reformatted versions ' +
22
+ '(thumbnails, previews, WebP conversions, etc.) and stores them as new ' +
23
+ 'file records linked to the source image.',
24
+ parameter_schema: {
25
+ type: 'object',
26
+ required: ['versions'],
27
+ properties: {
28
+ // ── Version definitions ───────────────────────────────────────
29
+ versions: {
30
+ type: 'array',
31
+ items: {
32
+ type: 'object',
33
+ properties: {
34
+ name: {
35
+ type: 'string',
36
+ description: 'Version identifier (e.g., "thumb", "preview", "hero")'
37
+ },
38
+ width: {
39
+ type: 'integer',
40
+ description: 'Target width in pixels'
41
+ },
42
+ height: {
43
+ type: 'integer',
44
+ description: 'Target height in pixels'
45
+ },
46
+ fit: {
47
+ type: 'string',
48
+ enum: ['cover', 'contain', 'fill', 'inside', 'outside'],
49
+ description: 'Resize fitting strategy',
50
+ default: 'cover'
51
+ },
52
+ format: {
53
+ type: 'string',
54
+ enum: ['jpeg', 'png', 'webp', 'avif'],
55
+ description: 'Output image format',
56
+ default: 'webp'
57
+ },
58
+ quality: {
59
+ type: 'integer',
60
+ description: 'Output quality (1-100)',
61
+ default: 80
62
+ }
63
+ },
64
+ required: ['name']
65
+ },
66
+ description: 'Array of version definitions. Each version specifies dimensions, ' +
67
+ 'format, and quality for a generated image variant. ' +
68
+ 'Required — the blueprint must explicitly define what variants to generate.',
69
+ minItems: 1
70
+ },
71
+ // ── MIME scoping ──────────────────────────────────────────────
72
+ mime_patterns: {
73
+ type: 'array',
74
+ items: { type: 'string' },
75
+ description: 'MIME type LIKE patterns to match. Defaults to all image types.',
76
+ default: ['image/%']
77
+ },
78
+ // ── Job routing ───────────────────────────────────────────────
79
+ task_identifier: {
80
+ type: 'string',
81
+ description: 'Job task identifier for the image processing worker',
82
+ default: 'process_image_versions'
83
+ },
84
+ events: {
85
+ type: 'array',
86
+ items: { type: 'string', enum: ['INSERT', 'UPDATE'] },
87
+ description: 'Trigger events that fire the job',
88
+ default: ['INSERT']
89
+ },
90
+ payload_custom: {
91
+ type: 'object',
92
+ additionalProperties: { type: 'string', format: 'column-ref' },
93
+ description: 'Custom payload key-to-column mapping for the job trigger',
94
+ default: {
95
+ file_id: 'id',
96
+ key: 'key',
97
+ mime_type: 'mime_type',
98
+ bucket_id: 'bucket_id'
99
+ }
100
+ },
101
+ trigger_conditions: {
102
+ description: 'Additional compound conditions beyond MIME filtering. ' +
103
+ 'Merged with the auto-generated MIME conditions via AND.',
104
+ 'x-codegen-type': 'TriggerCondition | TriggerCondition[]',
105
+ oneOf: [
106
+ { $ref: '#/$defs/triggerCondition' },
107
+ { type: 'array', items: { $ref: '#/$defs/triggerCondition' } }
108
+ ]
109
+ },
110
+ // ── Job options ───────────────────────────────────────────────
111
+ queue_name: {
112
+ type: 'string',
113
+ description: 'Job queue name for image processing tasks',
114
+ default: 'image_processing'
115
+ },
116
+ max_attempts: {
117
+ type: 'integer',
118
+ description: 'Maximum number of retry attempts',
119
+ default: 5
120
+ },
121
+ priority: {
122
+ type: 'integer',
123
+ description: 'Job priority (lower = higher priority)',
124
+ default: 0
125
+ }
126
+ }
127
+ },
128
+ tags: [
129
+ 'images',
130
+ 'processing',
131
+ 'jobs',
132
+ 'resize',
133
+ 'thumbnails',
134
+ 'files'
135
+ ]
136
+ };
@@ -3,7 +3,7 @@ export const SearchVector = {
3
3
  slug: 'search_vector',
4
4
  category: 'search',
5
5
  display_name: 'Vector Search',
6
- description: 'Adds a vector embedding column with HNSW or IVFFlat index for similarity search. Supports configurable dimensions, distance metrics (cosine, l2, ip), stale tracking strategies (column, null, hash), and automatic job enqueue triggers for embedding generation.',
6
+ description: 'Adds a vector embedding column with HNSW or IVFFlat index for similarity search. Supports configurable dimensions, distance metrics (cosine, l2, ip), per-field {field_name}_updated_at timestamp tracking (read-only in GraphQL), and automatic job enqueue triggers for embedding generation.',
7
7
  parameter_schema: {
8
8
  type: 'object',
9
9
  properties: {
@@ -42,11 +42,6 @@ export const SearchVector = {
42
42
  description: 'Index-specific options. HNSW: {m, ef_construction}. IVFFlat: {lists}.',
43
43
  default: {}
44
44
  },
45
- include_stale_field: {
46
- type: 'boolean',
47
- description: 'When stale_strategy is column, adds an embedding_stale boolean field',
48
- default: true
49
- },
50
45
  source_fields: {
51
46
  type: 'array',
52
47
  items: {
@@ -65,16 +60,6 @@ export const SearchVector = {
65
60
  description: 'Task identifier for the job queue',
66
61
  default: 'generate_embedding'
67
62
  },
68
- stale_strategy: {
69
- type: 'string',
70
- enum: [
71
- 'column',
72
- 'null',
73
- 'hash'
74
- ],
75
- description: 'Strategy for tracking embedding staleness. column: embedding_stale boolean. null: set embedding to NULL. hash: md5 hash of source fields.',
76
- default: 'column'
77
- },
78
63
  chunks: {
79
64
  type: 'object',
80
65
  description: 'Chunking configuration for long-text embedding. Creates an embedding_chunks record that drives automatic text splitting and per-chunk embedding. Omit to skip chunking.',
@@ -46,7 +46,8 @@ export const PresetAuthHardened = {
46
46
  'identity_providers_module',
47
47
  'webauthn_credentials_module',
48
48
  'webauthn_auth_module',
49
- 'phone_numbers_module'
49
+ 'phone_numbers_module',
50
+ 'devices_module'
50
51
  ],
51
52
  includes_notes: {
52
53
  rate_limits_module: 'Throttling for sign-in, password reset, sign-up, and IP-based gates.',
@@ -55,7 +56,8 @@ export const PresetAuthHardened = {
55
56
  webauthn_credentials_module: 'Per-user passkey storage.',
56
57
  webauthn_auth_module: 'Passkey challenge + assertion runtime.',
57
58
  session_secrets_module: 'Nonces for magic links, email OTP, and WebAuthn challenges.',
58
- phone_numbers_module: 'SMS sign-in / MFA support.'
59
+ phone_numbers_module: 'SMS sign-in / MFA support.',
60
+ devices_module: 'Device tracking and trusted-device MFA bypass.'
59
61
  },
60
62
  omits_notes: {
61
63
  'memberships_module:org': 'No orgs / teams — use `b2b` when you need multi-tenancy.',
@@ -58,10 +58,12 @@ export const PresetB2bStorage = {
58
58
  'hierarchy_module:org',
59
59
  'invites_module:app',
60
60
  'invites_module:org',
61
- 'storage_module'
61
+ 'storage_module',
62
+ 'devices_module'
62
63
  ],
63
64
  includes_notes: {
64
- storage_module: 'File upload infrastructure: app_buckets + app_files tables with RLS. Entity-type storage scopes layered on top via `has_storage=true`.'
65
+ storage_module: 'File upload infrastructure: app_buckets + app_files tables with RLS. Entity-type storage scopes layered on top via `has_storage=true`.',
66
+ devices_module: 'Device tracking and trusted-device MFA bypass.'
65
67
  },
66
68
  omits_notes: {
67
69
  crypto_addresses_module: 'Not a web3 preset.'
@@ -59,7 +59,8 @@ export const PresetB2b = {
59
59
  'profiles_module:org',
60
60
  'hierarchy_module:org',
61
61
  'invites_module:app',
62
- 'invites_module:org'
62
+ 'invites_module:org',
63
+ 'devices_module'
63
64
  ],
64
65
  includes_notes: {
65
66
  'memberships_module:org': 'Org-scoped membership rows — every user in an org gets one.',
@@ -73,7 +74,8 @@ export const PresetB2b = {
73
74
  'profiles_module:org': 'Org-scoped user profile (per org a user belongs to).',
74
75
  'hierarchy_module:org': 'Nested org structures (parent / child orgs).',
75
76
  'invites_module:app': 'App-level invites (rare — usually platform admin adds another admin).',
76
- 'invites_module:org': 'Org-level invites (the common case — invite a teammate into a workspace).'
77
+ 'invites_module:org': 'Org-level invites (the common case — invite a teammate into a workspace).',
78
+ devices_module: 'Device tracking and trusted-device MFA bypass.'
77
79
  },
78
80
  omits_notes: {
79
81
  storage_module: 'Add separately if you need file uploads tied to orgs.',
@@ -49,7 +49,8 @@ exports.PresetAuthHardened = {
49
49
  'identity_providers_module',
50
50
  'webauthn_credentials_module',
51
51
  'webauthn_auth_module',
52
- 'phone_numbers_module'
52
+ 'phone_numbers_module',
53
+ 'devices_module'
53
54
  ],
54
55
  includes_notes: {
55
56
  rate_limits_module: 'Throttling for sign-in, password reset, sign-up, and IP-based gates.',
@@ -58,7 +59,8 @@ exports.PresetAuthHardened = {
58
59
  webauthn_credentials_module: 'Per-user passkey storage.',
59
60
  webauthn_auth_module: 'Passkey challenge + assertion runtime.',
60
61
  session_secrets_module: 'Nonces for magic links, email OTP, and WebAuthn challenges.',
61
- phone_numbers_module: 'SMS sign-in / MFA support.'
62
+ phone_numbers_module: 'SMS sign-in / MFA support.',
63
+ devices_module: 'Device tracking and trusted-device MFA bypass.'
62
64
  },
63
65
  omits_notes: {
64
66
  'memberships_module:org': 'No orgs / teams — use `b2b` when you need multi-tenancy.',
@@ -61,10 +61,12 @@ exports.PresetB2bStorage = {
61
61
  'hierarchy_module:org',
62
62
  'invites_module:app',
63
63
  'invites_module:org',
64
- 'storage_module'
64
+ 'storage_module',
65
+ 'devices_module'
65
66
  ],
66
67
  includes_notes: {
67
- storage_module: 'File upload infrastructure: app_buckets + app_files tables with RLS. Entity-type storage scopes layered on top via `has_storage=true`.'
68
+ storage_module: 'File upload infrastructure: app_buckets + app_files tables with RLS. Entity-type storage scopes layered on top via `has_storage=true`.',
69
+ devices_module: 'Device tracking and trusted-device MFA bypass.'
68
70
  },
69
71
  omits_notes: {
70
72
  crypto_addresses_module: 'Not a web3 preset.'
@@ -62,7 +62,8 @@ exports.PresetB2b = {
62
62
  'profiles_module:org',
63
63
  'hierarchy_module:org',
64
64
  'invites_module:app',
65
- 'invites_module:org'
65
+ 'invites_module:org',
66
+ 'devices_module'
66
67
  ],
67
68
  includes_notes: {
68
69
  'memberships_module:org': 'Org-scoped membership rows — every user in an org gets one.',
@@ -76,7 +77,8 @@ exports.PresetB2b = {
76
77
  'profiles_module:org': 'Org-scoped user profile (per org a user belongs to).',
77
78
  'hierarchy_module:org': 'Nested org structures (parent / child orgs).',
78
79
  'invites_module:app': 'App-level invites (rare — usually platform admin adds another admin).',
79
- 'invites_module:org': 'Org-level invites (the common case — invite a teammate into a workspace).'
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.'
80
82
  },
81
83
  omits_notes: {
82
84
  storage_module: 'Add separately if you need file uploads tied to orgs.',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-type-registry",
3
- "version": "0.33.1",
3
+ "version": "0.35.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": "d43f1d7e38cc39a71b4f8d2cafb39f46df12e31a"
50
+ "gitHead": "50dc1d69049c207b46c237eba1e1b1cb7a5f928f"
51
51
  }