Skip to content

Commit 7798034

Browse files
authored
Merge pull request #949 from constructive-io/schema-update/20260401-090434
chore: update schemas from constructive-db
2 parents fc23b83 + 555470b commit 7798034

116 files changed

Lines changed: 14483 additions & 4318 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agents/skills/cli-public/SKILL.md

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22
name: cli-public
3-
description: CLI tool (csdk) for the public API — provides CRUD commands for 107 tables and 55 custom operations
3+
description: CLI tool (csdk) for the public API — provides CRUD commands for 109 tables and 61 custom operations
44
---
55

66
# cli-public
77

88
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
99

10-
CLI tool (csdk) for the public API — provides CRUD commands for 107 tables and 55 custom operations
10+
CLI tool (csdk) for the public API — provides CRUD commands for 109 tables and 61 custom operations
1111

1212
## Usage
1313

@@ -23,13 +23,13 @@ csdk auth set-token <token>
2323
csdk config set <key> <value>
2424
csdk config get <key>
2525

26-
# CRUD for any table (e.g. get-all-record)
27-
csdk get-all-record list
28-
csdk get-all-record get --id <value>
29-
csdk get-all-record create --<field> <value>
26+
# CRUD for any table (e.g. org-get-managers-record)
27+
csdk org-get-managers-record list
28+
csdk org-get-managers-record get --id <value>
29+
csdk org-get-managers-record create --<field> <value>
3030

3131
# Non-interactive mode (skip all prompts, use flags only)
32-
csdk --no-tty get-all-record list
32+
csdk --no-tty org-get-managers-record list
3333
```
3434

3535
## Examples
@@ -40,13 +40,13 @@ csdk --no-tty get-all-record list
4040
csdk context create local --endpoint http://localhost:5000/graphql
4141
csdk context use local
4242
csdk auth set-token <token>
43-
csdk get-all-record list
43+
csdk org-get-managers-record list
4444
```
4545

4646
### Non-interactive mode (for scripts and CI)
4747

4848
```bash
49-
csdk --no-tty get-all-record create --<field> <value>
49+
csdk --no-tty org-get-managers-record create --<field> <value>
5050
```
5151

