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.
- 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.js +1 -1
- package/codegen/generate-types.js +1 -1
- 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.js +1 -1
- package/esm/codegen/generate-types.js +1 -1
- 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
|
@@ -2,54 +2,55 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RelationBelongsTo = void 0;
|
|
4
4
|
exports.RelationBelongsTo = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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
|
+
type: 'object',
|
|
12
|
+
properties: {
|
|
13
|
+
source_table_id: {
|
|
14
|
+
type: 'string',
|
|
15
|
+
format: 'uuid',
|
|
16
|
+
description: 'Table that will have the FK field added'
|
|
17
17
|
},
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
target_table_id: {
|
|
19
|
+
type: 'string',
|
|
20
|
+
format: 'uuid',
|
|
21
|
+
description: 'Table being referenced by the FK'
|
|
22
22
|
},
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
field_name: {
|
|
24
|
+
type: 'string',
|
|
25
|
+
format: 'column-ref',
|
|
26
|
+
description: 'FK field name on the source table. Auto-derived from target table name if omitted (e.g., projects → project_id)'
|
|
26
27
|
},
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
28
|
+
delete_action: {
|
|
29
|
+
type: 'string',
|
|
30
|
+
enum: [
|
|
31
|
+
'c',
|
|
32
|
+
'r',
|
|
33
|
+
'n',
|
|
34
|
+
'd',
|
|
35
|
+
'a'
|
|
35
36
|
],
|
|
36
|
-
|
|
37
|
+
description: 'FK delete action: c=CASCADE, r=RESTRICT, n=SET NULL, d=SET DEFAULT, a=NO ACTION. Required.'
|
|
37
38
|
},
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
is_required: {
|
|
40
|
+
type: 'boolean',
|
|
41
|
+
description: 'Whether the FK field is NOT NULL',
|
|
42
|
+
default: true
|
|
42
43
|
}
|
|
43
44
|
},
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
required: [
|
|
46
|
+
'source_table_id',
|
|
47
|
+
'target_table_id',
|
|
48
|
+
'delete_action'
|
|
48
49
|
]
|
|
49
50
|
},
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
tags: [
|
|
52
|
+
'relation',
|
|
53
|
+
'foreign_key',
|
|
54
|
+
'schema'
|
|
54
55
|
]
|
|
55
56
|
};
|
|
@@ -2,55 +2,56 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RelationHasMany = void 0;
|
|
4
4
|
exports.RelationHasMany = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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
|
+
type: 'object',
|
|
12
|
+
properties: {
|
|
13
|
+
source_table_id: {
|
|
14
|
+
type: 'string',
|
|
15
|
+
format: 'uuid',
|
|
16
|
+
description: 'Parent table being referenced by the FK (e.g., projects in projects has many tasks)'
|
|
17
17
|
},
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
target_table_id: {
|
|
19
|
+
type: 'string',
|
|
20
|
+
format: 'uuid',
|
|
21
|
+
description: 'Child table that receives the FK field (e.g., tasks in projects has many tasks)'
|
|
22
22
|
},
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
field_name: {
|
|
24
|
+
type: 'string',
|
|
25
|
+
format: 'column-ref',
|
|
26
|
+
description: 'FK field name on the target table. Auto-derived from source table name if omitted (e.g., projects derives project_id)'
|
|
26
27
|
},
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
28
|
+
delete_action: {
|
|
29
|
+
type: 'string',
|
|
30
|
+
enum: [
|
|
31
|
+
'c',
|
|
32
|
+
'r',
|
|
33
|
+
'n',
|
|
34
|
+
'd',
|
|
35
|
+
'a'
|
|
35
36
|
],
|
|
36
|
-
|
|
37
|
+
description: 'FK delete action: c=CASCADE, r=RESTRICT, n=SET NULL, d=SET DEFAULT, a=NO ACTION. Required.'
|
|
37
38
|
},
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
is_required: {
|
|
40
|
+
type: 'boolean',
|
|
41
|
+
description: 'Whether the FK field is NOT NULL',
|
|
42
|
+
default: true
|
|
42
43
|
}
|
|
43
44
|
},
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
required: [
|
|
46
|
+
'source_table_id',
|
|
47
|
+
'target_table_id',
|
|
48
|
+
'delete_action'
|
|
48
49
|
]
|
|
49
50
|
},
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
tags: [
|
|
52
|
+
'relation',
|
|
53
|
+
'foreign_key',
|
|
54
|
+
'has_many',
|
|
55
|
+
'schema'
|
|
55
56
|
]
|
|
56
57
|
};
|
|
@@ -2,55 +2,56 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RelationHasOne = void 0;
|
|
4
4
|
exports.RelationHasOne = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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
|
+
type: 'object',
|
|
12
|
+
properties: {
|
|
13
|
+
source_table_id: {
|
|
14
|
+
type: 'string',
|
|
15
|
+
format: 'uuid',
|
|
16
|
+
description: 'Table that will have the FK field and unique constraint'
|
|
17
17
|
},
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
target_table_id: {
|
|
19
|
+
type: 'string',
|
|
20
|
+
format: 'uuid',
|
|
21
|
+
description: 'Table being referenced by the FK'
|
|
22
22
|
},
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
field_name: {
|
|
24
|
+
type: 'string',
|
|
25
|
+
format: 'column-ref',
|
|
26
|
+
description: 'FK field name on the source table. Auto-derived from target table name if omitted (e.g., users → user_id)'
|
|
26
27
|
},
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
28
|
+
delete_action: {
|
|
29
|
+
type: 'string',
|
|
30
|
+
enum: [
|
|
31
|
+
'c',
|
|
32
|
+
'r',
|
|
33
|
+
'n',
|
|
34
|
+
'd',
|
|
35
|
+
'a'
|
|
35
36
|
],
|
|
36
|
-
|
|
37
|
+
description: 'FK delete action: c=CASCADE, r=RESTRICT, n=SET NULL, d=SET DEFAULT, a=NO ACTION. Required.'
|
|
37
38
|
},
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
is_required: {
|
|
40
|
+
type: 'boolean',
|
|
41
|
+
description: 'Whether the FK field is NOT NULL',
|
|
42
|
+
default: true
|
|
42
43
|
}
|
|
43
44
|
},
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
required: [
|
|
46
|
+
'source_table_id',
|
|
47
|
+
'target_table_id',
|
|
48
|
+
'delete_action'
|
|
48
49
|
]
|
|
49
50
|
},
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
tags: [
|
|
52
|
+
'relation',
|
|
53
|
+
'foreign_key',
|
|
54
|
+
'unique',
|
|
55
|
+
'schema'
|
|
55
56
|
]
|
|
56
57
|
};
|
|
@@ -2,91 +2,93 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RelationManyToMany = void 0;
|
|
4
4
|
exports.RelationManyToMany = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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), 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
|
+
type: 'object',
|
|
12
|
+
properties: {
|
|
13
|
+
source_table_id: {
|
|
14
|
+
type: 'string',
|
|
15
|
+
format: 'uuid',
|
|
16
|
+
description: 'First table in the M:N relationship'
|
|
17
17
|
},
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
target_table_id: {
|
|
19
|
+
type: 'string',
|
|
20
|
+
format: 'uuid',
|
|
21
|
+
description: 'Second table in the M:N relationship'
|
|
22
22
|
},
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
junction_table_id: {
|
|
24
|
+
type: 'string',
|
|
25
|
+
format: 'uuid',
|
|
26
|
+
description: 'Existing junction table to use. If uuid_nil(), a new bare table is created'
|
|
27
27
|
},
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
junction_table_name: {
|
|
29
|
+
type: 'string',
|
|
30
|
+
description: 'Junction table name. Auto-derived from both table names if omitted (e.g., projects + tags derives project_tags)'
|
|
31
31
|
},
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
source_field_name: {
|
|
33
|
+
type: 'string',
|
|
34
|
+
format: 'column-ref',
|
|
35
|
+
description: 'FK field name on junction for source table. Auto-derived if omitted (e.g., projects derives project_id)'
|
|
35
36
|
},
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
target_field_name: {
|
|
38
|
+
type: 'string',
|
|
39
|
+
format: 'column-ref',
|
|
40
|
+
description: 'FK field name on junction for target table. Auto-derived if omitted (e.g., tags derives tag_id)'
|
|
39
41
|
},
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
use_composite_key: {
|
|
43
|
+
type: 'boolean',
|
|
44
|
+
description: 'When true, creates a composite PK from the two FK fields. When false, no PK is created by the trigger (use nodes with DataId for UUID PK). Mutually exclusive with nodes containing DataId.',
|
|
45
|
+
default: false
|
|
44
46
|
},
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
nodes: {
|
|
48
|
+
type: 'array',
|
|
49
|
+
items: {
|
|
50
|
+
type: 'object'
|
|
49
51
|
},
|
|
50
|
-
|
|
52
|
+
description: 'Array of node objects for field creation on junction table. Each object has a $type key (e.g. DataId, DataEntityMembership) and optional data keys. Forwarded to secure_table_provision as-is. Empty array means no additional fields.'
|
|
51
53
|
},
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
54
|
+
grants: {
|
|
55
|
+
type: 'array',
|
|
56
|
+
items: {
|
|
57
|
+
type: 'object',
|
|
58
|
+
properties: {
|
|
59
|
+
roles: { type: 'array', items: { type: 'string' } },
|
|
60
|
+
privileges: { type: 'array', items: { type: 'array', items: { type: 'string' } } }
|
|
59
61
|
},
|
|
60
|
-
|
|
62
|
+
required: ['roles', 'privileges']
|
|
61
63
|
},
|
|
62
|
-
|
|
64
|
+
description: 'Unified grant objects for the junction table. Each entry is { roles: string[], privileges: string[][] }. Forwarded to secure_table_provision as-is. Default: []'
|
|
63
65
|
},
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
66
|
+
policies: {
|
|
67
|
+
type: 'array',
|
|
68
|
+
items: {
|
|
69
|
+
type: 'object',
|
|
70
|
+
properties: {
|
|
71
|
+
$type: { type: 'string' },
|
|
72
|
+
data: { type: 'object' },
|
|
73
|
+
privileges: { type: 'array', items: { type: 'string' } },
|
|
74
|
+
policy_role: { type: 'string' },
|
|
75
|
+
permissive: { type: 'boolean' },
|
|
76
|
+
policy_name: { type: 'string' }
|
|
75
77
|
},
|
|
76
|
-
|
|
78
|
+
required: ['$type']
|
|
77
79
|
},
|
|
78
|
-
|
|
80
|
+
description: 'RLS policy objects for the junction table. Each entry has $type (Authz* generator), optional data, privileges, policy_role, permissive, policy_name. Forwarded to secure_table_provision as-is. Default: []'
|
|
79
81
|
}
|
|
80
82
|
},
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
83
|
+
required: [
|
|
84
|
+
'source_table_id',
|
|
85
|
+
'target_table_id'
|
|
84
86
|
]
|
|
85
87
|
},
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
88
|
+
tags: [
|
|
89
|
+
'relation',
|
|
90
|
+
'junction',
|
|
91
|
+
'many_to_many',
|
|
92
|
+
'schema'
|
|
91
93
|
]
|
|
92
94
|
};
|
|
@@ -2,70 +2,70 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RelationSpatial = void 0;
|
|
4
4
|
exports.RelationSpatial = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
5
|
+
name: 'RelationSpatial',
|
|
6
|
+
slug: 'relation_spatial',
|
|
7
|
+
category: 'relation',
|
|
8
|
+
display_name: 'Spatial Relation',
|
|
9
|
+
description: "Declares a spatial predicate between two existing geometry/geography columns. Inserts a metaschema_public.spatial_relation row; the sync_spatial_relation_tags trigger then projects a @spatialRelation smart tag onto the owner column so graphile-postgis' PostgisSpatialRelationsPlugin can expose it as a cross-table filter in GraphQL. Metadata-only: both source_field and target_field must already exist on their tables. Idempotent on (source_table_id, name). One direction per tag — author two RelationSpatial entries if symmetry is desired.",
|
|
10
|
+
parameter_schema: {
|
|
11
|
+
type: 'object',
|
|
12
|
+
properties: {
|
|
13
|
+
source_table_id: {
|
|
14
|
+
type: 'string',
|
|
15
|
+
format: 'uuid',
|
|
16
|
+
description: 'Table that owns the relation (the @spatialRelation tag is emitted on the owner column of this table)'
|
|
17
17
|
},
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
source_field_id: {
|
|
19
|
+
type: 'string',
|
|
20
|
+
format: 'uuid',
|
|
21
|
+
description: 'Geometry/geography column on source_table that carries the @spatialRelation smart tag'
|
|
22
22
|
},
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
target_table_id: {
|
|
24
|
+
type: 'string',
|
|
25
|
+
format: 'uuid',
|
|
26
|
+
description: 'Table being referenced by the spatial predicate'
|
|
27
27
|
},
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
target_field_id: {
|
|
29
|
+
type: 'string',
|
|
30
|
+
format: 'uuid',
|
|
31
|
+
description: 'Geometry/geography column on target_table that the predicate is evaluated against'
|
|
32
32
|
},
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
name: {
|
|
34
|
+
type: 'string',
|
|
35
|
+
description: 'Relation name (stable, snake_case). Becomes the generated filter field name in GraphQL (e.g. nearby_clinic). Unique per (source_table_id, name) — idempotency key.'
|
|
36
36
|
},
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
37
|
+
operator: {
|
|
38
|
+
type: 'string',
|
|
39
|
+
enum: [
|
|
40
|
+
'st_contains',
|
|
41
|
+
'st_within',
|
|
42
|
+
'st_intersects',
|
|
43
|
+
'st_covers',
|
|
44
|
+
'st_coveredby',
|
|
45
|
+
'st_overlaps',
|
|
46
|
+
'st_touches',
|
|
47
|
+
'st_dwithin'
|
|
48
48
|
],
|
|
49
|
-
|
|
49
|
+
description: 'PostGIS spatial predicate. One of the 8 whitelisted operators. st_dwithin requires param_name.'
|
|
50
50
|
},
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
param_name: {
|
|
52
|
+
type: 'string',
|
|
53
|
+
description: 'Parameter name for parametric operators (currently only st_dwithin, which needs a distance argument). Must be NULL for all other operators. Enforced by table CHECK.'
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
56
|
+
required: [
|
|
57
|
+
'source_table_id',
|
|
58
|
+
'source_field_id',
|
|
59
|
+
'target_table_id',
|
|
60
|
+
'target_field_id',
|
|
61
|
+
'name',
|
|
62
|
+
'operator'
|
|
63
63
|
]
|
|
64
64
|
},
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
65
|
+
tags: [
|
|
66
|
+
'relation',
|
|
67
|
+
'spatial',
|
|
68
|
+
'postgis',
|
|
69
|
+
'schema'
|
|
70
70
|
]
|
|
71
71
|
};
|
package/view/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { ViewTableProjection } from './view-table-projection';
|
|
2
|
-
export { ViewFilteredTable } from './view-filtered-table';
|
|
3
|
-
export { ViewJoinedTables } from './view-joined-tables';
|
|
4
1
|
export { ViewAggregated } from './view-aggregated';
|
|
5
2
|
export { ViewComposite } from './view-composite';
|
|
3
|
+
export { ViewFilteredTable } from './view-filtered-table';
|
|
4
|
+
export { ViewJoinedTables } from './view-joined-tables';
|
|
5
|
+
export { ViewTableProjection } from './view-table-projection';
|