node-type-registry 0.2.2 → 0.3.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 (159) hide show
  1. package/authz/authz-allow-all.js +9 -7
  2. package/authz/authz-composite.js +10 -7
  3. package/authz/authz-deny-all.js +9 -7
  4. package/authz/authz-direct-owner-any.js +10 -7
  5. package/authz/authz-direct-owner.js +10 -7
  6. package/authz/authz-entity-membership.js +10 -7
  7. package/authz/authz-member-list.js +10 -7
  8. package/authz/authz-membership-check.js +10 -7
  9. package/authz/authz-org-hierarchy.js +11 -7
  10. package/authz/authz-peer-ownership.js +11 -7
  11. package/authz/authz-publishable.js +11 -7
  12. package/authz/authz-related-entity-membership.js +10 -7
  13. package/authz/authz-related-member-list.js +10 -7
  14. package/authz/authz-related-peer-ownership.js +11 -7
  15. package/authz/authz-temporal.js +10 -7
  16. package/data/data-bm25.js +11 -7
  17. package/data/data-direct-owner.js +10 -7
  18. package/data/data-embedding.js +12 -7
  19. package/data/data-entity-membership.js +10 -7
  20. package/data/data-force-current-user.d.ts +2 -0
  21. package/data/data-force-current-user.js +25 -0
  22. package/data/data-full-text-search.js +12 -7
  23. package/data/data-id.js +10 -7
  24. package/data/data-immutable-fields.d.ts +2 -0
  25. package/data/data-immutable-fields.js +30 -0
  26. package/data/data-inflection.d.ts +2 -0
  27. package/data/data-inflection.js +45 -0
  28. package/data/data-inherit-from-parent.d.ts +2 -0
  29. package/data/data-inherit-from-parent.js +43 -0
  30. package/data/data-job-trigger.js +11 -7
  31. package/data/data-jsonb.js +10 -7
  32. package/data/data-owned-fields.d.ts +2 -0
  33. package/data/data-owned-fields.js +35 -0
  34. package/data/data-ownership-in-entity.js +12 -7
  35. package/data/data-peoplestamps.js +10 -7
  36. package/data/data-postgis-aggregate.js +13 -7
  37. package/data/data-postgis.js +12 -7
  38. package/data/data-publishable.js +11 -7
  39. package/data/data-search.js +11 -7
  40. package/{field/field-slug.d.ts → data/data-slug.d.ts} +1 -1
  41. package/data/data-slug.js +30 -0
  42. package/data/data-soft-delete.js +9 -7
  43. package/data/data-status-field.js +10 -7
  44. package/data/data-tags.js +10 -7
  45. package/data/data-timestamps.js +10 -7
  46. package/data/data-trgm.js +11 -7
  47. package/data/index.d.ts +9 -0
  48. package/data/index.js +19 -1
  49. package/data/table-organization-settings.js +20 -0
  50. package/data/table-user-profiles.js +20 -0
  51. package/data/table-user-settings.js +20 -0
  52. package/esm/authz/authz-allow-all.js +9 -7
  53. package/esm/authz/authz-composite.js +10 -7
  54. package/esm/authz/authz-deny-all.js +9 -7
  55. package/esm/authz/authz-direct-owner-any.js +10 -7
  56. package/esm/authz/authz-direct-owner.js +10 -7
  57. package/esm/authz/authz-entity-membership.js +10 -7
  58. package/esm/authz/authz-member-list.js +10 -7
  59. package/esm/authz/authz-membership-check.js +10 -7
  60. package/esm/authz/authz-org-hierarchy.js +11 -7
  61. package/esm/authz/authz-peer-ownership.js +11 -7
  62. package/esm/authz/authz-publishable.js +11 -7
  63. package/esm/authz/authz-related-entity-membership.js +10 -7
  64. package/esm/authz/authz-related-member-list.js +10 -7
  65. package/esm/authz/authz-related-peer-ownership.js +11 -7
  66. package/esm/authz/authz-temporal.js +10 -7
  67. package/esm/data/data-bm25.js +11 -7
  68. package/esm/data/data-direct-owner.js +10 -7
  69. package/esm/data/data-embedding.js +12 -7
  70. package/esm/data/data-entity-membership.js +10 -7
  71. package/esm/data/data-force-current-user.d.ts +2 -0
  72. package/esm/data/data-force-current-user.js +22 -0
  73. package/esm/data/data-full-text-search.js +12 -7
  74. package/esm/data/data-id.js +10 -7
  75. package/esm/data/data-immutable-fields.d.ts +2 -0
  76. package/esm/data/data-immutable-fields.js +27 -0
  77. package/esm/data/data-inflection.d.ts +2 -0
  78. package/esm/data/data-inflection.js +42 -0
  79. package/esm/data/data-inherit-from-parent.d.ts +2 -0
  80. package/esm/data/data-inherit-from-parent.js +40 -0
  81. package/esm/data/data-job-trigger.js +11 -7
  82. package/esm/data/data-jsonb.js +10 -7
  83. package/esm/data/data-owned-fields.d.ts +2 -0
  84. package/esm/data/data-owned-fields.js +32 -0
  85. package/esm/data/data-ownership-in-entity.js +12 -7
  86. package/esm/data/data-peoplestamps.js +10 -7
  87. package/esm/data/data-postgis-aggregate.js +13 -7
  88. package/esm/data/data-postgis.js +12 -7
  89. package/esm/data/data-publishable.js +11 -7
  90. package/esm/data/data-search.js +11 -7
  91. package/esm/{field/field-slug.d.ts → data/data-slug.d.ts} +1 -1
  92. package/esm/data/data-slug.js +27 -0
  93. package/esm/data/data-soft-delete.js +9 -7
  94. package/esm/data/data-status-field.js +10 -7
  95. package/esm/data/data-tags.js +10 -7
  96. package/esm/data/data-timestamps.js +10 -7
  97. package/esm/data/data-trgm.js +11 -7
  98. package/esm/data/index.d.ts +9 -0
  99. package/esm/data/index.js +9 -0
  100. package/esm/data/table-organization-settings.js +17 -0
  101. package/esm/data/table-user-profiles.js +17 -0
  102. package/esm/data/table-user-settings.js +17 -0
  103. package/esm/index.d.ts +0 -2
  104. package/esm/index.js +0 -7
  105. package/esm/relation/relation-belongs-to.js +11 -7
  106. package/esm/relation/relation-has-many.js +12 -7
  107. package/esm/relation/relation-has-one.js +12 -7
  108. package/esm/relation/relation-many-to-many.js +12 -7
  109. package/esm/view/view-aggregated.js +11 -7
  110. package/esm/view/view-composite.js +12 -7
  111. package/esm/view/view-filtered-table.js +11 -7
  112. package/esm/view/view-joined-tables.js +10 -7
  113. package/esm/view/view-table-projection.js +10 -7
  114. package/index.d.ts +0 -2
  115. package/index.js +0 -7
  116. package/package.json +4 -4
  117. package/relation/relation-belongs-to.js +11 -7
  118. package/relation/relation-has-many.js +12 -7
  119. package/relation/relation-has-one.js +12 -7
  120. package/relation/relation-many-to-many.js +12 -7
  121. package/view/view-aggregated.js +11 -7
  122. package/view/view-composite.js +12 -7
  123. package/view/view-filtered-table.js +11 -7
  124. package/view/view-joined-tables.js +10 -7
  125. package/view/view-table-projection.js +10 -7
  126. package/esm/field/field-immutable.d.ts +0 -2
  127. package/esm/field/field-immutable.js +0 -21
  128. package/esm/field/field-inflection.d.ts +0 -2
  129. package/esm/field/field-inflection.js +0 -29
  130. package/esm/field/field-owned.d.ts +0 -2
  131. package/esm/field/field-owned.js +0 -36
  132. package/esm/field/field-slug.js +0 -26
  133. package/esm/field/index.d.ts +0 -4
  134. package/esm/field/index.js +0 -4
  135. package/esm/table/index.d.ts +0 -3
  136. package/esm/table/index.js +0 -3
  137. package/esm/table/table-organization-settings.js +0 -12
  138. package/esm/table/table-user-profiles.js +0 -12
  139. package/esm/table/table-user-settings.js +0 -12
  140. package/field/field-immutable.d.ts +0 -2
  141. package/field/field-immutable.js +0 -24
  142. package/field/field-inflection.d.ts +0 -2
  143. package/field/field-inflection.js +0 -32
  144. package/field/field-owned.d.ts +0 -2
  145. package/field/field-owned.js +0 -39
  146. package/field/field-slug.js +0 -29
  147. package/field/index.d.ts +0 -4
  148. package/field/index.js +0 -11
  149. package/table/index.d.ts +0 -3
  150. package/table/index.js +0 -9
  151. package/table/table-organization-settings.js +0 -15
  152. package/table/table-user-profiles.js +0 -15
  153. package/table/table-user-settings.js +0 -15
  154. /package/{esm/table → data}/table-organization-settings.d.ts +0 -0
  155. /package/{esm/table → data}/table-user-profiles.d.ts +0 -0
  156. /package/{esm/table → data}/table-user-settings.d.ts +0 -0
  157. /package/{table → esm/data}/table-organization-settings.d.ts +0 -0
  158. /package/{table → esm/data}/table-user-profiles.d.ts +0 -0
  159. /package/{table → esm/data}/table-user-settings.d.ts +0 -0