5252
## References
@@ -56,9 +56,9 @@ See the `references/` directory for detailed per-entity API documentation:
5656
- [context](references/context.md)
5757
- [auth](references/auth.md)
5858
- [config](references/config.md)
59-
- [get-all-record](references/get-all-record.md)
6059
- [org-get-managers-record](references/org-get-managers-record.md)
6160
- [org-get-subordinates-record](references/org-get-subordinates-record.md)
61+
- [get-all-record](references/get-all-record.md)
6262
- [object](references/object.md)
6363
- [app-permission](references/app-permission.md)
6464
- [org-permission](references/org-permission.md)
@@ -119,6 +119,8 @@ See the `references/` directory for detailed per-entity API documentation:
119119
- [users-module](references/users-module.md)
120120
- [blueprint](references/blueprint.md)
121121
- [blueprint-template](references/blueprint-template.md)
122+
- [blueprint-construction](references/blueprint-construction.md)
123+
- [storage-module](references/storage-module.md)
122124
- [database-provision-module](references/database-provision-module.md)
123125
- [app-admin-grant](references/app-admin-grant.md)
124126
- [app-owner-grant](references/app-owner-grant.md)
@@ -149,9 +151,9 @@ See the `references/` directory for detailed per-entity API documentation:
149151
- [store](references/store.md)
150152
- [app-permission-default](references/app-permission-default.md)
151153
- [role-type](references/role-type.md)
152-
- [migrate-file](references/migrate-file.md)
153154
- [app-limit-default](references/app-limit-default.md)
154155
- [org-limit-default](references/org-limit-default.md)
156+
- [migrate-file](references/migrate-file.md)
155157
- [membership-type](references/membership-type.md)
156158
- [commit](references/commit.md)
157159
- [app-membership-default](references/app-membership-default.md)
@@ -173,6 +175,7 @@ See the `references/` directory for detailed per-entity API documentation:
173175
- [org-is-manager-of](references/org-is-manager-of.md)
174176
- [app-permissions-get-mask](references/app-permissions-get-mask.md)
175177
- [org-permissions-get-mask](references/org-permissions-get-mask.md)
178+
- [resolve-blueprint-table](references/resolve-blueprint-table.md)
176179
- [app-permissions-get-mask-by-names](references/app-permissions-get-mask-by-names.md)
177180
- [org-permissions-get-mask-by-names](references/org-permissions-get-mask-by-names.md)
178181
- [get-all-objects-from-root](references/get-all-objects-from-root.md)
@@ -198,22 +201,27 @@ See the `references/` directory for detailed per-entity API documentation:
198201
- [construct-blueprint](references/construct-blueprint.md)
199202
- [reset-password](references/reset-password.md)
200203
- [remove-node-at-path](references/remove-node-at-path.md)
201-
- [set-data-at-path](references/set-data-at-path.md)
202-
- [set-props-and-commit](references/set-props-and-commit.md)
203204
- [copy-template-to-blueprint](references/copy-template-to-blueprint.md)
204-
- [provision-database-with-user](references/provision-database-with-user.md)
205205
- [bootstrap-user](references/bootstrap-user.md)
206206
- [set-field-order](references/set-field-order.md)
207+
- [provision-unique-constraint](references/provision-unique-constraint.md)
208+
- [provision-full-text-search](references/provision-full-text-search.md)
209+
- [provision-index](references/provision-index.md)
210+
- [set-data-at-path](references/set-data-at-path.md)
211+
- [set-props-and-commit](references/set-props-and-commit.md)
212+
- [provision-database-with-user](references/provision-database-with-user.md)
207213
- [insert-node-at-path](references/insert-node-at-path.md)
208214
- [update-node-at-path](references/update-node-at-path.md)
209215
- [set-and-commit](references/set-and-commit.md)
216+
- [provision-relation](references/provision-relation.md)
210217
- [apply-rls](references/apply-rls.md)
211218
- [sign-in-one-time-token](references/sign-in-one-time-token.md)
212219
- [create-user-database](references/create-user-database.md)
213220
- [extend-token-expires](references/extend-token-expires.md)
214221
- [sign-in](references/sign-in.md)
215222
- [sign-up](references/sign-up.md)
216223
- [one-time-token](references/one-time-token.md)
224+
- [provision-table](references/provision-table.md)
217225
- [send-verification-email](references/send-verification-email.md)
218226
- [forgot-password](references/forgot-password.md)
219227
- [verify-password](references/verify-password.md)
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# blueprintConstruction
2+
3+
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
4+
5+
CRUD operations for BlueprintConstruction records via csdk CLI
6+
7+
## Usage
8+
9+
```bash
10+
csdk blueprint-construction list
11+
csdk blueprint-construction list --where.<field>.<op> <value> --orderBy <values>
12+
csdk blueprint-construction list --limit 10 --after <cursor>
13+
csdk blueprint-construction find-first --where.<field>.<op> <value>
14+
csdk blueprint-construction get --id <UUID>
15+
csdk blueprint-construction create --blueprintId <UUID> --databaseId <UUID> [--schemaId <UUID>] [--status <String>] [--errorDetails <String>] [--tableMap <JSON>] [--constructedDefinition <JSON>] [--constructedAt <Datetime>]
16+
csdk blueprint-construction update --id <UUID> [--blueprintId <UUID>] [--databaseId <UUID>] [--schemaId <UUID>] [--status <String>] [--errorDetails <String>] [--tableMap <JSON>] [--constructedDefinition <JSON>] [--constructedAt <Datetime>]
17+
csdk blueprint-construction delete --id <UUID>
18+
```
19+
20+
## Examples
21+
22+
### List blueprintConstruction records
23+
24+
```bash
25+
csdk blueprint-construction list
26+
```
27+
28+
### List blueprintConstruction records with pagination
29+
30+
```bash
31+
csdk blueprint-construction list --limit 10 --offset 0
32+
```
33+
34+
### List blueprintConstruction records with cursor pagination
35+
36+
```bash
37+
csdk blueprint-construction list --limit 10 --after <cursor>
38+
```
39+
40+
### Find first matching blueprintConstruction
41+
42+
```bash
43+
csdk blueprint-construction find-first --where.id.equalTo <value>
44+
```
45+
46+
### List blueprintConstruction records with field selection
47+
48+
```bash
49+
csdk blueprint-construction list --select id,id
50+
```
51+
52+
### List blueprintConstruction records with filtering and ordering
53+
54+
```bash
55+
csdk blueprint-construction list --where.id.equalTo <value> --orderBy ID_ASC
56+
```
57+
58+
### Create a blueprintConstruction
59+
60+
```bash
61+
csdk blueprint-construction create --blueprintId <UUID> --databaseId <UUID> [--schemaId <UUID>] [--status <String>] [--errorDetails <String>] [--tableMap <JSON>] [--constructedDefinition <JSON>] [--constructedAt <Datetime>]
62+
```
63+
64+
### Get a blueprintConstruction by id
65+
66+
```bash
67+
csdk blueprint-construction get --id <value>
68+
```

