node-type-registry 0.19.0 → 0.21.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 (149) hide show
  1. package/authz/authz-allow-all.js +10 -10
  2. package/authz/authz-composite.js +28 -28
  3. package/authz/authz-deny-all.js +10 -10
  4. package/authz/authz-direct-owner-any.js +19 -18
  5. package/authz/authz-direct-owner.js +17 -16
  6. package/authz/authz-entity-membership.js +44 -38
  7. package/authz/authz-member-list.js +17 -16
  8. package/authz/authz-membership-check.js +34 -34
  9. package/authz/authz-not-read-only.js +23 -22
  10. package/authz/authz-org-hierarchy.js +33 -31
  11. package/authz/authz-peer-ownership.js +40 -39
  12. package/authz/authz-publishable.js +26 -24
  13. package/authz/authz-related-entity-membership.js +67 -55
  14. package/authz/authz-related-member-list.js +35 -32
  15. package/authz/authz-related-peer-ownership.js +63 -59
  16. package/authz/authz-temporal.js +32 -30
  17. package/authz/index.d.ts +9 -9
  18. package/authz/index.js +19 -19
  19. package/blueprint-types.generated.js +1 -1
  20. package/codegen/generate-types.js +1 -1
  21. package/data/data-composite-field.js +27 -25
  22. package/data/data-direct-owner.js +24 -23
  23. package/data/data-entity-membership.js +24 -23
  24. package/data/data-force-current-user.js +17 -16
  25. package/data/data-id.js +16 -15
  26. package/data/data-immutable-fields.js +20 -19
  27. package/data/data-inflection.js +33 -32
  28. package/data/data-inherit-from-parent.js +31 -29
  29. package/data/data-job-trigger.js +87 -84
  30. package/data/data-jsonb.js +27 -26
  31. package/data/data-owned-fields.js +25 -23
  32. package/data/data-ownership-in-entity.js +21 -21
  33. package/data/data-peoplestamps.js +19 -19
  34. package/data/data-publishable.js +16 -16
  35. package/data/data-slug.js +21 -19
  36. package/data/data-soft-delete.js +14 -14
  37. package/data/data-status-field.js +32 -31
  38. package/data/data-tags.js +23 -22
  39. package/data/data-timestamps.js +15 -15
  40. package/data/index.d.ts +17 -17
  41. package/data/index.js +35 -35
  42. package/data/search-bm25.js +34 -33
  43. package/data/search-full-text.js +49 -47
  44. package/data/search-spatial-aggregate.js +77 -74
  45. package/data/search-spatial.js +51 -50
  46. package/data/search-trgm.js +20 -19
  47. package/data/search-unified.js +170 -162
  48. package/data/search-vector.js +104 -101
  49. package/data/table-organization-settings.js +13 -13
  50. package/data/table-user-profiles.js +13 -13
  51. package/data/table-user-settings.js +13 -13
  52. package/esm/authz/authz-allow-all.js +10 -10
  53. package/esm/authz/authz-composite.js +28 -28
  54. package/esm/authz/authz-deny-all.js +10 -10
  55. package/esm/authz/authz-direct-owner-any.js +19 -18
  56. package/esm/authz/authz-direct-owner.js +17 -16
  57. package/esm/authz/authz-entity-membership.js +44 -38
  58. package/esm/authz/authz-member-list.js +17 -16
  59. package/esm/authz/authz-membership-check.js +34 -34
  60. package/esm/authz/authz-not-read-only.js +23 -22
  61. package/esm/authz/authz-org-hierarchy.js +33 -31
  62. package/esm/authz/authz-peer-ownership.js +40 -39
  63. package/esm/authz/authz-publishable.js +26 -24
  64. package/esm/authz/authz-related-entity-membership.js +67 -55
  65. package/esm/authz/authz-related-member-list.js +35 -32
  66. package/esm/authz/authz-related-peer-ownership.js +63 -59
  67. package/esm/authz/authz-temporal.js +32 -30
  68. package/esm/authz/index.d.ts +9 -9
  69. package/esm/authz/index.js +9 -9
  70. package/esm/blueprint-types.generated.js +1 -1
  71. package/esm/codegen/generate-types.js +1 -1
  72. package/esm/data/data-composite-field.js +27 -25
  73. package/esm/data/data-direct-owner.js +24 -23
  74. package/esm/data/data-entity-membership.js +24 -23
  75. package/esm/data/data-force-current-user.js +17 -16
  76. package/esm/data/data-id.js +16 -15
  77. package/esm/data/data-immutable-fields.js +20 -19
  78. package/esm/data/data-inflection.js +33 -32
  79. package/esm/data/data-inherit-from-parent.js +31 -29
  80. package/esm/data/data-job-trigger.js +87 -84
  81. package/esm/data/data-jsonb.js +27 -26
  82. package/esm/data/data-owned-fields.js +25 -23
  83. package/esm/data/data-ownership-in-entity.js +21 -21
  84. package/esm/data/data-peoplestamps.js +19 -19
  85. package/esm/data/data-publishable.js +16 -16
  86. package/esm/data/data-slug.js +21 -19
  87. package/esm/data/data-soft-delete.js +14 -14
  88. package/esm/data/data-status-field.js +32 -31
  89. package/esm/data/data-tags.js +23 -22
  90. package/esm/data/data-timestamps.js +15 -15
  91. package/esm/data/index.d.ts +17 -17
  92. package/esm/data/index.js +17 -17
  93. package/esm/data/search-bm25.js +34 -33
  94. package/esm/data/search-full-text.js +49 -47
  95. package/esm/data/search-spatial-aggregate.js +77 -74
  96. package/esm/data/search-spatial.js +51 -50
  97. package/esm/data/search-trgm.js +20 -19
  98. package/esm/data/search-unified.js +170 -162
  99. package/esm/data/search-vector.js +104 -101
  100. package/esm/data/table-organization-settings.js +13 -13
  101. package/esm/data/table-user-profiles.js +13 -13
  102. package/esm/data/table-user-settings.js +13 -13
  103. package/esm/index.d.ts +3 -3
  104. package/esm/index.js +3 -3
  105. package/esm/module-presets/auth-email-magic.js +2 -2
  106. package/esm/module-presets/auth-email.js +8 -8
  107. package/esm/module-presets/auth-passkey.js +4 -4
  108. package/esm/module-presets/auth-sso.js +7 -7
  109. package/esm/module-presets/full.js +1 -1
  110. package/esm/module-presets/index.d.ts +5 -5
  111. package/esm/module-presets/index.js +4 -4
  112. package/esm/relation/index.d.ts +1 -1
  113. package/esm/relation/index.js +1 -1
  114. package/esm/relation/relation-belongs-to.js +41 -40
  115. package/esm/relation/relation-has-many.js +42 -41
  116. package/esm/relation/relation-has-one.js +42 -41
  117. package/esm/relation/relation-many-to-many.js +70 -68
  118. package/esm/relation/relation-spatial.js +54 -54
  119. package/esm/view/index.d.ts +3 -3
  120. package/esm/view/index.js +3 -3
  121. package/esm/view/view-aggregated.js +50 -48
  122. package/esm/view/view-composite.js +18 -18
  123. package/esm/view/view-filtered-table.js +37 -36
  124. package/esm/view/view-joined-tables.js +65 -61
  125. package/esm/view/view-table-projection.js +29 -28
  126. package/index.d.ts +3 -3
  127. package/index.js +3 -3
  128. package/module-presets/auth-email-magic.js +2 -2
  129. package/module-presets/auth-email.js +8 -8
  130. package/module-presets/auth-passkey.js +4 -4
  131. package/module-presets/auth-sso.js +7 -7
  132. package/module-presets/full.js +1 -1
  133. package/module-presets/index.d.ts +5 -5
  134. package/module-presets/index.js +7 -7
  135. package/package.json +2 -2
  136. package/relation/index.d.ts +1 -1
  137. package/relation/index.js +3 -3
  138. package/relation/relation-belongs-to.js +41 -40
  139. package/relation/relation-has-many.js +42 -41
  140. package/relation/relation-has-one.js +42 -41
  141. package/relation/relation-many-to-many.js +70 -68
  142. package/relation/relation-spatial.js +54 -54
  143. package/view/index.d.ts +3 -3
  144. package/view/index.js +7 -7
  145. package/view/view-aggregated.js +50 -48
  146. package/view/view-composite.js +18 -18
  147. package/view/view-filtered-table.js +37 -36
  148. package/view/view-joined-tables.js +65 -61
  149. package/view/view-table-projection.js +29 -28