@@ -1,10 +1,10 @@
1
1
  export const DataTrgm = {
2
- name: 'DataTrgm',
3
- slug: 'data_trgm',
4
- category: 'data',
5
- display_name: 'Trigram Search',
6
- description: 'Creates GIN trigram indexes (gin_trgm_ops) on specified text/citext fields for fuzzy LIKE/ILIKE/similarity search. Adds @trgmSearch smart tag for PostGraphile integration. Fields must already exist on the table.',
7
- parameter_schema: {
2
+ "name": "DataTrgm",
3
+ "slug": "data_trgm",
4
+ "category": "data",
5
+ "display_name": "Trigram Search",
6
+ "description": "Creates GIN trigram indexes (gin_trgm_ops) on specified text/citext fields for fuzzy LIKE/ILIKE/similarity search. Adds @trgmSearch smart tag for PostGraphile integration. Fields must already exist on the table.",
7
+ "parameter_schema": {
8
8
  "type": "object",
9
9
  "properties": {
10
10
  "fields": {
@@ -19,5 +19,9 @@ export const DataTrgm = {
19
19
  "fields"
20
20
  ]
21
21
  },
22
- tags: ['search', 'trigram', 'schema'],
22
+ "tags": [
23
+ "search",
24
+ "trigram",
25
+ "schema"
26
+ ]
23
27
  };
@@ -17,3 +17,12 @@ export { DataTags } from './data-tags';
17
17
  export { DataStatusField } from './data-status-field';
18
18
  export { DataJsonb } from './data-jsonb';
19
19
  export { DataTrgm } from './data-trgm';
20
+ export { DataSlug } from './data-slug';
21
+ export { DataInflection } from './data-inflection';
22
+ export { DataOwnedFields } from './data-owned-fields';
23
+ export { DataInheritFromParent } from './data-inherit-from-parent';
24
+ export { DataForceCurrentUser } from './data-force-current-user';
25
+ export { DataImmutableFields } from './data-immutable-fields';
26
+ export { TableUserProfiles } from './table-user-profiles';
27
+ export { TableOrganizationSettings } from './table-organization-settings';
28
+ export { TableUserSettings } from './table-user-settings';
package/esm/data/index.js CHANGED
@@ -17,3 +17,12 @@ export { DataTags } from './data-tags';
17
17
  export { DataStatusField } from './data-status-field';
18
18
  export { DataJsonb } from './data-jsonb';
19
19
  export { DataTrgm } from './data-trgm';
20
+ export { DataSlug } from './data-slug';
21
+ export { DataInflection } from './data-inflection';
22
+ export { DataOwnedFields } from './data-owned-fields';
23
+ export { DataInheritFromParent } from './data-inherit-from-parent';
24
+ export { DataForceCurrentUser } from './data-force-current-user';
25
+ export { DataImmutableFields } from './data-immutable-fields';
26
+ export { TableUserProfiles } from './table-user-profiles';
27
+ export { TableOrganizationSettings } from './table-organization-settings';
28
+ export { TableUserSettings } from './table-user-settings';
@@ -0,0 +1,17 @@
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": {}
10
+ },
11
+ "tags": [
12
+ "template",
13
+ "settings",
14
+ "membership",
15
+ "schema"
16
+ ]
17
+ };
@@ -0,0 +1,17 @@
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": {}
10
+ },
11
+ "tags": [
12
+ "template",
13
+ "settings",
14
+ "ownership",
15
+ "schema"
16
+ ]
17
+ };
@@ -0,0 +1,17 @@
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": {}
10
+ },
11
+ "tags": [
12
+ "template",
13
+ "settings",
14
+ "ownership",
15
+ "schema"
16
+ ]
17
+ };
package/esm/index.d.ts CHANGED
@@ -1,9 +1,7 @@
1
1
  export type { NodeTypeDefinition, JSONSchema } from './types';
