node-type-registry 0.2.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/LICENSE +23 -0
- package/README.md +87 -0
- package/authz/authz-allow-all.d.ts +2 -0
- package/authz/authz-allow-all.js +15 -0
- package/authz/authz-composite.d.ts +2 -0
- package/authz/authz-composite.js +39 -0
- package/authz/authz-deny-all.d.ts +2 -0
- package/authz/authz-deny-all.js +15 -0
- package/authz/authz-direct-owner-any.d.ts +2 -0
- package/authz/authz-direct-owner-any.js +26 -0
- package/authz/authz-direct-owner.d.ts +2 -0
- package/authz/authz-direct-owner.js +23 -0
- package/authz/authz-entity-membership.d.ts +2 -0
- package/authz/authz-entity-membership.js +49 -0
- package/authz/authz-member-list.d.ts +2 -0
- package/authz/authz-member-list.js +23 -0
- package/authz/authz-membership-check.d.ts +2 -0
- package/authz/authz-membership-check.js +45 -0
- package/authz/authz-org-hierarchy.d.ts +2 -0
- package/authz/authz-org-hierarchy.js +41 -0
- package/authz/authz-peer-ownership.d.ts +2 -0
- package/authz/authz-peer-ownership.js +49 -0
- package/authz/authz-publishable.d.ts +2 -0
- package/authz/authz-publishable.js +31 -0
- package/authz/authz-related-entity-membership.d.ts +2 -0
- package/authz/authz-related-entity-membership.js +71 -0
- package/authz/authz-related-member-list.d.ts +2 -0
- package/authz/authz-related-member-list.js +43 -0
- package/authz/authz-related-peer-ownership.d.ts +2 -0
- package/authz/authz-related-peer-ownership.js +75 -0
- package/authz/authz-temporal.d.ts +2 -0
- package/authz/authz-temporal.js +46 -0
- package/authz/index.d.ts +15 -0
- package/authz/index.js +33 -0
- package/codegen/generate-seed.d.ts +23 -0
- package/codegen/generate-seed.js +155 -0
- package/data/data-bm25.d.ts +2 -0
- package/data/data-bm25.js +43 -0
- package/data/data-direct-owner.d.ts +2 -0
- package/data/data-direct-owner.js +31 -0
- package/data/data-embedding.d.ts +2 -0
- package/data/data-embedding.js +82 -0
- package/data/data-entity-membership.d.ts +2 -0
- package/data/data-entity-membership.js +31 -0
- package/data/data-full-text-search.d.ts +2 -0
- package/data/data-full-text-search.js +61 -0
- package/data/data-id.d.ts +2 -0
- package/data/data-id.js +21 -0
- package/data/data-job-trigger.d.ts +2 -0
- package/data/data-job-trigger.js +111 -0
- package/data/data-jsonb.d.ts +2 -0
- package/data/data-jsonb.js +35 -0
- package/data/data-ownership-in-entity.d.ts +2 -0
- package/data/data-ownership-in-entity.js +26 -0
- package/data/data-peoplestamps.d.ts +2 -0
- package/data/data-peoplestamps.js +26 -0
- package/data/data-postgis-aggregate.d.ts +2 -0
- package/data/data-postgis-aggregate.js +94 -0
- package/data/data-postgis.d.ts +2 -0
- package/data/data-postgis.js +65 -0
- package/data/data-publishable.d.ts +2 -0
- package/data/data-publishable.js +21 -0
- package/data/data-search.d.ts +2 -0
- package/data/data-search.js +158 -0
- package/data/data-soft-delete.d.ts +2 -0
- package/data/data-soft-delete.js +21 -0
- package/data/data-status-field.d.ts +2 -0
- package/data/data-status-field.js +42 -0
- package/data/data-tags.d.ts +2 -0
- package/data/data-tags.js +30 -0
- package/data/data-timestamps.d.ts +2 -0
- package/data/data-timestamps.js +21 -0
- package/data/data-trgm.d.ts +2 -0
- package/data/data-trgm.js +26 -0
- package/data/index.d.ts +19 -0
- package/data/index.js +41 -0
- package/esm/authz/authz-allow-all.d.ts +2 -0
- package/esm/authz/authz-allow-all.js +12 -0
- package/esm/authz/authz-composite.d.ts +2 -0
- package/esm/authz/authz-composite.js +36 -0
- package/esm/authz/authz-deny-all.d.ts +2 -0
- package/esm/authz/authz-deny-all.js +12 -0
- package/esm/authz/authz-direct-owner-any.d.ts +2 -0
- package/esm/authz/authz-direct-owner-any.js +23 -0
- package/esm/authz/authz-direct-owner.d.ts +2 -0
- package/esm/authz/authz-direct-owner.js +20 -0
- package/esm/authz/authz-entity-membership.d.ts +2 -0
- package/esm/authz/authz-entity-membership.js +46 -0
- package/esm/authz/authz-member-list.d.ts +2 -0
- package/esm/authz/authz-member-list.js +20 -0
- package/esm/authz/authz-membership-check.d.ts +2 -0
- package/esm/authz/authz-membership-check.js +42 -0
- package/esm/authz/authz-org-hierarchy.d.ts +2 -0
- package/esm/authz/authz-org-hierarchy.js +38 -0
- package/esm/authz/authz-peer-ownership.d.ts +2 -0
- package/esm/authz/authz-peer-ownership.js +46 -0
- package/esm/authz/authz-publishable.d.ts +2 -0
- package/esm/authz/authz-publishable.js +28 -0
- package/esm/authz/authz-related-entity-membership.d.ts +2 -0
- package/esm/authz/authz-related-entity-membership.js +68 -0
- package/esm/authz/authz-related-member-list.d.ts +2 -0
- package/esm/authz/authz-related-member-list.js +40 -0
- package/esm/authz/authz-related-peer-ownership.d.ts +2 -0
- package/esm/authz/authz-related-peer-ownership.js +72 -0
- package/esm/authz/authz-temporal.d.ts +2 -0
- package/esm/authz/authz-temporal.js +43 -0
- package/esm/authz/index.d.ts +15 -0
- package/esm/authz/index.js +15 -0
- package/esm/codegen/generate-seed.d.ts +23 -0
- package/esm/codegen/generate-seed.js +153 -0
- package/esm/data/data-bm25.d.ts +2 -0
- package/esm/data/data-bm25.js +40 -0
- package/esm/data/data-direct-owner.d.ts +2 -0
- package/esm/data/data-direct-owner.js +28 -0
- package/esm/data/data-embedding.d.ts +2 -0
- package/esm/data/data-embedding.js +79 -0
- package/esm/data/data-entity-membership.d.ts +2 -0
- package/esm/data/data-entity-membership.js +28 -0
- package/esm/data/data-full-text-search.d.ts +2 -0
- package/esm/data/data-full-text-search.js +58 -0
- package/esm/data/data-id.d.ts +2 -0
- package/esm/data/data-id.js +18 -0
- package/esm/data/data-job-trigger.d.ts +2 -0
- package/esm/data/data-job-trigger.js +108 -0
- package/esm/data/data-jsonb.d.ts +2 -0
- package/esm/data/data-jsonb.js +32 -0
- package/esm/data/data-ownership-in-entity.d.ts +2 -0
- package/esm/data/data-ownership-in-entity.js +23 -0
- package/esm/data/data-peoplestamps.d.ts +2 -0
- package/esm/data/data-peoplestamps.js +23 -0
- package/esm/data/data-postgis-aggregate.d.ts +2 -0
- package/esm/data/data-postgis-aggregate.js +91 -0
- package/esm/data/data-postgis.d.ts +2 -0
- package/esm/data/data-postgis.js +62 -0
- package/esm/data/data-publishable.d.ts +2 -0
- package/esm/data/data-publishable.js +18 -0
- package/esm/data/data-search.d.ts +2 -0
- package/esm/data/data-search.js +155 -0
- package/esm/data/data-soft-delete.d.ts +2 -0
- package/esm/data/data-soft-delete.js +18 -0
- package/esm/data/data-status-field.d.ts +2 -0
- package/esm/data/data-status-field.js +39 -0
- package/esm/data/data-tags.d.ts +2 -0
- package/esm/data/data-tags.js +27 -0
- package/esm/data/data-timestamps.d.ts +2 -0
- package/esm/data/data-timestamps.js +18 -0
- package/esm/data/data-trgm.d.ts +2 -0
- package/esm/data/data-trgm.js +23 -0
- package/esm/data/index.d.ts +19 -0
- package/esm/data/index.js +19 -0
- package/esm/field/field-immutable.d.ts +2 -0
- package/esm/field/field-immutable.js +21 -0
- package/esm/field/field-inflection.d.ts +2 -0
- package/esm/field/field-inflection.js +29 -0
- package/esm/field/field-owned.d.ts +2 -0
- package/esm/field/field-owned.js +36 -0
- package/esm/field/field-slug.d.ts +2 -0
- package/esm/field/field-slug.js +26 -0
- package/esm/field/index.d.ts +4 -0
- package/esm/field/index.js +4 -0
- package/esm/index.d.ts +9 -0
- package/esm/index.js +21 -0
- package/esm/preset.d.ts +23 -0
- package/esm/preset.js +5 -0
- package/esm/relation/index.d.ts +4 -0
- package/esm/relation/index.js +4 -0
- package/esm/relation/relation-belongs-to.d.ts +2 -0
- package/esm/relation/relation-belongs-to.js +48 -0
- package/esm/relation/relation-has-many.d.ts +2 -0
- package/esm/relation/relation-has-many.js +48 -0
- package/esm/relation/relation-has-one.d.ts +2 -0
- package/esm/relation/relation-has-one.js +48 -0
- package/esm/relation/relation-many-to-many.d.ts +2 -0
- package/esm/relation/relation-many-to-many.js +92 -0
- package/esm/table/index.d.ts +3 -0
- package/esm/table/index.js +3 -0
- package/esm/table/table-organization-settings.d.ts +2 -0
- package/esm/table/table-organization-settings.js +12 -0
- package/esm/table/table-user-profiles.d.ts +2 -0
- package/esm/table/table-user-profiles.js +12 -0
- package/esm/table/table-user-settings.d.ts +2 -0
- package/esm/table/table-user-settings.js +12 -0
- package/esm/types.d.ts +61 -0
- package/esm/types.js +1 -0
- package/esm/view/index.d.ts +5 -0
- package/esm/view/index.js +5 -0
- package/esm/view/view-aggregated.d.ts +2 -0
- package/esm/view/view-aggregated.js +61 -0
- package/esm/view/view-composite.d.ts +2 -0
- package/esm/view/view-composite.js +20 -0
- package/esm/view/view-filtered-table.d.ts +2 -0
- package/esm/view/view-filtered-table.js +45 -0
- package/esm/view/view-joined-tables.d.ts +2 -0
- package/esm/view/view-joined-tables.js +80 -0
- package/esm/view/view-table-projection.d.ts +2 -0
- package/esm/view/view-table-projection.js +36 -0
- package/field/field-immutable.d.ts +2 -0
- package/field/field-immutable.js +24 -0
- package/field/field-inflection.d.ts +2 -0
- package/field/field-inflection.js +32 -0
- package/field/field-owned.d.ts +2 -0
- package/field/field-owned.js +39 -0
- package/field/field-slug.d.ts +2 -0
- package/field/field-slug.js +29 -0
- package/field/index.d.ts +4 -0
- package/field/index.js +11 -0
- package/index.d.ts +9 -0
- package/index.js +60 -0
- package/package.json +49 -0
- package/preset.d.ts +23 -0
- package/preset.js +8 -0
- package/relation/index.d.ts +4 -0
- package/relation/index.js +11 -0
- package/relation/relation-belongs-to.d.ts +2 -0
- package/relation/relation-belongs-to.js +51 -0
- package/relation/relation-has-many.d.ts +2 -0
- package/relation/relation-has-many.js +51 -0
- package/relation/relation-has-one.d.ts +2 -0
- package/relation/relation-has-one.js +51 -0
- package/relation/relation-many-to-many.d.ts +2 -0
- package/relation/relation-many-to-many.js +95 -0
- package/table/index.d.ts +3 -0
- package/table/index.js +9 -0
- package/table/table-organization-settings.d.ts +2 -0
- package/table/table-organization-settings.js +15 -0
- package/table/table-user-profiles.d.ts +2 -0
- package/table/table-user-profiles.js +15 -0
- package/table/table-user-settings.d.ts +2 -0
- package/table/table-user-settings.js +15 -0
- package/types.d.ts +61 -0
- package/types.js +2 -0
- package/view/index.d.ts +5 -0
- package/view/index.js +13 -0
- package/view/view-aggregated.d.ts +2 -0
- package/view/view-aggregated.js +64 -0
- package/view/view-composite.d.ts +2 -0
- package/view/view-composite.js +23 -0
- package/view/view-filtered-table.d.ts +2 -0
- package/view/view-filtered-table.js +48 -0
- package/view/view-joined-tables.d.ts +2 -0
- package/view/view-joined-tables.js +83 -0
- package/view/view-table-projection.d.ts +2 -0
- package/view/view-table-projection.js +39 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
export const DataJobTrigger = {
|
|
2
|
+
name: 'DataJobTrigger',
|
|
3
|
+
slug: 'data_job_trigger',
|
|
4
|
+
category: 'data',
|
|
5
|
+
display_name: 'Job Trigger',
|
|
6
|
+
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).',
|
|
7
|
+
parameter_schema: {
|
|
8
|
+
"type": "object",
|
|
9
|
+
"properties": {
|
|
10
|
+
"task_identifier": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "Job task identifier passed to add_job (e.g., process_invoice, sync_to_stripe)"
|
|
13
|
+
},
|
|
14
|
+
"payload_strategy": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"enum": [
|
|
17
|
+
"row",
|
|
18
|
+
"row_id",
|
|
19
|
+
"fields",
|
|
20
|
+
"custom"
|
|
21
|
+
],
|
|
22
|
+
"description": "How to build the job payload: row (full NEW/OLD), row_id (just id), fields (selected columns), custom (mapped columns)",
|
|
23
|
+
"default": "row_id"
|
|
24
|
+
},
|
|
25
|
+
"payload_fields": {
|
|
26
|
+
"type": "array",
|
|
27
|
+
"items": {
|
|
28
|
+
"type": "string"
|
|
29
|
+
},
|
|
30
|
+
"description": "Column names to include in payload (only for fields strategy)"
|
|
31
|
+
},
|
|
32
|
+
"payload_custom": {
|
|
33
|
+
"type": "object",
|
|
34
|
+
"additionalProperties": {
|
|
35
|
+
"type": "string"
|
|
36
|
+
},
|
|
37
|
+
"description": "Key-to-column mapping for custom payload (e.g., {\"invoice_id\": \"id\", \"total\": \"amount\"})"
|
|
38
|
+
},
|
|
39
|
+
"events": {
|
|
40
|
+
"type": "array",
|
|
41
|
+
"items": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"enum": [
|
|
44
|
+
"INSERT",
|
|
45
|
+
"UPDATE",
|
|
46
|
+
"DELETE"
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
"description": "Trigger events to create",
|
|
50
|
+
"default": [
|
|
51
|
+
"INSERT",
|
|
52
|
+
"UPDATE"
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
"include_old": {
|
|
56
|
+
"type": "boolean",
|
|
57
|
+
"description": "Include OLD row in payload (for UPDATE triggers)",
|
|
58
|
+
"default": false
|
|
59
|
+
},
|
|
60
|
+
"include_meta": {
|
|
61
|
+
"type": "boolean",
|
|
62
|
+
"description": "Include table/schema metadata in payload",
|
|
63
|
+
"default": false
|
|
64
|
+
},
|
|
65
|
+
"condition_field": {
|
|
66
|
+
"type": "string",
|
|
67
|
+
"description": "Column name for conditional WHEN clause (fires only when field equals condition_value)"
|
|
68
|
+
},
|
|
69
|
+
"condition_value": {
|
|
70
|
+
"type": "string",
|
|
71
|
+
"description": "Value to compare against condition_field in WHEN clause"
|
|
72
|
+
},
|
|
73
|
+
"watch_fields": {
|
|
74
|
+
"type": "array",
|
|
75
|
+
"items": {
|
|
76
|
+
"type": "string"
|
|
77
|
+
},
|
|
78
|
+
"description": "For UPDATE triggers, only fire when these fields change (uses DISTINCT FROM)"
|
|
79
|
+
},
|
|
80
|
+
"job_key": {
|
|
81
|
+
"type": "string",
|
|
82
|
+
"description": "Static job key for upsert semantics (prevents duplicate jobs)"
|
|
83
|
+
},
|
|
84
|
+
"queue_name": {
|
|
85
|
+
"type": "string",
|
|
86
|
+
"description": "Job queue name for routing to specific workers"
|
|
87
|
+
},
|
|
88
|
+
"priority": {
|
|
89
|
+
"type": "integer",
|
|
90
|
+
"description": "Job priority (lower = higher priority)",
|
|
91
|
+
"default": 0
|
|
92
|
+
},
|
|
93
|
+
"run_at_delay": {
|
|
94
|
+
"type": "string",
|
|
95
|
+
"description": "Delay before job runs as PostgreSQL interval (e.g., 30 seconds, 5 minutes)"
|
|
96
|
+
},
|
|
97
|
+
"max_attempts": {
|
|
98
|
+
"type": "integer",
|
|
99
|
+
"description": "Maximum retry attempts for the job",
|
|
100
|
+
"default": 25
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"required": [
|
|
104
|
+
"task_identifier"
|
|
105
|
+
]
|
|
106
|
+
},
|
|
107
|
+
tags: ['jobs', 'triggers', 'async'],
|
|
108
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export const DataJsonb = {
|
|
2
|
+
name: 'DataJsonb',
|
|
3
|
+
slug: 'data_jsonb',
|
|
4
|
+
category: 'data',
|
|
5
|
+
display_name: 'JSONB Field',
|
|
6
|
+
description: 'Adds a JSONB column with optional GIN index for containment queries (@>, ?, ?|, ?&). Standard pattern for semi-structured metadata.',
|
|
7
|
+
parameter_schema: {
|
|
8
|
+
"type": "object",
|
|
9
|
+
"properties": {
|
|
10
|
+
"field_name": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "Column name for the JSONB field",
|
|
13
|
+
"default": "metadata"
|
|
14
|
+
},
|
|
15
|
+
"default_value": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "Default value expression"
|
|
18
|
+
},
|
|
19
|
+
"is_required": {
|
|
20
|
+
"type": "boolean",
|
|
21
|
+
"description": "Whether the column has a NOT NULL constraint",
|
|
22
|
+
"default": false
|
|
23
|
+
},
|
|
24
|
+
"create_index": {
|
|
25
|
+
"type": "boolean",
|
|
26
|
+
"description": "Whether to create a GIN index",
|
|
27
|
+
"default": true
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
tags: ['jsonb', 'schema'],
|
|
32
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export const DataOwnershipInEntity = {
|
|
2
|
+
name: 'DataOwnershipInEntity',
|
|
3
|
+
slug: 'data_ownership_in_entity',
|
|
4
|
+
category: 'data',
|
|
5
|
+
display_name: 'Ownership In Entity',
|
|
6
|
+
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.',
|
|
7
|
+
parameter_schema: {
|
|
8
|
+
"type": "object",
|
|
9
|
+
"properties": {
|
|
10
|
+
"include_id": {
|
|
11
|
+
"type": "boolean",
|
|
12
|
+
"description": "If true, also adds a UUID primary key column with auto-generation",
|
|
13
|
+
"default": true
|
|
14
|
+
},
|
|
15
|
+
"include_user_fk": {
|
|
16
|
+
"type": "boolean",
|
|
17
|
+
"description": "If true, adds foreign key constraints from owner_id and entity_id to the users table",
|
|
18
|
+
"default": true
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
tags: ['ownership', 'membership', 'hierarchy', 'schema'],
|
|
23
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export const DataPeoplestamps = {
|
|
2
|
+
name: 'DataPeoplestamps',
|
|
3
|
+
slug: 'data_peoplestamps',
|
|
4
|
+
category: 'data',
|
|
5
|
+
display_name: 'Peoplestamps',
|
|
6
|
+
description: 'Adds user tracking for creates/updates with created_by and updated_by columns.',
|
|
7
|
+
parameter_schema: {
|
|
8
|
+
"type": "object",
|
|
9
|
+
"properties": {
|
|
10
|
+
"include_id": {
|
|
11
|
+
"type": "boolean",
|
|
12
|
+
"description": "If true, also adds a UUID primary key column with auto-generation",
|
|
13
|
+
"default": true
|
|
14
|
+
},
|
|
15
|
+
"include_user_fk": {
|
|
16
|
+
"type": "boolean",
|
|
17
|
+
"description": "If true, adds foreign key constraints from created_by and updated_by to the users table",
|
|
18
|
+
"default": false
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
tags: ['timestamps', 'schema'],
|
|
23
|
+
};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
export const DataPostGISAggregate = {
|
|
2
|
+
name: 'DataPostGISAggregate',
|
|
3
|
+
slug: 'data_postgis_aggregate',
|
|
4
|
+
category: 'data',
|
|
5
|
+
display_name: 'PostGIS Aggregate Geometry',
|
|
6
|
+
description: 'Creates a derived/materialized geometry field on the parent table that automatically aggregates geometries from a source (child) table via triggers. When child rows are inserted/updated/deleted, the parent aggregate field is recalculated using the specified PostGIS aggregation function (ST_Union, ST_Collect, ST_ConvexHull, ST_ConcaveHull). Useful for materializing spatial boundaries from collections of points or polygons.',
|
|
7
|
+
parameter_schema: {
|
|
8
|
+
"type": "object",
|
|
9
|
+
"properties": {
|
|
10
|
+
"field_name": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "Name of the aggregate geometry column on the parent table",
|
|
13
|
+
"default": "geom_aggregate"
|
|
14
|
+
},
|
|
15
|
+
"source_table_id": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"format": "uuid",
|
|
18
|
+
"description": "UUID of the source (child) table containing individual geometries"
|
|
19
|
+
},
|
|
20
|
+
"source_geom_field": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"description": "Name of the geometry column on the source table",
|
|
23
|
+
"default": "geom"
|
|
24
|
+
},
|
|
25
|
+
"source_fk_field": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"description": "Name of the foreign key column on the source table pointing to the parent"
|
|
28
|
+
},
|
|
29
|
+
"aggregate_function": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"enum": [
|
|
32
|
+
"union",
|
|
33
|
+
"collect",
|
|
34
|
+
"convex_hull",
|
|
35
|
+
"concave_hull"
|
|
36
|
+
],
|
|
37
|
+
"description": "PostGIS aggregation function: union (ST_Union, merges overlapping), collect (ST_Collect, groups without merging), convex_hull (smallest convex polygon), concave_hull (tighter boundary)",
|
|
38
|
+
"default": "union"
|
|
39
|
+
},
|
|
40
|
+
"geometry_type": {
|
|
41
|
+
"type": "string",
|
|
42
|
+
"enum": [
|
|
43
|
+
"Point",
|
|
44
|
+
"LineString",
|
|
45
|
+
"Polygon",
|
|
46
|
+
"MultiPoint",
|
|
47
|
+
"MultiLineString",
|
|
48
|
+
"MultiPolygon",
|
|
49
|
+
"GeometryCollection",
|
|
50
|
+
"Geometry"
|
|
51
|
+
],
|
|
52
|
+
"description": "Output geometry type constraint for the aggregate field",
|
|
53
|
+
"default": "MultiPolygon"
|
|
54
|
+
},
|
|
55
|
+
"srid": {
|
|
56
|
+
"type": "integer",
|
|
57
|
+
"description": "Spatial Reference System Identifier (e.g. 4326 for WGS84)",
|
|
58
|
+
"default": 4326
|
|
59
|
+
},
|
|
60
|
+
"dimension": {
|
|
61
|
+
"type": "integer",
|
|
62
|
+
"enum": [
|
|
63
|
+
2,
|
|
64
|
+
3,
|
|
65
|
+
4
|
|
66
|
+
],
|
|
67
|
+
"description": "Coordinate dimension (2=XY, 3=XYZ, 4=XYZM)",
|
|
68
|
+
"default": 2
|
|
69
|
+
},
|
|
70
|
+
"use_geography": {
|
|
71
|
+
"type": "boolean",
|
|
72
|
+
"description": "Use geography type instead of geometry",
|
|
73
|
+
"default": false
|
|
74
|
+
},
|
|
75
|
+
"index_method": {
|
|
76
|
+
"type": "string",
|
|
77
|
+
"enum": [
|
|
78
|
+
"gist",
|
|
79
|
+
"spgist"
|
|
80
|
+
],
|
|
81
|
+
"description": "Spatial index method for the aggregate field",
|
|
82
|
+
"default": "gist"
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"required": [
|
|
86
|
+
"source_table_id",
|
|
87
|
+
"source_fk_field"
|
|
88
|
+
]
|
|
89
|
+
},
|
|
90
|
+
tags: ['spatial', 'postgis', 'geometry', 'aggregate', 'schema'],
|
|
91
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
export const DataPostGIS = {
|
|
2
|
+
name: 'DataPostGIS',
|
|
3
|
+
slug: 'data_postgis',
|
|
4
|
+
category: 'data',
|
|
5
|
+
display_name: 'PostGIS Geometry',
|
|
6
|
+
description: 'Adds a PostGIS geometry or geography column with a spatial index (GiST or SP-GiST). Supports configurable geometry types (Point, Polygon, etc.), SRID, and dimensionality. The graphile-postgis plugin auto-detects geometry/geography columns by codec type for spatial filtering (ST_Contains, ST_DWithin, bbox operators).',
|
|
7
|
+
parameter_schema: {
|
|
8
|
+
"type": "object",
|
|
9
|
+
"properties": {
|
|
10
|
+
"field_name": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "Name of the geometry/geography column",
|
|
13
|
+
"default": "geom"
|
|
14
|
+
},
|
|
15
|
+
"geometry_type": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"enum": [
|
|
18
|
+
"Point",
|
|
19
|
+
"LineString",
|
|
20
|
+
"Polygon",
|
|
21
|
+
"MultiPoint",
|
|
22
|
+
"MultiLineString",
|
|
23
|
+
"MultiPolygon",
|
|
24
|
+
"GeometryCollection",
|
|
25
|
+
"Geometry"
|
|
26
|
+
],
|
|
27
|
+
"description": "PostGIS geometry type constraint",
|
|
28
|
+
"default": "Point"
|
|
29
|
+
},
|
|
30
|
+
"srid": {
|
|
31
|
+
"type": "integer",
|
|
32
|
+
"description": "Spatial Reference System Identifier (e.g. 4326 for WGS84)",
|
|
33
|
+
"default": 4326
|
|
34
|
+
},
|
|
35
|
+
"dimension": {
|
|
36
|
+
"type": "integer",
|
|
37
|
+
"enum": [
|
|
38
|
+
2,
|
|
39
|
+
3,
|
|
40
|
+
4
|
|
41
|
+
],
|
|
42
|
+
"description": "Coordinate dimension (2=XY, 3=XYZ, 4=XYZM)",
|
|
43
|
+
"default": 2
|
|
44
|
+
},
|
|
45
|
+
"use_geography": {
|
|
46
|
+
"type": "boolean",
|
|
47
|
+
"description": "Use geography type instead of geometry (for geodetic calculations on the sphere)",
|
|
48
|
+
"default": false
|
|
49
|
+
},
|
|
50
|
+
"index_method": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"enum": [
|
|
53
|
+
"gist",
|
|
54
|
+
"spgist"
|
|
55
|
+
],
|
|
56
|
+
"description": "Spatial index method",
|
|
57
|
+
"default": "gist"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
tags: ['spatial', 'postgis', 'geometry', 'schema'],
|
|
62
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export const DataPublishable = {
|
|
2
|
+
name: 'DataPublishable',
|
|
3
|
+
slug: 'data_publishable',
|
|
4
|
+
category: 'data',
|
|
5
|
+
display_name: 'Publishable',
|
|
6
|
+
description: 'Adds publish state columns (is_published, published_at) for content visibility. Enables AuthzPublishable and AuthzTemporal authorization.',
|
|
7
|
+
parameter_schema: {
|
|
8
|
+
"type": "object",
|
|
9
|
+
"properties": {
|
|
10
|
+
"include_id": {
|
|
11
|
+
"type": "boolean",
|
|
12
|
+
"description": "If true, also adds a UUID primary key column with auto-generation",
|
|
13
|
+
"default": true
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
tags: ['publishing', 'temporal', 'schema'],
|
|
18
|
+
};
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
export const DataSearch = {
|
|
2
|
+
name: 'DataSearch',
|
|
3
|
+
slug: 'data_search',
|
|
4
|
+
category: 'data',
|
|
5
|
+
display_name: 'Unified Search',
|
|
6
|
+
description: 'Composite node type that orchestrates multiple search modalities (full-text search, BM25, embeddings, trigram) on a single table. Configures per-table search score weights, normalization strategy, and recency boost via the @searchConfig smart tag.',
|
|
7
|
+
parameter_schema: {
|
|
8
|
+
"type": "object",
|
|
9
|
+
"properties": {
|
|
10
|
+
"full_text_search": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"description": "DataFullTextSearch parameters. Omit to skip FTS setup.",
|
|
13
|
+
"properties": {
|
|
14
|
+
"field_name": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"default": "search"
|
|
17
|
+
},
|
|
18
|
+
"source_fields": {
|
|
19
|
+
"type": "array",
|
|
20
|
+
"items": {
|
|
21
|
+
"type": "object",
|
|
22
|
+
"properties": {
|
|
23
|
+
"field": {
|
|
24
|
+
"type": "string"
|
|
25
|
+
},
|
|
26
|
+
"weight": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"enum": [
|
|
29
|
+
"A",
|
|
30
|
+
"B",
|
|
31
|
+
"C",
|
|
32
|
+
"D"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
"lang": {
|
|
36
|
+
"type": "string"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"required": [
|
|
40
|
+
"field"
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"search_score_weight": {
|
|
45
|
+
"type": "number",
|
|
46
|
+
"default": 1
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"bm25": {
|
|
51
|
+
"type": "object",
|
|
52
|
+
"description": "DataBm25 parameters. Omit to skip BM25 setup.",
|
|
53
|
+
"properties": {
|
|
54
|
+
"field_name": {
|
|
55
|
+
"type": "string"
|
|
56
|
+
},
|
|
57
|
+
"text_config": {
|
|
58
|
+
"type": "string",
|
|
59
|
+
"default": "english"
|
|
60
|
+
},
|
|
61
|
+
"k1": {
|
|
62
|
+
"type": "number"
|
|
63
|
+
},
|
|
64
|
+
"b": {
|
|
65
|
+
"type": "number"
|
|
66
|
+
},
|
|
67
|
+
"search_score_weight": {
|
|
68
|
+
"type": "number",
|
|
69
|
+
"default": 1
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"embedding": {
|
|
74
|
+
"type": "object",
|
|
75
|
+
"description": "DataEmbedding parameters. Omit to skip embedding setup.",
|
|
76
|
+
"properties": {
|
|
77
|
+
"field_name": {
|
|
78
|
+
"type": "string",
|
|
79
|
+
"default": "embedding"
|
|
80
|
+
},
|
|
81
|
+
"dimensions": {
|
|
82
|
+
"type": "integer",
|
|
83
|
+
"default": 768
|
|
84
|
+
},
|
|
85
|
+
"index_method": {
|
|
86
|
+
"type": "string",
|
|
87
|
+
"enum": [
|
|
88
|
+
"hnsw",
|
|
89
|
+
"ivfflat"
|
|
90
|
+
]
|
|
91
|
+
},
|
|
92
|
+
"metric": {
|
|
93
|
+
"type": "string",
|
|
94
|
+
"enum": [
|
|
95
|
+
"cosine",
|
|
96
|
+
"l2",
|
|
97
|
+
"ip"
|
|
98
|
+
]
|
|
99
|
+
},
|
|
100
|
+
"source_fields": {
|
|
101
|
+
"type": "array",
|
|
102
|
+
"items": {
|
|
103
|
+
"type": "string"
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"search_score_weight": {
|
|
107
|
+
"type": "number",
|
|
108
|
+
"default": 1
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"trgm_fields": {
|
|
113
|
+
"type": "array",
|
|
114
|
+
"items": {
|
|
115
|
+
"type": "string"
|
|
116
|
+
},
|
|
117
|
+
"description": "Field names to tag with @trgmSearch for fuzzy/typo-tolerant matching"
|
|
118
|
+
},
|
|
119
|
+
"search_config": {
|
|
120
|
+
"type": "object",
|
|
121
|
+
"description": "Unified search score configuration written to @searchConfig smart tag",
|
|
122
|
+
"properties": {
|
|
123
|
+
"weights": {
|
|
124
|
+
"type": "object",
|
|
125
|
+
"description": "Per-algorithm weights: {tsv: 1.5, bm25: 1.0, pgvector: 0.8, trgm: 0.3}"
|
|
126
|
+
},
|
|
127
|
+
"normalization": {
|
|
128
|
+
"type": "string",
|
|
129
|
+
"enum": [
|
|
130
|
+
"linear",
|
|
131
|
+
"sigmoid"
|
|
132
|
+
],
|
|
133
|
+
"description": "Score normalization strategy",
|
|
134
|
+
"default": "linear"
|
|
135
|
+
},
|
|
136
|
+
"boost_recent": {
|
|
137
|
+
"type": "boolean",
|
|
138
|
+
"description": "Enable recency boost for search results",
|
|
139
|
+
"default": false
|
|
140
|
+
},
|
|
141
|
+
"boost_recency_field": {
|
|
142
|
+
"type": "string",
|
|
143
|
+
"description": "Timestamp field for recency boost (e.g. created_at, updated_at)"
|
|
144
|
+
},
|
|
145
|
+
"boost_recency_decay": {
|
|
146
|
+
"type": "number",
|
|
147
|
+
"description": "Decay rate for recency boost (0-1, lower = faster decay)",
|
|
148
|
+
"default": 0.5
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
tags: ['search', 'composite', 'schema'],
|
|
155
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export const DataSoftDelete = {
|
|
2
|
+
name: 'DataSoftDelete',
|
|
3
|
+
slug: 'data_soft_delete',
|
|
4
|
+
category: 'data',
|
|
5
|
+
display_name: 'Soft Delete',
|
|
6
|
+
description: 'Adds soft delete support with deleted_at and is_deleted columns.',
|
|
7
|
+
parameter_schema: {
|
|
8
|
+
"type": "object",
|
|
9
|
+
"properties": {
|
|
10
|
+
"include_id": {
|
|
11
|
+
"type": "boolean",
|
|
12
|
+
"description": "If true, also adds a UUID primary key column with auto-generation",
|
|
13
|
+
"default": true
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
tags: ['schema'],
|
|
18
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export const DataStatusField = {
|
|
2
|
+
name: 'DataStatusField',
|
|
3
|
+
slug: 'data_status_field',
|
|
4
|
+
category: 'data',
|
|
5
|
+
display_name: 'Status Field',
|
|
6
|
+
description: 'Adds a status column with B-tree index for efficient equality filtering and sorting. Optionally constrains values via CHECK constraint when allowed_values is provided.',
|
|
7
|
+
parameter_schema: {
|
|
8
|
+
"type": "object",
|
|
9
|
+
"properties": {
|
|
10
|
+
"field_name": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "Column name for the status field",
|
|
13
|
+
"default": "status"
|
|
14
|
+
},
|
|
15
|
+
"type": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "Column type (text or citext)",
|
|
18
|
+
"default": "text"
|
|
19
|
+
},
|
|
20
|
+
"default_value": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"description": "Default value expression (e.g., active)"
|
|
23
|
+
},
|
|
24
|
+
"is_required": {
|
|
25
|
+
"type": "boolean",
|
|
26
|
+
"description": "Whether the column has a NOT NULL constraint",
|
|
27
|
+
"default": true
|
|
28
|
+
},
|
|
29
|
+
"allowed_values": {
|
|
30
|
+
"type": "array",
|
|
31
|
+
"items": {
|
|
32
|
+
"type": "string"
|
|
33
|
+
},
|
|
34
|
+
"description": "If provided, creates a CHECK constraint restricting the column to these values"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
tags: ['status', 'schema'],
|
|
39
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export const DataTags = {
|
|
2
|
+
name: 'DataTags',
|
|
3
|
+
slug: 'data_tags',
|
|
4
|
+
category: 'data',
|
|
5
|
+
display_name: 'Tags',
|
|
6
|
+
description: 'Adds a citext[] tags column with GIN index for efficient array containment queries (@>, &&). Standard tagging pattern for categorization and filtering.',
|
|
7
|
+
parameter_schema: {
|
|
8
|
+
"type": "object",
|
|
9
|
+
"properties": {
|
|
10
|
+
"field_name": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "Column name for the tags array",
|
|
13
|
+
"default": "tags"
|
|
14
|
+
},
|
|
15
|
+
"default_value": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "Default value expression for the tags column"
|
|
18
|
+
},
|
|
19
|
+
"is_required": {
|
|
20
|
+
"type": "boolean",
|
|
21
|
+
"description": "Whether the column has a NOT NULL constraint",
|
|
22
|
+
"default": false
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
tags: ['tags', 'schema'],
|
|
27
|
+
};
|