@@ -1,130 +1,133 @@
1
1
  export const SearchVector = {
2
- "name": "SearchVector",
3
- "slug": "search_vector",
4
- "category": "search",
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.",
7
- "parameter_schema": {
8
- "type": "object",
9
- "properties": {
10
- "field_name": {
11
- "type": "string",
12
- "description": "Name of the vector column",
13
- "default": "embedding"
2
+ name: 'SearchVector',
3
+ slug: 'search_vector',
4
+ category: 'search',
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.',
7
+ parameter_schema: {
8
+ type: 'object',
9
+ properties: {
10
+ field_name: {
11
+ type: 'string',
12
+ format: 'column-ref',
13
+ description: 'Name of the vector column',
14
+ default: 'embedding'
14
15
  },
15
- "dimensions": {
16
- "type": "integer",
17
- "description": "Vector dimensions (e.g. 384, 768, 1536, 3072)",
18
- "default": 768
16
+ dimensions: {
17
+ type: 'integer',
18
+ description: 'Vector dimensions (e.g. 384, 768, 1536, 3072)',
19
+ default: 768
19
20
  },
20
- "index_method": {
21
- "type": "string",
22
- "enum": [
23
- "hnsw",
24
- "ivfflat"
21
+ index_method: {
22
+ type: 'string',
23
+ enum: [
24
+ 'hnsw',
25
+ 'ivfflat'
25
26
  ],
26
- "description": "Index type for similarity search",
27
- "default": "hnsw"
27
+ description: 'Index type for similarity search',
28
+ default: 'hnsw'
28
29
  },
29
- "metric": {
30
- "type": "string",
31
- "enum": [
32
- "cosine",
33
- "l2",
34
- "ip"
30
+ metric: {
31
+ type: 'string',
32
+ enum: [
33
+ 'cosine',
34
+ 'l2',
35
+ 'ip'
35
36
  ],
36
- "description": "Distance metric (cosine, l2, ip)",
37
- "default": "cosine"
37
+ description: 'Distance metric (cosine, l2, ip)',
38
+ default: 'cosine'
38
39
  },
39
- "index_options": {
40
- "type": "object",
41
- "description": "Index-specific options. HNSW: {m, ef_construction}. IVFFlat: {lists}.",
42
- "default": {}
40
+ index_options: {
41
+ type: 'object',
42
+ description: 'Index-specific options. HNSW: {m, ef_construction}. IVFFlat: {lists}.',
43
+ default: {}
43
44
  },
44
- "include_stale_field": {
45
- "type": "boolean",
46
- "description": "When stale_strategy is column, adds an embedding_stale boolean field",
47
- "default": true
45
+ include_stale_field: {
46
+ type: 'boolean',
47
+ description: 'When stale_strategy is column, adds an embedding_stale boolean field',
48
+ default: true
48
49
  },
49
- "source_fields": {
50
- "type": "array",
51
- "items": {
52
- "type": "string"
50
+ source_fields: {
51
+ type: 'array',
52
+ items: {
53
+ type: 'string',
54
+ format: 'column-ref'
53
55
  },
54
- "description": "Column names that feed the embedding. Used by stale trigger to detect content changes."
56
+ description: 'Column names that feed the embedding. Used by stale trigger to detect content changes.'
55
57
  },
56
- "enqueue_job": {
57
- "type": "boolean",
58
- "description": "Auto-create trigger that enqueues embedding generation jobs",
59
- "default": true
58
+ enqueue_job: {
59
+ type: 'boolean',
60
+ description: 'Auto-create trigger that enqueues embedding generation jobs',
61
+ default: true
60
62
  },
61
- "job_task_name": {
62
- "type": "string",
63
- "description": "Task identifier for the job queue",
64
- "default": "generate_embedding"
63
+ job_task_name: {
64
+ type: 'string',
65
+ description: 'Task identifier for the job queue',
66
+ default: 'generate_embedding'
65
67
  },
66
- "stale_strategy": {
67
- "type": "string",
68
- "enum": [
69
- "column",
70
- "null",
71
- "hash"
68
+ stale_strategy: {
69
+ type: 'string',
70
+ enum: [
71
+ 'column',
72
+ 'null',
73
+ 'hash'
72
74
  ],
73
- "description": "Strategy for tracking embedding staleness. column: embedding_stale boolean. null: set embedding to NULL. hash: md5 hash of source fields.",
74
- "default": "column"
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'
75
77
  },
76
- "chunks": {
77
- "type": "object",
78
- "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.",
79
- "properties": {
80
- "content_field_name": {
81
- "type": "string",
82
- "description": "Name of the text content column in the chunks table",
83
- "default": "content"
78
+ chunks: {
79
+ type: 'object',
80
+ 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.',
81
+ properties: {
82
+ content_field_name: {
83
+ type: 'string',
84
+ format: 'column-ref',
85
+ description: 'Name of the text content column in the chunks table',
86
+ default: 'content'
84
87
  },
85
- "chunk_size": {
86
- "type": "integer",
87
- "description": "Maximum number of characters per chunk",
88
- "default": 1000
88
+ chunk_size: {
89
+ type: 'integer',
90
+ description: 'Maximum number of characters per chunk',
91
+ default: 1000
89
92
  },
90
- "chunk_overlap": {
91
- "type": "integer",
92
- "description": "Number of overlapping characters between consecutive chunks",
93
- "default": 200
93
+ chunk_overlap: {
94
+ type: 'integer',
95
+ description: 'Number of overlapping characters between consecutive chunks',
96
+ default: 200
94
97
  },
95
- "chunk_strategy": {
96
- "type": "string",
97
- "enum": [
98
- "fixed",
99
- "sentence",
100
- "paragraph",
101
- "semantic"
98
+ chunk_strategy: {
99
+ type: 'string',
100
+ enum: [
101
+ 'fixed',
102
+ 'sentence',
103
+ 'paragraph',
104
+ 'semantic'
102
105
  ],
103
- "description": "Strategy for splitting text into chunks",
104
- "default": "fixed"
106
+ description: 'Strategy for splitting text into chunks',
107
+ default: 'fixed'
105
108
  },
106
- "metadata_fields": {
107
- "type": "object",
108
- "description": "Metadata fields from parent to copy into chunks"
109
+ metadata_fields: {
110
+ type: 'object',
111
+ description: 'Metadata fields from parent to copy into chunks'
109
112
  },
110
- "enqueue_chunking_job": {
111
- "type": "boolean",
112
- "description": "Whether to auto-enqueue a chunking job on insert/update",
113
- "default": true
113
+ enqueue_chunking_job: {
114
+ type: 'boolean',
115
+ description: 'Whether to auto-enqueue a chunking job on insert/update',
116
+ default: true
114
117
  },
115
- "chunking_task_name": {
116
- "type": "string",
117
- "description": "Task identifier for the chunking job queue",
118
- "default": "generate_chunks"
118
+ chunking_task_name: {
119
+ type: 'string',
120
+ description: 'Task identifier for the chunking job queue',
121
+ default: 'generate_chunks'
119
122
  }
120
123
  }
121
124
  }
122
125
  }
123
126
  },
124
- "tags": [
125
- "embedding",
126
- "vector",
127
- "ai",
128
- "schema"
127
+ tags: [
128
+ 'embedding',
129
+ 'vector',
130
+ 'ai',
131
+ 'schema'
129
132
  ]
130
133
  };
@@ -1,17 +1,17 @@
1
1
  export const TableOrganizationSettings = {
2
- "name": "TableOrganizationSettings",
3
- "slug": "table_organization_settings",
4
- "category": "data",
5
- "display_name": "Organization Settings",
6
- "description": "Creates an organization settings table with standard business fields (legal_name, address fields). Uses AuthzEntityMembership for access control.",
7
- "parameter_schema": {
8
- "type": "object",
9
- "properties": {}
2
+ name: 'TableOrganizationSettings',
3
+ slug: 'table_organization_settings',
4
+ category: 'data',
5
+ display_name: 'Organization Settings',
6
+ description: 'Creates an organization settings table with standard business fields (legal_name, address fields). Uses AuthzEntityMembership for access control.',
7
+ parameter_schema: {
8
+ type: 'object',
9
+ properties: {}
10
10
  },
11
- "tags": [
12
- "template",
13
- "settings",
14
- "membership",
15
- "schema"
11
+ tags: [
12
+ 'template',
13
+ 'settings',
14
+ 'membership',
15
+ 'schema'
16
16
  ]
17
17
  };
@@ -1,17 +1,17 @@
1
1
  export const TableUserProfiles = {
2
- "name": "TableUserProfiles",
3
- "slug": "table_user_profiles",
4
- "category": "data",
5
- "display_name": "User Profiles",
6
- "description": "Creates a user profiles table with standard profile fields (profile_picture, bio, first_name, last_name, tags, desired). Uses AuthzDirectOwner for edit access and AuthzAllowAll for select.",
7
- "parameter_schema": {
8
- "type": "object",
9
- "properties": {}
2
+ name: 'TableUserProfiles',
3
+ slug: 'table_user_profiles',
4
+ category: 'data',
5
+ display_name: 'User Profiles',
6
+ description: 'Creates a user profiles table with standard profile fields (profile_picture, bio, first_name, last_name, tags, desired). Uses AuthzDirectOwner for edit access and AuthzAllowAll for select.',
7
+ parameter_schema: {
8
+ type: 'object',
9
+ properties: {}
10
10
  },
11
- "tags": [
12
- "template",
13
- "settings",
14
- "ownership",
15
- "schema"
11
+ tags: [
12
+ 'template',
13
+ 'settings',
14
+ 'ownership',
15
+ 'schema'
16
16
  ]
17
17
  };
@@ -1,17 +1,17 @@
1
1
  export const TableUserSettings = {
2
- "name": "TableUserSettings",
3
- "slug": "table_user_settings",
4
- "category": "data",
5
- "display_name": "User Settings",
6
- "description": "Creates a user settings table for user-specific configuration. Uses AuthzDirectOwner for access control.",
7
- "parameter_schema": {
8
- "type": "object",
9
- "properties": {}
2
+ name: 'TableUserSettings',
3
+ slug: 'table_user_settings',
4
+ category: 'data',
5
+ display_name: 'User Settings',
6
+ description: 'Creates a user settings table for user-specific configuration. Uses AuthzDirectOwner for access control.',
7
+ parameter_schema: {
8
+ type: 'object',
9
+ properties: {}
10
10
  },
11
- "tags": [
12
- "template",
13
- "settings",
14
- "ownership",
15
- "schema"
11
+ tags: [
12
+ 'template',
13
+ 'settings',
14
+ 'ownership',
15
+ 'schema'
16
16
  ]
17
17
  };
package/esm/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- export type { NodeTypeDefinition, JSONSchema } from './types';
2
1
  export * from './authz';
2
+ export * from './blueprint-types.generated';
3
3
  export * from './data';
4
+ export * from './module-presets';
4
5
  export * from './relation';
6
+ export type { JSONSchema, NodeTypeDefinition } from './types';
5
7
  export * from './view';
6
- export * from './blueprint-types.generated';
7
- export * from './module-presets';
8
8
  import type { NodeTypeDefinition } from './types';
9
9
  export declare const allNodeTypes: NodeTypeDefinition[];
package/esm/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  export * from './authz';
2
+ export * from './blueprint-types.generated';
2
3
  export * from './data';
4
+ export * from './module-presets';
3
5
  export * from './relation';
4
6
  export * from './view';
5
- export * from './blueprint-types.generated';
6
- export * from './module-presets';
7
7
  import * as authz from './authz';
8
8
  import * as data from './data';
9
9
  import * as relation from './relation';
@@ -12,5 +12,5 @@ export const allNodeTypes = [
12
12
  ...Object.values(authz),
13
13
  ...Object.values(data),
14
14
  ...Object.values(relation),
15
- ...Object.values(view),
15
+ ...Object.values(view)
16
16
  ];
@@ -19,8 +19,8 @@ export const PresetAuthEmailMagic = {
19
19
  'generator emits the passwordless procedures: `sign_up_magic_link`, `sign_in_magic_link`, ' +
20
20
  '`sign_in_email_otp`. Password flows still exist — you opt into passwordless-only by ' +
21
21
  'flipping the `allow_password_sign_*` toggles off in `app_settings_auth` after install. ' +
22
- "This is the right step up from `auth:email` when you want to ship magic links without yet " +
23
- "taking on SSO or passkeys.",
22
+ 'This is the right step up from `auth:email` when you want to ship magic links without yet ' +
23
+ 'taking on SSO or passkeys.',
24
24
  good_for: [
25
25
  'Consumer apps that want passwordless from day one',
26
26
  'Apps targeting users who forget passwords (newsletters, one-off tools)',
@@ -17,15 +17,15 @@ export const PresetAuthEmail = {
17
17
  name: 'auth:email',
18
18
  display_name: 'Email + Password',
19
19
  summary: 'Standard email/password auth flow. No orgs, no SSO, no MFA, no rate limits.',
20
- description: "Installs `user_auth_module` with exactly the table dependencies its insert trigger " +
21
- "hard-requires: users, app-scoped memberships, emails, secrets, encrypted secrets, " +
22
- "sessions, plus RLS. You get the standard password-based auth procedures (sign_up, " +
20
+ description: 'Installs `user_auth_module` with exactly the table dependencies its insert trigger ' +
21
+ 'hard-requires: users, app-scoped memberships, emails, secrets, encrypted secrets, ' +
22
+ 'sessions, plus RLS. You get the standard password-based auth procedures (sign_up, ' +
23
23
  "sign_in, reset_password, verify_email, delete_account, ...) and that's it. " +
24
- "Everything else in the module catalog — SSO, passkeys, SMS, rate limits, orgs, " +
25
- "invites, permissions — is deliberately omitted. This is the right shape for single-tenant " +
26
- "consumer apps in the first weeks, internal tools that need a real login, or anything " +
27
- "where you want the lightest possible working auth and will add complexity only when " +
28
- "forced to.",
24
+ 'Everything else in the module catalog — SSO, passkeys, SMS, rate limits, orgs, ' +
25
+ 'invites, permissions — is deliberately omitted. This is the right shape for single-tenant ' +
26
+ 'consumer apps in the first weeks, internal tools that need a real login, or anything ' +
27
+ 'where you want the lightest possible working auth and will add complexity only when ' +
28
+ 'forced to.',
29
29
  good_for: [
30
30
  'Single-tenant consumer apps in the first week of development',
31
31
  'Internal tools where one simple login is enough',
@@ -15,10 +15,10 @@ export const PresetAuthPasskey = {
15
15
  display_name: 'Passkeys (WebAuthn)',
16
16
  summary: '`auth:email` plus WebAuthn passkey registration and assertion.',
17
17
  description: "Installs the three modules WebAuthn needs: `webauthn_credentials_module` for each user's " +
18
- "registered public keys, `webauthn_auth_module` for the runtime challenge/assertion flow, " +
19
- "and `session_secrets_module` for the one-time challenge nonces. With these installed, " +
20
- "the generator emits WebAuthn registration/login procs. Keep password flows as a recovery " +
21
- "path, or disable them in `app_settings_auth` for passkey-only deployments.",
18
+ 'registered public keys, `webauthn_auth_module` for the runtime challenge/assertion flow, ' +
19
+ 'and `session_secrets_module` for the one-time challenge nonces. With these installed, ' +
20
+ 'the generator emits WebAuthn registration/login procs. Keep password flows as a recovery ' +
21
+ 'path, or disable them in `app_settings_auth` for passkey-only deployments.',
22
22
  good_for: [
23
23
  'Apps where you want users to adopt phishing-resistant auth',
24
24
  'Consumer apps with a tech-forward audience',
@@ -21,13 +21,13 @@ export const PresetAuthSso = {
21
21
  name: 'auth:sso',
22
22
  display_name: 'OAuth / OpenID Connect',
23
23
  summary: '`auth:email` plus OAuth providers and connected-account linkage.',
24
- description: "Adds the two modules that make SSO work: `identity_providers_module` (where provider " +
25
- "definitions live — Google, GitHub, Okta, etc., with their URLs, client IDs, and " +
26
- "encrypted client secrets) and `connected_accounts_module` (the junction mapping a " +
27
- "Constructive user to a `(provider, external_id)` pair). The generator emits " +
28
- "`sign_in_identity` and `sign_up_identity` procedures which decrypt the client secret " +
29
- "through `encrypted_secrets_module` at auth time. Keep password flows as break-glass, or " +
30
- "disable them via `app_settings_auth` toggles for strictly-SSO deployments.",
24
+ description: 'Adds the two modules that make SSO work: `identity_providers_module` (where provider ' +
25
+ 'definitions live — Google, GitHub, Okta, etc., with their URLs, client IDs, and ' +
26
+ 'encrypted client secrets) and `connected_accounts_module` (the junction mapping a ' +
27
+ 'Constructive user to a `(provider, external_id)` pair). The generator emits ' +
28
+ '`sign_in_identity` and `sign_up_identity` procedures which decrypt the client secret ' +
29
+ 'through `encrypted_secrets_module` at auth time. Keep password flows as break-glass, or ' +
30
+ 'disable them via `app_settings_auth` toggles for strictly-SSO deployments.',
31
31
  good_for: [
32
32
  'B2B apps where end users sign in via their employer IdP',
33
33
  'Consumer apps that want "Sign in with Google / GitHub"',
@@ -18,7 +18,7 @@ export const PresetFull = {
18
18
  description: 'Installs every module in the catalog: everything in `b2b` plus `storage_module` ' +
19
19
  'for file uploads and `crypto_addresses_module` / `crypto_auth_module` for ' +
20
20
  'wallet-based sign-in. This matches the current default when `provision_database_modules` ' +
21
- "is called without an explicit `v_modules` argument. Use it for fully-featured " +
21
+ 'is called without an explicit `v_modules` argument. Use it for fully-featured ' +
22
22
  'demo/example databases, kitchen-sink reference deployments, or greenfield apps that ' +
23
23
  'would rather feature-flag at the app_settings level than uninstall modules.',
24
24
  good_for: [
@@ -1,14 +1,14 @@
1
1
  export type { ModulePreset } from './types';
2
- import type { ModulePreset } from './types';
3
- import { PresetMinimal } from './minimal';
4
2
  import { PresetAuthEmail } from './auth-email';
5
3
  import { PresetAuthEmailMagic } from './auth-email-magic';
6
- import { PresetAuthSso } from './auth-sso';
7
- import { PresetAuthPasskey } from './auth-passkey';
8
4
  import { PresetAuthHardened } from './auth-hardened';
5
+ import { PresetAuthPasskey } from './auth-passkey';
6
+ import { PresetAuthSso } from './auth-sso';
9
7
  import { PresetB2b } from './b2b';
10
8
  import { PresetFull } from './full';
11
- export { PresetMinimal, PresetAuthEmail, PresetAuthEmailMagic, PresetAuthSso, PresetAuthPasskey, PresetAuthHardened, PresetB2b, PresetFull };
9
+ import { PresetMinimal } from './minimal';
10
+ import type { ModulePreset } from './types';
11
+ export { PresetAuthEmail, PresetAuthEmailMagic, PresetAuthHardened, PresetAuthPasskey, PresetAuthSso, PresetB2b, PresetFull, PresetMinimal };
12
12
  /**
13
13
  * Ordered list of all shipped module presets, from smallest to largest
14
14
  * module footprint. Stable ordering — CLIs / UIs can present this directly.
@@ -1,12 +1,12 @@
1
- import { PresetMinimal } from './minimal';
2
1
  import { PresetAuthEmail } from './auth-email';
3
2
  import { PresetAuthEmailMagic } from './auth-email-magic';
4
- import { PresetAuthSso } from './auth-sso';
5
- import { PresetAuthPasskey } from './auth-passkey';
6
3
  import { PresetAuthHardened } from './auth-hardened';
4
+ import { PresetAuthPasskey } from './auth-passkey';
5
+ import { PresetAuthSso } from './auth-sso';
7
6
  import { PresetB2b } from './b2b';
8
7
  import { PresetFull } from './full';
9
- export { PresetMinimal, PresetAuthEmail, PresetAuthEmailMagic, PresetAuthSso, PresetAuthPasskey, PresetAuthHardened, PresetB2b, PresetFull };
8
+ import { PresetMinimal } from './minimal';
9
+ export { PresetAuthEmail, PresetAuthEmailMagic, PresetAuthHardened, PresetAuthPasskey, PresetAuthSso, PresetB2b, PresetFull, PresetMinimal };
10
10
  /**
11
11
  * Ordered list of all shipped module presets, from smallest to largest
12
12
  * module footprint. Stable ordering — CLIs / UIs can present this directly.
@@ -1,5 +1,5 @@
1
1
  export { RelationBelongsTo } from './relation-belongs-to';
2
- export { RelationHasOne } from './relation-has-one';
3
2
  export { RelationHasMany } from './relation-has-many';
3
+ export { RelationHasOne } from './relation-has-one';
4
4
  export { RelationManyToMany } from './relation-many-to-many';
5
5
  export { RelationSpatial } from './relation-spatial';
@@ -1,5 +1,5 @@
1
1
  export { RelationBelongsTo } from './relation-belongs-to';
2
- export { RelationHasOne } from './relation-has-one';
3
2
  export { RelationHasMany } from './relation-has-many';
3
+ export { RelationHasOne } from './relation-has-one';
4
4
  export { RelationManyToMany } from './relation-many-to-many';
5
5
  export { RelationSpatial } from './relation-spatial';
@@ -1,52 +1,53 @@
1
1
  export const RelationBelongsTo = {
2
- "name": "RelationBelongsTo",
3
- "slug": "relation_belongs_to",
4
- "category": "relation",
5
- "display_name": "Belongs To",
6
- "description": "Creates a foreign key field on the source table referencing the target table. Auto-derives the FK field name from the target table name using inflection (e.g., projects derives project_id). delete_action is required and must be explicitly provided by the caller.",
7
- "parameter_schema": {
8
- "type": "object",
9
- "properties": {
10
- "source_table_id": {
11
- "type": "string",
12
- "format": "uuid",
13
- "description": "Table that will have the FK field added"
2
+ name: 'RelationBelongsTo',
3
+ slug: 'relation_belongs_to',
4
+ category: 'relation',
5
+ display_name: 'Belongs To',
6
+ description: 'Creates a foreign key field on the source table referencing the target table. Auto-derives the FK field name from the target table name using inflection (e.g., projects derives project_id). delete_action is required and must be explicitly provided by the caller.',
7
+ parameter_schema: {
8
+ type: 'object',
9
+ properties: {
10
+ source_table_id: {
11
+ type: 'string',
12
+ format: 'uuid',
13
+ description: 'Table that will have the FK field added'
14
14
  },
15
- "target_table_id": {
16
- "type": "string",
17
- "format": "uuid",
18
- "description": "Table being referenced by the FK"
15
+ target_table_id: {
16
+ type: 'string',
17
+ format: 'uuid',
18
+ description: 'Table being referenced by the FK'
19
19
  },
20
- "field_name": {
21
- "type": "string",
22
- "description": "FK field name on the source table. Auto-derived from target table name if omitted (e.g., projects → project_id)"
20
+ field_name: {
21
+ type: 'string',
22
+ format: 'column-ref',
23
+ description: 'FK field name on the source table. Auto-derived from target table name if omitted (e.g., projects → project_id)'
23
24
  },
24
- "delete_action": {
25
- "type": "string",
26
- "enum": [
27
- "c",
28
- "r",
29
- "n",
30
- "d",
31
- "a"
25
+ delete_action: {
26
+ type: 'string',
27
+ enum: [
28
+ 'c',
29
+ 'r',
30
+ 'n',
31
+ 'd',
32
+ 'a'
32
33
  ],
33
- "description": "FK delete action: c=CASCADE, r=RESTRICT, n=SET NULL, d=SET DEFAULT, a=NO ACTION. Required."
34
+ description: 'FK delete action: c=CASCADE, r=RESTRICT, n=SET NULL, d=SET DEFAULT, a=NO ACTION. Required.'
34
35
  },
35
- "is_required": {
36
- "type": "boolean",
37
- "description": "Whether the FK field is NOT NULL",
38
- "default": true
36
+ is_required: {
37
+ type: 'boolean',
38
+ description: 'Whether the FK field is NOT NULL',
39
+ default: true
39
40
  }
40
41
  },
41
- "required": [
42
- "source_table_id",
43
- "target_table_id",
44
- "delete_action"
42
+ required: [
43
+ 'source_table_id',
44
+ 'target_table_id',
45
+ 'delete_action'
45
46
  ]
46
47
  },
47
- "tags": [
48
- "relation",
49
- "foreign_key",
50
- "schema"
48
+ tags: [
49
+ 'relation',
50
+ 'foreign_key',
51
+ 'schema'
51
52
  ]
52
53
  };