2
2
  export * from './authz';
3
3
  export * from './data';
4
- export * from './field';
5
4
  export * from './relation';
6
5
  export * from './view';
7
- export * from './table';
8
6
  import type { NodeTypeDefinition } from './types';
9
7
  export declare const allNodeTypes: NodeTypeDefinition[];
package/esm/index.js CHANGED
@@ -1,21 +1,14 @@
1
- // Re-export all node definitions by category
2
1
  export * from './authz';
3
2
  export * from './data';
4
- export * from './field';
5
3
  export * from './relation';
6
4
  export * from './view';
7
- export * from './table';
8
5
  import * as authz from './authz';
9
6
  import * as data from './data';
10
- import * as field from './field';
11
7
  import * as relation from './relation';
12
8
  import * as view from './view';
13
- import * as table from './table';
14
9
  export const allNodeTypes = [
15
10
  ...Object.values(authz),
16
11
  ...Object.values(data),
17
- ...Object.values(field),
18
12
  ...Object.values(relation),
19
13
  ...Object.values(view),
20
- ...Object.values(table),
21
14
  ];
@@ -1,10 +1,10 @@
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: {
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
8
  "type": "object",
9
9
  "properties": {
10
10
  "source_table_id": {
@@ -44,5 +44,9 @@ export const RelationBelongsTo = {
44
44
  "delete_action"
45
45
  ]
46
46
  },
47
- tags: ['relation', 'foreign_key', 'schema'],
47
+ "tags": [
48
+ "relation",
49
+ "foreign_key",
50
+ "schema"
51
+ ]
48
52
  };
@@ -1,10 +1,10 @@
1
1
  export const RelationHasMany = {
2
- name: 'RelationHasMany',
3
- slug: 'relation_has_many',
4
- category: 'relation',
5
- display_name: 'Has Many',
6
- description: 'Creates a foreign key field on the target table referencing the source table. Inverse of RelationBelongsTo — same FK, different perspective. "projects has many tasks" creates tasks.project_id. Auto-derives the FK field name from the source table name using inflection. delete_action is required and must be explicitly provided by the caller.',
7
- parameter_schema: {
2
+ "name": "RelationHasMany",
3
+ "slug": "relation_has_many",
4
+ "category": "relation",
5
+ "display_name": "Has Many",
6
+ "description": "Creates a foreign key field on the target table referencing the source table. Inverse of RelationBelongsTo — same FK, different perspective. \"projects has many tasks\" creates tasks.project_id. Auto-derives the FK field name from the source table name using inflection. delete_action is required and must be explicitly provided by the caller.",
7
+ "parameter_schema": {
8
8
  "type": "object",
9
9
  "properties": {
10
10
  "source_table_id": {
@@ -44,5 +44,10 @@ export const RelationHasMany = {
44
44
  "delete_action"
45
45
  ]
46
46
  },
47
- tags: ['relation', 'foreign_key', 'has_many', 'schema'],
47
+ "tags": [
48
+ "relation",
49
+ "foreign_key",
50
+ "has_many",
51
+ "schema"
52
+ ]
48
53
  };
@@ -1,10 +1,10 @@
1
1
  export const RelationHasOne = {
2
- name: 'RelationHasOne',
3
- slug: 'relation_has_one',
4
- category: 'relation',
5
- display_name: 'Has One',
6
- description: 'Creates a foreign key field with a unique constraint on the source table referencing the target table. Enforces 1:1 cardinality. Auto-derives the FK field name from the target table name using inflection. delete_action is required and must be explicitly provided by the caller.',
7
- parameter_schema: {
2
+ "name": "RelationHasOne",
3
+ "slug": "relation_has_one",
4
+ "category": "relation",
5
+ "display_name": "Has One",
6
+ "description": "Creates a foreign key field with a unique constraint on the source table referencing the target table. Enforces 1:1 cardinality. Auto-derives the FK field name from the target table name using inflection. delete_action is required and must be explicitly provided by the caller.",
7
+ "parameter_schema": {
8
8
  "type": "object",
9
9
  "properties": {
10
10
  "source_table_id": {
@@ -44,5 +44,10 @@ export const RelationHasOne = {
44
44
  "delete_action"
45
45
  ]
46
46
  },
47
- tags: ['relation', 'foreign_key', 'unique', 'schema'],
47
+ "tags": [
48
+ "relation",
49
+ "foreign_key",
50
+ "unique",
51
+ "schema"
52
+ ]
48
53
  };
@@ -1,10 +1,10 @@
1
1
  export const RelationManyToMany = {
2
- name: 'RelationManyToMany',
3
- slug: 'relation_many_to_many',
4
- category: 'relation',
5
- display_name: 'Many to Many',
6
- description: 'Creates a junction table between source and target tables with auto-derived naming and FK fields. The trigger creates a bare table (no implicit DataId or any node_type), adds FK fields to both tables, optionally creates a composite PK (use_composite_key), then forwards all security config to secure_table_provision as-is. The trigger never injects values the caller did not provide. Junction table FKs always CASCADE on delete.',
7
- parameter_schema: {
2
+ "name": "RelationManyToMany",
3
+ "slug": "relation_many_to_many",
4
+ "category": "relation",
5
+ "display_name": "Many to Many",
6
+ "description": "Creates a junction table between source and target tables with auto-derived naming and FK fields. The trigger creates a bare table (no implicit DataId or any node_type), adds FK fields to both tables, optionally creates a composite PK (use_composite_key), then forwards all security config to secure_table_provision as-is. The trigger never injects values the caller did not provide. Junction table FKs always CASCADE on delete.",
7
+ "parameter_schema": {
8
8
  "type": "object",
9
9
  "properties": {
10
10
  "source_table_id": {
@@ -88,5 +88,10 @@ export const RelationManyToMany = {
88
88
  "target_table_id"
89
89
  ]
90
90
  },
91
- tags: ['relation', 'junction', 'many_to_many', 'schema'],
91
+ "tags": [
92
+ "relation",
93
+ "junction",
94
+ "many_to_many",
95
+ "schema"
96
+ ]
92
97
  };
@@ -1,10 +1,10 @@
1
1
  export const ViewAggregated = {
2
- name: 'ViewAggregated',
3
- slug: 'view_aggregated',
4
- category: 'view',
5
- display_name: 'Aggregated View',
6
- description: 'View with GROUP BY and aggregate functions. Useful for summary/reporting views.',
7
- parameter_schema: {
2
+ "name": "ViewAggregated",
3
+ "slug": "view_aggregated",
4
+ "category": "view",
5
+ "display_name": "Aggregated View",
6
+ "description": "View with GROUP BY and aggregate functions. Useful for summary/reporting views.",
7
+ "parameter_schema": {
8
8
  "type": "object",
9
9
  "properties": {
10
10
  "source_table_id": {
@@ -57,5 +57,9 @@ export const ViewAggregated = {
57
57
  "aggregates"
58
58
  ]
59
59
  },
60
- tags: ['view', 'aggregate', 'reporting'],
60
+ "tags": [
61
+ "view",
62
+ "aggregate",
63
+ "reporting"
64
+ ]
61
65
  };
@@ -1,10 +1,10 @@
1
1
  export const ViewComposite = {
2
- name: 'ViewComposite',
3
- slug: 'view_composite',
4
- category: 'view',
5
- display_name: 'Composite View',
6
- description: 'Advanced view using composite AST for the query. Use when other node types are insufficient (CTEs, UNIONs, complex subqueries, etc.).',
7
- parameter_schema: {
2
+ "name": "ViewComposite",
3
+ "slug": "view_composite",
4
+ "category": "view",
5
+ "display_name": "Composite View",
6
+ "description": "Advanced view using composite AST for the query. Use when other node types are insufficient (CTEs, UNIONs, complex subqueries, etc.).",
7
+ "parameter_schema": {
8
8
  "type": "object",
9
9
  "properties": {
10
10
  "query_ast": {
@@ -16,5 +16,10 @@ export const ViewComposite = {
16
16
  "query_ast"
17
17
  ]
18
18
  },
19
- tags: ['view', 'advanced', 'composite', 'ast'],
19
+ "tags": [
20
+ "view",
21
+ "advanced",
22
+ "composite",
23
+ "ast"
24
+ ]
20
25
  };
@@ -1,10 +1,10 @@
1
1
  export const ViewFilteredTable = {
2
- name: 'ViewFilteredTable',
3
- slug: 'view_filtered_table',
4
- category: 'view',
5
- display_name: 'Filtered Table',
6
- description: 'Table projection with an Authz* filter baked into the view definition. The view only returns records matching the filter.',
7
- parameter_schema: {
2
+ "name": "ViewFilteredTable",
3
+ "slug": "view_filtered_table",
4
+ "category": "view",
5
+ "display_name": "Filtered Table",
6
+ "description": "Table projection with an Authz* filter baked into the view definition. The view only returns records matching the filter.",
7
+ "parameter_schema": {
8
8
  "type": "object",
9
9
  "properties": {
10
10
  "source_table_id": {
@@ -41,5 +41,9 @@ export const ViewFilteredTable = {
41
41
  "filter_type"
42
42
  ]
43
43
  },
44
- tags: ['view', 'filter', 'authz'],
44
+ "tags": [
45
+ "view",
46
+ "filter",
47
+ "authz"
48
+ ]
45
49
  };
@@ -1,10 +1,10 @@
1
1
  export const ViewJoinedTables = {
2
- name: 'ViewJoinedTables',
3
- slug: 'view_joined_tables',
4
- category: 'view',
5
- display_name: 'Joined Tables',
6
- description: 'View that joins multiple tables together. Supports INNER, LEFT, RIGHT, and FULL joins.',
7
- parameter_schema: {
2
+ "name": "ViewJoinedTables",
3
+ "slug": "view_joined_tables",
4
+ "category": "view",
5
+ "display_name": "Joined Tables",
6
+ "description": "View that joins multiple tables together. Supports INNER, LEFT, RIGHT, and FULL joins.",
7
+ "parameter_schema": {
8
8
  "type": "object",
9
9
  "properties": {
10
10
  "primary_table_id": {
@@ -76,5 +76,8 @@ export const ViewJoinedTables = {
76
76
  "joins"
77
77
  ]
78
78
  },
79
- tags: ['view', 'join'],
79
+ "tags": [
80
+ "view",
81
+ "join"
82
+ ]
80
83
  };
@@ -1,10 +1,10 @@
1
1
  export const ViewTableProjection = {
2
- name: 'ViewTableProjection',
3
- slug: 'view_table_projection',
4
- category: 'view',
5
- display_name: 'Table Projection',
6
- description: 'Simple column selection from a single source table. Projects all or specific fields.',
7
- parameter_schema: {
2
+ "name": "ViewTableProjection",
3
+ "slug": "view_table_projection",
4
+ "category": "view",
5
+ "display_name": "Table Projection",
6
+ "description": "Simple column selection from a single source table. Projects all or specific fields.",
7
+ "parameter_schema": {
8
8
  "type": "object",
9
9
  "properties": {
10
10
  "source_table_id": {
@@ -32,5 +32,8 @@ export const ViewTableProjection = {
32
32
  "source_table_id"
33
33
  ]
34
34
  },
35
- tags: ['view', 'projection'],
35
+ "tags": [
36
+ "view",
37
+ "projection"
38
+ ]
36
39
  };
package/index.d.ts CHANGED
@@ -1,9 +1,7 @@
1
1
  export type { NodeTypeDefinition, JSONSchema } from './types';
2
2
  export * from './authz';
3
3
  export * from './data';
4
- export * from './field';
5
4
  export * from './relation';
6
5
  export * from './view';
7
- export * from './table';
8
6
  import type { NodeTypeDefinition } from './types';
9
7
  export declare const allNodeTypes: NodeTypeDefinition[];
package/index.js CHANGED
@@ -37,24 +37,17 @@ var __importStar = (this && this.__importStar) || (function () {
37
37
  })();
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.allNodeTypes = void 0;
40
- // Re-export all node definitions by category
41
40
  __exportStar(require("./authz"), exports);
42
41
  __exportStar(require("./data"), exports);
43
- __exportStar(require("./field"), exports);
44
42
  __exportStar(require("./relation"), exports);
45
43
  __exportStar(require("./view"), exports);
46
- __exportStar(require("./table"), exports);
47
44
  const authz = __importStar(require("./authz"));
48
45
  const data = __importStar(require("./data"));
49
- const field = __importStar(require("./field"));
50
46
  const relation = __importStar(require("./relation"));
51
47
  const view = __importStar(require("./view"));
52
- const table = __importStar(require("./table"));
53
48
  exports.allNodeTypes = [
54
49
  ...Object.values(authz),
55
50
  ...Object.values(data),
56
- ...Object.values(field),
57
51
  ...Object.values(relation),
58
52
  ...Object.values(view),
59
- ...Object.values(table),
60
53
  ];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "node-type-registry",
3
- "version": "0.2.2",
4
- "description": "Node type definitions for the Constructive blueprint system. Single source of truth for all Authz*, Data*, Field*, Relation*, View*, and Table* node types.",
3
+ "version": "0.3.0",
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",
7
7
  "module": "esm/index.js",
@@ -32,7 +32,7 @@
32
32
  "@pgsql/types": "^17.6.2",
33
33
  "@pgsql/utils": "^17.8.14",
34
34
  "graphile-config": "1.0.0-rc.6",
35
- "graphile-settings": "^4.15.1",
35
+ "graphile-settings": "^4.16.0",
36
36
  "pgsql-deparser": "^17.18.1"
37
37
  },
38
38
  "devDependencies": {
@@ -45,5 +45,5 @@
45
45
  "registry",
46
46
  "graphile"
47
47
  ],
48
- "gitHead": "8366738765a5615ad279eec5b462a291020fef94"
48
+ "gitHead": "b8ed57a447cd71b93094edf362e72b94801e5f3a"
49
49
  }
@@ -2,12 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RelationBelongsTo = void 0;
4
4
  exports.RelationBelongsTo = {
5
- name: 'RelationBelongsTo',
6
- slug: 'relation_belongs_to',
7
- category: 'relation',
8
- display_name: 'Belongs To',
9
- 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.',
10
- parameter_schema: {
5
+ "name": "RelationBelongsTo",
6
+ "slug": "relation_belongs_to",
7
+ "category": "relation",
8
+ "display_name": "Belongs To",
9
+ "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.",
10
+ "parameter_schema": {
11
11
  "type": "object",
12
12
  "properties": {
13
13
  "source_table_id": {
@@ -47,5 +47,9 @@ exports.RelationBelongsTo = {
47
47
  "delete_action"
48
48
  ]
49
49
  },
50
- tags: ['relation', 'foreign_key', 'schema'],
50
+ "tags": [
51
+ "relation",
52
+ "foreign_key",
53
+ "schema"
54
+ ]
51
55
  };
@@ -2,12 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RelationHasMany = void 0;
4
4
  exports.RelationHasMany = {
5
- name: 'RelationHasMany',
6
- slug: 'relation_has_many',
7
- category: 'relation',
8
- display_name: 'Has Many',
9
- description: 'Creates a foreign key field on the target table referencing the source table. Inverse of RelationBelongsTo — same FK, different perspective. "projects has many tasks" creates tasks.project_id. Auto-derives the FK field name from the source table name using inflection. delete_action is required and must be explicitly provided by the caller.',
10
- parameter_schema: {
5
+ "name": "RelationHasMany",
6
+ "slug": "relation_has_many",
7
+ "category": "relation",
8
+ "display_name": "Has Many",
9
+ "description": "Creates a foreign key field on the target table referencing the source table. Inverse of RelationBelongsTo — same FK, different perspective. \"projects has many tasks\" creates tasks.project_id. Auto-derives the FK field name from the source table name using inflection. delete_action is required and must be explicitly provided by the caller.",
10
+ "parameter_schema": {
11
11
  "type": "object",
12
12
  "properties": {
13
13
  "source_table_id": {
@@ -47,5 +47,10 @@ exports.RelationHasMany = {
47
47
  "delete_action"
48
48
  ]
49
49
  },
50
- tags: ['relation', 'foreign_key', 'has_many', 'schema'],
50
+ "tags": [
51
+ "relation",
52
+ "foreign_key",
53
+ "has_many",
54
+ "schema"
55
+ ]
51
56
  };
@@ -2,12 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RelationHasOne = void 0;
4
4
  exports.RelationHasOne = {
5
- name: 'RelationHasOne',
6
- slug: 'relation_has_one',
7
- category: 'relation',
8
- display_name: 'Has One',
9
- description: 'Creates a foreign key field with a unique constraint on the source table referencing the target table. Enforces 1:1 cardinality. Auto-derives the FK field name from the target table name using inflection. delete_action is required and must be explicitly provided by the caller.',
10
- parameter_schema: {
5
+ "name": "RelationHasOne",
6
+ "slug": "relation_has_one",
7
+ "category": "relation",
8
+ "display_name": "Has One",
9
+ "description": "Creates a foreign key field with a unique constraint on the source table referencing the target table. Enforces 1:1 cardinality. Auto-derives the FK field name from the target table name using inflection. delete_action is required and must be explicitly provided by the caller.",
10
+ "parameter_schema": {
11
11
  "type": "object",
12
12
  "properties": {
13
13
  "source_table_id": {
@@ -47,5 +47,10 @@ exports.RelationHasOne = {
47
47
  "delete_action"
48
48
  ]
49
49
  },
50
- tags: ['relation', 'foreign_key', 'unique', 'schema'],
50
+ "tags": [
51
+ "relation",
52
+ "foreign_key",
53
+ "unique",
54
+ "schema"
55
+ ]
51
56
  };
@@ -2,12 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RelationManyToMany = void 0;
4
4
  exports.RelationManyToMany = {
5
- name: 'RelationManyToMany',
6
- slug: 'relation_many_to_many',
7
- category: 'relation',
8
- display_name: 'Many to Many',
9
- description: 'Creates a junction table between source and target tables with auto-derived naming and FK fields. The trigger creates a bare table (no implicit DataId or any node_type), adds FK fields to both tables, optionally creates a composite PK (use_composite_key), then forwards all security config to secure_table_provision as-is. The trigger never injects values the caller did not provide. Junction table FKs always CASCADE on delete.',
10
- parameter_schema: {
5
+ "name": "RelationManyToMany",
6
+ "slug": "relation_many_to_many",
7
+ "category": "relation",
8
+ "display_name": "Many to Many",
9
+ "description": "Creates a junction table between source and target tables with auto-derived naming and FK fields. The trigger creates a bare table (no implicit DataId or any node_type), adds FK fields to both tables, optionally creates a composite PK (use_composite_key), then forwards all security config to secure_table_provision as-is. The trigger never injects values the caller did not provide. Junction table FKs always CASCADE on delete.",
10
+ "parameter_schema": {
11
11
  "type": "object",
12
12
  "properties": {
13
13
  "source_table_id": {
@@ -91,5 +91,10 @@ exports.RelationManyToMany = {
91
91
  "target_table_id"
92
92
  ]
93
93
  },
94
- tags: ['relation', 'junction', 'many_to_many', 'schema'],
94
+ "tags": [
95
+ "relation",
96
+ "junction",
97
+ "many_to_many",
98
+ "schema"
99
+ ]
95
100
  };
@@ -2,12 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ViewAggregated = void 0;
4
4
  exports.ViewAggregated = {
5
- name: 'ViewAggregated',
6
- slug: 'view_aggregated',
7
- category: 'view',
8
- display_name: 'Aggregated View',
9
- description: 'View with GROUP BY and aggregate functions. Useful for summary/reporting views.',
10
- parameter_schema: {
5
+ "name": "ViewAggregated",
6
+ "slug": "view_aggregated",
7
+ "category": "view",
8
+ "display_name": "Aggregated View",
9
+ "description": "View with GROUP BY and aggregate functions. Useful for summary/reporting views.",
10
+ "parameter_schema": {
11
11
  "type": "object",
12
12
  "properties": {
13
13
  "source_table_id": {
@@ -60,5 +60,9 @@ exports.ViewAggregated = {
60
60
  "aggregates"
61
61
  ]
62
62
  },
63
- tags: ['view', 'aggregate', 'reporting'],
63
+ "tags": [
64
+ "view",
65
+ "aggregate",
66
+ "reporting"
67
+ ]
64
68
  };