.agents/skills/cli-public/references/blueprint.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ csdk blueprint list --where.<field>.<op> <value> --orderBy <values>
1212
csdk blueprint list --limit 10 --after <cursor>
1313
csdk blueprint find-first --where.<field>.<op> <value>
1414
csdk blueprint get --id <UUID>
15-
csdk blueprint create --ownerId <UUID> --databaseId <UUID> --name <String> --displayName <String> --definition <JSON> [--description <String>] [--templateId <UUID>] [--status <String>] [--constructedAt <Datetime>] [--errorDetails <String>] [--refMap <JSON>] [--constructedDefinition <JSON>] [--definitionHash <UUID>] [--tableHashes <JSON>]
16-
csdk blueprint update --id <UUID> [--ownerId <UUID>] [--databaseId <UUID>] [--name <String>] [--displayName <String>] [--description <String>] [--definition <JSON>] [--templateId <UUID>] [--status <String>] [--constructedAt <Datetime>] [--errorDetails <String>] [--refMap <JSON>] [--constructedDefinition <JSON>] [--definitionHash <UUID>] [--tableHashes <JSON>]
15+
csdk blueprint create --ownerId <UUID> --databaseId <UUID> --name <String> --displayName <String> --definition <JSON> [--description <String>] [--templateId <UUID>] [--definitionHash <UUID>] [--tableHashes <JSON>]
16+
csdk blueprint update --id <UUID> [--ownerId <UUID>] [--databaseId <UUID>] [--name <String>] [--displayName <String>] [--description <String>] [--definition <JSON>] [--templateId <UUID>] [--definitionHash <UUID>] [--tableHashes <JSON>]
1717
csdk blueprint delete --id <UUID>
1818
```
1919

@@ -58,7 +58,7 @@ csdk blueprint list --where.id.equalTo <value> --orderBy ID_ASC
5858
### Create a blueprint
5959

6060
```bash
61-
csdk blueprint create --ownerId <UUID> --databaseId <UUID> --name <String> --displayName <String> --definition <JSON> [--description <String>] [--templateId <UUID>] [--status <String>] [--constructedAt <Datetime>] [--errorDetails <String>] [--refMap <JSON>] [--constructedDefinition <JSON>] [--definitionHash <UUID>] [--tableHashes <JSON>]
61+
csdk blueprint create --ownerId <UUID> --databaseId <UUID> --name <String> --displayName <String> --definition <JSON> [--description <String>] [--templateId <UUID>] [--definitionHash <UUID>] [--tableHashes <JSON>]
6262
```
6363

6464
### Get a blueprint by id

.agents/skills/cli-public/references/construct-blueprint.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
44

5-
Executes a draft blueprint definition. Four phases: (1) create tables with nodes[], fields, and policies[], (2) create relations between tables, (3) create indexes on table fields (supports BTREE, HNSW, GIN, GIST, BM25, etc.), (4) create full-text search configurations with weighted multi-field TSVector support. nodes[] entries can be strings or {$type, data} objects. Relations use $type for relation_type with junction config as top-level fields (node_type, policy_type, grant_roles, grant_privileges, policy_data, policy_permissive, source_field_name, target_field_name, node_data). Indexes reference table_ref + column name(s) and are resolved to field_ids. Full-text searches reference table_ref + tsvector field + source fields with weights/langs. Builds a ref_map of local ref names to created table UUIDs. Updates blueprint status to constructed (or failed with error_details). Returns the ref_map.
5+
Executes a blueprint definition by delegating to provision_* procedures. Creates a blueprint_construction record to track the attempt. Five phases: (1) provision_table() for each table with all nodes[], fields[], policies[], grants, and table-level indexes/fts/unique_constraints in a single call, (2) provision_relation() for each relation, (3) provision_index() for top-level indexes, (4) provision_full_text_search() for top-level FTS, (5) provision_unique_constraint() for top-level unique constraints. Tables are identified by table_name with optional per-table schema_name. Relations use $type for relation_type with source_table/target_table. Returns the construction record ID on success, NULL on failure.
66

77
## Usage
88

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# provisionFullTextSearch
2+
3+
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
4+
5+
Creates a full-text search configuration on a table. Accepts a jsonb definition with field (tsvector column name) and sources (array of {field, weight, lang}). Graceful: skips if FTS config already exists for the same (table_id, field_id). Returns the fts_id.
6+
7+
## Usage
8+
9+
```bash
10+
csdk provision-full-text-search --input.clientMutationId <String> --input.databaseId <UUID> --input.tableId <UUID> --input.definition <JSON>
11+
```
12+
13+
## Examples
14+
15+
### Run provisionFullTextSearch
16+
17+
```bash
18+
csdk provision-full-text-search --input.clientMutationId <String> --input.databaseId <UUID> --input.tableId <UUID> --input.definition <JSON>
19+
```
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# provisionIndex
2+
3+
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
4+
5+
Creates an index on a table. Accepts a jsonb definition with columns (array of names or single column string), access_method (default BTREE), is_unique, op_classes, options, and name (auto-generated if omitted). Graceful: skips if an index with the same (table_id, field_ids, access_method) already exists. Returns the index_id.
6+
7+
## Usage
8+
9+
```bash
10+
csdk provision-index --input.clientMutationId <String> --input.databaseId <UUID> --input.tableId <UUID> --input.definition <JSON>
11+
```
12+
13+
## Examples
14+
15+
### Run provisionIndex
16+
17+
```bash
18+
csdk provision-index --input.clientMutationId <String> --input.databaseId <UUID> --input.tableId <UUID> --input.definition <JSON>
19+
```
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# provisionRelation
2+
3+
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
4+
5+
Composable relation provisioning: creates FK fields, indexes, unique constraints, and junction tables depending on the relation_type. Supports RelationBelongsTo, RelationHasOne, RelationHasMany, and RelationManyToMany. ManyToMany uses provision_table() internally for junction table creation with full node/grant/policy support. All operations are graceful (skip existing). Returns (out_field_id, out_junction_table_id, out_source_field_id, out_target_field_id).
6+
7+
## Usage
8+
9+
```bash
10+
csdk provision-relation --input.clientMutationId <String> --input.databaseId <UUID> --input.relationType <String> --input.sourceTableId <UUID> --input.targetTableId <UUID> --input.fieldName <String> --input.deleteAction <String> --input.isRequired <Boolean> --input.apiRequired <Boolean> --input.createIndex <Boolean> --input.junctionTableId <UUID> --input.junctionTableName <String> --input.junctionSchemaId <UUID> --input.sourceFieldName <String> --input.targetFieldName <String> --input.useCompositeKey <Boolean> --input.exposeInApi <Boolean> --input.nodes <JSON> --input.grants <JSON> --input.grantRoles <String> --input.policies <JSON>
11+
```
12+
13+
## Examples
14+
15+
### Run provisionRelation
16+
17+
```bash
18+
csdk provision-relation --input.clientMutationId <String> --input.databaseId <UUID> --input.relationType <String> --input.sourceTableId <UUID> --input.targetTableId <UUID> --input.fieldName <String> --input.deleteAction <String> --input.isRequired <Boolean> --input.apiRequired <Boolean> --input.createIndex <Boolean> --input.junctionTableId <UUID> --input.junctionTableName <String> --input.junctionSchemaId <UUID> --input.sourceFieldName <String> --input.targetFieldName <String> --input.useCompositeKey <Boolean> --input.exposeInApi <Boolean> --input.nodes <JSON> --input.grants <JSON> --input.grantRoles <String> --input.policies <JSON>
19+
```
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# provisionTable
2+
3+
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
4+
5+
Composable table provisioning: creates or finds a table, then applies N nodes (Data* modules), creates fields, enables RLS, creates grants, creates N policies, and optionally creates table-level indexes/full_text_searches/unique_constraints. All operations are graceful (skip existing). Accepts multiple nodes and multiple policies per call, unlike secure_table_provision which is limited to one of each. Returns (out_table_id, out_fields).
6+
7+
## Usage
8+
9+
```bash
10+
csdk provision-table --input.clientMutationId <String> --input.databaseId <UUID> --input.schemaId <UUID> --input.tableName <String> --input.tableId <UUID> --input.nodes <JSON> --input.fields <JSON> --input.policies <JSON> --input.grants <JSON> --input.grantRoles <String> --input.useRls <Boolean> --input.indexes <JSON> --input.fullTextSearches <JSON> --input.uniqueConstraints <JSON>
11+
```
12+
13+
## Examples
14+
15+
### Run provisionTable
16+
17+
```bash
18+
csdk provision-table --input.clientMutationId <String> --input.databaseId <UUID> --input.schemaId <UUID> --input.tableName <String> --input.tableId <UUID> --input.nodes <JSON> --input.fields <JSON> --input.policies <JSON> --input.grants <JSON> --input.grantRoles <String> --input.useRls <Boolean> --input.indexes <JSON> --input.fullTextSearches <JSON> --input.uniqueConstraints <JSON>
19+
```
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# provisionUniqueConstraint
2+
3+
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
4+
5+
Creates a unique constraint on a table. Accepts a jsonb definition with columns (array of field names). Graceful: skips if the exact same unique constraint already exists.
6+
7+
## Usage
8+
9+
```bash
10+
csdk provision-unique-constraint --input.clientMutationId <String> --input.databaseId <UUID> --input.tableId <UUID> --input.definition <JSON>
11+
```
12+
13+
## Examples
14+
15+
### Run provisionUniqueConstraint
16+
17+
```bash
18+
csdk provision-unique-constraint --input.clientMutationId <String> --input.databaseId <UUID> --input.tableId <UUID> --input.definition <JSON>
19+
```

0 commit comments

Comments
 (0)