node-type-registry 0.18.1 → 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.
- package/authz/authz-allow-all.js +10 -10
- package/authz/authz-composite.js +28 -28
- package/authz/authz-deny-all.js +10 -10
- package/authz/authz-direct-owner-any.js +19 -18
- package/authz/authz-direct-owner.js +17 -16
- package/authz/authz-entity-membership.js +39 -38
- package/authz/authz-member-list.js +17 -16
- package/authz/authz-membership-check.js +34 -34
- package/authz/authz-not-read-only.js +23 -22
- package/authz/authz-org-hierarchy.js +33 -31
- package/authz/authz-peer-ownership.js +40 -39
- package/authz/authz-publishable.js +26 -24
- package/authz/authz-related-entity-membership.js +57 -55
- package/authz/authz-related-member-list.js +35 -32
- package/authz/authz-related-peer-ownership.js +62 -59
- package/authz/authz-temporal.js +32 -30
- package/authz/index.d.ts +9 -9
- package/authz/index.js +19 -19
- package/blueprint-types.generated.d.ts +10 -17
- package/blueprint-types.generated.js +1 -1
- package/codegen/generate-types.js +10 -21
- package/data/data-composite-field.js +27 -25
- package/data/data-direct-owner.js +24 -23
- package/data/data-entity-membership.js +24 -23
- package/data/data-force-current-user.js +17 -16
- package/data/data-id.js +16 -15
- package/data/data-immutable-fields.js +20 -19
- package/data/data-inflection.js +33 -32
- package/data/data-inherit-from-parent.js +31 -29
- package/data/data-job-trigger.js +87 -84
- package/data/data-jsonb.js +27 -26
- package/data/data-owned-fields.js +25 -23
- package/data/data-ownership-in-entity.js +21 -21
- package/data/data-peoplestamps.js +19 -19
- package/data/data-publishable.js +16 -16
- package/data/data-slug.js +21 -19
- package/data/data-soft-delete.js +14 -14
- package/data/data-status-field.js +32 -31
- package/data/data-tags.js +23 -22
- package/data/data-timestamps.js +15 -15
- package/data/index.d.ts +17 -17
- package/data/index.js +35 -35
- package/data/search-bm25.js +34 -33
- package/data/search-full-text.js +49 -47
- package/data/search-spatial-aggregate.js +77 -74
- package/data/search-spatial.js +51 -50
- package/data/search-trgm.js +20 -19
- package/data/search-unified.js +170 -162
- package/data/search-vector.js +104 -101
- package/data/table-organization-settings.js +13 -13
- package/data/table-user-profiles.js +13 -13
- package/data/table-user-settings.js +13 -13
- package/esm/authz/authz-allow-all.js +10 -10
- package/esm/authz/authz-composite.js +28 -28
- package/esm/authz/authz-deny-all.js +10 -10
- package/esm/authz/authz-direct-owner-any.js +19 -18
- package/esm/authz/authz-direct-owner.js +17 -16
- package/esm/authz/authz-entity-membership.js +39 -38
- package/esm/authz/authz-member-list.js +17 -16
- package/esm/authz/authz-membership-check.js +34 -34
- package/esm/authz/authz-not-read-only.js +23 -22
- package/esm/authz/authz-org-hierarchy.js +33 -31
- package/esm/authz/authz-peer-ownership.js +40 -39
- package/esm/authz/authz-publishable.js +26 -24
- package/esm/authz/authz-related-entity-membership.js +57 -55
- package/esm/authz/authz-related-member-list.js +35 -32
- package/esm/authz/authz-related-peer-ownership.js +62 -59
- package/esm/authz/authz-temporal.js +32 -30
- package/esm/authz/index.d.ts +9 -9
- package/esm/authz/index.js +9 -9
- package/esm/blueprint-types.generated.d.ts +10 -17
- package/esm/blueprint-types.generated.js +1 -1
- package/esm/codegen/generate-types.js +10 -21
- package/esm/data/data-composite-field.js +27 -25
- package/esm/data/data-direct-owner.js +24 -23
- package/esm/data/data-entity-membership.js +24 -23
- package/esm/data/data-force-current-user.js +17 -16
- package/esm/data/data-id.js +16 -15
- package/esm/data/data-immutable-fields.js +20 -19
- package/esm/data/data-inflection.js +33 -32
- package/esm/data/data-inherit-from-parent.js +31 -29
- package/esm/data/data-job-trigger.js +87 -84
- package/esm/data/data-jsonb.js +27 -26
- package/esm/data/data-owned-fields.js +25 -23
- package/esm/data/data-ownership-in-entity.js +21 -21
- package/esm/data/data-peoplestamps.js +19 -19
- package/esm/data/data-publishable.js +16 -16
- package/esm/data/data-slug.js +21 -19
- package/esm/data/data-soft-delete.js +14 -14
- package/esm/data/data-status-field.js +32 -31
- package/esm/data/data-tags.js +23 -22
- package/esm/data/data-timestamps.js +15 -15
- package/esm/data/index.d.ts +17 -17
- package/esm/data/index.js +17 -17
- package/esm/data/search-bm25.js +34 -33
- package/esm/data/search-full-text.js +49 -47
- package/esm/data/search-spatial-aggregate.js +77 -74
- package/esm/data/search-spatial.js +51 -50
- package/esm/data/search-trgm.js +20 -19
- package/esm/data/search-unified.js +170 -162
- package/esm/data/search-vector.js +104 -101
- package/esm/data/table-organization-settings.js +13 -13
- package/esm/data/table-user-profiles.js +13 -13
- package/esm/data/table-user-settings.js +13 -13
- package/esm/index.d.ts +3 -3
- package/esm/index.js +3 -3
- package/esm/module-presets/auth-email-magic.js +2 -2
- package/esm/module-presets/auth-email.js +8 -8
- package/esm/module-presets/auth-passkey.js +4 -4
- package/esm/module-presets/auth-sso.js +7 -7
- package/esm/module-presets/full.js +1 -1
- package/esm/module-presets/index.d.ts +5 -5
- package/esm/module-presets/index.js +4 -4
- package/esm/relation/index.d.ts +1 -1
- package/esm/relation/index.js +1 -1
- package/esm/relation/relation-belongs-to.js +41 -40
- package/esm/relation/relation-has-many.js +42 -41
- package/esm/relation/relation-has-one.js +42 -41
- package/esm/relation/relation-many-to-many.js +70 -68
- package/esm/relation/relation-spatial.js +54 -54
- package/esm/view/index.d.ts +3 -3
- package/esm/view/index.js +3 -3
- package/esm/view/view-aggregated.js +50 -48
- package/esm/view/view-composite.js +18 -18
- package/esm/view/view-filtered-table.js +37 -36
- package/esm/view/view-joined-tables.js +65 -61
- package/esm/view/view-table-projection.js +29 -28
- package/index.d.ts +3 -3
- package/index.js +3 -3
- package/module-presets/auth-email-magic.js +2 -2
- package/module-presets/auth-email.js +8 -8
- package/module-presets/auth-passkey.js +4 -4
- package/module-presets/auth-sso.js +7 -7
- package/module-presets/full.js +1 -1
- package/module-presets/index.d.ts +5 -5
- package/module-presets/index.js +7 -7
- package/package.json +2 -2
- package/relation/index.d.ts +1 -1
- package/relation/index.js +3 -3
- package/relation/relation-belongs-to.js +41 -40
- package/relation/relation-has-many.js +42 -41
- package/relation/relation-has-one.js +42 -41
- package/relation/relation-many-to-many.js +70 -68
- package/relation/relation-spatial.js +54 -54
- package/view/index.d.ts +3 -3
- package/view/index.js +7 -7
- package/view/view-aggregated.js +50 -48
- package/view/view-composite.js +18 -18
- package/view/view-filtered-table.js +37 -36
- package/view/view-joined-tables.js +65 -61
- package/view/view-table-projection.js +29 -28
package/data/data-inflection.js
CHANGED
|
@@ -2,44 +2,45 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DataInflection = void 0;
|
|
4
4
|
exports.DataInflection = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
5
|
+
name: 'DataInflection',
|
|
6
|
+
slug: 'data_inflection',
|
|
7
|
+
category: 'data',
|
|
8
|
+
display_name: 'Inflection',
|
|
9
|
+
description: 'Transforms field values using inflection operations (snake_case, camelCase, slugify, plural, singular, etc). Attaches BEFORE INSERT and BEFORE UPDATE triggers. References fields by name in data jsonb.',
|
|
10
|
+
parameter_schema: {
|
|
11
|
+
type: 'object',
|
|
12
|
+
properties: {
|
|
13
|
+
field_name: {
|
|
14
|
+
type: 'string',
|
|
15
|
+
format: 'column-ref',
|
|
16
|
+
description: 'Name of the field to transform'
|
|
16
17
|
},
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
18
|
+
ops: {
|
|
19
|
+
type: 'array',
|
|
20
|
+
items: {
|
|
21
|
+
type: 'string',
|
|
22
|
+
enum: [
|
|
23
|
+
'plural',
|
|
24
|
+
'singular',
|
|
25
|
+
'camel',
|
|
26
|
+
'pascal',
|
|
27
|
+
'dashed',
|
|
28
|
+
'slugify',
|
|
29
|
+
'underscore',
|
|
30
|
+
'lower',
|
|
31
|
+
'upper'
|
|
31
32
|
]
|
|
32
33
|
},
|
|
33
|
-
|
|
34
|
+
description: 'Inflection operations to apply in order'
|
|
34
35
|
}
|
|
35
36
|
},
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
required: [
|
|
38
|
+
'field_name',
|
|
39
|
+
'ops'
|
|
39
40
|
]
|
|
40
41
|
},
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
tags: [
|
|
43
|
+
'transform',
|
|
44
|
+
'behavior'
|
|
44
45
|
]
|
|
45
46
|
};
|
|
@@ -2,42 +2,44 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DataInheritFromParent = void 0;
|
|
4
4
|
exports.DataInheritFromParent = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
5
|
+
name: 'DataInheritFromParent',
|
|
6
|
+
slug: 'data_inherit_from_parent',
|
|
7
|
+
category: 'data',
|
|
8
|
+
display_name: 'Inherit From Parent',
|
|
9
|
+
description: 'BEFORE INSERT trigger that copies specified fields from a parent table via a foreign key. The parent row is looked up through RLS (SECURITY INVOKER), so the insert fails if the caller cannot see the parent. Used by the storage module to inherit owner_id and is_public from buckets to files.',
|
|
10
|
+
parameter_schema: {
|
|
11
|
+
type: 'object',
|
|
12
|
+
properties: {
|
|
13
|
+
parent_fk_field: {
|
|
14
|
+
type: 'string',
|
|
15
|
+
format: 'column-ref',
|
|
16
|
+
description: 'Name of the FK field on this table that references the parent (e.g. bucket_id)'
|
|
16
17
|
},
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
fields: {
|
|
19
|
+
type: 'array',
|
|
20
|
+
items: {
|
|
21
|
+
type: 'string',
|
|
22
|
+
format: 'column-ref'
|
|
21
23
|
},
|
|
22
|
-
|
|
24
|
+
description: 'Field names to copy from the parent row (e.g. ["owner_id", "is_public"])'
|
|
23
25
|
},
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
parent_table: {
|
|
27
|
+
type: 'string',
|
|
28
|
+
description: 'Parent table name (optional fallback if FK not yet registered in metaschema)'
|
|
27
29
|
},
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
parent_schema: {
|
|
31
|
+
type: 'string',
|
|
32
|
+
description: 'Parent table schema (optional, defaults to same schema as child table)'
|
|
31
33
|
}
|
|
32
34
|
},
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
35
|
+
required: [
|
|
36
|
+
'parent_fk_field',
|
|
37
|
+
'fields'
|
|
36
38
|
]
|
|
37
39
|
},
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
tags: [
|
|
41
|
+
'trigger',
|
|
42
|
+
'inheritance',
|
|
43
|
+
'schema'
|
|
42
44
|
]
|
|
43
45
|
};
|
package/data/data-job-trigger.js
CHANGED
|
@@ -2,114 +2,117 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DataJobTrigger = void 0;
|
|
4
4
|
exports.DataJobTrigger = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
5
|
+
name: 'DataJobTrigger',
|
|
6
|
+
slug: 'data_job_trigger',
|
|
7
|
+
category: 'data',
|
|
8
|
+
display_name: 'Job Trigger',
|
|
9
|
+
description: 'Dynamically creates PostgreSQL triggers that enqueue jobs via app_jobs.add_job() when table rows are inserted, updated, or deleted. Supports configurable payload strategies (full row, row ID, selected fields, or custom mapping), conditional firing via WHEN clauses, watched field changes, and extended job options (queue, priority, delay, max attempts).',
|
|
10
|
+
parameter_schema: {
|
|
11
|
+
type: 'object',
|
|
12
|
+
properties: {
|
|
13
|
+
task_identifier: {
|
|
14
|
+
type: 'string',
|
|
15
|
+
description: 'Job task identifier passed to add_job (e.g., process_invoice, sync_to_stripe)'
|
|
16
16
|
},
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
payload_strategy: {
|
|
18
|
+
type: 'string',
|
|
19
|
+
enum: [
|
|
20
|
+
'row',
|
|
21
|
+
'row_id',
|
|
22
|
+
'fields',
|
|
23
|
+
'custom'
|
|
24
24
|
],
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
description: 'How to build the job payload: row (full NEW/OLD), row_id (just id), fields (selected columns), custom (mapped columns)',
|
|
26
|
+
default: 'row_id'
|
|
27
27
|
},
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
payload_fields: {
|
|
29
|
+
type: 'array',
|
|
30
|
+
items: {
|
|
31
|
+
type: 'string',
|
|
32
|
+
format: 'column-ref'
|
|
32
33
|
},
|
|
33
|
-
|
|
34
|
+
description: 'Column names to include in payload (only for fields strategy)'
|
|
34
35
|
},
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
payload_custom: {
|
|
37
|
+
type: 'object',
|
|
38
|
+
additionalProperties: {
|
|
39
|
+
type: 'string'
|
|
39
40
|
},
|
|
40
|
-
|
|
41
|
+
description: 'Key-to-column mapping for custom payload (e.g., {"invoice_id": "id", "total": "amount"})'
|
|
41
42
|
},
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
43
|
+
events: {
|
|
44
|
+
type: 'array',
|
|
45
|
+
items: {
|
|
46
|
+
type: 'string',
|
|
47
|
+
enum: [
|
|
48
|
+
'INSERT',
|
|
49
|
+
'UPDATE',
|
|
50
|
+
'DELETE'
|
|
50
51
|
]
|
|
51
52
|
},
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
description: 'Trigger events to create',
|
|
54
|
+
default: [
|
|
55
|
+
'INSERT',
|
|
56
|
+
'UPDATE'
|
|
56
57
|
]
|
|
57
58
|
},
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
59
|
+
include_old: {
|
|
60
|
+
type: 'boolean',
|
|
61
|
+
description: 'Include OLD row in payload (for UPDATE triggers)',
|
|
62
|
+
default: false
|
|
62
63
|
},
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
include_meta: {
|
|
65
|
+
type: 'boolean',
|
|
66
|
+
description: 'Include table/schema metadata in payload',
|
|
67
|
+
default: false
|
|
67
68
|
},
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
condition_field: {
|
|
70
|
+
type: 'string',
|
|
71
|
+
format: 'column-ref',
|
|
72
|
+
description: 'Column name for conditional WHEN clause (fires only when field equals condition_value)'
|
|
71
73
|
},
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
74
|
+
condition_value: {
|
|
75
|
+
type: 'string',
|
|
76
|
+
description: 'Value to compare against condition_field in WHEN clause'
|
|
75
77
|
},
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
watch_fields: {
|
|
79
|
+
type: 'array',
|
|
80
|
+
items: {
|
|
81
|
+
type: 'string',
|
|
82
|
+
format: 'column-ref'
|
|
80
83
|
},
|
|
81
|
-
|
|
84
|
+
description: 'For UPDATE triggers, only fire when these fields change (uses DISTINCT FROM)'
|
|
82
85
|
},
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
+
job_key: {
|
|
87
|
+
type: 'string',
|
|
88
|
+
description: 'Static job key for upsert semantics (prevents duplicate jobs)'
|
|
86
89
|
},
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
+
queue_name: {
|
|
91
|
+
type: 'string',
|
|
92
|
+
description: 'Job queue name for routing to specific workers'
|
|
90
93
|
},
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
94
|
+
priority: {
|
|
95
|
+
type: 'integer',
|
|
96
|
+
description: 'Job priority (lower = higher priority)',
|
|
97
|
+
default: 0
|
|
95
98
|
},
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
+
run_at_delay: {
|
|
100
|
+
type: 'string',
|
|
101
|
+
description: 'Delay before job runs as PostgreSQL interval (e.g., 30 seconds, 5 minutes)'
|
|
99
102
|
},
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
103
|
+
max_attempts: {
|
|
104
|
+
type: 'integer',
|
|
105
|
+
description: 'Maximum retry attempts for the job',
|
|
106
|
+
default: 25
|
|
104
107
|
}
|
|
105
108
|
},
|
|
106
|
-
|
|
107
|
-
|
|
109
|
+
required: [
|
|
110
|
+
'task_identifier'
|
|
108
111
|
]
|
|
109
112
|
},
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
113
|
+
tags: [
|
|
114
|
+
'jobs',
|
|
115
|
+
'triggers',
|
|
116
|
+
'async'
|
|
114
117
|
]
|
|
115
118
|
};
|
package/data/data-jsonb.js
CHANGED
|
@@ -2,37 +2,38 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DataJsonb = void 0;
|
|
4
4
|
exports.DataJsonb = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
5
|
+
name: 'DataJsonb',
|
|
6
|
+
slug: 'data_jsonb',
|
|
7
|
+
category: 'data',
|
|
8
|
+
display_name: 'JSONB Field',
|
|
9
|
+
description: 'Adds a JSONB column with optional GIN index for containment queries (@>, ?, ?|, ?&). Standard pattern for semi-structured metadata.',
|
|
10
|
+
parameter_schema: {
|
|
11
|
+
type: 'object',
|
|
12
|
+
properties: {
|
|
13
|
+
field_name: {
|
|
14
|
+
type: 'string',
|
|
15
|
+
format: 'column-ref',
|
|
16
|
+
description: 'Column name for the JSONB field',
|
|
17
|
+
default: 'metadata'
|
|
17
18
|
},
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
default_value: {
|
|
20
|
+
type: 'string',
|
|
21
|
+
description: 'Default value expression'
|
|
21
22
|
},
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
is_required: {
|
|
24
|
+
type: 'boolean',
|
|
25
|
+
description: 'Whether the column has a NOT NULL constraint',
|
|
26
|
+
default: false
|
|
26
27
|
},
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
create_index: {
|
|
29
|
+
type: 'boolean',
|
|
30
|
+
description: 'Whether to create a GIN index',
|
|
31
|
+
default: true
|
|
31
32
|
}
|
|
32
33
|
}
|
|
33
34
|
},
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
tags: [
|
|
36
|
+
'jsonb',
|
|
37
|
+
'schema'
|
|
37
38
|
]
|
|
38
39
|
};
|
|
@@ -2,34 +2,36 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DataOwnedFields = void 0;
|
|
4
4
|
exports.DataOwnedFields = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
5
|
+
name: 'DataOwnedFields',
|
|
6
|
+
slug: 'data_owned_fields',
|
|
7
|
+
category: 'data',
|
|
8
|
+
display_name: 'Owned Fields',
|
|
9
|
+
description: 'Restricts which user can modify specific columns in shared objects. Creates an AFTER UPDATE trigger that throws OWNED_PROPS when a non-owner tries to change protected fields. References fields by name in data jsonb.',
|
|
10
|
+
parameter_schema: {
|
|
11
|
+
type: 'object',
|
|
12
|
+
properties: {
|
|
13
|
+
role_key_field_name: {
|
|
14
|
+
type: 'string',
|
|
15
|
+
format: 'column-ref',
|
|
16
|
+
description: 'Name of the field identifying the owner (e.g. sender_id)'
|
|
16
17
|
},
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
protected_field_names: {
|
|
19
|
+
type: 'array',
|
|
20
|
+
items: {
|
|
21
|
+
type: 'string',
|
|
22
|
+
format: 'column-ref'
|
|
21
23
|
},
|
|
22
|
-
|
|
24
|
+
description: 'Names of fields only this owner can modify'
|
|
23
25
|
}
|
|
24
26
|
},
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
required: [
|
|
28
|
+
'role_key_field_name',
|
|
29
|
+
'protected_field_names'
|
|
28
30
|
]
|
|
29
31
|
},
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
tags: [
|
|
33
|
+
'ownership',
|
|
34
|
+
'constraint',
|
|
35
|
+
'behavior'
|
|
34
36
|
]
|
|
35
37
|
};
|
|
@@ -2,30 +2,30 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DataOwnershipInEntity = void 0;
|
|
4
4
|
exports.DataOwnershipInEntity = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
5
|
+
name: 'DataOwnershipInEntity',
|
|
6
|
+
slug: 'data_ownership_in_entity',
|
|
7
|
+
category: 'data',
|
|
8
|
+
display_name: 'Ownership In Entity',
|
|
9
|
+
description: 'Combines direct ownership with entity scoping. Adds both owner_id and entity_id columns. Enables AuthzDirectOwner, AuthzEntityMembership, and AuthzOrgHierarchy authorization. Particularly useful for OrgHierarchy where a user owns a row (owner_id) within an entity (entity_id), and managers above can see subordinate-owned records via the hierarchy closure table.',
|
|
10
|
+
parameter_schema: {
|
|
11
|
+
type: 'object',
|
|
12
|
+
properties: {
|
|
13
|
+
include_id: {
|
|
14
|
+
type: 'boolean',
|
|
15
|
+
description: 'If true, also adds a UUID primary key column with auto-generation',
|
|
16
|
+
default: true
|
|
17
17
|
},
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
include_user_fk: {
|
|
19
|
+
type: 'boolean',
|
|
20
|
+
description: 'If true, adds foreign key constraints from owner_id and entity_id to the users table',
|
|
21
|
+
default: true
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
tags: [
|
|
26
|
+
'ownership',
|
|
27
|
+
'membership',
|
|
28
|
+
'hierarchy',
|
|
29
|
+
'schema'
|
|
30
30
|
]
|
|
31
31
|
};
|
|
@@ -2,28 +2,28 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DataPeoplestamps = void 0;
|
|
4
4
|
exports.DataPeoplestamps = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
5
|
+
name: 'DataPeoplestamps',
|
|
6
|
+
slug: 'data_peoplestamps',
|
|
7
|
+
category: 'data',
|
|
8
|
+
display_name: 'Peoplestamps',
|
|
9
|
+
description: 'Adds user tracking for creates/updates with created_by and updated_by columns.',
|
|
10
|
+
parameter_schema: {
|
|
11
|
+
type: 'object',
|
|
12
|
+
properties: {
|
|
13
|
+
include_id: {
|
|
14
|
+
type: 'boolean',
|
|
15
|
+
description: 'If true, also adds a UUID primary key column with auto-generation',
|
|
16
|
+
default: true
|
|
17
17
|
},
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
include_user_fk: {
|
|
19
|
+
type: 'boolean',
|
|
20
|
+
description: 'If true, adds foreign key constraints from created_by and updated_by to the users table',
|
|
21
|
+
default: false
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
tags: [
|
|
26
|
+
'timestamps',
|
|
27
|
+
'schema'
|
|
28
28
|
]
|
|
29
29
|
};
|