node-type-registry 0.19.0 → 0.20.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 +39 -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 +57 -55
  14. package/authz/authz-related-member-list.js +35 -32
  15. package/authz/authz-related-peer-ownership.js +62 -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 +39 -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 +57 -55
  65. package/esm/authz/authz-related-member-list.js +35 -32
  66. package/esm/authz/authz-related-peer-ownership.js +62 -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
@@ -2,19 +2,19 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TableOrganizationSettings = void 0;
4
4
  exports.TableOrganizationSettings = {
5
- "name": "TableOrganizationSettings",
6
- "slug": "table_organization_settings",
7
- "category": "data",
8
- "display_name": "Organization Settings",
9
- "description": "Creates an organization settings table with standard business fields (legal_name, address fields). Uses AuthzEntityMembership for access control.",
10
- "parameter_schema": {
11
- "type": "object",
12
- "properties": {}
5
+ name: 'TableOrganizationSettings',
6
+ slug: 'table_organization_settings',
7
+ category: 'data',
8
+ display_name: 'Organization Settings',
9
+ description: 'Creates an organization settings table with standard business fields (legal_name, address fields). Uses AuthzEntityMembership for access control.',
10
+ parameter_schema: {
11
+ type: 'object',
12
+ properties: {}
13
13
  },
14
- "tags": [
15
- "template",
16
- "settings",
17
- "membership",
18
- "schema"
14
+ tags: [
15
+ 'template',
16
+ 'settings',
17
+ 'membership',
18
+ 'schema'
19
19
  ]
20
20
  };
@@ -2,19 +2,19 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TableUserProfiles = void 0;
4
4
  exports.TableUserProfiles = {
5
- "name": "TableUserProfiles",
6
- "slug": "table_user_profiles",
7
- "category": "data",
8
- "display_name": "User Profiles",
9
- "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.",
10
- "parameter_schema": {
11
- "type": "object",
12
- "properties": {}
5
+ name: 'TableUserProfiles',
6
+ slug: 'table_user_profiles',
7
+ category: 'data',
8
+ display_name: 'User Profiles',
9
+ 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.',
10
+ parameter_schema: {
11
+ type: 'object',
12
+ properties: {}
13
13
  },
14
- "tags": [
15
- "template",
16
- "settings",
17
- "ownership",
18
- "schema"
14
+ tags: [
15
+ 'template',
16
+ 'settings',
17
+ 'ownership',
18
+ 'schema'
19
19
  ]
20
20
  };
@@ -2,19 +2,19 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TableUserSettings = void 0;
4
4
  exports.TableUserSettings = {
5
- "name": "TableUserSettings",
6
- "slug": "table_user_settings",
7
- "category": "data",
8
- "display_name": "User Settings",
9
- "description": "Creates a user settings table for user-specific configuration. Uses AuthzDirectOwner for access control.",
10
- "parameter_schema": {
11
- "type": "object",
12
- "properties": {}
5
+ name: 'TableUserSettings',
6
+ slug: 'table_user_settings',
7
+ category: 'data',
8
+ display_name: 'User Settings',
9
+ description: 'Creates a user settings table for user-specific configuration. Uses AuthzDirectOwner for access control.',
10
+ parameter_schema: {
11
+ type: 'object',
12
+ properties: {}
13
13
  },
14
- "tags": [
15
- "template",
16
- "settings",
17
- "ownership",
18
- "schema"
14
+ tags: [
15
+ 'template',
16
+ 'settings',
17
+ 'ownership',
18
+ 'schema'
19
19
  ]
20
20
  };
@@ -1,14 +1,14 @@
1
1
  export const AuthzAllowAll = {
2
- "name": "AuthzAllowAll",
3
- "slug": "authz_allow_all",
4
- "category": "authz",
5
- "display_name": "Public Access",
6
- "description": "Allows all access. Generates TRUE expression.",
7
- "parameter_schema": {
8
- "type": "object",
9
- "properties": {}
2
+ name: 'AuthzAllowAll',
3
+ slug: 'authz_allow_all',
4
+ category: 'authz',
5
+ display_name: 'Public Access',
6
+ description: 'Allows all access. Generates TRUE expression.',
7
+ parameter_schema: {
8
+ type: 'object',
9
+ properties: {}
10
10
  },
11
- "tags": [
12
- "authz"
11
+ tags: [
12
+ 'authz'
13
13
  ]
14
14
  };
@@ -1,39 +1,39 @@
1
1
  export const AuthzComposite = {
2
- "name": "AuthzComposite",
3
- "slug": "authz_composite",
4
- "category": "authz",
5
- "display_name": "Composite Policy",
6
- "description": "Composite authorization policy that combines multiple authorization nodes using boolean logic (AND/OR). The data field contains a JSONB AST with nested authorization nodes.",
7
- "parameter_schema": {
8
- "type": "object",
9
- "description": "A composite policy containing nested authorization nodes combined with boolean logic",
10
- "properties": {
11
- "BoolExpr": {
12
- "type": "object",
13
- "description": "Boolean expression combining multiple authorization nodes",
14
- "properties": {
15
- "boolop": {
16
- "type": "string",
17
- "enum": [
18
- "AND_EXPR",
19
- "OR_EXPR",
20
- "NOT_EXPR"
2
+ name: 'AuthzComposite',
3
+ slug: 'authz_composite',
4
+ category: 'authz',
5
+ display_name: 'Composite Policy',
6
+ description: 'Composite authorization policy that combines multiple authorization nodes using boolean logic (AND/OR). The data field contains a JSONB AST with nested authorization nodes.',
7
+ parameter_schema: {
8
+ type: 'object',
9
+ description: 'A composite policy containing nested authorization nodes combined with boolean logic',
10
+ properties: {
11
+ BoolExpr: {
12
+ type: 'object',
13
+ description: 'Boolean expression combining multiple authorization nodes',
14
+ properties: {
15
+ boolop: {
16
+ type: 'string',
17
+ enum: [
18
+ 'AND_EXPR',
19
+ 'OR_EXPR',
20
+ 'NOT_EXPR'
21
21
  ],
22
- "description": "Boolean operator: AND_EXPR, OR_EXPR, or NOT_EXPR"
22
+ description: 'Boolean operator: AND_EXPR, OR_EXPR, or NOT_EXPR'
23
23
  },
24
- "args": {
25
- "type": "array",
26
- "description": "Array of authorization nodes to combine",
27
- "items": {
28
- "type": "object"
24
+ args: {
25
+ type: 'array',
26
+ description: 'Array of authorization nodes to combine',
27
+ items: {
28
+ type: 'object'
29
29
  }
30
30
  }
31
31
  }
32
32
  }
33
33
  }
34
34
  },
35
- "tags": [
36
- "composite",
37
- "authz"
35
+ tags: [
36
+ 'composite',
37
+ 'authz'
38
38
  ]
39
39
  };
@@ -1,14 +1,14 @@
1
1
  export const AuthzDenyAll = {
2
- "name": "AuthzDenyAll",
3
- "slug": "authz_deny_all",
4
- "category": "authz",
5
- "display_name": "No Access",
6
- "description": "Denies all access. Generates FALSE expression.",
7
- "parameter_schema": {
8
- "type": "object",
9
- "properties": {}
2
+ name: 'AuthzDenyAll',
3
+ slug: 'authz_deny_all',
4
+ category: 'authz',
5
+ display_name: 'No Access',
6
+ description: 'Denies all access. Generates FALSE expression.',
7
+ parameter_schema: {
8
+ type: 'object',
9
+ properties: {}
10
10
  },
11
- "tags": [
12
- "authz"
11
+ tags: [
12
+ 'authz'
13
13
  ]
14
14
  };
@@ -1,26 +1,27 @@
1
1
  export const AuthzDirectOwnerAny = {
2
- "name": "AuthzDirectOwnerAny",
3
- "slug": "authz_direct_owner_any",
4
- "category": "authz",
5
- "display_name": "Multi-Owner Access",
6
- "description": "OR logic for multiple ownership fields. Checks if current user matches any of the specified fields.",
7
- "parameter_schema": {
8
- "type": "object",
9
- "properties": {
10
- "entity_fields": {
11
- "type": "array",
12
- "items": {
13
- "type": "string"
2
+ name: 'AuthzDirectOwnerAny',
3
+ slug: 'authz_direct_owner_any',
4
+ category: 'authz',
5
+ display_name: 'Multi-Owner Access',
6
+ description: 'OR logic for multiple ownership fields. Checks if current user matches any of the specified fields.',
7
+ parameter_schema: {
8
+ type: 'object',
9
+ properties: {
10
+ entity_fields: {
11
+ type: 'array',
12
+ items: {
13
+ type: 'string',
14
+ format: 'column-ref'
14
15
  },
15
- "description": "Array of column names to check for ownership"
16
+ description: 'Array of column names to check for ownership'
16
17
  }
17
18
  },
18
- "required": [
19
- "entity_fields"
19
+ required: [
20
+ 'entity_fields'
20
21
  ]
21
22
  },
22
- "tags": [
23
- "ownership",
24
- "authz"
23
+ tags: [
24
+ 'ownership',
25
+ 'authz'
25
26
  ]
26
27
  };
@@ -1,23 +1,24 @@
1
1
  export const AuthzDirectOwner = {
2
- "name": "AuthzDirectOwner",
3
- "slug": "authz_direct_owner",
4
- "category": "authz",
5
- "display_name": "Direct Ownership",
6
- "description": "Direct equality comparison between a table column and the current user ID. Simplest authorization pattern with no subqueries.",
7
- "parameter_schema": {
8
- "type": "object",
9
- "properties": {
10
- "entity_field": {
11
- "type": "string",
12
- "description": "Column name containing the owner user ID (e.g., owner_id)"
2
+ name: 'AuthzDirectOwner',
3
+ slug: 'authz_direct_owner',
4
+ category: 'authz',
5
+ display_name: 'Direct Ownership',
6
+ description: 'Direct equality comparison between a table column and the current user ID. Simplest authorization pattern with no subqueries.',
7
+ parameter_schema: {
8
+ type: 'object',
9
+ properties: {
10
+ entity_field: {
11
+ type: 'string',
12
+ format: 'column-ref',
13
+ description: 'Column name containing the owner user ID (e.g., owner_id)'
13
14
  }
14
15
  },
15
- "required": [
16
- "entity_field"
16
+ required: [
17
+ 'entity_field'
17
18
  ]
18
19
  },
19
- "tags": [
20
- "ownership",
21
- "authz"
20
+ tags: [
21
+ 'ownership',
22
+ 'authz'
22
23
  ]
23
24
  };
@@ -1,53 +1,54 @@
1
1
  export const AuthzEntityMembership = {
2
- "name": "AuthzEntityMembership",
3
- "slug": "authz_entity_membership",
4
- "category": "authz",
5
- "display_name": "Entity Membership",
6
- "description": "Membership check scoped by a field on the row through the SPRT table. Verifies user has membership in the entity referenced by the row.",
7
- "parameter_schema": {
8
- "type": "object",
9
- "properties": {
10
- "entity_field": {
11
- "type": "string",
12
- "description": "Column name referencing the entity (e.g., entity_id, org_id)"
2
+ name: 'AuthzEntityMembership',
3
+ slug: 'authz_entity_membership',
4
+ category: 'authz',
5
+ display_name: 'Entity Membership',
6
+ description: 'Membership check scoped by a field on the row through the SPRT table. Verifies user has membership in the entity referenced by the row.',
7
+ parameter_schema: {
8
+ type: 'object',
9
+ properties: {
10
+ entity_field: {
11
+ type: 'string',
12
+ format: 'column-ref',
13
+ description: 'Column name referencing the entity (e.g., entity_id, org_id)'
13
14
  },
14
- "membership_type": {
15
- "type": [
16
- "integer",
17
- "string"
15
+ membership_type: {
16
+ type: [
17
+ 'integer',
18
+ 'string'
18
19
  ],
19
- "description": "Scope: 1=app, 2=org, 3+=dynamic entity types (or string name resolved via membership_types_module)"
20
+ description: 'Scope: 1=app, 2=org, 3+=dynamic entity types (or string name resolved via membership_types_module)'
20
21
  },
21
- "entity_type": {
22
- "type": "string",
23
- "description": "Entity type prefix (e.g. 'channel', 'department'). Resolved to membership_type integer via memberships_module lookup. Use instead of membership_type for readability."
22
+ entity_type: {
23
+ type: 'string',
24
+ description: "Entity type prefix (e.g. 'channel', 'department'). Resolved to membership_type integer via memberships_module lookup. Use instead of membership_type for readability."
24
25
  },
25
- "permission": {
26
- "type": "string",
27
- "description": "Single permission name to check (resolved to bitstring mask)"
26
+ permission: {
27
+ type: 'string',
28
+ description: 'Single permission name to check (resolved to bitstring mask)'
28
29
  },
29
- "permissions": {
30
- "type": "array",
31
- "items": {
32
- "type": "string"
30
+ permissions: {
31
+ type: 'array',
32
+ items: {
33
+ type: 'string'
33
34
  },
34
- "description": "Multiple permission names to check (ORed together into mask)"
35
+ description: 'Multiple permission names to check (ORed together into mask)'
35
36
  },
36
- "is_admin": {
37
- "type": "boolean",
38
- "description": "If true, require is_admin flag"
37
+ is_admin: {
38
+ type: 'boolean',
39
+ description: 'If true, require is_admin flag'
39
40
  },
40
- "is_owner": {
41
- "type": "boolean",
42
- "description": "If true, require is_owner flag"
41
+ is_owner: {
42
+ type: 'boolean',
43
+ description: 'If true, require is_owner flag'
43
44
  }
44
45
  },
45
- "required": [
46
- "entity_field"
46
+ required: [
47
+ 'entity_field'
47
48
  ]
48
49
  },
49
- "tags": [
50
- "membership",
51
- "authz"
50
+ tags: [
51
+ 'membership',
52
+ 'authz'
52
53
  ]
53
54
  };
@@ -1,23 +1,24 @@
1
1
  export const AuthzMemberList = {
2
- "name": "AuthzMemberList",
3
- "slug": "authz_member_list",
4
- "category": "authz",
5
- "display_name": "Member List",
6
- "description": "Check if current user is in an array column on the same row.",
7
- "parameter_schema": {
8
- "type": "object",
9
- "properties": {
10
- "array_field": {
11
- "type": "string",
12
- "description": "Column name containing the array of user IDs"
2
+ name: 'AuthzMemberList',
3
+ slug: 'authz_member_list',
4
+ category: 'authz',
5
+ display_name: 'Member List',
6
+ description: 'Check if current user is in an array column on the same row.',
7
+ parameter_schema: {
8
+ type: 'object',
9
+ properties: {
10
+ array_field: {
11
+ type: 'string',
12
+ format: 'column-ref',
13
+ description: 'Column name containing the array of user IDs'
13
14
  }
14
15
  },
15
- "required": [
16
- "array_field"
16
+ required: [
17
+ 'array_field'
17
18
  ]
18
19
  },
19
- "tags": [
20
- "ownership",
21
- "authz"
20
+ tags: [
21
+ 'ownership',
22
+ 'authz'
22
23
  ]
23
24
  };
@@ -1,47 +1,47 @@
1
1
  export const AuthzMembership = {
2
- "name": "AuthzMembership",
3
- "slug": "authz_membership_check",
4
- "category": "authz",
5
- "display_name": "Membership Check",
6
- "description": "Membership check that verifies the user has membership (optionally with specific permission) without binding to any entity from the row. Uses EXISTS subquery against SPRT table.",
7
- "parameter_schema": {
8
- "type": "object",
9
- "properties": {
10
- "membership_type": {
11
- "type": [
12
- "integer",
13
- "string"
2
+ name: 'AuthzMembership',
3
+ slug: 'authz_membership_check',
4
+ category: 'authz',
5
+ display_name: 'Membership Check',
6
+ description: 'Membership check that verifies the user has membership (optionally with specific permission) without binding to any entity from the row. Uses EXISTS subquery against SPRT table.',
7
+ parameter_schema: {
8
+ type: 'object',
9
+ properties: {
10
+ membership_type: {
11
+ type: [
12
+ 'integer',
13
+ 'string'
14
14
  ],
15
- "description": "Scope: 1=app, 2=org, 3+=dynamic entity types (or string name resolved via membership_types_module)"
15
+ description: 'Scope: 1=app, 2=org, 3+=dynamic entity types (or string name resolved via membership_types_module)'
16
16
  },
17
- "entity_type": {
18
- "type": "string",
19
- "description": "Entity type prefix (e.g. 'channel', 'department'). Resolved to membership_type integer via memberships_module lookup. Use instead of membership_type for readability."
17
+ entity_type: {
18
+ type: 'string',
19
+ description: "Entity type prefix (e.g. 'channel', 'department'). Resolved to membership_type integer via memberships_module lookup. Use instead of membership_type for readability."
20
20
  },
21
- "permission": {
22
- "type": "string",
23
- "description": "Single permission name to check (resolved to bitstring mask)"
21
+ permission: {
22
+ type: 'string',
23
+ description: 'Single permission name to check (resolved to bitstring mask)'
24
24
  },
25
- "permissions": {
26
- "type": "array",
27
- "items": {
28
- "type": "string"
25
+ permissions: {
26
+ type: 'array',
27
+ items: {
28
+ type: 'string'
29
29
  },
30
- "description": "Multiple permission names to check (ORed together into mask)"
30
+ description: 'Multiple permission names to check (ORed together into mask)'
31
31
  },
32
- "is_admin": {
33
- "type": "boolean",
34
- "description": "If true, require is_admin flag"
32
+ is_admin: {
33
+ type: 'boolean',
34
+ description: 'If true, require is_admin flag'
35
35
  },
36
- "is_owner": {
37
- "type": "boolean",
38
- "description": "If true, require is_owner flag"
36
+ is_owner: {
37
+ type: 'boolean',
38
+ description: 'If true, require is_owner flag'
39
39
  }
40
40
  },
41
- "required": []
41
+ required: []
42
42
  },
43
- "tags": [
44
- "membership",
45
- "authz"
43
+ tags: [
44
+ 'membership',
45
+ 'authz'
46
46
  ]
47
47
  };
@@ -1,31 +1,32 @@
1
1
  export const AuthzNotReadOnly = {
2
- "name": "AuthzNotReadOnly",
3
- "slug": "authz_not_read_only",
4
- "category": "authz",
5
- "display_name": "Not Read-Only",
6
- "description": "Restrictive policy that blocks read-only members from mutations. Checks actor_id + is_read_only IS NOT TRUE on the SPRT. Designed to run as a restrictive counterpart after a permissive AuthzEntityMembership policy has already verified membership.",
7
- "parameter_schema": {
8
- "type": "object",
9
- "properties": {
10
- "entity_field": {
11
- "type": "string",
12
- "description": "Column name referencing the entity (e.g., entity_id, org_id)"
2
+ name: 'AuthzNotReadOnly',
3
+ slug: 'authz_not_read_only',
4
+ category: 'authz',
5
+ display_name: 'Not Read-Only',
6
+ description: 'Restrictive policy that blocks read-only members from mutations. Checks actor_id + is_read_only IS NOT TRUE on the SPRT. Designed to run as a restrictive counterpart after a permissive AuthzEntityMembership policy has already verified membership.',
7
+ parameter_schema: {
8
+ type: 'object',
9
+ properties: {
10
+ entity_field: {
11
+ type: 'string',
12
+ format: 'column-ref',
13
+ description: 'Column name referencing the entity (e.g., entity_id, org_id)'
13
14
  },
14
- "membership_type": {
15
- "type": [
16
- "integer",
17
- "string"
15
+ membership_type: {
16
+ type: [
17
+ 'integer',
18
+ 'string'
18
19
  ],
19
- "description": "Scope: 2=org, 3+=dynamic entity types. Must be >= 2 (entity-scoped)."
20
+ description: 'Scope: 2=org, 3+=dynamic entity types. Must be >= 2 (entity-scoped).'
20
21
  }
21
22
  },
22
- "required": [
23
- "entity_field"
23
+ required: [
24
+ 'entity_field'
24
25
  ]
25
26
  },
26
- "tags": [
27
- "membership",
28
- "authz",
29
- "restrictive"
27
+ tags: [
28
+ 'membership',
29
+ 'authz',
30
+ 'restrictive'
30
31
  ]
31
32
  };