diff --git a/.agents/skills/cli-api/SKILL.md b/.agents/skills/cli-api/SKILL.md index 309d60d810..7481f360e1 100644 --- a/.agents/skills/cli-api/SKILL.md +++ b/.agents/skills/cli-api/SKILL.md @@ -23,13 +23,13 @@ csdk auth set-token csdk config set csdk config get -# CRUD for any table (e.g. api-schema) -csdk api-schema list -csdk api-schema get --id -csdk api-schema create -- +# CRUD for any table (e.g. api) +csdk api list +csdk api get --id +csdk api create -- # Non-interactive mode (skip all prompts, use flags only) -csdk --no-tty api-schema list +csdk --no-tty api list ``` ## Examples @@ -40,13 +40,13 @@ csdk --no-tty api-schema list csdk context create local --endpoint http://localhost:5000/graphql csdk context use local csdk auth set-token -csdk api-schema list +csdk api list ``` ### Non-interactive mode (for scripts and CI) ```bash -csdk --no-tty api-schema create -- +csdk --no-tty api create -- ``` ## References @@ -56,9 +56,9 @@ See the `references/` directory for detailed per-entity API documentation: - [context](references/context.md) - [auth](references/auth.md) - [config](references/config.md) +- [api](references/api.md) - [api-schema](references/api-schema.md) - [api-setting](references/api-setting.md) -- [apis](references/apis.md) - [ast-migration](references/ast-migration.md) - [check-constraint](references/check-constraint.md) - [composite-type](references/composite-type.md) @@ -88,9 +88,9 @@ See the `references/` directory for detailed per-entity API documentation: - [node-type-registry](references/node-type-registry.md) - [page](references/page.md) - [partition](references/partition.md) +- [platform-api](references/platform-api.md) - [platform-api-schema](references/platform-api-schema.md) - [platform-api-setting](references/platform-api-setting.md) -- [platform-apis](references/platform-apis.md) - [platform-cors-setting](references/platform-cors-setting.md) - [platform-domain](references/platform-domain.md) - [platform-domain-event](references/platform-domain-event.md) diff --git a/.agents/skills/cli-compute/SKILL.md b/.agents/skills/cli-compute/SKILL.md index 1523187de2..5106543dc7 100644 --- a/.agents/skills/cli-compute/SKILL.md +++ b/.agents/skills/cli-compute/SKILL.md @@ -1,13 +1,13 @@ --- name: cli-compute -description: CLI tool (csdk) for the compute API — provides CRUD commands for 69 tables and 29 custom operations +description: CLI tool (csdk) for the compute API — provides CRUD commands for 69 tables and 38 custom operations --- # cli-compute -CLI tool (csdk) for the compute API — provides CRUD commands for 69 tables and 29 custom operations +CLI tool (csdk) for the compute API — provides CRUD commands for 69 tables and 38 custom operations ## Usage @@ -135,12 +135,19 @@ See the `references/` directory for detailed per-entity API documentation: - [import-graph-json](references/import-graph-json.md) - [infra-init-empty-repo](references/infra-init-empty-repo.md) - [infra-insert-node-at-path](references/infra-insert-node-at-path.md) +- [infra-insert-nodes-at-paths](references/infra-insert-nodes-at-paths.md) +- [infra-set-and-commit](references/infra-set-and-commit.md) - [infra-set-data-at-path](references/infra-set-data-at-path.md) +- [infra-set-many-and-commit](references/infra-set-many-and-commit.md) - [init-empty-repo](references/init-empty-repo.md) - [insert-node-at-path](references/insert-node-at-path.md) +- [insert-nodes-at-paths](references/insert-nodes-at-paths.md) - [platform-infra-init-empty-repo](references/platform-infra-init-empty-repo.md) - [platform-infra-insert-node-at-path](references/platform-infra-insert-node-at-path.md) +- [platform-infra-insert-nodes-at-paths](references/platform-infra-insert-nodes-at-paths.md) +- [platform-infra-set-and-commit](references/platform-infra-set-and-commit.md) - [platform-infra-set-data-at-path](references/platform-infra-set-data-at-path.md) +- [platform-infra-set-many-and-commit](references/platform-infra-set-many-and-commit.md) - [platform-resource-installations-install](references/platform-resource-installations-install.md) - [platform-resource-installations-rollback](references/platform-resource-installations-rollback.md) - [platform-resource-installations-uninstall](references/platform-resource-installations-uninstall.md) @@ -151,6 +158,8 @@ See the `references/` directory for detailed per-entity API documentation: - [resource-installations-uninstall](references/resource-installations-uninstall.md) - [resource-installations-upgrade](references/resource-installations-upgrade.md) - [save-graph](references/save-graph.md) +- [set-and-commit](references/set-and-commit.md) - [set-data-at-path](references/set-data-at-path.md) +- [set-many-and-commit](references/set-many-and-commit.md) - [start-execution](references/start-execution.md) - [validate-function-graph](references/validate-function-graph.md) diff --git a/.agents/skills/cli-compute/references/function-definition.md b/.agents/skills/cli-compute/references/function-definition.md index 42f8c39b15..a3c0d48f6e 100644 --- a/.agents/skills/cli-compute/references/function-definition.md +++ b/.agents/skills/cli-compute/references/function-definition.md @@ -12,8 +12,8 @@ csdk function-definition list --where.. --orderBy csdk function-definition list --limit 10 --after csdk function-definition find-first --where.. csdk function-definition get --id -csdk function-definition create --category --databaseId --name [--accessChannels ] [--concurrency ] [--description ] [--fnCategory ] [--functionColumns ] [--graphId ] [--icon ] [--image ] [--inputs ] [--integrations ] [--isPublished ] [--maxAttempts ] [--moduleTable ] [--outputs ] [--payloadArgs ] [--priority ] [--props ] [--protected ] [--publishedAt ] [--queueName ] [--requiredBuckets ] [--requiredConfigs ] [--requiredModels ] [--requiredSecrets ] [--resources ] [--runtime ] [--scaleMax ] [--scaleMin ] [--targetFunction ] [--targetSchema ] [--timeoutSeconds ] [--volatile ] -csdk function-definition update --id [--accessChannels ] [--category ] [--concurrency ] [--databaseId ] [--description ] [--fnCategory ] [--functionColumns ] [--graphId ] [--icon ] [--image ] [--inputs ] [--integrations ] [--isPublished ] [--maxAttempts ] [--moduleTable ] [--name ] [--outputs ] [--payloadArgs ] [--priority ] [--props ] [--protected ] [--publishedAt ] [--queueName ] [--requiredBuckets ] [--requiredConfigs ] [--requiredModels ] [--requiredSecrets ] [--resources ] [--runtime ] [--scaleMax ] [--scaleMin ] [--targetFunction ] [--targetSchema ] [--timeoutSeconds ] [--volatile ] +csdk function-definition create --category --databaseId --name [--accessChannels ] [--concurrency ] [--description ] [--fnCategory ] [--functionColumns ] [--graphId ] [--icon ] [--image ] [--inputs ] [--integrations ] [--isPublished ] [--maxAttempts ] [--moduleTable ] [--outputs ] [--payloadArgs ] [--priority ] [--props ] [--protected ] [--publishedAt ] [--queueName ] [--requiredBuckets ] [--requiredConfigs ] [--requiredModels ] [--requiredModules ] [--requiredSecrets ] [--resources ] [--runtime ] [--scaleMax ] [--scaleMin ] [--targetFunction ] [--targetSchema ] [--timeoutSeconds ] [--volatile ] +csdk function-definition update --id [--accessChannels ] [--category ] [--concurrency ] [--databaseId ] [--description ] [--fnCategory ] [--functionColumns ] [--graphId ] [--icon ] [--image ] [--inputs ] [--integrations ] [--isPublished ] [--maxAttempts ] [--moduleTable ] [--name ] [--outputs ] [--payloadArgs ] [--priority ] [--props ] [--protected ] [--publishedAt ] [--queueName ] [--requiredBuckets ] [--requiredConfigs ] [--requiredModels ] [--requiredModules ] [--requiredSecrets ] [--resources ] [--runtime ] [--scaleMax ] [--scaleMin ] [--targetFunction ] [--targetSchema ] [--timeoutSeconds ] [--volatile ] csdk function-definition delete --id ``` @@ -58,7 +58,7 @@ csdk function-definition list --where.id.equalTo --orderBy ID_ASC ### Create a functionDefinition ```bash -csdk function-definition create --category --databaseId --name [--accessChannels ] [--concurrency ] [--description ] [--fnCategory ] [--functionColumns ] [--graphId ] [--icon ] [--image ] [--inputs ] [--integrations ] [--isPublished ] [--maxAttempts ] [--moduleTable ] [--outputs ] [--payloadArgs ] [--priority ] [--props ] [--protected ] [--publishedAt ] [--queueName ] [--requiredBuckets ] [--requiredConfigs ] [--requiredModels ] [--requiredSecrets ] [--resources ] [--runtime ] [--scaleMax ] [--scaleMin ] [--targetFunction ] [--targetSchema ] [--timeoutSeconds ] [--volatile ] +csdk function-definition create --category --databaseId --name [--accessChannels ] [--concurrency ] [--description ] [--fnCategory ] [--functionColumns ] [--graphId ] [--icon ] [--image ] [--inputs ] [--integrations ] [--isPublished ] [--maxAttempts ] [--moduleTable ] [--outputs ] [--payloadArgs ] [--priority ] [--props ] [--protected ] [--publishedAt ] [--queueName ] [--requiredBuckets ] [--requiredConfigs ] [--requiredModels ] [--requiredModules ] [--requiredSecrets ] [--resources ] [--runtime ] [--scaleMax ] [--scaleMin ] [--targetFunction ] [--targetSchema ] [--timeoutSeconds ] [--volatile ] ``` ### Get a functionDefinition by id diff --git a/.agents/skills/cli-compute/references/function-deployment.md b/.agents/skills/cli-compute/references/function-deployment.md index 7c2c6fcb08..c1ec3743d9 100644 --- a/.agents/skills/cli-compute/references/function-deployment.md +++ b/.agents/skills/cli-compute/references/function-deployment.md @@ -12,8 +12,8 @@ csdk function-deployment list --where.. --orderBy csdk function-deployment list --limit 10 --after csdk function-deployment find-first --where.. csdk function-deployment get --id -csdk function-deployment create --databaseId --image --namespaceId [--annotations ] [--concurrency ] [--errorCount ] [--handlerName ] [--imageVersion ] [--labels ] [--lastError ] [--lastErrorAt ] [--resources ] [--revision ] [--scaleMax ] [--scaleMin ] [--serviceName ] [--serviceUrl ] [--status ] [--timeoutSeconds ] -csdk function-deployment update --id [--annotations ] [--concurrency ] [--databaseId ] [--errorCount ] [--handlerName ] [--image ] [--imageVersion ] [--labels ] [--lastError ] [--lastErrorAt ] [--namespaceId ] [--resources ] [--revision ] [--scaleMax ] [--scaleMin ] [--serviceName ] [--serviceUrl ] [--status ] [--timeoutSeconds ] +csdk function-deployment create --databaseId --image --namespaceId [--annotations ] [--concurrency ] [--errorCount ] [--handlerName ] [--imageVersion ] [--labels ] [--lastError ] [--lastErrorAt ] [--realm ] [--resources ] [--revision ] [--scaleMax ] [--scaleMin ] [--serviceName ] [--serviceUrl ] [--status ] [--timeoutSeconds ] +csdk function-deployment update --id [--annotations ] [--concurrency ] [--databaseId ] [--errorCount ] [--handlerName ] [--image ] [--imageVersion ] [--labels ] [--lastError ] [--lastErrorAt ] [--namespaceId ] [--realm ] [--resources ] [--revision ] [--scaleMax ] [--scaleMin ] [--serviceName ] [--serviceUrl ] [--status ] [--timeoutSeconds ] csdk function-deployment delete --id ``` @@ -58,7 +58,7 @@ csdk function-deployment list --where.id.equalTo --orderBy ID_ASC ### Create a functionDeployment ```bash -csdk function-deployment create --databaseId --image --namespaceId [--annotations ] [--concurrency ] [--errorCount ] [--handlerName ] [--imageVersion ] [--labels ] [--lastError ] [--lastErrorAt ] [--resources ] [--revision ] [--scaleMax ] [--scaleMin ] [--serviceName ] [--serviceUrl ] [--status ] [--timeoutSeconds ] +csdk function-deployment create --databaseId --image --namespaceId [--annotations ] [--concurrency ] [--errorCount ] [--handlerName ] [--imageVersion ] [--labels ] [--lastError ] [--lastErrorAt ] [--realm ] [--resources ] [--revision ] [--scaleMax ] [--scaleMin ] [--serviceName ] [--serviceUrl ] [--status ] [--timeoutSeconds ] ``` ### Get a functionDeployment by id diff --git a/.agents/skills/cli-compute/references/infra-insert-nodes-at-paths.md b/.agents/skills/cli-compute/references/infra-insert-nodes-at-paths.md new file mode 100644 index 0000000000..2e1b239b6d --- /dev/null +++ b/.agents/skills/cli-compute/references/infra-insert-nodes-at-paths.md @@ -0,0 +1,19 @@ +# infraInsertNodesAtPaths + + + +Execute the infraInsertNodesAtPaths mutation + +## Usage + +```bash +csdk infra-insert-nodes-at-paths --input.clientMutationId --input.datas --input.kidsList --input.ktreeList --input.paths --input.root --input.sId +``` + +## Examples + +### Run infraInsertNodesAtPaths + +```bash +csdk infra-insert-nodes-at-paths --input.clientMutationId --input.datas --input.kidsList --input.ktreeList --input.paths --input.root --input.sId +``` diff --git a/.agents/skills/cli-compute/references/infra-set-and-commit.md b/.agents/skills/cli-compute/references/infra-set-and-commit.md new file mode 100644 index 0000000000..7666c08c3c --- /dev/null +++ b/.agents/skills/cli-compute/references/infra-set-and-commit.md @@ -0,0 +1,19 @@ +# infraSetAndCommit + + + +Execute the infraSetAndCommit mutation + +## Usage + +```bash +csdk infra-set-and-commit --input.clientMutationId --input.data --input.kids --input.ktree --input.message --input.path --input.refname --input.sId --input.storeId +``` + +## Examples + +### Run infraSetAndCommit + +```bash +csdk infra-set-and-commit --input.clientMutationId --input.data --input.kids --input.ktree --input.message --input.path --input.refname --input.sId --input.storeId +``` diff --git a/.agents/skills/cli-compute/references/infra-set-many-and-commit.md b/.agents/skills/cli-compute/references/infra-set-many-and-commit.md new file mode 100644 index 0000000000..2a8a6d7b35 --- /dev/null +++ b/.agents/skills/cli-compute/references/infra-set-many-and-commit.md @@ -0,0 +1,19 @@ +# infraSetManyAndCommit + + + +Execute the infraSetManyAndCommit mutation + +## Usage + +```bash +csdk infra-set-many-and-commit --input.clientMutationId --input.entries --input.message --input.refname --input.sId --input.storeId +``` + +## Examples + +### Run infraSetManyAndCommit + +```bash +csdk infra-set-many-and-commit --input.clientMutationId --input.entries --input.message --input.refname --input.sId --input.storeId +``` diff --git a/.agents/skills/cli-compute/references/insert-nodes-at-paths.md b/.agents/skills/cli-compute/references/insert-nodes-at-paths.md new file mode 100644 index 0000000000..f023c4ad2f --- /dev/null +++ b/.agents/skills/cli-compute/references/insert-nodes-at-paths.md @@ -0,0 +1,19 @@ +# insertNodesAtPaths + + + +Execute the insertNodesAtPaths mutation + +## Usage + +```bash +csdk insert-nodes-at-paths --input.clientMutationId --input.datas --input.kidsList --input.ktreeList --input.paths --input.root --input.sId +``` + +## Examples + +### Run insertNodesAtPaths + +```bash +csdk insert-nodes-at-paths --input.clientMutationId --input.datas --input.kidsList --input.ktreeList --input.paths --input.root --input.sId +``` diff --git a/.agents/skills/cli-compute/references/platform-function-definition.md b/.agents/skills/cli-compute/references/platform-function-definition.md index 0f4b696f46..092f56799a 100644 --- a/.agents/skills/cli-compute/references/platform-function-definition.md +++ b/.agents/skills/cli-compute/references/platform-function-definition.md @@ -12,8 +12,8 @@ csdk platform-function-definition list --where.. --orderBy csdk platform-function-definition find-first --where.. csdk platform-function-definition get --id -csdk platform-function-definition create --category --name [--accessChannels ] [--billable ] [--concurrency ] [--description ] [--fnCategory ] [--functionColumns ] [--graphId ] [--icon ] [--image ] [--inputs ] [--integrations ] [--isPublished ] [--maxAttempts ] [--moduleTable ] [--outputs ] [--payloadArgs ] [--priority ] [--props ] [--protected ] [--publishedAt ] [--queueName ] [--requiredBuckets ] [--requiredConfigs ] [--requiredModels ] [--requiredSecrets ] [--resources ] [--runtime ] [--scaleMax ] [--scaleMin ] [--system ] [--targetFunction ] [--targetSchema ] [--timeoutSeconds ] [--volatile ] -csdk platform-function-definition update --id [--accessChannels ] [--billable ] [--category ] [--concurrency ] [--description ] [--fnCategory ] [--functionColumns ] [--graphId ] [--icon ] [--image ] [--inputs ] [--integrations ] [--isPublished ] [--maxAttempts ] [--moduleTable ] [--name ] [--outputs ] [--payloadArgs ] [--priority ] [--props ] [--protected ] [--publishedAt ] [--queueName ] [--requiredBuckets ] [--requiredConfigs ] [--requiredModels ] [--requiredSecrets ] [--resources ] [--runtime ] [--scaleMax ] [--scaleMin ] [--system ] [--targetFunction ] [--targetSchema ] [--timeoutSeconds ] [--volatile ] +csdk platform-function-definition create --category --name [--accessChannels ] [--billable ] [--concurrency ] [--description ] [--fnCategory ] [--functionColumns ] [--graphId ] [--icon ] [--image ] [--inputs ] [--integrations ] [--isPublished ] [--maxAttempts ] [--moduleTable ] [--outputs ] [--payloadArgs ] [--priority ] [--props ] [--protected ] [--publishedAt ] [--queueName ] [--requiredBuckets ] [--requiredConfigs ] [--requiredModels ] [--requiredModules ] [--requiredSecrets ] [--resources ] [--runtime ] [--scaleMax ] [--scaleMin ] [--system ] [--targetFunction ] [--targetSchema ] [--timeoutSeconds ] [--volatile ] +csdk platform-function-definition update --id [--accessChannels ] [--billable ] [--category ] [--concurrency ] [--description ] [--fnCategory ] [--functionColumns ] [--graphId ] [--icon ] [--image ] [--inputs ] [--integrations ] [--isPublished ] [--maxAttempts ] [--moduleTable ] [--name ] [--outputs ] [--payloadArgs ] [--priority ] [--props ] [--protected ] [--publishedAt ] [--queueName ] [--requiredBuckets ] [--requiredConfigs ] [--requiredModels ] [--requiredModules ] [--requiredSecrets ] [--resources ] [--runtime ] [--scaleMax ] [--scaleMin ] [--system ] [--targetFunction ] [--targetSchema ] [--timeoutSeconds ] [--volatile ] csdk platform-function-definition delete --id ``` @@ -58,7 +58,7 @@ csdk platform-function-definition list --where.id.equalTo --orderBy ID_A ### Create a platformFunctionDefinition ```bash -csdk platform-function-definition create --category --name [--accessChannels ] [--billable ] [--concurrency ] [--description ] [--fnCategory ] [--functionColumns ] [--graphId ] [--icon ] [--image ] [--inputs ] [--integrations ] [--isPublished ] [--maxAttempts ] [--moduleTable ] [--outputs ] [--payloadArgs ] [--priority ] [--props ] [--protected ] [--publishedAt ] [--queueName ] [--requiredBuckets ] [--requiredConfigs ] [--requiredModels ] [--requiredSecrets ] [--resources ] [--runtime ] [--scaleMax ] [--scaleMin ] [--system ] [--targetFunction ] [--targetSchema ] [--timeoutSeconds ] [--volatile ] +csdk platform-function-definition create --category --name [--accessChannels ] [--billable ] [--concurrency ] [--description ] [--fnCategory ] [--functionColumns ] [--graphId ] [--icon ] [--image ] [--inputs ] [--integrations ] [--isPublished ] [--maxAttempts ] [--moduleTable ] [--outputs ] [--payloadArgs ] [--priority ] [--props ] [--protected ] [--publishedAt ] [--queueName ] [--requiredBuckets ] [--requiredConfigs ] [--requiredModels ] [--requiredModules ] [--requiredSecrets ] [--resources ] [--runtime ] [--scaleMax ] [--scaleMin ] [--system ] [--targetFunction ] [--targetSchema ] [--timeoutSeconds ] [--volatile ] ``` ### Get a platformFunctionDefinition by id diff --git a/.agents/skills/cli-compute/references/platform-function-deployment.md b/.agents/skills/cli-compute/references/platform-function-deployment.md index 2fecca87b1..7b1950c34d 100644 --- a/.agents/skills/cli-compute/references/platform-function-deployment.md +++ b/.agents/skills/cli-compute/references/platform-function-deployment.md @@ -12,8 +12,8 @@ csdk platform-function-deployment list --where.. --orderBy csdk platform-function-deployment find-first --where.. csdk platform-function-deployment get --id -csdk platform-function-deployment create --image --namespaceId [--annotations ] [--concurrency ] [--errorCount ] [--handlerName ] [--imageVersion ] [--labels ] [--lastError ] [--lastErrorAt ] [--resources ] [--revision ] [--scaleMax ] [--scaleMin ] [--serviceName ] [--serviceUrl ] [--status ] [--timeoutSeconds ] -csdk platform-function-deployment update --id [--annotations ] [--concurrency ] [--errorCount ] [--handlerName ] [--image ] [--imageVersion ] [--labels ] [--lastError ] [--lastErrorAt ] [--namespaceId ] [--resources ] [--revision ] [--scaleMax ] [--scaleMin ] [--serviceName ] [--serviceUrl ] [--status ] [--timeoutSeconds ] +csdk platform-function-deployment create --image --namespaceId [--annotations ] [--concurrency ] [--errorCount ] [--handlerName ] [--imageVersion ] [--labels ] [--lastError ] [--lastErrorAt ] [--realm ] [--resources ] [--revision ] [--scaleMax ] [--scaleMin ] [--serviceName ] [--serviceUrl ] [--status ] [--timeoutSeconds ] +csdk platform-function-deployment update --id [--annotations ] [--concurrency ] [--errorCount ] [--handlerName ] [--image ] [--imageVersion ] [--labels ] [--lastError ] [--lastErrorAt ] [--namespaceId ] [--realm ] [--resources ] [--revision ] [--scaleMax ] [--scaleMin ] [--serviceName ] [--serviceUrl ] [--status ] [--timeoutSeconds ] csdk platform-function-deployment delete --id ``` @@ -58,7 +58,7 @@ csdk platform-function-deployment list --where.id.equalTo --orderBy ID_A ### Create a platformFunctionDeployment ```bash -csdk platform-function-deployment create --image --namespaceId [--annotations ] [--concurrency ] [--errorCount ] [--handlerName ] [--imageVersion ] [--labels ] [--lastError ] [--lastErrorAt ] [--resources ] [--revision ] [--scaleMax ] [--scaleMin ] [--serviceName ] [--serviceUrl ] [--status ] [--timeoutSeconds ] +csdk platform-function-deployment create --image --namespaceId [--annotations ] [--concurrency ] [--errorCount ] [--handlerName ] [--imageVersion ] [--labels ] [--lastError ] [--lastErrorAt ] [--realm ] [--resources ] [--revision ] [--scaleMax ] [--scaleMin ] [--serviceName ] [--serviceUrl ] [--status ] [--timeoutSeconds ] ``` ### Get a platformFunctionDeployment by id diff --git a/.agents/skills/cli-compute/references/platform-infra-insert-nodes-at-paths.md b/.agents/skills/cli-compute/references/platform-infra-insert-nodes-at-paths.md new file mode 100644 index 0000000000..0f1ce80662 --- /dev/null +++ b/.agents/skills/cli-compute/references/platform-infra-insert-nodes-at-paths.md @@ -0,0 +1,19 @@ +# platformInfraInsertNodesAtPaths + + + +Execute the platformInfraInsertNodesAtPaths mutation + +## Usage + +```bash +csdk platform-infra-insert-nodes-at-paths --input.clientMutationId --input.datas --input.kidsList --input.ktreeList --input.paths --input.root --input.sId +``` + +## Examples + +### Run platformInfraInsertNodesAtPaths + +```bash +csdk platform-infra-insert-nodes-at-paths --input.clientMutationId --input.datas --input.kidsList --input.ktreeList --input.paths --input.root --input.sId +``` diff --git a/.agents/skills/cli-compute/references/platform-infra-set-and-commit.md b/.agents/skills/cli-compute/references/platform-infra-set-and-commit.md new file mode 100644 index 0000000000..78c8099e2d --- /dev/null +++ b/.agents/skills/cli-compute/references/platform-infra-set-and-commit.md @@ -0,0 +1,19 @@ +# platformInfraSetAndCommit + + + +Execute the platformInfraSetAndCommit mutation + +## Usage + +```bash +csdk platform-infra-set-and-commit --input.clientMutationId --input.data --input.kids --input.ktree --input.message --input.path --input.refname --input.sId --input.storeId +``` + +## Examples + +### Run platformInfraSetAndCommit + +```bash +csdk platform-infra-set-and-commit --input.clientMutationId --input.data --input.kids --input.ktree --input.message --input.path --input.refname --input.sId --input.storeId +``` diff --git a/.agents/skills/cli-compute/references/platform-infra-set-many-and-commit.md b/.agents/skills/cli-compute/references/platform-infra-set-many-and-commit.md new file mode 100644 index 0000000000..33e719276f --- /dev/null +++ b/.agents/skills/cli-compute/references/platform-infra-set-many-and-commit.md @@ -0,0 +1,19 @@ +# platformInfraSetManyAndCommit + + + +Execute the platformInfraSetManyAndCommit mutation + +## Usage + +```bash +csdk platform-infra-set-many-and-commit --input.clientMutationId --input.entries --input.message --input.refname --input.sId --input.storeId +``` + +## Examples + +### Run platformInfraSetManyAndCommit + +```bash +csdk platform-infra-set-many-and-commit --input.clientMutationId --input.entries --input.message --input.refname --input.sId --input.storeId +``` diff --git a/.agents/skills/cli-compute/references/set-and-commit.md b/.agents/skills/cli-compute/references/set-and-commit.md new file mode 100644 index 0000000000..fdb32a40a4 --- /dev/null +++ b/.agents/skills/cli-compute/references/set-and-commit.md @@ -0,0 +1,19 @@ +# setAndCommit + + + +Execute the setAndCommit mutation + +## Usage + +```bash +csdk set-and-commit --input.clientMutationId --input.data --input.kids --input.ktree --input.message --input.path --input.refname --input.sId --input.storeId +``` + +## Examples + +### Run setAndCommit + +```bash +csdk set-and-commit --input.clientMutationId --input.data --input.kids --input.ktree --input.message --input.path --input.refname --input.sId --input.storeId +``` diff --git a/.agents/skills/cli-compute/references/set-many-and-commit.md b/.agents/skills/cli-compute/references/set-many-and-commit.md new file mode 100644 index 0000000000..7039169257 --- /dev/null +++ b/.agents/skills/cli-compute/references/set-many-and-commit.md @@ -0,0 +1,19 @@ +# setManyAndCommit + + + +Execute the setManyAndCommit mutation + +## Usage + +```bash +csdk set-many-and-commit --input.clientMutationId --input.entries --input.message --input.refname --input.sId --input.storeId +``` + +## Examples + +### Run setManyAndCommit + +```bash +csdk set-many-and-commit --input.clientMutationId --input.entries --input.message --input.refname --input.sId --input.storeId +``` diff --git a/.agents/skills/cli-infra/SKILL.md b/.agents/skills/cli-infra/SKILL.md index 2437911365..15667eeae9 100644 --- a/.agents/skills/cli-infra/SKILL.md +++ b/.agents/skills/cli-infra/SKILL.md @@ -1,13 +1,13 @@ --- name: cli-infra -description: CLI tool (csdk) for the infra API — provides CRUD commands for 10 tables and 4 custom operations +description: CLI tool (csdk) for the infra API — provides CRUD commands for 10 tables and 7 custom operations --- # cli-infra -CLI tool (csdk) for the infra API — provides CRUD commands for 10 tables and 4 custom operations +CLI tool (csdk) for the infra API — provides CRUD commands for 10 tables and 7 custom operations ## Usage @@ -68,5 +68,8 @@ See the `references/` directory for detailed per-entity API documentation: - [platform-namespace-event](references/platform-namespace-event.md) - [platform-infra-init-empty-repo](references/platform-infra-init-empty-repo.md) - [platform-infra-insert-node-at-path](references/platform-infra-insert-node-at-path.md) +- [platform-infra-insert-nodes-at-paths](references/platform-infra-insert-nodes-at-paths.md) +- [platform-infra-set-and-commit](references/platform-infra-set-and-commit.md) - [platform-infra-set-data-at-path](references/platform-infra-set-data-at-path.md) +- [platform-infra-set-many-and-commit](references/platform-infra-set-many-and-commit.md) - [provision-bucket](references/provision-bucket.md) diff --git a/.agents/skills/cli-infra/references/platform-infra-insert-nodes-at-paths.md b/.agents/skills/cli-infra/references/platform-infra-insert-nodes-at-paths.md new file mode 100644 index 0000000000..0f1ce80662 --- /dev/null +++ b/.agents/skills/cli-infra/references/platform-infra-insert-nodes-at-paths.md @@ -0,0 +1,19 @@ +# platformInfraInsertNodesAtPaths + + + +Execute the platformInfraInsertNodesAtPaths mutation + +## Usage + +```bash +csdk platform-infra-insert-nodes-at-paths --input.clientMutationId --input.datas --input.kidsList --input.ktreeList --input.paths --input.root --input.sId +``` + +## Examples + +### Run platformInfraInsertNodesAtPaths + +```bash +csdk platform-infra-insert-nodes-at-paths --input.clientMutationId --input.datas --input.kidsList --input.ktreeList --input.paths --input.root --input.sId +``` diff --git a/.agents/skills/cli-infra/references/platform-infra-set-and-commit.md b/.agents/skills/cli-infra/references/platform-infra-set-and-commit.md new file mode 100644 index 0000000000..78c8099e2d --- /dev/null +++ b/.agents/skills/cli-infra/references/platform-infra-set-and-commit.md @@ -0,0 +1,19 @@ +# platformInfraSetAndCommit + + + +Execute the platformInfraSetAndCommit mutation + +## Usage + +```bash +csdk platform-infra-set-and-commit --input.clientMutationId --input.data --input.kids --input.ktree --input.message --input.path --input.refname --input.sId --input.storeId +``` + +## Examples + +### Run platformInfraSetAndCommit + +```bash +csdk platform-infra-set-and-commit --input.clientMutationId --input.data --input.kids --input.ktree --input.message --input.path --input.refname --input.sId --input.storeId +``` diff --git a/.agents/skills/cli-infra/references/platform-infra-set-many-and-commit.md b/.agents/skills/cli-infra/references/platform-infra-set-many-and-commit.md new file mode 100644 index 0000000000..33e719276f --- /dev/null +++ b/.agents/skills/cli-infra/references/platform-infra-set-many-and-commit.md @@ -0,0 +1,19 @@ +# platformInfraSetManyAndCommit + + + +Execute the platformInfraSetManyAndCommit mutation + +## Usage + +```bash +csdk platform-infra-set-many-and-commit --input.clientMutationId --input.entries --input.message --input.refname --input.sId --input.storeId +``` + +## Examples + +### Run platformInfraSetManyAndCommit + +```bash +csdk platform-infra-set-many-and-commit --input.clientMutationId --input.entries --input.message --input.refname --input.sId --input.storeId +``` diff --git a/.agents/skills/cli-modules/SKILL.md b/.agents/skills/cli-modules/SKILL.md index c2e22a0d72..e3f16707fe 100644 --- a/.agents/skills/cli-modules/SKILL.md +++ b/.agents/skills/cli-modules/SKILL.md @@ -1,13 +1,13 @@ --- name: cli-modules -description: CLI tool (csdk) for the modules API — provides CRUD commands for 76 tables and 12 custom operations +description: CLI tool (csdk) for the modules API — provides CRUD commands for 78 tables and 3 custom operations --- # cli-modules -CLI tool (csdk) for the modules API — provides CRUD commands for 76 tables and 12 custom operations +CLI tool (csdk) for the modules API — provides CRUD commands for 78 tables and 3 custom operations ## Usage @@ -117,6 +117,7 @@ See the `references/` directory for detailed per-entity API documentation: - [resource-module](references/resource-module.md) - [rls-module](references/rls-module.md) - [route-module](references/route-module.md) +- [scope-types-module](references/scope-types-module.md) - [secure-table-provision](references/secure-table-provision.md) - [session-secrets-module](references/session-secrets-module.md) - [sessions-module](references/sessions-module.md) @@ -127,20 +128,12 @@ See the `references/` directory for detailed per-entity API documentation: - [user-auth-module](references/user-auth-module.md) - [user-credentials-module](references/user-credentials-module.md) - [user-settings-module](references/user-settings-module.md) +- [user-settings-security-module](references/user-settings-security-module.md) - [user-state-module](references/user-state-module.md) - [users-module](references/users-module.md) - [webauthn-auth-module](references/webauthn-auth-module.md) - [webauthn-credentials-module](references/webauthn-credentials-module.md) - [webhook-module](references/webhook-module.md) -- [resolve-blueprint-field](references/resolve-blueprint-field.md) -- [resolve-blueprint-table](references/resolve-blueprint-table.md) - [construct-blueprint](references/construct-blueprint.md) - [copy-template-to-blueprint](references/copy-template-to-blueprint.md) - [provision-bucket](references/provision-bucket.md) -- [provision-check-constraint](references/provision-check-constraint.md) -- [provision-full-text-search](references/provision-full-text-search.md) -- [provision-index](references/provision-index.md) -- [provision-relation](references/provision-relation.md) -- [provision-spatial-relation](references/provision-spatial-relation.md) -- [provision-table](references/provision-table.md) -- [provision-unique-constraint](references/provision-unique-constraint.md) diff --git a/.agents/skills/cli-modules/references/billing-provider-module.md b/.agents/skills/cli-modules/references/billing-provider-module.md index e6a3518fa9..90fb26beb0 100644 --- a/.agents/skills/cli-modules/references/billing-provider-module.md +++ b/.agents/skills/cli-modules/references/billing-provider-module.md @@ -12,8 +12,8 @@ csdk billing-provider-module list --where.. --orderBy csdk billing-provider-module find-first --where.. csdk billing-provider-module get --id -csdk billing-provider-module create --databaseId [--apiName ] [--billingCustomersTableId ] [--billingCustomersTableName ] [--billingPricesTableId ] [--billingPricesTableName ] [--billingProductsTableId ] [--billingProductsTableName ] [--billingSubscriptionsTableId ] [--billingSubscriptionsTableName ] [--billingWebhookEventsTableId ] [--billingWebhookEventsTableName ] [--prefix ] [--pricesTableId ] [--privateApiName ] [--privateSchemaId ] [--processBillingEventFunction ] [--productsTableId ] [--provider ] [--schemaId ] [--subscriptionsTableId ] -csdk billing-provider-module update --id [--apiName ] [--billingCustomersTableId ] [--billingCustomersTableName ] [--billingPricesTableId ] [--billingPricesTableName ] [--billingProductsTableId ] [--billingProductsTableName ] [--billingSubscriptionsTableId ] [--billingSubscriptionsTableName ] [--billingWebhookEventsTableId ] [--billingWebhookEventsTableName ] [--databaseId ] [--prefix ] [--pricesTableId ] [--privateApiName ] [--privateSchemaId ] [--processBillingEventFunction ] [--productsTableId ] [--provider ] [--schemaId ] [--subscriptionsTableId ] +csdk billing-provider-module create --databaseId [--apiName ] [--billingCustomersTableId ] [--billingCustomersTableName ] [--billingInvoicesTableId ] [--billingInvoicesTableName ] [--billingPricesTableId ] [--billingPricesTableName ] [--billingProductsTableId ] [--billingProductsTableName ] [--billingRefundsTableId ] [--billingRefundsTableName ] [--billingSubscriptionsTableId ] [--billingSubscriptionsTableName ] [--billingWebhookEventsTableId ] [--billingWebhookEventsTableName ] [--listPendingUsageSyncFunction ] [--markUsageSyncedFunction ] [--prefix ] [--pricesTableId ] [--privateApiName ] [--privateSchemaId ] [--processBillingEventFunction ] [--productsTableId ] [--provider ] [--recordRefundFunction ] [--schemaId ] [--subscriptionsTableId ] [--upsertInvoiceFunction ] +csdk billing-provider-module update --id [--apiName ] [--billingCustomersTableId ] [--billingCustomersTableName ] [--billingInvoicesTableId ] [--billingInvoicesTableName ] [--billingPricesTableId ] [--billingPricesTableName ] [--billingProductsTableId ] [--billingProductsTableName ] [--billingRefundsTableId ] [--billingRefundsTableName ] [--billingSubscriptionsTableId ] [--billingSubscriptionsTableName ] [--billingWebhookEventsTableId ] [--billingWebhookEventsTableName ] [--databaseId ] [--listPendingUsageSyncFunction ] [--markUsageSyncedFunction ] [--prefix ] [--pricesTableId ] [--privateApiName ] [--privateSchemaId ] [--processBillingEventFunction ] [--productsTableId ] [--provider ] [--recordRefundFunction ] [--schemaId ] [--subscriptionsTableId ] [--upsertInvoiceFunction ] csdk billing-provider-module delete --id ``` @@ -58,7 +58,7 @@ csdk billing-provider-module list --where.id.equalTo --orderBy ID_ASC ### Create a billingProviderModule ```bash -csdk billing-provider-module create --databaseId [--apiName ] [--billingCustomersTableId ] [--billingCustomersTableName ] [--billingPricesTableId ] [--billingPricesTableName ] [--billingProductsTableId ] [--billingProductsTableName ] [--billingSubscriptionsTableId ] [--billingSubscriptionsTableName ] [--billingWebhookEventsTableId ] [--billingWebhookEventsTableName ] [--prefix ] [--pricesTableId ] [--privateApiName ] [--privateSchemaId ] [--processBillingEventFunction ] [--productsTableId ] [--provider ] [--schemaId ] [--subscriptionsTableId ] +csdk billing-provider-module create --databaseId [--apiName ] [--billingCustomersTableId ] [--billingCustomersTableName ] [--billingInvoicesTableId ] [--billingInvoicesTableName ] [--billingPricesTableId ] [--billingPricesTableName ] [--billingProductsTableId ] [--billingProductsTableName ] [--billingRefundsTableId ] [--billingRefundsTableName ] [--billingSubscriptionsTableId ] [--billingSubscriptionsTableName ] [--billingWebhookEventsTableId ] [--billingWebhookEventsTableName ] [--listPendingUsageSyncFunction ] [--markUsageSyncedFunction ] [--prefix ] [--pricesTableId ] [--privateApiName ] [--privateSchemaId ] [--processBillingEventFunction ] [--productsTableId ] [--provider ] [--recordRefundFunction ] [--schemaId ] [--subscriptionsTableId ] [--upsertInvoiceFunction ] ``` ### Get a billingProviderModule by id diff --git a/.agents/skills/cli-modules/references/catalog-module.md b/.agents/skills/cli-modules/references/catalog-module.md index 5b2a308304..33795fb722 100644 --- a/.agents/skills/cli-modules/references/catalog-module.md +++ b/.agents/skills/cli-modules/references/catalog-module.md @@ -12,8 +12,8 @@ csdk catalog-module list --where.. --orderBy csdk catalog-module list --limit 10 --after csdk catalog-module find-first --where.. csdk catalog-module get --id -csdk catalog-module create --databaseId --scope [--apiName ] [--apisTableId ] [--apisTableName ] [--appsTableId ] [--appsTableName ] [--bucketsTableId ] [--bucketsTableName ] [--defaultPermissions ] [--domainsTableId ] [--domainsTableName ] [--entityTableId ] [--functionsTableId ] [--functionsTableName ] [--namespacesTableId ] [--namespacesTableName ] [--policies ] [--privateApiName ] [--provisions ] [--publicSchemaName ] [--resourceDefinitionsTableId ] [--resourceDefinitionsTableName ] [--resourceInstallationsTableId ] [--resourceInstallationsTableName ] [--resourcesTableId ] [--resourcesTableName ] [--schemaId ] [--sitesAppLinksTableId ] [--sitesAppLinksTableName ] [--sitesDeepLinksTableId ] [--sitesDeepLinksTableName ] [--sitesErrorPagesTableId ] [--sitesErrorPagesTableName ] [--sitesTableId ] [--sitesTableName ] [--sitesWebConfigTableId ] [--sitesWebConfigTableName ] -csdk catalog-module update --id [--apiName ] [--apisTableId ] [--apisTableName ] [--appsTableId ] [--appsTableName ] [--bucketsTableId ] [--bucketsTableName ] [--databaseId ] [--defaultPermissions ] [--domainsTableId ] [--domainsTableName ] [--entityTableId ] [--functionsTableId ] [--functionsTableName ] [--namespacesTableId ] [--namespacesTableName ] [--policies ] [--privateApiName ] [--provisions ] [--publicSchemaName ] [--resourceDefinitionsTableId ] [--resourceDefinitionsTableName ] [--resourceInstallationsTableId ] [--resourceInstallationsTableName ] [--resourcesTableId ] [--resourcesTableName ] [--schemaId ] [--scope ] [--sitesAppLinksTableId ] [--sitesAppLinksTableName ] [--sitesDeepLinksTableId ] [--sitesDeepLinksTableName ] [--sitesErrorPagesTableId ] [--sitesErrorPagesTableName ] [--sitesTableId ] [--sitesTableName ] [--sitesWebConfigTableId ] [--sitesWebConfigTableName ] +csdk catalog-module create --databaseId --scope [--apiName ] [--apisTableId ] [--apisTableName ] [--appsTableId ] [--appsTableName ] [--bindingsTableId ] [--bindingsTableName ] [--bucketsTableId ] [--bucketsTableName ] [--defaultPermissions ] [--domainsTableId ] [--domainsTableName ] [--entityTableId ] [--functionsTableId ] [--functionsTableName ] [--namespacesTableId ] [--namespacesTableName ] [--policies ] [--privateApiName ] [--provisions ] [--publicSchemaName ] [--resourceDefinitionsTableId ] [--resourceDefinitionsTableName ] [--resourceInstallationsTableId ] [--resourceInstallationsTableName ] [--resourcesTableId ] [--resourcesTableName ] [--schemaId ] [--sitesAppLinksTableId ] [--sitesAppLinksTableName ] [--sitesDeepLinksTableId ] [--sitesDeepLinksTableName ] [--sitesErrorPagesTableId ] [--sitesErrorPagesTableName ] [--sitesTableId ] [--sitesTableName ] [--sitesWebConfigTableId ] [--sitesWebConfigTableName ] +csdk catalog-module update --id [--apiName ] [--apisTableId ] [--apisTableName ] [--appsTableId ] [--appsTableName ] [--bindingsTableId ] [--bindingsTableName ] [--bucketsTableId ] [--bucketsTableName ] [--databaseId ] [--defaultPermissions ] [--domainsTableId ] [--domainsTableName ] [--entityTableId ] [--functionsTableId ] [--functionsTableName ] [--namespacesTableId ] [--namespacesTableName ] [--policies ] [--privateApiName ] [--provisions ] [--publicSchemaName ] [--resourceDefinitionsTableId ] [--resourceDefinitionsTableName ] [--resourceInstallationsTableId ] [--resourceInstallationsTableName ] [--resourcesTableId ] [--resourcesTableName ] [--schemaId ] [--scope ] [--sitesAppLinksTableId ] [--sitesAppLinksTableName ] [--sitesDeepLinksTableId ] [--sitesDeepLinksTableName ] [--sitesErrorPagesTableId ] [--sitesErrorPagesTableName ] [--sitesTableId ] [--sitesTableName ] [--sitesWebConfigTableId ] [--sitesWebConfigTableName ] csdk catalog-module delete --id ``` @@ -58,7 +58,7 @@ csdk catalog-module list --where.id.equalTo --orderBy ID_ASC ### Create a catalogModule ```bash -csdk catalog-module create --databaseId --scope [--apiName ] [--apisTableId ] [--apisTableName ] [--appsTableId ] [--appsTableName ] [--bucketsTableId ] [--bucketsTableName ] [--defaultPermissions ] [--domainsTableId ] [--domainsTableName ] [--entityTableId ] [--functionsTableId ] [--functionsTableName ] [--namespacesTableId ] [--namespacesTableName ] [--policies ] [--privateApiName ] [--provisions ] [--publicSchemaName ] [--resourceDefinitionsTableId ] [--resourceDefinitionsTableName ] [--resourceInstallationsTableId ] [--resourceInstallationsTableName ] [--resourcesTableId ] [--resourcesTableName ] [--schemaId ] [--sitesAppLinksTableId ] [--sitesAppLinksTableName ] [--sitesDeepLinksTableId ] [--sitesDeepLinksTableName ] [--sitesErrorPagesTableId ] [--sitesErrorPagesTableName ] [--sitesTableId ] [--sitesTableName ] [--sitesWebConfigTableId ] [--sitesWebConfigTableName ] +csdk catalog-module create --databaseId --scope [--apiName ] [--apisTableId ] [--apisTableName ] [--appsTableId ] [--appsTableName ] [--bindingsTableId ] [--bindingsTableName ] [--bucketsTableId ] [--bucketsTableName ] [--defaultPermissions ] [--domainsTableId ] [--domainsTableName ] [--entityTableId ] [--functionsTableId ] [--functionsTableName ] [--namespacesTableId ] [--namespacesTableName ] [--policies ] [--privateApiName ] [--provisions ] [--publicSchemaName ] [--resourceDefinitionsTableId ] [--resourceDefinitionsTableName ] [--resourceInstallationsTableId ] [--resourceInstallationsTableName ] [--resourcesTableId ] [--resourcesTableName ] [--schemaId ] [--sitesAppLinksTableId ] [--sitesAppLinksTableName ] [--sitesDeepLinksTableId ] [--sitesDeepLinksTableName ] [--sitesErrorPagesTableId ] [--sitesErrorPagesTableName ] [--sitesTableId ] [--sitesTableName ] [--sitesWebConfigTableId ] [--sitesWebConfigTableName ] ``` ### Get a catalogModule by id diff --git a/.agents/skills/cli-modules/references/route-module.md b/.agents/skills/cli-modules/references/route-module.md index ee1a02a01f..4669fd5584 100644 --- a/.agents/skills/cli-modules/references/route-module.md +++ b/.agents/skills/cli-modules/references/route-module.md @@ -12,8 +12,8 @@ csdk route-module list --where.. --orderBy csdk route-module list --limit 10 --after csdk route-module find-first --where.. csdk route-module get --id -csdk route-module create --databaseId --scope [--apiName ] [--catalogModuleId ] [--defaultPermissions ] [--domainModuleId ] [--entityField ] [--entityTableId ] [--hostnameBindingsTableId ] [--hostnameBindingsTableName ] [--policies ] [--prefix ] [--privateApiName ] [--privateSchemaId ] [--privateSchemaName ] [--provisions ] [--publicSchemaName ] [--resolverFunctionName ] [--routeBindingsTableId ] [--routeBindingsTableName ] [--routesTableId ] [--routesTableName ] [--schemaId ] -csdk route-module update --id [--apiName ] [--catalogModuleId ] [--databaseId ] [--defaultPermissions ] [--domainModuleId ] [--entityField ] [--entityTableId ] [--hostnameBindingsTableId ] [--hostnameBindingsTableName ] [--policies ] [--prefix ] [--privateApiName ] [--privateSchemaId ] [--privateSchemaName ] [--provisions ] [--publicSchemaName ] [--resolverFunctionName ] [--routeBindingsTableId ] [--routeBindingsTableName ] [--routesTableId ] [--routesTableName ] [--schemaId ] [--scope ] +csdk route-module create --databaseId --scope [--apiName ] [--appLinksFunctionName ] [--catalogModuleId ] [--deepLinkFunctionName ] [--defaultPermissions ] [--domainModuleId ] [--entityField ] [--entityTableId ] [--hostnameBindingsTableId ] [--hostnameBindingsTableName ] [--policies ] [--prefix ] [--privateApiName ] [--privateSchemaId ] [--privateSchemaName ] [--provisions ] [--publicSchemaName ] [--resolverFunctionName ] [--routeBindingsTableId ] [--routeBindingsTableName ] [--routesTableId ] [--routesTableName ] [--schemaId ] +csdk route-module update --id [--apiName ] [--appLinksFunctionName ] [--catalogModuleId ] [--databaseId ] [--deepLinkFunctionName ] [--defaultPermissions ] [--domainModuleId ] [--entityField ] [--entityTableId ] [--hostnameBindingsTableId ] [--hostnameBindingsTableName ] [--policies ] [--prefix ] [--privateApiName ] [--privateSchemaId ] [--privateSchemaName ] [--provisions ] [--publicSchemaName ] [--resolverFunctionName ] [--routeBindingsTableId ] [--routeBindingsTableName ] [--routesTableId ] [--routesTableName ] [--schemaId ] [--scope ] csdk route-module delete --id ``` @@ -58,7 +58,7 @@ csdk route-module list --where.id.equalTo --orderBy ID_ASC ### Create a routeModule ```bash -csdk route-module create --databaseId --scope [--apiName ] [--catalogModuleId ] [--defaultPermissions ] [--domainModuleId ] [--entityField ] [--entityTableId ] [--hostnameBindingsTableId ] [--hostnameBindingsTableName ] [--policies ] [--prefix ] [--privateApiName ] [--privateSchemaId ] [--privateSchemaName ] [--provisions ] [--publicSchemaName ] [--resolverFunctionName ] [--routeBindingsTableId ] [--routeBindingsTableName ] [--routesTableId ] [--routesTableName ] [--schemaId ] +csdk route-module create --databaseId --scope [--apiName ] [--appLinksFunctionName ] [--catalogModuleId ] [--deepLinkFunctionName ] [--defaultPermissions ] [--domainModuleId ] [--entityField ] [--entityTableId ] [--hostnameBindingsTableId ] [--hostnameBindingsTableName ] [--policies ] [--prefix ] [--privateApiName ] [--privateSchemaId ] [--privateSchemaName ] [--provisions ] [--publicSchemaName ] [--resolverFunctionName ] [--routeBindingsTableId ] [--routeBindingsTableName ] [--routesTableId ] [--routesTableName ] [--schemaId ] ``` ### Get a routeModule by id diff --git a/.agents/skills/cli-modules/references/scope-types-module.md b/.agents/skills/cli-modules/references/scope-types-module.md new file mode 100644 index 0000000000..d78bac7575 --- /dev/null +++ b/.agents/skills/cli-modules/references/scope-types-module.md @@ -0,0 +1,68 @@ +# scopeTypesModule + + + +CRUD operations for ScopeTypesModule records via csdk CLI + +## Usage + +```bash +csdk scope-types-module list +csdk scope-types-module list --where.. --orderBy +csdk scope-types-module list --limit 10 --after +csdk scope-types-module find-first --where.. +csdk scope-types-module get --id +csdk scope-types-module create --databaseId [--privateSchemaName ] [--schemaId ] [--scopeTypesTableId ] +csdk scope-types-module update --id [--databaseId ] [--privateSchemaName ] [--schemaId ] [--scopeTypesTableId ] +csdk scope-types-module delete --id +``` + +## Examples + +### List scopeTypesModule records + +```bash +csdk scope-types-module list +``` + +### List scopeTypesModule records with pagination + +```bash +csdk scope-types-module list --limit 10 --offset 0 +``` + +### List scopeTypesModule records with cursor pagination + +```bash +csdk scope-types-module list --limit 10 --after +``` + +### Find first matching scopeTypesModule + +```bash +csdk scope-types-module find-first --where.id.equalTo +``` + +### List scopeTypesModule records with field selection + +```bash +csdk scope-types-module list --select id,id +``` + +### List scopeTypesModule records with filtering and ordering + +```bash +csdk scope-types-module list --where.id.equalTo --orderBy ID_ASC +``` + +### Create a scopeTypesModule + +```bash +csdk scope-types-module create --databaseId [--privateSchemaName ] [--schemaId ] [--scopeTypesTableId ] +``` + +### Get a scopeTypesModule by id + +```bash +csdk scope-types-module get --id +``` diff --git a/.agents/skills/cli-modules/references/user-settings-security-module.md b/.agents/skills/cli-modules/references/user-settings-security-module.md new file mode 100644 index 0000000000..75078a141c --- /dev/null +++ b/.agents/skills/cli-modules/references/user-settings-security-module.md @@ -0,0 +1,68 @@ +# userSettingsSecurityModule + + + +CRUD operations for UserSettingsSecurityModule records via csdk CLI + +## Usage + +```bash +csdk user-settings-security-module list +csdk user-settings-security-module list --where.. --orderBy +csdk user-settings-security-module list --limit 10 --after +csdk user-settings-security-module find-first --where.. +csdk user-settings-security-module get --id +csdk user-settings-security-module create --databaseId [--apiName ] [--ownerTableId ] [--schemaId ] [--tableId ] [--tableName ] +csdk user-settings-security-module update --id [--apiName ] [--databaseId ] [--ownerTableId ] [--schemaId ] [--tableId ] [--tableName ] +csdk user-settings-security-module delete --id +``` + +## Examples + +### List userSettingsSecurityModule records + +```bash +csdk user-settings-security-module list +``` + +### List userSettingsSecurityModule records with pagination + +```bash +csdk user-settings-security-module list --limit 10 --offset 0 +``` + +### List userSettingsSecurityModule records with cursor pagination + +```bash +csdk user-settings-security-module list --limit 10 --after +``` + +### Find first matching userSettingsSecurityModule + +```bash +csdk user-settings-security-module find-first --where.id.equalTo +``` + +### List userSettingsSecurityModule records with field selection + +```bash +csdk user-settings-security-module list --select id,id +``` + +### List userSettingsSecurityModule records with filtering and ordering + +```bash +csdk user-settings-security-module list --where.id.equalTo --orderBy ID_ASC +``` + +### Create a userSettingsSecurityModule + +```bash +csdk user-settings-security-module create --databaseId [--apiName ] [--ownerTableId ] [--schemaId ] [--tableId ] [--tableName ] +``` + +### Get a userSettingsSecurityModule by id + +```bash +csdk user-settings-security-module get --id +``` diff --git a/.agents/skills/cli-objects/SKILL.md b/.agents/skills/cli-objects/SKILL.md index ea2ac97787..db49ad1859 100644 --- a/.agents/skills/cli-objects/SKILL.md +++ b/.agents/skills/cli-objects/SKILL.md @@ -1,13 +1,13 @@ --- name: cli-objects -description: CLI tool (csdk) for the objects API — provides CRUD commands for 5 tables and 4 custom operations +description: CLI tool (csdk) for the objects API — provides CRUD commands for 5 tables and 7 custom operations --- # cli-objects -CLI tool (csdk) for the objects API — provides CRUD commands for 5 tables and 4 custom operations +CLI tool (csdk) for the objects API — provides CRUD commands for 5 tables and 7 custom operations ## Usage @@ -63,5 +63,8 @@ See the `references/` directory for detailed per-entity API documentation: - [store](references/store.md) - [init-empty-repo](references/init-empty-repo.md) - [insert-node-at-path](references/insert-node-at-path.md) +- [insert-nodes-at-paths](references/insert-nodes-at-paths.md) - [provision-bucket](references/provision-bucket.md) +- [set-and-commit](references/set-and-commit.md) - [set-data-at-path](references/set-data-at-path.md) +- [set-many-and-commit](references/set-many-and-commit.md) diff --git a/.agents/skills/cli-objects/references/insert-nodes-at-paths.md b/.agents/skills/cli-objects/references/insert-nodes-at-paths.md new file mode 100644 index 0000000000..f023c4ad2f --- /dev/null +++ b/.agents/skills/cli-objects/references/insert-nodes-at-paths.md @@ -0,0 +1,19 @@ +# insertNodesAtPaths + + + +Execute the insertNodesAtPaths mutation + +## Usage + +```bash +csdk insert-nodes-at-paths --input.clientMutationId --input.datas --input.kidsList --input.ktreeList --input.paths --input.root --input.sId +``` + +## Examples + +### Run insertNodesAtPaths + +```bash +csdk insert-nodes-at-paths --input.clientMutationId --input.datas --input.kidsList --input.ktreeList --input.paths --input.root --input.sId +``` diff --git a/.agents/skills/cli-objects/references/set-and-commit.md b/.agents/skills/cli-objects/references/set-and-commit.md index 897356944a..fdb32a40a4 100644 --- a/.agents/skills/cli-objects/references/set-and-commit.md +++ b/.agents/skills/cli-objects/references/set-and-commit.md @@ -7,7 +7,7 @@ Execute the setAndCommit mutation ## Usage ```bash -csdk set-and-commit --input.clientMutationId --input.dbId --input.storeId --input.refname --input.path --input.data --input.kids --input.ktree +csdk set-and-commit --input.clientMutationId --input.data --input.kids --input.ktree --input.message --input.path --input.refname --input.sId --input.storeId ``` ## Examples @@ -15,5 +15,5 @@ csdk set-and-commit --input.clientMutationId --input.dbId --inpu ### Run setAndCommit ```bash -csdk set-and-commit --input.clientMutationId --input.dbId --input.storeId --input.refname --input.path --input.data --input.kids --input.ktree +csdk set-and-commit --input.clientMutationId --input.data --input.kids --input.ktree --input.message --input.path --input.refname --input.sId --input.storeId ``` diff --git a/.agents/skills/cli-objects/references/set-many-and-commit.md b/.agents/skills/cli-objects/references/set-many-and-commit.md new file mode 100644 index 0000000000..7039169257 --- /dev/null +++ b/.agents/skills/cli-objects/references/set-many-and-commit.md @@ -0,0 +1,19 @@ +# setManyAndCommit + + + +Execute the setManyAndCommit mutation + +## Usage + +```bash +csdk set-many-and-commit --input.clientMutationId --input.entries --input.message --input.refname --input.sId --input.storeId +``` + +## Examples + +### Run setManyAndCommit + +```bash +csdk set-many-and-commit --input.clientMutationId --input.entries --input.message --input.refname --input.sId --input.storeId +``` diff --git a/.agents/skills/hooks-api/SKILL.md b/.agents/skills/hooks-api/SKILL.md index 5198cc125d..f3cabe926a 100644 --- a/.agents/skills/hooks-api/SKILL.md +++ b/.agents/skills/hooks-api/SKILL.md @@ -13,13 +13,13 @@ React Query hooks for the api API — provides typed query and mutation hooks fo ```typescript // Import hooks -import { useApiSchemasQuery } from './hooks'; +import { useApisQuery } from './hooks'; // Query hooks: useQuery, usesQuery // Mutation hooks: useCreateMutation, useUpdateMutation, useDeleteMutation // Bulk mutation hooks (when enabled): useBulkCreateMutation, useBulkUpsertMutation, etc. -const { data, isLoading } = useApiSchemasQuery({ +const { data, isLoading } = useApisQuery({ selection: { fields: { id: true } }, }); ``` @@ -29,7 +29,7 @@ const { data, isLoading } = useApiSchemasQuery({ ### Query records ```typescript -const { data, isLoading } = useApiSchemasQuery({ +const { data, isLoading } = useApisQuery({ selection: { fields: { id: true } }, }); ``` @@ -38,9 +38,9 @@ const { data, isLoading } = useApiSchemasQuery({ See the `references/` directory for detailed per-entity API documentation: +- [api](references/api.md) - [api-schema](references/api-schema.md) - [api-setting](references/api-setting.md) -- [apis](references/apis.md) - [ast-migration](references/ast-migration.md) - [check-constraint](references/check-constraint.md) - [composite-type](references/composite-type.md) @@ -70,9 +70,9 @@ See the `references/` directory for detailed per-entity API documentation: - [node-type-registry](references/node-type-registry.md) - [page](references/page.md) - [partition](references/partition.md) +- [platform-api](references/platform-api.md) - [platform-api-schema](references/platform-api-schema.md) - [platform-api-setting](references/platform-api-setting.md) -- [platform-apis](references/platform-apis.md) - [platform-cors-setting](references/platform-cors-setting.md) - [platform-domain](references/platform-domain.md) - [platform-domain-event](references/platform-domain-event.md) diff --git a/.agents/skills/hooks-compute/SKILL.md b/.agents/skills/hooks-compute/SKILL.md index 38b33fa7b0..5870318f79 100644 --- a/.agents/skills/hooks-compute/SKILL.md +++ b/.agents/skills/hooks-compute/SKILL.md @@ -1,13 +1,13 @@ --- name: hooks-compute -description: React Query hooks for the compute API — provides typed query and mutation hooks for 69 tables and 29 custom operations +description: React Query hooks for the compute API — provides typed query and mutation hooks for 69 tables and 38 custom operations --- # hooks-compute -React Query hooks for the compute API — provides typed query and mutation hooks for 69 tables and 29 custom operations +React Query hooks for the compute API — provides typed query and mutation hooks for 69 tables and 38 custom operations ## Usage @@ -117,12 +117,19 @@ See the `references/` directory for detailed per-entity API documentation: - [import-graph-json](references/import-graph-json.md) - [infra-init-empty-repo](references/infra-init-empty-repo.md) - [infra-insert-node-at-path](references/infra-insert-node-at-path.md) +- [infra-insert-nodes-at-paths](references/infra-insert-nodes-at-paths.md) +- [infra-set-and-commit](references/infra-set-and-commit.md) - [infra-set-data-at-path](references/infra-set-data-at-path.md) +- [infra-set-many-and-commit](references/infra-set-many-and-commit.md) - [init-empty-repo](references/init-empty-repo.md) - [insert-node-at-path](references/insert-node-at-path.md) +- [insert-nodes-at-paths](references/insert-nodes-at-paths.md) - [platform-infra-init-empty-repo](references/platform-infra-init-empty-repo.md) - [platform-infra-insert-node-at-path](references/platform-infra-insert-node-at-path.md) +- [platform-infra-insert-nodes-at-paths](references/platform-infra-insert-nodes-at-paths.md) +- [platform-infra-set-and-commit](references/platform-infra-set-and-commit.md) - [platform-infra-set-data-at-path](references/platform-infra-set-data-at-path.md) +- [platform-infra-set-many-and-commit](references/platform-infra-set-many-and-commit.md) - [platform-resource-installations-install](references/platform-resource-installations-install.md) - [platform-resource-installations-rollback](references/platform-resource-installations-rollback.md) - [platform-resource-installations-uninstall](references/platform-resource-installations-uninstall.md) @@ -133,6 +140,8 @@ See the `references/` directory for detailed per-entity API documentation: - [resource-installations-uninstall](references/resource-installations-uninstall.md) - [resource-installations-upgrade](references/resource-installations-upgrade.md) - [save-graph](references/save-graph.md) +- [set-and-commit](references/set-and-commit.md) - [set-data-at-path](references/set-data-at-path.md) +- [set-many-and-commit](references/set-many-and-commit.md) - [start-execution](references/start-execution.md) - [validate-function-graph](references/validate-function-graph.md) diff --git a/.agents/skills/hooks-compute/references/function-definition.md b/.agents/skills/hooks-compute/references/function-definition.md index 0bfc2e6e4e..93cbce3c63 100644 --- a/.agents/skills/hooks-compute/references/function-definition.md +++ b/.agents/skills/hooks-compute/references/function-definition.md @@ -7,8 +7,8 @@ Function definitions — registered cloud functions with routing, queue, and ret ## Usage ```typescript -useFunctionDefinitionsQuery({ selection: { fields: { accessChannels: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, databaseId: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } } }) -useFunctionDefinitionQuery({ id: '', selection: { fields: { accessChannels: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, databaseId: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } } }) +useFunctionDefinitionsQuery({ selection: { fields: { accessChannels: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, databaseId: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredModules: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } } }) +useFunctionDefinitionQuery({ id: '', selection: { fields: { accessChannels: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, databaseId: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredModules: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } } }) useCreateFunctionDefinitionMutation({ selection: { fields: { id: true } } }) useUpdateFunctionDefinitionMutation({ selection: { fields: { id: true } } }) useDeleteFunctionDefinitionMutation({}) @@ -20,7 +20,7 @@ useDeleteFunctionDefinitionMutation({}) ```typescript const { data, isLoading } = useFunctionDefinitionsQuery({ - selection: { fields: { accessChannels: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, databaseId: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }, + selection: { fields: { accessChannels: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, databaseId: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredModules: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useFunctionDefinitionsQuery({ const { mutate } = useCreateFunctionDefinitionMutation({ selection: { fields: { id: true } }, }); -mutate({ accessChannels: '', category: '', concurrency: '', cpuLimitMillicores: '', cpuRequestMillicores: '', databaseId: '', description: '', fnCategory: '', functionColumns: '', graphId: '', icon: '', image: '', inputs: '', integrations: '', isPublished: '', maxAttempts: '', memoryLimitBytes: '', memoryRequestBytes: '', moduleTable: '', name: '', outputs: '', payloadArgs: '', priority: '', props: '', protected: '', publishedAt: '', queueName: '', requiredBuckets: '', requiredConfigs: '', requiredModels: '', requiredSecrets: '', resources: '', runtime: '', scaleMax: '', scaleMin: '', targetFunction: '', targetSchema: '', taskIdentifier: '', timeoutSeconds: '', volatile: '' }); +mutate({ accessChannels: '', category: '', concurrency: '', cpuLimitMillicores: '', cpuRequestMillicores: '', databaseId: '', description: '', fnCategory: '', functionColumns: '', graphId: '', icon: '', image: '', inputs: '', integrations: '', isPublished: '', maxAttempts: '', memoryLimitBytes: '', memoryRequestBytes: '', moduleTable: '', name: '', outputs: '', payloadArgs: '', priority: '', props: '', protected: '', publishedAt: '', queueName: '', requiredBuckets: '', requiredConfigs: '', requiredModels: '', requiredModules: '', requiredSecrets: '', resources: '', runtime: '', scaleMax: '', scaleMin: '', targetFunction: '', targetSchema: '', taskIdentifier: '', timeoutSeconds: '', volatile: '' }); ``` diff --git a/.agents/skills/hooks-compute/references/function-deployment.md b/.agents/skills/hooks-compute/references/function-deployment.md index f983fea8c6..d0ac57d720 100644 --- a/.agents/skills/hooks-compute/references/function-deployment.md +++ b/.agents/skills/hooks-compute/references/function-deployment.md @@ -7,8 +7,8 @@ Function deployment bindings — ties a handler image to a namespace for Knative ## Usage ```typescript -useFunctionDeploymentsQuery({ selection: { fields: { annotations: true, concurrency: true, createdAt: true, databaseId: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } } }) -useFunctionDeploymentQuery({ id: '', selection: { fields: { annotations: true, concurrency: true, createdAt: true, databaseId: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } } }) +useFunctionDeploymentsQuery({ selection: { fields: { annotations: true, concurrency: true, createdAt: true, databaseId: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, realm: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } } }) +useFunctionDeploymentQuery({ id: '', selection: { fields: { annotations: true, concurrency: true, createdAt: true, databaseId: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, realm: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } } }) useCreateFunctionDeploymentMutation({ selection: { fields: { id: true } } }) useUpdateFunctionDeploymentMutation({ selection: { fields: { id: true } } }) useDeleteFunctionDeploymentMutation({}) @@ -20,7 +20,7 @@ useDeleteFunctionDeploymentMutation({}) ```typescript const { data, isLoading } = useFunctionDeploymentsQuery({ - selection: { fields: { annotations: true, concurrency: true, createdAt: true, databaseId: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }, + selection: { fields: { annotations: true, concurrency: true, createdAt: true, databaseId: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, realm: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useFunctionDeploymentsQuery({ const { mutate } = useCreateFunctionDeploymentMutation({ selection: { fields: { id: true } }, }); -mutate({ annotations: '', concurrency: '', databaseId: '', errorCount: '', handlerName: '', image: '', imageVersion: '', labels: '', lastError: '', lastErrorAt: '', namespaceId: '', resources: '', revision: '', scaleMax: '', scaleMin: '', serviceName: '', serviceUrl: '', status: '', timeoutSeconds: '' }); +mutate({ annotations: '', concurrency: '', databaseId: '', errorCount: '', handlerName: '', image: '', imageVersion: '', labels: '', lastError: '', lastErrorAt: '', namespaceId: '', realm: '', resources: '', revision: '', scaleMax: '', scaleMin: '', serviceName: '', serviceUrl: '', status: '', timeoutSeconds: '' }); ``` diff --git a/.agents/skills/hooks-compute/references/infra-insert-nodes-at-paths.md b/.agents/skills/hooks-compute/references/infra-insert-nodes-at-paths.md new file mode 100644 index 0000000000..b48b858b5e --- /dev/null +++ b/.agents/skills/hooks-compute/references/infra-insert-nodes-at-paths.md @@ -0,0 +1,20 @@ +# infraInsertNodesAtPaths + + + +React Query mutation hook for infraInsertNodesAtPaths + +## Usage + +```typescript +const { mutate } = useInfraInsertNodesAtPathsMutation(); mutate({ input: '' }); +``` + +## Examples + +### Use useInfraInsertNodesAtPathsMutation + +```typescript +const { mutate, isLoading } = useInfraInsertNodesAtPathsMutation(); +mutate({ input: '' }); +``` diff --git a/.agents/skills/hooks-compute/references/infra-set-and-commit.md b/.agents/skills/hooks-compute/references/infra-set-and-commit.md new file mode 100644 index 0000000000..a64e1bf66f --- /dev/null +++ b/.agents/skills/hooks-compute/references/infra-set-and-commit.md @@ -0,0 +1,20 @@ +# infraSetAndCommit + + + +React Query mutation hook for infraSetAndCommit + +## Usage + +```typescript +const { mutate } = useInfraSetAndCommitMutation(); mutate({ input: '' }); +``` + +## Examples + +### Use useInfraSetAndCommitMutation + +```typescript +const { mutate, isLoading } = useInfraSetAndCommitMutation(); +mutate({ input: '' }); +``` diff --git a/.agents/skills/hooks-compute/references/infra-set-many-and-commit.md b/.agents/skills/hooks-compute/references/infra-set-many-and-commit.md new file mode 100644 index 0000000000..3ada7f8d91 --- /dev/null +++ b/.agents/skills/hooks-compute/references/infra-set-many-and-commit.md @@ -0,0 +1,20 @@ +# infraSetManyAndCommit + + + +React Query mutation hook for infraSetManyAndCommit + +## Usage + +```typescript +const { mutate } = useInfraSetManyAndCommitMutation(); mutate({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }); +``` + +## Examples + +### Use useInfraSetManyAndCommitMutation + +```typescript +const { mutate, isLoading } = useInfraSetManyAndCommitMutation(); +mutate({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }); +``` diff --git a/.agents/skills/hooks-compute/references/insert-nodes-at-paths.md b/.agents/skills/hooks-compute/references/insert-nodes-at-paths.md new file mode 100644 index 0000000000..d7185a48ac --- /dev/null +++ b/.agents/skills/hooks-compute/references/insert-nodes-at-paths.md @@ -0,0 +1,20 @@ +# insertNodesAtPaths + + + +React Query mutation hook for insertNodesAtPaths + +## Usage + +```typescript +const { mutate } = useInsertNodesAtPathsMutation(); mutate({ input: '' }); +``` + +## Examples + +### Use useInsertNodesAtPathsMutation + +```typescript +const { mutate, isLoading } = useInsertNodesAtPathsMutation(); +mutate({ input: '' }); +``` diff --git a/.agents/skills/hooks-compute/references/platform-function-definition.md b/.agents/skills/hooks-compute/references/platform-function-definition.md index 739c3642ba..f23e03dc7b 100644 --- a/.agents/skills/hooks-compute/references/platform-function-definition.md +++ b/.agents/skills/hooks-compute/references/platform-function-definition.md @@ -7,8 +7,8 @@ Function definitions — registered cloud functions with routing, queue, and ret ## Usage ```typescript -usePlatformFunctionDefinitionsQuery({ selection: { fields: { accessChannels: true, billable: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, system: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } } }) -usePlatformFunctionDefinitionQuery({ id: '', selection: { fields: { accessChannels: true, billable: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, system: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } } }) +usePlatformFunctionDefinitionsQuery({ selection: { fields: { accessChannels: true, billable: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredModules: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, system: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } } }) +usePlatformFunctionDefinitionQuery({ id: '', selection: { fields: { accessChannels: true, billable: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredModules: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, system: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } } }) useCreatePlatformFunctionDefinitionMutation({ selection: { fields: { id: true } } }) useUpdatePlatformFunctionDefinitionMutation({ selection: { fields: { id: true } } }) useDeletePlatformFunctionDefinitionMutation({}) @@ -20,7 +20,7 @@ useDeletePlatformFunctionDefinitionMutation({}) ```typescript const { data, isLoading } = usePlatformFunctionDefinitionsQuery({ - selection: { fields: { accessChannels: true, billable: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, system: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }, + selection: { fields: { accessChannels: true, billable: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredModules: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, system: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = usePlatformFunctionDefinitionsQuery({ const { mutate } = useCreatePlatformFunctionDefinitionMutation({ selection: { fields: { id: true } }, }); -mutate({ accessChannels: '', billable: '', category: '', concurrency: '', cpuLimitMillicores: '', cpuRequestMillicores: '', description: '', fnCategory: '', functionColumns: '', graphId: '', icon: '', image: '', inputs: '', integrations: '', isPublished: '', maxAttempts: '', memoryLimitBytes: '', memoryRequestBytes: '', moduleTable: '', name: '', outputs: '', payloadArgs: '', priority: '', props: '', protected: '', publishedAt: '', queueName: '', requiredBuckets: '', requiredConfigs: '', requiredModels: '', requiredSecrets: '', resources: '', runtime: '', scaleMax: '', scaleMin: '', system: '', targetFunction: '', targetSchema: '', taskIdentifier: '', timeoutSeconds: '', volatile: '' }); +mutate({ accessChannels: '', billable: '', category: '', concurrency: '', cpuLimitMillicores: '', cpuRequestMillicores: '', description: '', fnCategory: '', functionColumns: '', graphId: '', icon: '', image: '', inputs: '', integrations: '', isPublished: '', maxAttempts: '', memoryLimitBytes: '', memoryRequestBytes: '', moduleTable: '', name: '', outputs: '', payloadArgs: '', priority: '', props: '', protected: '', publishedAt: '', queueName: '', requiredBuckets: '', requiredConfigs: '', requiredModels: '', requiredModules: '', requiredSecrets: '', resources: '', runtime: '', scaleMax: '', scaleMin: '', system: '', targetFunction: '', targetSchema: '', taskIdentifier: '', timeoutSeconds: '', volatile: '' }); ``` diff --git a/.agents/skills/hooks-compute/references/platform-function-deployment.md b/.agents/skills/hooks-compute/references/platform-function-deployment.md index e968311f01..f263fc6baa 100644 --- a/.agents/skills/hooks-compute/references/platform-function-deployment.md +++ b/.agents/skills/hooks-compute/references/platform-function-deployment.md @@ -7,8 +7,8 @@ Function deployment bindings — ties a handler image to a namespace for Knative ## Usage ```typescript -usePlatformFunctionDeploymentsQuery({ selection: { fields: { annotations: true, concurrency: true, createdAt: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } } }) -usePlatformFunctionDeploymentQuery({ id: '', selection: { fields: { annotations: true, concurrency: true, createdAt: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } } }) +usePlatformFunctionDeploymentsQuery({ selection: { fields: { annotations: true, concurrency: true, createdAt: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, realm: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } } }) +usePlatformFunctionDeploymentQuery({ id: '', selection: { fields: { annotations: true, concurrency: true, createdAt: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, realm: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } } }) useCreatePlatformFunctionDeploymentMutation({ selection: { fields: { id: true } } }) useUpdatePlatformFunctionDeploymentMutation({ selection: { fields: { id: true } } }) useDeletePlatformFunctionDeploymentMutation({}) @@ -20,7 +20,7 @@ useDeletePlatformFunctionDeploymentMutation({}) ```typescript const { data, isLoading } = usePlatformFunctionDeploymentsQuery({ - selection: { fields: { annotations: true, concurrency: true, createdAt: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }, + selection: { fields: { annotations: true, concurrency: true, createdAt: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, realm: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = usePlatformFunctionDeploymentsQuery({ const { mutate } = useCreatePlatformFunctionDeploymentMutation({ selection: { fields: { id: true } }, }); -mutate({ annotations: '', concurrency: '', errorCount: '', handlerName: '', image: '', imageVersion: '', labels: '', lastError: '', lastErrorAt: '', namespaceId: '', resources: '', revision: '', scaleMax: '', scaleMin: '', serviceName: '', serviceUrl: '', status: '', timeoutSeconds: '' }); +mutate({ annotations: '', concurrency: '', errorCount: '', handlerName: '', image: '', imageVersion: '', labels: '', lastError: '', lastErrorAt: '', namespaceId: '', realm: '', resources: '', revision: '', scaleMax: '', scaleMin: '', serviceName: '', serviceUrl: '', status: '', timeoutSeconds: '' }); ``` diff --git a/.agents/skills/hooks-compute/references/platform-infra-insert-nodes-at-paths.md b/.agents/skills/hooks-compute/references/platform-infra-insert-nodes-at-paths.md new file mode 100644 index 0000000000..dd4c10a2f0 --- /dev/null +++ b/.agents/skills/hooks-compute/references/platform-infra-insert-nodes-at-paths.md @@ -0,0 +1,20 @@ +# platformInfraInsertNodesAtPaths + + + +React Query mutation hook for platformInfraInsertNodesAtPaths + +## Usage + +```typescript +const { mutate } = usePlatformInfraInsertNodesAtPathsMutation(); mutate({ input: '' }); +``` + +## Examples + +### Use usePlatformInfraInsertNodesAtPathsMutation + +```typescript +const { mutate, isLoading } = usePlatformInfraInsertNodesAtPathsMutation(); +mutate({ input: '' }); +``` diff --git a/.agents/skills/hooks-compute/references/platform-infra-set-and-commit.md b/.agents/skills/hooks-compute/references/platform-infra-set-and-commit.md new file mode 100644 index 0000000000..3a31f2d542 --- /dev/null +++ b/.agents/skills/hooks-compute/references/platform-infra-set-and-commit.md @@ -0,0 +1,20 @@ +# platformInfraSetAndCommit + + + +React Query mutation hook for platformInfraSetAndCommit + +## Usage + +```typescript +const { mutate } = usePlatformInfraSetAndCommitMutation(); mutate({ input: '' }); +``` + +## Examples + +### Use usePlatformInfraSetAndCommitMutation + +```typescript +const { mutate, isLoading } = usePlatformInfraSetAndCommitMutation(); +mutate({ input: '' }); +``` diff --git a/.agents/skills/hooks-compute/references/platform-infra-set-many-and-commit.md b/.agents/skills/hooks-compute/references/platform-infra-set-many-and-commit.md new file mode 100644 index 0000000000..1cdfbea46e --- /dev/null +++ b/.agents/skills/hooks-compute/references/platform-infra-set-many-and-commit.md @@ -0,0 +1,20 @@ +# platformInfraSetManyAndCommit + + + +React Query mutation hook for platformInfraSetManyAndCommit + +## Usage + +```typescript +const { mutate } = usePlatformInfraSetManyAndCommitMutation(); mutate({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }); +``` + +## Examples + +### Use usePlatformInfraSetManyAndCommitMutation + +```typescript +const { mutate, isLoading } = usePlatformInfraSetManyAndCommitMutation(); +mutate({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }); +``` diff --git a/.agents/skills/hooks-compute/references/set-and-commit.md b/.agents/skills/hooks-compute/references/set-and-commit.md new file mode 100644 index 0000000000..362ab6ea2b --- /dev/null +++ b/.agents/skills/hooks-compute/references/set-and-commit.md @@ -0,0 +1,20 @@ +# setAndCommit + + + +React Query mutation hook for setAndCommit + +## Usage + +```typescript +const { mutate } = useSetAndCommitMutation(); mutate({ input: '' }); +``` + +## Examples + +### Use useSetAndCommitMutation + +```typescript +const { mutate, isLoading } = useSetAndCommitMutation(); +mutate({ input: '' }); +``` diff --git a/.agents/skills/hooks-compute/references/set-many-and-commit.md b/.agents/skills/hooks-compute/references/set-many-and-commit.md new file mode 100644 index 0000000000..7329c10396 --- /dev/null +++ b/.agents/skills/hooks-compute/references/set-many-and-commit.md @@ -0,0 +1,20 @@ +# setManyAndCommit + + + +React Query mutation hook for setManyAndCommit + +## Usage + +```typescript +const { mutate } = useSetManyAndCommitMutation(); mutate({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }); +``` + +## Examples + +### Use useSetManyAndCommitMutation + +```typescript +const { mutate, isLoading } = useSetManyAndCommitMutation(); +mutate({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }); +``` diff --git a/.agents/skills/hooks-infra/SKILL.md b/.agents/skills/hooks-infra/SKILL.md index f33976c75a..99793c0278 100644 --- a/.agents/skills/hooks-infra/SKILL.md +++ b/.agents/skills/hooks-infra/SKILL.md @@ -1,13 +1,13 @@ --- name: hooks-infra -description: React Query hooks for the infra API — provides typed query and mutation hooks for 10 tables and 4 custom operations +description: React Query hooks for the infra API — provides typed query and mutation hooks for 10 tables and 7 custom operations --- # hooks-infra -React Query hooks for the infra API — provides typed query and mutation hooks for 10 tables and 4 custom operations +React Query hooks for the infra API — provides typed query and mutation hooks for 10 tables and 7 custom operations ## Usage @@ -50,5 +50,8 @@ See the `references/` directory for detailed per-entity API documentation: - [platform-namespace-event](references/platform-namespace-event.md) - [platform-infra-init-empty-repo](references/platform-infra-init-empty-repo.md) - [platform-infra-insert-node-at-path](references/platform-infra-insert-node-at-path.md) +- [platform-infra-insert-nodes-at-paths](references/platform-infra-insert-nodes-at-paths.md) +- [platform-infra-set-and-commit](references/platform-infra-set-and-commit.md) - [platform-infra-set-data-at-path](references/platform-infra-set-data-at-path.md) +- [platform-infra-set-many-and-commit](references/platform-infra-set-many-and-commit.md) - [provision-bucket](references/provision-bucket.md) diff --git a/.agents/skills/hooks-infra/references/platform-infra-insert-nodes-at-paths.md b/.agents/skills/hooks-infra/references/platform-infra-insert-nodes-at-paths.md new file mode 100644 index 0000000000..dd4c10a2f0 --- /dev/null +++ b/.agents/skills/hooks-infra/references/platform-infra-insert-nodes-at-paths.md @@ -0,0 +1,20 @@ +# platformInfraInsertNodesAtPaths + + + +React Query mutation hook for platformInfraInsertNodesAtPaths + +## Usage + +```typescript +const { mutate } = usePlatformInfraInsertNodesAtPathsMutation(); mutate({ input: '' }); +``` + +## Examples + +### Use usePlatformInfraInsertNodesAtPathsMutation + +```typescript +const { mutate, isLoading } = usePlatformInfraInsertNodesAtPathsMutation(); +mutate({ input: '' }); +``` diff --git a/.agents/skills/hooks-infra/references/platform-infra-set-and-commit.md b/.agents/skills/hooks-infra/references/platform-infra-set-and-commit.md new file mode 100644 index 0000000000..3a31f2d542 --- /dev/null +++ b/.agents/skills/hooks-infra/references/platform-infra-set-and-commit.md @@ -0,0 +1,20 @@ +# platformInfraSetAndCommit + + + +React Query mutation hook for platformInfraSetAndCommit + +## Usage + +```typescript +const { mutate } = usePlatformInfraSetAndCommitMutation(); mutate({ input: '' }); +``` + +## Examples + +### Use usePlatformInfraSetAndCommitMutation + +```typescript +const { mutate, isLoading } = usePlatformInfraSetAndCommitMutation(); +mutate({ input: '' }); +``` diff --git a/.agents/skills/hooks-infra/references/platform-infra-set-many-and-commit.md b/.agents/skills/hooks-infra/references/platform-infra-set-many-and-commit.md new file mode 100644 index 0000000000..1cdfbea46e --- /dev/null +++ b/.agents/skills/hooks-infra/references/platform-infra-set-many-and-commit.md @@ -0,0 +1,20 @@ +# platformInfraSetManyAndCommit + + + +React Query mutation hook for platformInfraSetManyAndCommit + +## Usage + +```typescript +const { mutate } = usePlatformInfraSetManyAndCommitMutation(); mutate({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }); +``` + +## Examples + +### Use usePlatformInfraSetManyAndCommitMutation + +```typescript +const { mutate, isLoading } = usePlatformInfraSetManyAndCommitMutation(); +mutate({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }); +``` diff --git a/.agents/skills/hooks-modules/SKILL.md b/.agents/skills/hooks-modules/SKILL.md index 092bd5df16..f0fe4c9369 100644 --- a/.agents/skills/hooks-modules/SKILL.md +++ b/.agents/skills/hooks-modules/SKILL.md @@ -1,13 +1,13 @@ --- name: hooks-modules -description: React Query hooks for the modules API — provides typed query and mutation hooks for 76 tables and 12 custom operations +description: React Query hooks for the modules API — provides typed query and mutation hooks for 78 tables and 3 custom operations --- # hooks-modules -React Query hooks for the modules API — provides typed query and mutation hooks for 76 tables and 12 custom operations +React Query hooks for the modules API — provides typed query and mutation hooks for 78 tables and 3 custom operations ## Usage @@ -99,6 +99,7 @@ See the `references/` directory for detailed per-entity API documentation: - [resource-module](references/resource-module.md) - [rls-module](references/rls-module.md) - [route-module](references/route-module.md) +- [scope-types-module](references/scope-types-module.md) - [secure-table-provision](references/secure-table-provision.md) - [session-secrets-module](references/session-secrets-module.md) - [sessions-module](references/sessions-module.md) @@ -109,20 +110,12 @@ See the `references/` directory for detailed per-entity API documentation: - [user-auth-module](references/user-auth-module.md) - [user-credentials-module](references/user-credentials-module.md) - [user-settings-module](references/user-settings-module.md) +- [user-settings-security-module](references/user-settings-security-module.md) - [user-state-module](references/user-state-module.md) - [users-module](references/users-module.md) - [webauthn-auth-module](references/webauthn-auth-module.md) - [webauthn-credentials-module](references/webauthn-credentials-module.md) - [webhook-module](references/webhook-module.md) -- [resolve-blueprint-field](references/resolve-blueprint-field.md) -- [resolve-blueprint-table](references/resolve-blueprint-table.md) - [construct-blueprint](references/construct-blueprint.md) - [copy-template-to-blueprint](references/copy-template-to-blueprint.md) - [provision-bucket](references/provision-bucket.md) -- [provision-check-constraint](references/provision-check-constraint.md) -- [provision-full-text-search](references/provision-full-text-search.md) -- [provision-index](references/provision-index.md) -- [provision-relation](references/provision-relation.md) -- [provision-spatial-relation](references/provision-spatial-relation.md) -- [provision-table](references/provision-table.md) -- [provision-unique-constraint](references/provision-unique-constraint.md) diff --git a/.agents/skills/hooks-modules/references/billing-provider-module.md b/.agents/skills/hooks-modules/references/billing-provider-module.md index 88f93fdba5..5980231bee 100644 --- a/.agents/skills/hooks-modules/references/billing-provider-module.md +++ b/.agents/skills/hooks-modules/references/billing-provider-module.md @@ -7,8 +7,8 @@ React Query hooks for BillingProviderModule data operations ## Usage ```typescript -useBillingProviderModulesQuery({ selection: { fields: { apiName: true, billingCustomersTableId: true, billingCustomersTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, databaseId: true, id: true, prefix: true, pricesTableId: true, privateApiName: true, privateSchemaId: true, processBillingEventFunction: true, productsTableId: true, provider: true, schemaId: true, subscriptionsTableId: true } } }) -useBillingProviderModuleQuery({ id: '', selection: { fields: { apiName: true, billingCustomersTableId: true, billingCustomersTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, databaseId: true, id: true, prefix: true, pricesTableId: true, privateApiName: true, privateSchemaId: true, processBillingEventFunction: true, productsTableId: true, provider: true, schemaId: true, subscriptionsTableId: true } } }) +useBillingProviderModulesQuery({ selection: { fields: { apiName: true, billingCustomersTableId: true, billingCustomersTableName: true, billingInvoicesTableId: true, billingInvoicesTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, billingRefundsTableId: true, billingRefundsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, databaseId: true, id: true, listPendingUsageSyncFunction: true, markUsageSyncedFunction: true, prefix: true, pricesTableId: true, privateApiName: true, privateSchemaId: true, processBillingEventFunction: true, productsTableId: true, provider: true, recordRefundFunction: true, schemaId: true, subscriptionsTableId: true, upsertInvoiceFunction: true } } }) +useBillingProviderModuleQuery({ id: '', selection: { fields: { apiName: true, billingCustomersTableId: true, billingCustomersTableName: true, billingInvoicesTableId: true, billingInvoicesTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, billingRefundsTableId: true, billingRefundsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, databaseId: true, id: true, listPendingUsageSyncFunction: true, markUsageSyncedFunction: true, prefix: true, pricesTableId: true, privateApiName: true, privateSchemaId: true, processBillingEventFunction: true, productsTableId: true, provider: true, recordRefundFunction: true, schemaId: true, subscriptionsTableId: true, upsertInvoiceFunction: true } } }) useCreateBillingProviderModuleMutation({ selection: { fields: { id: true } } }) useUpdateBillingProviderModuleMutation({ selection: { fields: { id: true } } }) useDeleteBillingProviderModuleMutation({}) @@ -20,7 +20,7 @@ useDeleteBillingProviderModuleMutation({}) ```typescript const { data, isLoading } = useBillingProviderModulesQuery({ - selection: { fields: { apiName: true, billingCustomersTableId: true, billingCustomersTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, databaseId: true, id: true, prefix: true, pricesTableId: true, privateApiName: true, privateSchemaId: true, processBillingEventFunction: true, productsTableId: true, provider: true, schemaId: true, subscriptionsTableId: true } }, + selection: { fields: { apiName: true, billingCustomersTableId: true, billingCustomersTableName: true, billingInvoicesTableId: true, billingInvoicesTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, billingRefundsTableId: true, billingRefundsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, databaseId: true, id: true, listPendingUsageSyncFunction: true, markUsageSyncedFunction: true, prefix: true, pricesTableId: true, privateApiName: true, privateSchemaId: true, processBillingEventFunction: true, productsTableId: true, provider: true, recordRefundFunction: true, schemaId: true, subscriptionsTableId: true, upsertInvoiceFunction: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useBillingProviderModulesQuery({ const { mutate } = useCreateBillingProviderModuleMutation({ selection: { fields: { id: true } }, }); -mutate({ apiName: '', billingCustomersTableId: '', billingCustomersTableName: '', billingPricesTableId: '', billingPricesTableName: '', billingProductsTableId: '', billingProductsTableName: '', billingSubscriptionsTableId: '', billingSubscriptionsTableName: '', billingWebhookEventsTableId: '', billingWebhookEventsTableName: '', databaseId: '', prefix: '', pricesTableId: '', privateApiName: '', privateSchemaId: '', processBillingEventFunction: '', productsTableId: '', provider: '', schemaId: '', subscriptionsTableId: '' }); +mutate({ apiName: '', billingCustomersTableId: '', billingCustomersTableName: '', billingInvoicesTableId: '', billingInvoicesTableName: '', billingPricesTableId: '', billingPricesTableName: '', billingProductsTableId: '', billingProductsTableName: '', billingRefundsTableId: '', billingRefundsTableName: '', billingSubscriptionsTableId: '', billingSubscriptionsTableName: '', billingWebhookEventsTableId: '', billingWebhookEventsTableName: '', databaseId: '', listPendingUsageSyncFunction: '', markUsageSyncedFunction: '', prefix: '', pricesTableId: '', privateApiName: '', privateSchemaId: '', processBillingEventFunction: '', productsTableId: '', provider: '', recordRefundFunction: '', schemaId: '', subscriptionsTableId: '', upsertInvoiceFunction: '' }); ``` diff --git a/.agents/skills/hooks-modules/references/catalog-module.md b/.agents/skills/hooks-modules/references/catalog-module.md index cf24906c51..4a56cf1dba 100644 --- a/.agents/skills/hooks-modules/references/catalog-module.md +++ b/.agents/skills/hooks-modules/references/catalog-module.md @@ -7,8 +7,8 @@ React Query hooks for CatalogModule data operations ## Usage ```typescript -useCatalogModulesQuery({ selection: { fields: { apiName: true, apisTableId: true, apisTableName: true, appsTableId: true, appsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultPermissions: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } } }) -useCatalogModuleQuery({ id: '', selection: { fields: { apiName: true, apisTableId: true, apisTableName: true, appsTableId: true, appsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultPermissions: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } } }) +useCatalogModulesQuery({ selection: { fields: { apiName: true, apisTableId: true, apisTableName: true, appsTableId: true, appsTableName: true, bindingsTableId: true, bindingsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultPermissions: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } } }) +useCatalogModuleQuery({ id: '', selection: { fields: { apiName: true, apisTableId: true, apisTableName: true, appsTableId: true, appsTableName: true, bindingsTableId: true, bindingsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultPermissions: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } } }) useCreateCatalogModuleMutation({ selection: { fields: { id: true } } }) useUpdateCatalogModuleMutation({ selection: { fields: { id: true } } }) useDeleteCatalogModuleMutation({}) @@ -20,7 +20,7 @@ useDeleteCatalogModuleMutation({}) ```typescript const { data, isLoading } = useCatalogModulesQuery({ - selection: { fields: { apiName: true, apisTableId: true, apisTableName: true, appsTableId: true, appsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultPermissions: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } }, + selection: { fields: { apiName: true, apisTableId: true, apisTableName: true, appsTableId: true, appsTableName: true, bindingsTableId: true, bindingsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultPermissions: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useCatalogModulesQuery({ const { mutate } = useCreateCatalogModuleMutation({ selection: { fields: { id: true } }, }); -mutate({ apiName: '', apisTableId: '', apisTableName: '', appsTableId: '', appsTableName: '', bucketsTableId: '', bucketsTableName: '', databaseId: '', defaultPermissions: '', domainsTableId: '', domainsTableName: '', entityTableId: '', functionsTableId: '', functionsTableName: '', namespacesTableId: '', namespacesTableName: '', policies: '', privateApiName: '', provisions: '', publicSchemaName: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourcesTableId: '', resourcesTableName: '', schemaId: '', scope: '', sitesAppLinksTableId: '', sitesAppLinksTableName: '', sitesDeepLinksTableId: '', sitesDeepLinksTableName: '', sitesErrorPagesTableId: '', sitesErrorPagesTableName: '', sitesTableId: '', sitesTableName: '', sitesWebConfigTableId: '', sitesWebConfigTableName: '' }); +mutate({ apiName: '', apisTableId: '', apisTableName: '', appsTableId: '', appsTableName: '', bindingsTableId: '', bindingsTableName: '', bucketsTableId: '', bucketsTableName: '', databaseId: '', defaultPermissions: '', domainsTableId: '', domainsTableName: '', entityTableId: '', functionsTableId: '', functionsTableName: '', namespacesTableId: '', namespacesTableName: '', policies: '', privateApiName: '', provisions: '', publicSchemaName: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourcesTableId: '', resourcesTableName: '', schemaId: '', scope: '', sitesAppLinksTableId: '', sitesAppLinksTableName: '', sitesDeepLinksTableId: '', sitesDeepLinksTableName: '', sitesErrorPagesTableId: '', sitesErrorPagesTableName: '', sitesTableId: '', sitesTableName: '', sitesWebConfigTableId: '', sitesWebConfigTableName: '' }); ``` diff --git a/.agents/skills/hooks-modules/references/route-module.md b/.agents/skills/hooks-modules/references/route-module.md index 9d8b50490f..432d232bae 100644 --- a/.agents/skills/hooks-modules/references/route-module.md +++ b/.agents/skills/hooks-modules/references/route-module.md @@ -7,8 +7,8 @@ React Query hooks for RouteModule data operations ## Usage ```typescript -useRouteModulesQuery({ selection: { fields: { apiName: true, catalogModuleId: true, databaseId: true, defaultPermissions: true, domainModuleId: true, entityField: true, entityTableId: true, hostnameBindingsTableId: true, hostnameBindingsTableName: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, resolverFunctionName: true, routeBindingsTableId: true, routeBindingsTableName: true, routesTableId: true, routesTableName: true, schemaId: true, scope: true } } }) -useRouteModuleQuery({ id: '', selection: { fields: { apiName: true, catalogModuleId: true, databaseId: true, defaultPermissions: true, domainModuleId: true, entityField: true, entityTableId: true, hostnameBindingsTableId: true, hostnameBindingsTableName: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, resolverFunctionName: true, routeBindingsTableId: true, routeBindingsTableName: true, routesTableId: true, routesTableName: true, schemaId: true, scope: true } } }) +useRouteModulesQuery({ selection: { fields: { apiName: true, appLinksFunctionName: true, catalogModuleId: true, databaseId: true, deepLinkFunctionName: true, defaultPermissions: true, domainModuleId: true, entityField: true, entityTableId: true, hostnameBindingsTableId: true, hostnameBindingsTableName: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, resolverFunctionName: true, routeBindingsTableId: true, routeBindingsTableName: true, routesTableId: true, routesTableName: true, schemaId: true, scope: true } } }) +useRouteModuleQuery({ id: '', selection: { fields: { apiName: true, appLinksFunctionName: true, catalogModuleId: true, databaseId: true, deepLinkFunctionName: true, defaultPermissions: true, domainModuleId: true, entityField: true, entityTableId: true, hostnameBindingsTableId: true, hostnameBindingsTableName: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, resolverFunctionName: true, routeBindingsTableId: true, routeBindingsTableName: true, routesTableId: true, routesTableName: true, schemaId: true, scope: true } } }) useCreateRouteModuleMutation({ selection: { fields: { id: true } } }) useUpdateRouteModuleMutation({ selection: { fields: { id: true } } }) useDeleteRouteModuleMutation({}) @@ -20,7 +20,7 @@ useDeleteRouteModuleMutation({}) ```typescript const { data, isLoading } = useRouteModulesQuery({ - selection: { fields: { apiName: true, catalogModuleId: true, databaseId: true, defaultPermissions: true, domainModuleId: true, entityField: true, entityTableId: true, hostnameBindingsTableId: true, hostnameBindingsTableName: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, resolverFunctionName: true, routeBindingsTableId: true, routeBindingsTableName: true, routesTableId: true, routesTableName: true, schemaId: true, scope: true } }, + selection: { fields: { apiName: true, appLinksFunctionName: true, catalogModuleId: true, databaseId: true, deepLinkFunctionName: true, defaultPermissions: true, domainModuleId: true, entityField: true, entityTableId: true, hostnameBindingsTableId: true, hostnameBindingsTableName: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, resolverFunctionName: true, routeBindingsTableId: true, routeBindingsTableName: true, routesTableId: true, routesTableName: true, schemaId: true, scope: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useRouteModulesQuery({ const { mutate } = useCreateRouteModuleMutation({ selection: { fields: { id: true } }, }); -mutate({ apiName: '', catalogModuleId: '', databaseId: '', defaultPermissions: '', domainModuleId: '', entityField: '', entityTableId: '', hostnameBindingsTableId: '', hostnameBindingsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', resolverFunctionName: '', routeBindingsTableId: '', routeBindingsTableName: '', routesTableId: '', routesTableName: '', schemaId: '', scope: '' }); +mutate({ apiName: '', appLinksFunctionName: '', catalogModuleId: '', databaseId: '', deepLinkFunctionName: '', defaultPermissions: '', domainModuleId: '', entityField: '', entityTableId: '', hostnameBindingsTableId: '', hostnameBindingsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', resolverFunctionName: '', routeBindingsTableId: '', routeBindingsTableName: '', routesTableId: '', routesTableName: '', schemaId: '', scope: '' }); ``` diff --git a/.agents/skills/hooks-modules/references/scope-types-module.md b/.agents/skills/hooks-modules/references/scope-types-module.md new file mode 100644 index 0000000000..d304a8fe50 --- /dev/null +++ b/.agents/skills/hooks-modules/references/scope-types-module.md @@ -0,0 +1,34 @@ +# scopeTypesModule + + + +React Query hooks for ScopeTypesModule data operations + +## Usage + +```typescript +useScopeTypesModulesQuery({ selection: { fields: { databaseId: true, id: true, privateSchemaName: true, schemaId: true, scopeTypesTableId: true } } }) +useScopeTypesModuleQuery({ id: '', selection: { fields: { databaseId: true, id: true, privateSchemaName: true, schemaId: true, scopeTypesTableId: true } } }) +useCreateScopeTypesModuleMutation({ selection: { fields: { id: true } } }) +useUpdateScopeTypesModuleMutation({ selection: { fields: { id: true } } }) +useDeleteScopeTypesModuleMutation({}) +``` + +## Examples + +### List all scopeTypesModules + +```typescript +const { data, isLoading } = useScopeTypesModulesQuery({ + selection: { fields: { databaseId: true, id: true, privateSchemaName: true, schemaId: true, scopeTypesTableId: true } }, +}); +``` + +### Create a scopeTypesModule + +```typescript +const { mutate } = useCreateScopeTypesModuleMutation({ + selection: { fields: { id: true } }, +}); +mutate({ databaseId: '', privateSchemaName: '', schemaId: '', scopeTypesTableId: '' }); +``` diff --git a/.agents/skills/hooks-modules/references/user-settings-security-module.md b/.agents/skills/hooks-modules/references/user-settings-security-module.md new file mode 100644 index 0000000000..ccb40f16ce --- /dev/null +++ b/.agents/skills/hooks-modules/references/user-settings-security-module.md @@ -0,0 +1,34 @@ +# userSettingsSecurityModule + + + +React Query hooks for UserSettingsSecurityModule data operations + +## Usage + +```typescript +useUserSettingsSecurityModulesQuery({ selection: { fields: { apiName: true, databaseId: true, id: true, ownerTableId: true, schemaId: true, tableId: true, tableName: true } } }) +useUserSettingsSecurityModuleQuery({ id: '', selection: { fields: { apiName: true, databaseId: true, id: true, ownerTableId: true, schemaId: true, tableId: true, tableName: true } } }) +useCreateUserSettingsSecurityModuleMutation({ selection: { fields: { id: true } } }) +useUpdateUserSettingsSecurityModuleMutation({ selection: { fields: { id: true } } }) +useDeleteUserSettingsSecurityModuleMutation({}) +``` + +## Examples + +### List all userSettingsSecurityModules + +```typescript +const { data, isLoading } = useUserSettingsSecurityModulesQuery({ + selection: { fields: { apiName: true, databaseId: true, id: true, ownerTableId: true, schemaId: true, tableId: true, tableName: true } }, +}); +``` + +### Create a userSettingsSecurityModule + +```typescript +const { mutate } = useCreateUserSettingsSecurityModuleMutation({ + selection: { fields: { id: true } }, +}); +mutate({ apiName: '', databaseId: '', ownerTableId: '', schemaId: '', tableId: '', tableName: '' }); +``` diff --git a/.agents/skills/hooks-objects/SKILL.md b/.agents/skills/hooks-objects/SKILL.md index bbe72773f3..bb0063deed 100644 --- a/.agents/skills/hooks-objects/SKILL.md +++ b/.agents/skills/hooks-objects/SKILL.md @@ -1,13 +1,13 @@ --- name: hooks-objects -description: React Query hooks for the objects API — provides typed query and mutation hooks for 5 tables and 4 custom operations +description: React Query hooks for the objects API — provides typed query and mutation hooks for 5 tables and 7 custom operations --- # hooks-objects -React Query hooks for the objects API — provides typed query and mutation hooks for 5 tables and 4 custom operations +React Query hooks for the objects API — provides typed query and mutation hooks for 5 tables and 7 custom operations ## Usage @@ -45,5 +45,8 @@ See the `references/` directory for detailed per-entity API documentation: - [store](references/store.md) - [init-empty-repo](references/init-empty-repo.md) - [insert-node-at-path](references/insert-node-at-path.md) +- [insert-nodes-at-paths](references/insert-nodes-at-paths.md) - [provision-bucket](references/provision-bucket.md) +- [set-and-commit](references/set-and-commit.md) - [set-data-at-path](references/set-data-at-path.md) +- [set-many-and-commit](references/set-many-and-commit.md) diff --git a/.agents/skills/hooks-objects/references/insert-nodes-at-paths.md b/.agents/skills/hooks-objects/references/insert-nodes-at-paths.md new file mode 100644 index 0000000000..d7185a48ac --- /dev/null +++ b/.agents/skills/hooks-objects/references/insert-nodes-at-paths.md @@ -0,0 +1,20 @@ +# insertNodesAtPaths + + + +React Query mutation hook for insertNodesAtPaths + +## Usage + +```typescript +const { mutate } = useInsertNodesAtPathsMutation(); mutate({ input: '' }); +``` + +## Examples + +### Use useInsertNodesAtPathsMutation + +```typescript +const { mutate, isLoading } = useInsertNodesAtPathsMutation(); +mutate({ input: '' }); +``` diff --git a/.agents/skills/hooks-objects/references/set-many-and-commit.md b/.agents/skills/hooks-objects/references/set-many-and-commit.md new file mode 100644 index 0000000000..7329c10396 --- /dev/null +++ b/.agents/skills/hooks-objects/references/set-many-and-commit.md @@ -0,0 +1,20 @@ +# setManyAndCommit + + + +React Query mutation hook for setManyAndCommit + +## Usage + +```typescript +const { mutate } = useSetManyAndCommitMutation(); mutate({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }); +``` + +## Examples + +### Use useSetManyAndCommitMutation + +```typescript +const { mutate, isLoading } = useSetManyAndCommitMutation(); +mutate({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }); +``` diff --git a/.agents/skills/orm-api/SKILL.md b/.agents/skills/orm-api/SKILL.md index 058ac6134e..c5dd259262 100644 --- a/.agents/skills/orm-api/SKILL.md +++ b/.agents/skills/orm-api/SKILL.md @@ -15,7 +15,7 @@ ORM client for the api API — provides typed CRUD operations for 80 tables and // Import the ORM client import { db } from './orm'; -// Available models: apiSchema, apiSetting, apis, astMigration, checkConstraint, compositeType, corsSetting, database, ... +// Available models: api, apiSchema, apiSetting, astMigration, checkConstraint, compositeType, corsSetting, database, ... db..findMany({ select: { id: true } }).execute() db..findOne({ id: '', select: { id: true } }).execute() db..create({ data: { ... }, select: { id: true } }).execute() @@ -28,7 +28,7 @@ db..delete({ where: { id: '' } }).execute() ### Query records ```typescript -const items = await db.apiSchema.findMany({ +const items = await db.api.findMany({ select: { id: true } }).execute(); ``` @@ -37,9 +37,9 @@ const items = await db.apiSchema.findMany({ See the `references/` directory for detailed per-entity API documentation: +- [api](references/api.md) - [api-schema](references/api-schema.md) - [api-setting](references/api-setting.md) -- [apis](references/apis.md) - [ast-migration](references/ast-migration.md) - [check-constraint](references/check-constraint.md) - [composite-type](references/composite-type.md) @@ -69,9 +69,9 @@ See the `references/` directory for detailed per-entity API documentation: - [node-type-registry](references/node-type-registry.md) - [page](references/page.md) - [partition](references/partition.md) +- [platform-api](references/platform-api.md) - [platform-api-schema](references/platform-api-schema.md) - [platform-api-setting](references/platform-api-setting.md) -- [platform-apis](references/platform-apis.md) - [platform-cors-setting](references/platform-cors-setting.md) - [platform-domain](references/platform-domain.md) - [platform-domain-event](references/platform-domain-event.md) diff --git a/.agents/skills/orm-compute/SKILL.md b/.agents/skills/orm-compute/SKILL.md index c16969bcf4..5778b7fcf2 100644 --- a/.agents/skills/orm-compute/SKILL.md +++ b/.agents/skills/orm-compute/SKILL.md @@ -1,13 +1,13 @@ --- name: orm-compute -description: ORM client for the compute API — provides typed CRUD operations for 69 tables and 29 custom operations +description: ORM client for the compute API — provides typed CRUD operations for 69 tables and 38 custom operations --- # orm-compute -ORM client for the compute API — provides typed CRUD operations for 69 tables and 29 custom operations +ORM client for the compute API — provides typed CRUD operations for 69 tables and 38 custom operations ## Usage @@ -116,12 +116,19 @@ See the `references/` directory for detailed per-entity API documentation: - [import-graph-json](references/import-graph-json.md) - [infra-init-empty-repo](references/infra-init-empty-repo.md) - [infra-insert-node-at-path](references/infra-insert-node-at-path.md) +- [infra-insert-nodes-at-paths](references/infra-insert-nodes-at-paths.md) +- [infra-set-and-commit](references/infra-set-and-commit.md) - [infra-set-data-at-path](references/infra-set-data-at-path.md) +- [infra-set-many-and-commit](references/infra-set-many-and-commit.md) - [init-empty-repo](references/init-empty-repo.md) - [insert-node-at-path](references/insert-node-at-path.md) +- [insert-nodes-at-paths](references/insert-nodes-at-paths.md) - [platform-infra-init-empty-repo](references/platform-infra-init-empty-repo.md) - [platform-infra-insert-node-at-path](references/platform-infra-insert-node-at-path.md) +- [platform-infra-insert-nodes-at-paths](references/platform-infra-insert-nodes-at-paths.md) +- [platform-infra-set-and-commit](references/platform-infra-set-and-commit.md) - [platform-infra-set-data-at-path](references/platform-infra-set-data-at-path.md) +- [platform-infra-set-many-and-commit](references/platform-infra-set-many-and-commit.md) - [platform-resource-installations-install](references/platform-resource-installations-install.md) - [platform-resource-installations-rollback](references/platform-resource-installations-rollback.md) - [platform-resource-installations-uninstall](references/platform-resource-installations-uninstall.md) @@ -132,6 +139,8 @@ See the `references/` directory for detailed per-entity API documentation: - [resource-installations-uninstall](references/resource-installations-uninstall.md) - [resource-installations-upgrade](references/resource-installations-upgrade.md) - [save-graph](references/save-graph.md) +- [set-and-commit](references/set-and-commit.md) - [set-data-at-path](references/set-data-at-path.md) +- [set-many-and-commit](references/set-many-and-commit.md) - [start-execution](references/start-execution.md) - [validate-function-graph](references/validate-function-graph.md) diff --git a/.agents/skills/orm-compute/references/function-definition.md b/.agents/skills/orm-compute/references/function-definition.md index eba02866b7..f79b1115bd 100644 --- a/.agents/skills/orm-compute/references/function-definition.md +++ b/.agents/skills/orm-compute/references/function-definition.md @@ -9,7 +9,7 @@ Function definitions — registered cloud functions with routing, queue, and ret ```typescript db.functionDefinition.findMany({ select: { id: true } }).execute() db.functionDefinition.findOne({ id: '', select: { id: true } }).execute() -db.functionDefinition.create({ data: { accessChannels: '', category: '', concurrency: '', cpuLimitMillicores: '', cpuRequestMillicores: '', databaseId: '', description: '', fnCategory: '', functionColumns: '', graphId: '', icon: '', image: '', inputs: '', integrations: '', isPublished: '', maxAttempts: '', memoryLimitBytes: '', memoryRequestBytes: '', moduleTable: '', name: '', outputs: '', payloadArgs: '', priority: '', props: '', protected: '', publishedAt: '', queueName: '', requiredBuckets: '', requiredConfigs: '', requiredModels: '', requiredSecrets: '', resources: '', runtime: '', scaleMax: '', scaleMin: '', targetFunction: '', targetSchema: '', taskIdentifier: '', timeoutSeconds: '', volatile: '' }, select: { id: true } }).execute() +db.functionDefinition.create({ data: { accessChannels: '', category: '', concurrency: '', cpuLimitMillicores: '', cpuRequestMillicores: '', databaseId: '', description: '', fnCategory: '', functionColumns: '', graphId: '', icon: '', image: '', inputs: '', integrations: '', isPublished: '', maxAttempts: '', memoryLimitBytes: '', memoryRequestBytes: '', moduleTable: '', name: '', outputs: '', payloadArgs: '', priority: '', props: '', protected: '', publishedAt: '', queueName: '', requiredBuckets: '', requiredConfigs: '', requiredModels: '', requiredModules: '', requiredSecrets: '', resources: '', runtime: '', scaleMax: '', scaleMin: '', targetFunction: '', targetSchema: '', taskIdentifier: '', timeoutSeconds: '', volatile: '' }, select: { id: true } }).execute() db.functionDefinition.update({ where: { id: '' }, data: { accessChannels: '' }, select: { id: true } }).execute() db.functionDefinition.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.functionDefinition.findMany({ ```typescript const item = await db.functionDefinition.create({ - data: { accessChannels: '', category: '', concurrency: '', cpuLimitMillicores: '', cpuRequestMillicores: '', databaseId: '', description: '', fnCategory: '', functionColumns: '', graphId: '', icon: '', image: '', inputs: '', integrations: '', isPublished: '', maxAttempts: '', memoryLimitBytes: '', memoryRequestBytes: '', moduleTable: '', name: '', outputs: '', payloadArgs: '', priority: '', props: '', protected: '', publishedAt: '', queueName: '', requiredBuckets: '', requiredConfigs: '', requiredModels: '', requiredSecrets: '', resources: '', runtime: '', scaleMax: '', scaleMin: '', targetFunction: '', targetSchema: '', taskIdentifier: '', timeoutSeconds: '', volatile: '' }, + data: { accessChannels: '', category: '', concurrency: '', cpuLimitMillicores: '', cpuRequestMillicores: '', databaseId: '', description: '', fnCategory: '', functionColumns: '', graphId: '', icon: '', image: '', inputs: '', integrations: '', isPublished: '', maxAttempts: '', memoryLimitBytes: '', memoryRequestBytes: '', moduleTable: '', name: '', outputs: '', payloadArgs: '', priority: '', props: '', protected: '', publishedAt: '', queueName: '', requiredBuckets: '', requiredConfigs: '', requiredModels: '', requiredModules: '', requiredSecrets: '', resources: '', runtime: '', scaleMax: '', scaleMin: '', targetFunction: '', targetSchema: '', taskIdentifier: '', timeoutSeconds: '', volatile: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-compute/references/function-deployment.md b/.agents/skills/orm-compute/references/function-deployment.md index 8509eae494..d5261c1276 100644 --- a/.agents/skills/orm-compute/references/function-deployment.md +++ b/.agents/skills/orm-compute/references/function-deployment.md @@ -9,7 +9,7 @@ Function deployment bindings — ties a handler image to a namespace for Knative ```typescript db.functionDeployment.findMany({ select: { id: true } }).execute() db.functionDeployment.findOne({ id: '', select: { id: true } }).execute() -db.functionDeployment.create({ data: { annotations: '', concurrency: '', databaseId: '', errorCount: '', handlerName: '', image: '', imageVersion: '', labels: '', lastError: '', lastErrorAt: '', namespaceId: '', resources: '', revision: '', scaleMax: '', scaleMin: '', serviceName: '', serviceUrl: '', status: '', timeoutSeconds: '' }, select: { id: true } }).execute() +db.functionDeployment.create({ data: { annotations: '', concurrency: '', databaseId: '', errorCount: '', handlerName: '', image: '', imageVersion: '', labels: '', lastError: '', lastErrorAt: '', namespaceId: '', realm: '', resources: '', revision: '', scaleMax: '', scaleMin: '', serviceName: '', serviceUrl: '', status: '', timeoutSeconds: '' }, select: { id: true } }).execute() db.functionDeployment.update({ where: { id: '' }, data: { annotations: '' }, select: { id: true } }).execute() db.functionDeployment.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.functionDeployment.findMany({ ```typescript const item = await db.functionDeployment.create({ - data: { annotations: '', concurrency: '', databaseId: '', errorCount: '', handlerName: '', image: '', imageVersion: '', labels: '', lastError: '', lastErrorAt: '', namespaceId: '', resources: '', revision: '', scaleMax: '', scaleMin: '', serviceName: '', serviceUrl: '', status: '', timeoutSeconds: '' }, + data: { annotations: '', concurrency: '', databaseId: '', errorCount: '', handlerName: '', image: '', imageVersion: '', labels: '', lastError: '', lastErrorAt: '', namespaceId: '', realm: '', resources: '', revision: '', scaleMax: '', scaleMin: '', serviceName: '', serviceUrl: '', status: '', timeoutSeconds: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-compute/references/infra-insert-nodes-at-paths.md b/.agents/skills/orm-compute/references/infra-insert-nodes-at-paths.md new file mode 100644 index 0000000000..3a6a112c6a --- /dev/null +++ b/.agents/skills/orm-compute/references/infra-insert-nodes-at-paths.md @@ -0,0 +1,19 @@ +# infraInsertNodesAtPaths + + + +Execute the infraInsertNodesAtPaths mutation + +## Usage + +```typescript +db.mutation.infraInsertNodesAtPaths({ input: '' }).execute() +``` + +## Examples + +### Run infraInsertNodesAtPaths + +```typescript +const result = await db.mutation.infraInsertNodesAtPaths({ input: '' }).execute(); +``` diff --git a/.agents/skills/orm-compute/references/infra-set-and-commit.md b/.agents/skills/orm-compute/references/infra-set-and-commit.md new file mode 100644 index 0000000000..1cafda087d --- /dev/null +++ b/.agents/skills/orm-compute/references/infra-set-and-commit.md @@ -0,0 +1,19 @@ +# infraSetAndCommit + + + +Execute the infraSetAndCommit mutation + +## Usage + +```typescript +db.mutation.infraSetAndCommit({ input: '' }).execute() +``` + +## Examples + +### Run infraSetAndCommit + +```typescript +const result = await db.mutation.infraSetAndCommit({ input: '' }).execute(); +``` diff --git a/.agents/skills/orm-compute/references/infra-set-many-and-commit.md b/.agents/skills/orm-compute/references/infra-set-many-and-commit.md new file mode 100644 index 0000000000..2232a8908d --- /dev/null +++ b/.agents/skills/orm-compute/references/infra-set-many-and-commit.md @@ -0,0 +1,19 @@ +# infraSetManyAndCommit + + + +Execute the infraSetManyAndCommit mutation + +## Usage + +```typescript +db.mutation.infraSetManyAndCommit({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }).execute() +``` + +## Examples + +### Run infraSetManyAndCommit + +```typescript +const result = await db.mutation.infraSetManyAndCommit({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }).execute(); +``` diff --git a/.agents/skills/orm-compute/references/insert-nodes-at-paths.md b/.agents/skills/orm-compute/references/insert-nodes-at-paths.md new file mode 100644 index 0000000000..92134612a9 --- /dev/null +++ b/.agents/skills/orm-compute/references/insert-nodes-at-paths.md @@ -0,0 +1,19 @@ +# insertNodesAtPaths + + + +Execute the insertNodesAtPaths mutation + +## Usage + +```typescript +db.mutation.insertNodesAtPaths({ input: '' }).execute() +``` + +## Examples + +### Run insertNodesAtPaths + +```typescript +const result = await db.mutation.insertNodesAtPaths({ input: '' }).execute(); +``` diff --git a/.agents/skills/orm-compute/references/platform-function-definition.md b/.agents/skills/orm-compute/references/platform-function-definition.md index 25c601cbdd..262f1d1ab0 100644 --- a/.agents/skills/orm-compute/references/platform-function-definition.md +++ b/.agents/skills/orm-compute/references/platform-function-definition.md @@ -9,7 +9,7 @@ Function definitions — registered cloud functions with routing, queue, and ret ```typescript db.platformFunctionDefinition.findMany({ select: { id: true } }).execute() db.platformFunctionDefinition.findOne({ id: '', select: { id: true } }).execute() -db.platformFunctionDefinition.create({ data: { accessChannels: '', billable: '', category: '', concurrency: '', cpuLimitMillicores: '', cpuRequestMillicores: '', description: '', fnCategory: '', functionColumns: '', graphId: '', icon: '', image: '', inputs: '', integrations: '', isPublished: '', maxAttempts: '', memoryLimitBytes: '', memoryRequestBytes: '', moduleTable: '', name: '', outputs: '', payloadArgs: '', priority: '', props: '', protected: '', publishedAt: '', queueName: '', requiredBuckets: '', requiredConfigs: '', requiredModels: '', requiredSecrets: '', resources: '', runtime: '', scaleMax: '', scaleMin: '', system: '', targetFunction: '', targetSchema: '', taskIdentifier: '', timeoutSeconds: '', volatile: '' }, select: { id: true } }).execute() +db.platformFunctionDefinition.create({ data: { accessChannels: '', billable: '', category: '', concurrency: '', cpuLimitMillicores: '', cpuRequestMillicores: '', description: '', fnCategory: '', functionColumns: '', graphId: '', icon: '', image: '', inputs: '', integrations: '', isPublished: '', maxAttempts: '', memoryLimitBytes: '', memoryRequestBytes: '', moduleTable: '', name: '', outputs: '', payloadArgs: '', priority: '', props: '', protected: '', publishedAt: '', queueName: '', requiredBuckets: '', requiredConfigs: '', requiredModels: '', requiredModules: '', requiredSecrets: '', resources: '', runtime: '', scaleMax: '', scaleMin: '', system: '', targetFunction: '', targetSchema: '', taskIdentifier: '', timeoutSeconds: '', volatile: '' }, select: { id: true } }).execute() db.platformFunctionDefinition.update({ where: { id: '' }, data: { accessChannels: '' }, select: { id: true } }).execute() db.platformFunctionDefinition.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.platformFunctionDefinition.findMany({ ```typescript const item = await db.platformFunctionDefinition.create({ - data: { accessChannels: '', billable: '', category: '', concurrency: '', cpuLimitMillicores: '', cpuRequestMillicores: '', description: '', fnCategory: '', functionColumns: '', graphId: '', icon: '', image: '', inputs: '', integrations: '', isPublished: '', maxAttempts: '', memoryLimitBytes: '', memoryRequestBytes: '', moduleTable: '', name: '', outputs: '', payloadArgs: '', priority: '', props: '', protected: '', publishedAt: '', queueName: '', requiredBuckets: '', requiredConfigs: '', requiredModels: '', requiredSecrets: '', resources: '', runtime: '', scaleMax: '', scaleMin: '', system: '', targetFunction: '', targetSchema: '', taskIdentifier: '', timeoutSeconds: '', volatile: '' }, + data: { accessChannels: '', billable: '', category: '', concurrency: '', cpuLimitMillicores: '', cpuRequestMillicores: '', description: '', fnCategory: '', functionColumns: '', graphId: '', icon: '', image: '', inputs: '', integrations: '', isPublished: '', maxAttempts: '', memoryLimitBytes: '', memoryRequestBytes: '', moduleTable: '', name: '', outputs: '', payloadArgs: '', priority: '', props: '', protected: '', publishedAt: '', queueName: '', requiredBuckets: '', requiredConfigs: '', requiredModels: '', requiredModules: '', requiredSecrets: '', resources: '', runtime: '', scaleMax: '', scaleMin: '', system: '', targetFunction: '', targetSchema: '', taskIdentifier: '', timeoutSeconds: '', volatile: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-compute/references/platform-function-deployment.md b/.agents/skills/orm-compute/references/platform-function-deployment.md index b0fc8d4fa4..e0a3b7df4b 100644 --- a/.agents/skills/orm-compute/references/platform-function-deployment.md +++ b/.agents/skills/orm-compute/references/platform-function-deployment.md @@ -9,7 +9,7 @@ Function deployment bindings — ties a handler image to a namespace for Knative ```typescript db.platformFunctionDeployment.findMany({ select: { id: true } }).execute() db.platformFunctionDeployment.findOne({ id: '', select: { id: true } }).execute() -db.platformFunctionDeployment.create({ data: { annotations: '', concurrency: '', errorCount: '', handlerName: '', image: '', imageVersion: '', labels: '', lastError: '', lastErrorAt: '', namespaceId: '', resources: '', revision: '', scaleMax: '', scaleMin: '', serviceName: '', serviceUrl: '', status: '', timeoutSeconds: '' }, select: { id: true } }).execute() +db.platformFunctionDeployment.create({ data: { annotations: '', concurrency: '', errorCount: '', handlerName: '', image: '', imageVersion: '', labels: '', lastError: '', lastErrorAt: '', namespaceId: '', realm: '', resources: '', revision: '', scaleMax: '', scaleMin: '', serviceName: '', serviceUrl: '', status: '', timeoutSeconds: '' }, select: { id: true } }).execute() db.platformFunctionDeployment.update({ where: { id: '' }, data: { annotations: '' }, select: { id: true } }).execute() db.platformFunctionDeployment.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.platformFunctionDeployment.findMany({ ```typescript const item = await db.platformFunctionDeployment.create({ - data: { annotations: '', concurrency: '', errorCount: '', handlerName: '', image: '', imageVersion: '', labels: '', lastError: '', lastErrorAt: '', namespaceId: '', resources: '', revision: '', scaleMax: '', scaleMin: '', serviceName: '', serviceUrl: '', status: '', timeoutSeconds: '' }, + data: { annotations: '', concurrency: '', errorCount: '', handlerName: '', image: '', imageVersion: '', labels: '', lastError: '', lastErrorAt: '', namespaceId: '', realm: '', resources: '', revision: '', scaleMax: '', scaleMin: '', serviceName: '', serviceUrl: '', status: '', timeoutSeconds: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-compute/references/platform-infra-insert-nodes-at-paths.md b/.agents/skills/orm-compute/references/platform-infra-insert-nodes-at-paths.md new file mode 100644 index 0000000000..432256cae1 --- /dev/null +++ b/.agents/skills/orm-compute/references/platform-infra-insert-nodes-at-paths.md @@ -0,0 +1,19 @@ +# platformInfraInsertNodesAtPaths + + + +Execute the platformInfraInsertNodesAtPaths mutation + +## Usage + +```typescript +db.mutation.platformInfraInsertNodesAtPaths({ input: '' }).execute() +``` + +## Examples + +### Run platformInfraInsertNodesAtPaths + +```typescript +const result = await db.mutation.platformInfraInsertNodesAtPaths({ input: '' }).execute(); +``` diff --git a/.agents/skills/orm-compute/references/platform-infra-set-and-commit.md b/.agents/skills/orm-compute/references/platform-infra-set-and-commit.md new file mode 100644 index 0000000000..044f7b74aa --- /dev/null +++ b/.agents/skills/orm-compute/references/platform-infra-set-and-commit.md @@ -0,0 +1,19 @@ +# platformInfraSetAndCommit + + + +Execute the platformInfraSetAndCommit mutation + +## Usage + +```typescript +db.mutation.platformInfraSetAndCommit({ input: '' }).execute() +``` + +## Examples + +### Run platformInfraSetAndCommit + +```typescript +const result = await db.mutation.platformInfraSetAndCommit({ input: '' }).execute(); +``` diff --git a/.agents/skills/orm-compute/references/platform-infra-set-many-and-commit.md b/.agents/skills/orm-compute/references/platform-infra-set-many-and-commit.md new file mode 100644 index 0000000000..a08d77f2f1 --- /dev/null +++ b/.agents/skills/orm-compute/references/platform-infra-set-many-and-commit.md @@ -0,0 +1,19 @@ +# platformInfraSetManyAndCommit + + + +Execute the platformInfraSetManyAndCommit mutation + +## Usage + +```typescript +db.mutation.platformInfraSetManyAndCommit({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }).execute() +``` + +## Examples + +### Run platformInfraSetManyAndCommit + +```typescript +const result = await db.mutation.platformInfraSetManyAndCommit({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }).execute(); +``` diff --git a/.agents/skills/orm-compute/references/set-and-commit.md b/.agents/skills/orm-compute/references/set-and-commit.md new file mode 100644 index 0000000000..ad6df17886 --- /dev/null +++ b/.agents/skills/orm-compute/references/set-and-commit.md @@ -0,0 +1,19 @@ +# setAndCommit + + + +Execute the setAndCommit mutation + +## Usage + +```typescript +db.mutation.setAndCommit({ input: '' }).execute() +``` + +## Examples + +### Run setAndCommit + +```typescript +const result = await db.mutation.setAndCommit({ input: '' }).execute(); +``` diff --git a/.agents/skills/orm-compute/references/set-many-and-commit.md b/.agents/skills/orm-compute/references/set-many-and-commit.md new file mode 100644 index 0000000000..95526566ce --- /dev/null +++ b/.agents/skills/orm-compute/references/set-many-and-commit.md @@ -0,0 +1,19 @@ +# setManyAndCommit + + + +Execute the setManyAndCommit mutation + +## Usage + +```typescript +db.mutation.setManyAndCommit({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }).execute() +``` + +## Examples + +### Run setManyAndCommit + +```typescript +const result = await db.mutation.setManyAndCommit({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }).execute(); +``` diff --git a/.agents/skills/orm-infra/SKILL.md b/.agents/skills/orm-infra/SKILL.md index ba4a612899..7593168162 100644 --- a/.agents/skills/orm-infra/SKILL.md +++ b/.agents/skills/orm-infra/SKILL.md @@ -1,13 +1,13 @@ --- name: orm-infra -description: ORM client for the infra API — provides typed CRUD operations for 10 tables and 4 custom operations +description: ORM client for the infra API — provides typed CRUD operations for 10 tables and 7 custom operations --- # orm-infra -ORM client for the infra API — provides typed CRUD operations for 10 tables and 4 custom operations +ORM client for the infra API — provides typed CRUD operations for 10 tables and 7 custom operations ## Usage @@ -49,5 +49,8 @@ See the `references/` directory for detailed per-entity API documentation: - [platform-namespace-event](references/platform-namespace-event.md) - [platform-infra-init-empty-repo](references/platform-infra-init-empty-repo.md) - [platform-infra-insert-node-at-path](references/platform-infra-insert-node-at-path.md) +- [platform-infra-insert-nodes-at-paths](references/platform-infra-insert-nodes-at-paths.md) +- [platform-infra-set-and-commit](references/platform-infra-set-and-commit.md) - [platform-infra-set-data-at-path](references/platform-infra-set-data-at-path.md) +- [platform-infra-set-many-and-commit](references/platform-infra-set-many-and-commit.md) - [provision-bucket](references/provision-bucket.md) diff --git a/.agents/skills/orm-infra/references/platform-infra-insert-nodes-at-paths.md b/.agents/skills/orm-infra/references/platform-infra-insert-nodes-at-paths.md new file mode 100644 index 0000000000..432256cae1 --- /dev/null +++ b/.agents/skills/orm-infra/references/platform-infra-insert-nodes-at-paths.md @@ -0,0 +1,19 @@ +# platformInfraInsertNodesAtPaths + + + +Execute the platformInfraInsertNodesAtPaths mutation + +## Usage + +```typescript +db.mutation.platformInfraInsertNodesAtPaths({ input: '' }).execute() +``` + +## Examples + +### Run platformInfraInsertNodesAtPaths + +```typescript +const result = await db.mutation.platformInfraInsertNodesAtPaths({ input: '' }).execute(); +``` diff --git a/.agents/skills/orm-infra/references/platform-infra-set-and-commit.md b/.agents/skills/orm-infra/references/platform-infra-set-and-commit.md new file mode 100644 index 0000000000..044f7b74aa --- /dev/null +++ b/.agents/skills/orm-infra/references/platform-infra-set-and-commit.md @@ -0,0 +1,19 @@ +# platformInfraSetAndCommit + + + +Execute the platformInfraSetAndCommit mutation + +## Usage + +```typescript +db.mutation.platformInfraSetAndCommit({ input: '' }).execute() +``` + +## Examples + +### Run platformInfraSetAndCommit + +```typescript +const result = await db.mutation.platformInfraSetAndCommit({ input: '' }).execute(); +``` diff --git a/.agents/skills/orm-infra/references/platform-infra-set-many-and-commit.md b/.agents/skills/orm-infra/references/platform-infra-set-many-and-commit.md new file mode 100644 index 0000000000..a08d77f2f1 --- /dev/null +++ b/.agents/skills/orm-infra/references/platform-infra-set-many-and-commit.md @@ -0,0 +1,19 @@ +# platformInfraSetManyAndCommit + + + +Execute the platformInfraSetManyAndCommit mutation + +## Usage + +```typescript +db.mutation.platformInfraSetManyAndCommit({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }).execute() +``` + +## Examples + +### Run platformInfraSetManyAndCommit + +```typescript +const result = await db.mutation.platformInfraSetManyAndCommit({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }).execute(); +``` diff --git a/.agents/skills/orm-modules/SKILL.md b/.agents/skills/orm-modules/SKILL.md index 4bada56dd8..b03adf8aa8 100644 --- a/.agents/skills/orm-modules/SKILL.md +++ b/.agents/skills/orm-modules/SKILL.md @@ -1,13 +1,13 @@ --- name: orm-modules -description: ORM client for the modules API — provides typed CRUD operations for 76 tables and 12 custom operations +description: ORM client for the modules API — provides typed CRUD operations for 78 tables and 3 custom operations --- # orm-modules -ORM client for the modules API — provides typed CRUD operations for 76 tables and 12 custom operations +ORM client for the modules API — provides typed CRUD operations for 78 tables and 3 custom operations ## Usage @@ -98,6 +98,7 @@ See the `references/` directory for detailed per-entity API documentation: - [resource-module](references/resource-module.md) - [rls-module](references/rls-module.md) - [route-module](references/route-module.md) +- [scope-types-module](references/scope-types-module.md) - [secure-table-provision](references/secure-table-provision.md) - [session-secrets-module](references/session-secrets-module.md) - [sessions-module](references/sessions-module.md) @@ -108,20 +109,12 @@ See the `references/` directory for detailed per-entity API documentation: - [user-auth-module](references/user-auth-module.md) - [user-credentials-module](references/user-credentials-module.md) - [user-settings-module](references/user-settings-module.md) +- [user-settings-security-module](references/user-settings-security-module.md) - [user-state-module](references/user-state-module.md) - [users-module](references/users-module.md) - [webauthn-auth-module](references/webauthn-auth-module.md) - [webauthn-credentials-module](references/webauthn-credentials-module.md) - [webhook-module](references/webhook-module.md) -- [resolve-blueprint-field](references/resolve-blueprint-field.md) -- [resolve-blueprint-table](references/resolve-blueprint-table.md) - [construct-blueprint](references/construct-blueprint.md) - [copy-template-to-blueprint](references/copy-template-to-blueprint.md) - [provision-bucket](references/provision-bucket.md) -- [provision-check-constraint](references/provision-check-constraint.md) -- [provision-full-text-search](references/provision-full-text-search.md) -- [provision-index](references/provision-index.md) -- [provision-relation](references/provision-relation.md) -- [provision-spatial-relation](references/provision-spatial-relation.md) -- [provision-table](references/provision-table.md) -- [provision-unique-constraint](references/provision-unique-constraint.md) diff --git a/.agents/skills/orm-modules/references/billing-provider-module.md b/.agents/skills/orm-modules/references/billing-provider-module.md index 6f8cea981b..182cc6f6a5 100644 --- a/.agents/skills/orm-modules/references/billing-provider-module.md +++ b/.agents/skills/orm-modules/references/billing-provider-module.md @@ -9,7 +9,7 @@ ORM operations for BillingProviderModule records ```typescript db.billingProviderModule.findMany({ select: { id: true } }).execute() db.billingProviderModule.findOne({ id: '', select: { id: true } }).execute() -db.billingProviderModule.create({ data: { apiName: '', billingCustomersTableId: '', billingCustomersTableName: '', billingPricesTableId: '', billingPricesTableName: '', billingProductsTableId: '', billingProductsTableName: '', billingSubscriptionsTableId: '', billingSubscriptionsTableName: '', billingWebhookEventsTableId: '', billingWebhookEventsTableName: '', databaseId: '', prefix: '', pricesTableId: '', privateApiName: '', privateSchemaId: '', processBillingEventFunction: '', productsTableId: '', provider: '', schemaId: '', subscriptionsTableId: '' }, select: { id: true } }).execute() +db.billingProviderModule.create({ data: { apiName: '', billingCustomersTableId: '', billingCustomersTableName: '', billingInvoicesTableId: '', billingInvoicesTableName: '', billingPricesTableId: '', billingPricesTableName: '', billingProductsTableId: '', billingProductsTableName: '', billingRefundsTableId: '', billingRefundsTableName: '', billingSubscriptionsTableId: '', billingSubscriptionsTableName: '', billingWebhookEventsTableId: '', billingWebhookEventsTableName: '', databaseId: '', listPendingUsageSyncFunction: '', markUsageSyncedFunction: '', prefix: '', pricesTableId: '', privateApiName: '', privateSchemaId: '', processBillingEventFunction: '', productsTableId: '', provider: '', recordRefundFunction: '', schemaId: '', subscriptionsTableId: '', upsertInvoiceFunction: '' }, select: { id: true } }).execute() db.billingProviderModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute() db.billingProviderModule.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.billingProviderModule.findMany({ ```typescript const item = await db.billingProviderModule.create({ - data: { apiName: '', billingCustomersTableId: '', billingCustomersTableName: '', billingPricesTableId: '', billingPricesTableName: '', billingProductsTableId: '', billingProductsTableName: '', billingSubscriptionsTableId: '', billingSubscriptionsTableName: '', billingWebhookEventsTableId: '', billingWebhookEventsTableName: '', databaseId: '', prefix: '', pricesTableId: '', privateApiName: '', privateSchemaId: '', processBillingEventFunction: '', productsTableId: '', provider: '', schemaId: '', subscriptionsTableId: '' }, + data: { apiName: '', billingCustomersTableId: '', billingCustomersTableName: '', billingInvoicesTableId: '', billingInvoicesTableName: '', billingPricesTableId: '', billingPricesTableName: '', billingProductsTableId: '', billingProductsTableName: '', billingRefundsTableId: '', billingRefundsTableName: '', billingSubscriptionsTableId: '', billingSubscriptionsTableName: '', billingWebhookEventsTableId: '', billingWebhookEventsTableName: '', databaseId: '', listPendingUsageSyncFunction: '', markUsageSyncedFunction: '', prefix: '', pricesTableId: '', privateApiName: '', privateSchemaId: '', processBillingEventFunction: '', productsTableId: '', provider: '', recordRefundFunction: '', schemaId: '', subscriptionsTableId: '', upsertInvoiceFunction: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-modules/references/catalog-module.md b/.agents/skills/orm-modules/references/catalog-module.md index c40261ac97..7e8f740e49 100644 --- a/.agents/skills/orm-modules/references/catalog-module.md +++ b/.agents/skills/orm-modules/references/catalog-module.md @@ -9,7 +9,7 @@ ORM operations for CatalogModule records ```typescript db.catalogModule.findMany({ select: { id: true } }).execute() db.catalogModule.findOne({ id: '', select: { id: true } }).execute() -db.catalogModule.create({ data: { apiName: '', apisTableId: '', apisTableName: '', appsTableId: '', appsTableName: '', bucketsTableId: '', bucketsTableName: '', databaseId: '', defaultPermissions: '', domainsTableId: '', domainsTableName: '', entityTableId: '', functionsTableId: '', functionsTableName: '', namespacesTableId: '', namespacesTableName: '', policies: '', privateApiName: '', provisions: '', publicSchemaName: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourcesTableId: '', resourcesTableName: '', schemaId: '', scope: '', sitesAppLinksTableId: '', sitesAppLinksTableName: '', sitesDeepLinksTableId: '', sitesDeepLinksTableName: '', sitesErrorPagesTableId: '', sitesErrorPagesTableName: '', sitesTableId: '', sitesTableName: '', sitesWebConfigTableId: '', sitesWebConfigTableName: '' }, select: { id: true } }).execute() +db.catalogModule.create({ data: { apiName: '', apisTableId: '', apisTableName: '', appsTableId: '', appsTableName: '', bindingsTableId: '', bindingsTableName: '', bucketsTableId: '', bucketsTableName: '', databaseId: '', defaultPermissions: '', domainsTableId: '', domainsTableName: '', entityTableId: '', functionsTableId: '', functionsTableName: '', namespacesTableId: '', namespacesTableName: '', policies: '', privateApiName: '', provisions: '', publicSchemaName: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourcesTableId: '', resourcesTableName: '', schemaId: '', scope: '', sitesAppLinksTableId: '', sitesAppLinksTableName: '', sitesDeepLinksTableId: '', sitesDeepLinksTableName: '', sitesErrorPagesTableId: '', sitesErrorPagesTableName: '', sitesTableId: '', sitesTableName: '', sitesWebConfigTableId: '', sitesWebConfigTableName: '' }, select: { id: true } }).execute() db.catalogModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute() db.catalogModule.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.catalogModule.findMany({ ```typescript const item = await db.catalogModule.create({ - data: { apiName: '', apisTableId: '', apisTableName: '', appsTableId: '', appsTableName: '', bucketsTableId: '', bucketsTableName: '', databaseId: '', defaultPermissions: '', domainsTableId: '', domainsTableName: '', entityTableId: '', functionsTableId: '', functionsTableName: '', namespacesTableId: '', namespacesTableName: '', policies: '', privateApiName: '', provisions: '', publicSchemaName: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourcesTableId: '', resourcesTableName: '', schemaId: '', scope: '', sitesAppLinksTableId: '', sitesAppLinksTableName: '', sitesDeepLinksTableId: '', sitesDeepLinksTableName: '', sitesErrorPagesTableId: '', sitesErrorPagesTableName: '', sitesTableId: '', sitesTableName: '', sitesWebConfigTableId: '', sitesWebConfigTableName: '' }, + data: { apiName: '', apisTableId: '', apisTableName: '', appsTableId: '', appsTableName: '', bindingsTableId: '', bindingsTableName: '', bucketsTableId: '', bucketsTableName: '', databaseId: '', defaultPermissions: '', domainsTableId: '', domainsTableName: '', entityTableId: '', functionsTableId: '', functionsTableName: '', namespacesTableId: '', namespacesTableName: '', policies: '', privateApiName: '', provisions: '', publicSchemaName: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourcesTableId: '', resourcesTableName: '', schemaId: '', scope: '', sitesAppLinksTableId: '', sitesAppLinksTableName: '', sitesDeepLinksTableId: '', sitesDeepLinksTableName: '', sitesErrorPagesTableId: '', sitesErrorPagesTableName: '', sitesTableId: '', sitesTableName: '', sitesWebConfigTableId: '', sitesWebConfigTableName: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-modules/references/route-module.md b/.agents/skills/orm-modules/references/route-module.md index 7d7fc877a5..31e1dcb208 100644 --- a/.agents/skills/orm-modules/references/route-module.md +++ b/.agents/skills/orm-modules/references/route-module.md @@ -9,7 +9,7 @@ ORM operations for RouteModule records ```typescript db.routeModule.findMany({ select: { id: true } }).execute() db.routeModule.findOne({ id: '', select: { id: true } }).execute() -db.routeModule.create({ data: { apiName: '', catalogModuleId: '', databaseId: '', defaultPermissions: '', domainModuleId: '', entityField: '', entityTableId: '', hostnameBindingsTableId: '', hostnameBindingsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', resolverFunctionName: '', routeBindingsTableId: '', routeBindingsTableName: '', routesTableId: '', routesTableName: '', schemaId: '', scope: '' }, select: { id: true } }).execute() +db.routeModule.create({ data: { apiName: '', appLinksFunctionName: '', catalogModuleId: '', databaseId: '', deepLinkFunctionName: '', defaultPermissions: '', domainModuleId: '', entityField: '', entityTableId: '', hostnameBindingsTableId: '', hostnameBindingsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', resolverFunctionName: '', routeBindingsTableId: '', routeBindingsTableName: '', routesTableId: '', routesTableName: '', schemaId: '', scope: '' }, select: { id: true } }).execute() db.routeModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute() db.routeModule.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.routeModule.findMany({ ```typescript const item = await db.routeModule.create({ - data: { apiName: '', catalogModuleId: '', databaseId: '', defaultPermissions: '', domainModuleId: '', entityField: '', entityTableId: '', hostnameBindingsTableId: '', hostnameBindingsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', resolverFunctionName: '', routeBindingsTableId: '', routeBindingsTableName: '', routesTableId: '', routesTableName: '', schemaId: '', scope: '' }, + data: { apiName: '', appLinksFunctionName: '', catalogModuleId: '', databaseId: '', deepLinkFunctionName: '', defaultPermissions: '', domainModuleId: '', entityField: '', entityTableId: '', hostnameBindingsTableId: '', hostnameBindingsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', resolverFunctionName: '', routeBindingsTableId: '', routeBindingsTableName: '', routesTableId: '', routesTableName: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-modules/references/scope-types-module.md b/.agents/skills/orm-modules/references/scope-types-module.md new file mode 100644 index 0000000000..8c5eae3c16 --- /dev/null +++ b/.agents/skills/orm-modules/references/scope-types-module.md @@ -0,0 +1,34 @@ +# scopeTypesModule + + + +ORM operations for ScopeTypesModule records + +## Usage + +```typescript +db.scopeTypesModule.findMany({ select: { id: true } }).execute() +db.scopeTypesModule.findOne({ id: '', select: { id: true } }).execute() +db.scopeTypesModule.create({ data: { databaseId: '', privateSchemaName: '', schemaId: '', scopeTypesTableId: '' }, select: { id: true } }).execute() +db.scopeTypesModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute() +db.scopeTypesModule.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all scopeTypesModule records + +```typescript +const items = await db.scopeTypesModule.findMany({ + select: { id: true, databaseId: true } +}).execute(); +``` + +### Create a scopeTypesModule + +```typescript +const item = await db.scopeTypesModule.create({ + data: { databaseId: '', privateSchemaName: '', schemaId: '', scopeTypesTableId: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-modules/references/user-settings-security-module.md b/.agents/skills/orm-modules/references/user-settings-security-module.md new file mode 100644 index 0000000000..756b0ebea9 --- /dev/null +++ b/.agents/skills/orm-modules/references/user-settings-security-module.md @@ -0,0 +1,34 @@ +# userSettingsSecurityModule + + + +ORM operations for UserSettingsSecurityModule records + +## Usage + +```typescript +db.userSettingsSecurityModule.findMany({ select: { id: true } }).execute() +db.userSettingsSecurityModule.findOne({ id: '', select: { id: true } }).execute() +db.userSettingsSecurityModule.create({ data: { apiName: '', databaseId: '', ownerTableId: '', schemaId: '', tableId: '', tableName: '' }, select: { id: true } }).execute() +db.userSettingsSecurityModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute() +db.userSettingsSecurityModule.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all userSettingsSecurityModule records + +```typescript +const items = await db.userSettingsSecurityModule.findMany({ + select: { id: true, apiName: true } +}).execute(); +``` + +### Create a userSettingsSecurityModule + +```typescript +const item = await db.userSettingsSecurityModule.create({ + data: { apiName: '', databaseId: '', ownerTableId: '', schemaId: '', tableId: '', tableName: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-objects/SKILL.md b/.agents/skills/orm-objects/SKILL.md index d6cb3ea25b..8ff749a58f 100644 --- a/.agents/skills/orm-objects/SKILL.md +++ b/.agents/skills/orm-objects/SKILL.md @@ -1,13 +1,13 @@ --- name: orm-objects -description: ORM client for the objects API — provides typed CRUD operations for 5 tables and 4 custom operations +description: ORM client for the objects API — provides typed CRUD operations for 5 tables and 7 custom operations --- # orm-objects -ORM client for the objects API — provides typed CRUD operations for 5 tables and 4 custom operations +ORM client for the objects API — provides typed CRUD operations for 5 tables and 7 custom operations ## Usage @@ -44,5 +44,8 @@ See the `references/` directory for detailed per-entity API documentation: - [store](references/store.md) - [init-empty-repo](references/init-empty-repo.md) - [insert-node-at-path](references/insert-node-at-path.md) +- [insert-nodes-at-paths](references/insert-nodes-at-paths.md) - [provision-bucket](references/provision-bucket.md) +- [set-and-commit](references/set-and-commit.md) - [set-data-at-path](references/set-data-at-path.md) +- [set-many-and-commit](references/set-many-and-commit.md) diff --git a/.agents/skills/orm-objects/references/insert-nodes-at-paths.md b/.agents/skills/orm-objects/references/insert-nodes-at-paths.md new file mode 100644 index 0000000000..92134612a9 --- /dev/null +++ b/.agents/skills/orm-objects/references/insert-nodes-at-paths.md @@ -0,0 +1,19 @@ +# insertNodesAtPaths + + + +Execute the insertNodesAtPaths mutation + +## Usage + +```typescript +db.mutation.insertNodesAtPaths({ input: '' }).execute() +``` + +## Examples + +### Run insertNodesAtPaths + +```typescript +const result = await db.mutation.insertNodesAtPaths({ input: '' }).execute(); +``` diff --git a/.agents/skills/orm-objects/references/set-many-and-commit.md b/.agents/skills/orm-objects/references/set-many-and-commit.md new file mode 100644 index 0000000000..95526566ce --- /dev/null +++ b/.agents/skills/orm-objects/references/set-many-and-commit.md @@ -0,0 +1,19 @@ +# setManyAndCommit + + + +Execute the setManyAndCommit mutation + +## Usage + +```typescript +db.mutation.setManyAndCommit({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }).execute() +``` + +## Examples + +### Run setManyAndCommit + +```typescript +const result = await db.mutation.setManyAndCommit({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }).execute(); +``` diff --git a/pgpm/export/src/meta-export-tables.json b/pgpm/export/src/meta-export-tables.json index 1119a642ff..858fa2cda8 100644 --- a/pgpm/export/src/meta-export-tables.json +++ b/pgpm/export/src/meta-export-tables.json @@ -381,6 +381,11 @@ "schema": "metaschema_modules_public", "table": "user_settings_module" }, + { + "key": "user_settings_security_module", + "schema": "metaschema_modules_public", + "table": "user_settings_security_module" + }, { "key": "user_state_module", "schema": "metaschema_modules_public", diff --git a/sdk/constructive-cli/src/api/cli/README.md b/sdk/constructive-cli/src/api/cli/README.md index af6fa9bbc9..90ca756e03 100644 --- a/sdk/constructive-cli/src/api/cli/README.md +++ b/sdk/constructive-cli/src/api/cli/README.md @@ -26,9 +26,9 @@ csdk auth set-token | `context` | Manage API contexts (endpoints) | | `auth` | Manage authentication tokens | | `config` | Manage config key-value store (per-context) | +| `api` | api CRUD operations | | `api-schema` | apiSchema CRUD operations | | `api-setting` | apiSetting CRUD operations | -| `apis` | apis CRUD operations | | `ast-migration` | astMigration CRUD operations | | `check-constraint` | checkConstraint CRUD operations | | `composite-type` | compositeType CRUD operations | @@ -58,9 +58,9 @@ csdk auth set-token | `node-type-registry` | nodeTypeRegistry CRUD operations | | `page` | page CRUD operations | | `partition` | partition CRUD operations | +| `platform-api` | platformApi CRUD operations | | `platform-api-schema` | platformApiSchema CRUD operations | | `platform-api-setting` | platformApiSetting CRUD operations | -| `platform-apis` | platformApis CRUD operations | | `platform-cors-setting` | platformCorsSetting CRUD operations | | `platform-domain` | platformDomain CRUD operations | | `platform-domain-event` | platformDomainEvent CRUD operations | @@ -174,6 +174,37 @@ Variables are scoped to the active context and stored at `~/.csdk/config/`. ## Table Commands +### `api` + +CRUD operations for Api records. + +| Subcommand | Description | +|------------|-------------| +| `list` | List all api records | +| `find-first` | Find first matching api record | +| `get` | Get a api by id | +| `create` | Create a new api | +| `update` | Update an existing api | +| `delete` | Delete a api | + +**Fields:** + +| Field | Type | +|-------|------| +| `anonRole` | String | +| `config` | JSON | +| `createdAt` | Datetime | +| `databaseId` | UUID | +| `dbname` | String | +| `id` | UUID | +| `isPublished` | Boolean | +| `name` | String | +| `roleName` | String | +| `updatedAt` | Datetime | + +**Required create fields:** `databaseId`, `name` +**Optional create fields (backend defaults):** `anonRole`, `config`, `dbname`, `isPublished`, `roleName` + ### `api-schema` CRUD operations for ApiSchema records. @@ -240,37 +271,6 @@ CRUD operations for ApiSetting records. **Required create fields:** `apiId`, `databaseId` **Optional create fields (backend defaults):** `enableAggregates`, `enableBulk`, `enableConnectionFilter`, `enableDirectUploads`, `enableI18N`, `enableLlm`, `enableLtree`, `enableManyToMany`, `enablePostgis`, `enablePresignedUploads`, `enableRealtime`, `enableSearch`, `options`, `statementTimeoutMs` -### `apis` - -CRUD operations for Apis records. - -| Subcommand | Description | -|------------|-------------| -| `list` | List all apis records | -| `find-first` | Find first matching apis record | -| `get` | Get a apis by id | -| `create` | Create a new apis | -| `update` | Update an existing apis | -| `delete` | Delete a apis | - -**Fields:** - -| Field | Type | -|-------|------| -| `anonRole` | String | -| `config` | JSON | -| `createdAt` | Datetime | -| `databaseId` | UUID | -| `dbname` | String | -| `id` | UUID | -| `isPublished` | Boolean | -| `name` | String | -| `roleName` | String | -| `updatedAt` | Datetime | - -**Required create fields:** `databaseId`, `name` -**Optional create fields (backend defaults):** `anonRole`, `config`, `dbname`, `isPublished`, `roleName` - ### `ast-migration` CRUD operations for AstMigration records. @@ -1236,6 +1236,36 @@ CRUD operations for Partition records. **Required create fields:** `databaseId`, `partitionKeyId`, `strategy`, `tableId` **Optional create fields (backend defaults):** `interval`, `isParented`, `namingPattern`, `premake`, `retention`, `retentionKeepTable` +### `platform-api` + +CRUD operations for PlatformApi records. + +| Subcommand | Description | +|------------|-------------| +| `list` | List all platformApi records | +| `find-first` | Find first matching platformApi record | +| `get` | Get a platformApi by id | +| `create` | Create a new platformApi | +| `update` | Update an existing platformApi | +| `delete` | Delete a platformApi | + +**Fields:** + +| Field | Type | +|-------|------| +| `anonRole` | String | +| `config` | JSON | +| `createdAt` | Datetime | +| `dbname` | String | +| `id` | UUID | +| `isPublished` | Boolean | +| `name` | String | +| `roleName` | String | +| `updatedAt` | Datetime | + +**Required create fields:** `name` +**Optional create fields (backend defaults):** `anonRole`, `config`, `dbname`, `isPublished`, `roleName` + ### `platform-api-schema` CRUD operations for PlatformApiSchema records. @@ -1300,36 +1330,6 @@ CRUD operations for PlatformApiSetting records. **Required create fields:** `apiId` **Optional create fields (backend defaults):** `enableAggregates`, `enableBulk`, `enableConnectionFilter`, `enableDirectUploads`, `enableI18N`, `enableLlm`, `enableLtree`, `enableManyToMany`, `enablePostgis`, `enablePresignedUploads`, `enableRealtime`, `enableSearch`, `options`, `statementTimeoutMs` -### `platform-apis` - -CRUD operations for PlatformApis records. - -| Subcommand | Description | -|------------|-------------| -| `list` | List all platformApis records | -| `find-first` | Find first matching platformApis record | -| `get` | Get a platformApis by id | -| `create` | Create a new platformApis | -| `update` | Update an existing platformApis | -| `delete` | Delete a platformApis | - -**Fields:** - -| Field | Type | -|-------|------| -| `anonRole` | String | -| `config` | JSON | -| `createdAt` | Datetime | -| `dbname` | String | -| `id` | UUID | -| `isPublished` | Boolean | -| `name` | String | -| `roleName` | String | -| `updatedAt` | Datetime | - -**Required create fields:** `name` -**Optional create fields (backend defaults):** `anonRole`, `config`, `dbname`, `isPublished`, `roleName` - ### `platform-cors-setting` CRUD operations for PlatformCorsSetting records. diff --git a/sdk/constructive-cli/src/api/cli/commands.ts b/sdk/constructive-cli/src/api/cli/commands.ts index d66aadcf71..a7b8ad4c70 100644 --- a/sdk/constructive-cli/src/api/cli/commands.ts +++ b/sdk/constructive-cli/src/api/cli/commands.ts @@ -6,9 +6,9 @@ import { CLIOptions, Inquirerer, extractFirst } from 'inquirerer'; import contextCmd from './commands/context'; import authCmd from './commands/auth'; +import apiCmd from './commands/api'; import apiSchemaCmd from './commands/api-schema'; import apiSettingCmd from './commands/api-setting'; -import apisCmd from './commands/apis'; import astMigrationCmd from './commands/ast-migration'; import checkConstraintCmd from './commands/check-constraint'; import compositeTypeCmd from './commands/composite-type'; @@ -38,9 +38,9 @@ import managedDomainCmd from './commands/managed-domain'; import nodeTypeRegistryCmd from './commands/node-type-registry'; import pageCmd from './commands/page'; import partitionCmd from './commands/partition'; +import platformApiCmd from './commands/platform-api'; import platformApiSchemaCmd from './commands/platform-api-schema'; import platformApiSettingCmd from './commands/platform-api-setting'; -import platformApisCmd from './commands/platform-apis'; import platformCorsSettingCmd from './commands/platform-cors-setting'; import platformDomainCmd from './commands/platform-domain'; import platformDomainEventCmd from './commands/platform-domain-event'; @@ -113,9 +113,9 @@ const createCommandMap: () => Record< > = () => ({ context: contextCmd, auth: authCmd, + api: apiCmd, 'api-schema': apiSchemaCmd, 'api-setting': apiSettingCmd, - apis: apisCmd, 'ast-migration': astMigrationCmd, 'check-constraint': checkConstraintCmd, 'composite-type': compositeTypeCmd, @@ -145,9 +145,9 @@ const createCommandMap: () => Record< 'node-type-registry': nodeTypeRegistryCmd, page: pageCmd, partition: partitionCmd, + 'platform-api': platformApiCmd, 'platform-api-schema': platformApiSchemaCmd, 'platform-api-setting': platformApiSettingCmd, - 'platform-apis': platformApisCmd, 'platform-cors-setting': platformCorsSettingCmd, 'platform-domain': platformDomainCmd, 'platform-domain-event': platformDomainEventCmd, @@ -212,7 +212,7 @@ const createCommandMap: () => Record< 'sites-provision-static-site': sitesProvisionStaticSiteCmd, }); const usage = - "\ncsdk \n\nCommands:\n context Manage API contexts\n auth Manage authentication\n api-schema apiSchema CRUD operations\n api-setting apiSetting CRUD operations\n apis apis CRUD operations\n ast-migration astMigration CRUD operations\n check-constraint checkConstraint CRUD operations\n composite-type compositeType CRUD operations\n cors-setting corsSetting CRUD operations\n database database CRUD operations\n database-setting databaseSetting CRUD operations\n database-transfer databaseTransfer CRUD operations\n default-privilege defaultPrivilege CRUD operations\n derive derive CRUD operations\n domain domain CRUD operations\n domain-event domainEvent CRUD operations\n domain-type domainType CRUD operations\n domain-verification domainVerification CRUD operations\n embedding-chunk embeddingChunk CRUD operations\n enum enum CRUD operations\n exclusion-constraint exclusionConstraint CRUD operations\n field-behavior fieldBehavior CRUD operations\n field field CRUD operations\n foreign-key-constraint-behavior foreignKeyConstraintBehavior CRUD operations\n foreign-key-constraint foreignKeyConstraint CRUD operations\n full-text-search fullTextSearch CRUD operations\n function function CRUD operations\n hostname-binding hostnameBinding CRUD operations\n http-route httpRoute CRUD operations\n index index CRUD operations\n managed-domain managedDomain CRUD operations\n node-type-registry nodeTypeRegistry CRUD operations\n page page CRUD operations\n partition partition CRUD operations\n platform-api-schema platformApiSchema CRUD operations\n platform-api-setting platformApiSetting CRUD operations\n platform-apis platformApis CRUD operations\n platform-cors-setting platformCorsSetting CRUD operations\n platform-domain platformDomain CRUD operations\n platform-domain-event platformDomainEvent CRUD operations\n platform-domain-verification platformDomainVerification CRUD operations\n platform-managed-domain platformManagedDomain CRUD operations\n platform-page platformPage CRUD operations\n platform-site-app-link platformSiteAppLink CRUD operations\n platform-site platformSite CRUD operations\n platform-site-deep-link platformSiteDeepLink CRUD operations\n platform-site-error-page platformSiteErrorPage CRUD operations\n platform-site-metadatum platformSiteMetadatum CRUD operations\n platform-site-module platformSiteModule CRUD operations\n platform-site-theme platformSiteTheme CRUD operations\n platform-site-web-config platformSiteWebConfig CRUD operations\n policy policy CRUD operations\n primary-key-constraint primaryKeyConstraint CRUD operations\n pubkey-setting pubkeySetting CRUD operations\n rls-setting rlsSetting CRUD operations\n route-binding routeBinding CRUD operations\n route route CRUD operations\n schema schema CRUD operations\n schema-grant schemaGrant CRUD operations\n site-app-link siteAppLink CRUD operations\n site site CRUD operations\n site-deep-link siteDeepLink CRUD operations\n site-error-page siteErrorPage CRUD operations\n site-metadatum siteMetadatum CRUD operations\n site-module siteModule CRUD operations\n site-theme siteTheme CRUD operations\n site-web-config siteWebConfig CRUD operations\n spatial-relation spatialRelation CRUD operations\n sql-action sqlAction CRUD operations\n table-behavior tableBehavior CRUD operations\n table table CRUD operations\n table-grant tableGrant CRUD operations\n trigger trigger CRUD operations\n trigger-function triggerFunction CRUD operations\n unique-constraint-behavior uniqueConstraintBehavior CRUD operations\n unique-constraint uniqueConstraint CRUD operations\n view-behavior viewBehavior CRUD operations\n view view CRUD operations\n view-grant viewGrant CRUD operations\n view-rule viewRule CRUD operations\n view-table viewTable CRUD operations\n webauthn-setting webauthnSetting CRUD operations\n api-schema-names apiSchemaNames\n apply-registry-defaults applyRegistryDefaults\n resolve-deep-link resolveDeepLink\n resolve-http-route resolveHttpRoute\n resolve-route resolveRoute\n resolve-site-app-links resolveSiteAppLinks\n accept-database-transfer acceptDatabaseTransfer\n apply-rls applyRls\n cancel-database-transfer cancelDatabaseTransfer\n domains-assign-subdomain domainsAssignSubdomain\n platform-domains-assign-subdomain platformDomainsAssignSubdomain\n platform-sites-provision-static-site platformSitesProvisionStaticSite\n provision-bucket Provision an S3 bucket for a logical bucket in the database.\nReads the bucket config via RLS, then creates and configures\nthe S3 bucket with the appropriate privacy policies, CORS rules,\nand lifecycle settings.\n reject-database-transfer rejectDatabaseTransfer\n request-database Requests a database and returns a ticket (database_provision_module row) to poll.\n\nPass exactly one of preset_slug or modules. The pool, presets, and owner bootstrap are private implementation details: a warm pool hit fulfills the ticket immediately (fulfilled_at set, deferred owner bootstrap), otherwise the database is cold-provisioned asynchronously with exactly the requested modules. Poll the ticket until status = 'completed'; it then carries database_id and fulfilled_at.\n\nExample usage:\n SELECT * FROM metaschema_public.request_database('my_app', 'example.com', preset_slug := 'full');\n SELECT * FROM metaschema_public.request_database('my_app', 'example.com', modules := '[\"users_module\", \"emails_module\"]'::jsonb);\n set-field-order setFieldOrder\n sites-provision-static-site sitesProvisionStaticSite\n\n --help, -h Show this help message\n --version, -v Show version\n"; + "\ncsdk \n\nCommands:\n context Manage API contexts\n auth Manage authentication\n api api CRUD operations\n api-schema apiSchema CRUD operations\n api-setting apiSetting CRUD operations\n ast-migration astMigration CRUD operations\n check-constraint checkConstraint CRUD operations\n composite-type compositeType CRUD operations\n cors-setting corsSetting CRUD operations\n database database CRUD operations\n database-setting databaseSetting CRUD operations\n database-transfer databaseTransfer CRUD operations\n default-privilege defaultPrivilege CRUD operations\n derive derive CRUD operations\n domain domain CRUD operations\n domain-event domainEvent CRUD operations\n domain-type domainType CRUD operations\n domain-verification domainVerification CRUD operations\n embedding-chunk embeddingChunk CRUD operations\n enum enum CRUD operations\n exclusion-constraint exclusionConstraint CRUD operations\n field-behavior fieldBehavior CRUD operations\n field field CRUD operations\n foreign-key-constraint-behavior foreignKeyConstraintBehavior CRUD operations\n foreign-key-constraint foreignKeyConstraint CRUD operations\n full-text-search fullTextSearch CRUD operations\n function function CRUD operations\n hostname-binding hostnameBinding CRUD operations\n http-route httpRoute CRUD operations\n index index CRUD operations\n managed-domain managedDomain CRUD operations\n node-type-registry nodeTypeRegistry CRUD operations\n page page CRUD operations\n partition partition CRUD operations\n platform-api platformApi CRUD operations\n platform-api-schema platformApiSchema CRUD operations\n platform-api-setting platformApiSetting CRUD operations\n platform-cors-setting platformCorsSetting CRUD operations\n platform-domain platformDomain CRUD operations\n platform-domain-event platformDomainEvent CRUD operations\n platform-domain-verification platformDomainVerification CRUD operations\n platform-managed-domain platformManagedDomain CRUD operations\n platform-page platformPage CRUD operations\n platform-site-app-link platformSiteAppLink CRUD operations\n platform-site platformSite CRUD operations\n platform-site-deep-link platformSiteDeepLink CRUD operations\n platform-site-error-page platformSiteErrorPage CRUD operations\n platform-site-metadatum platformSiteMetadatum CRUD operations\n platform-site-module platformSiteModule CRUD operations\n platform-site-theme platformSiteTheme CRUD operations\n platform-site-web-config platformSiteWebConfig CRUD operations\n policy policy CRUD operations\n primary-key-constraint primaryKeyConstraint CRUD operations\n pubkey-setting pubkeySetting CRUD operations\n rls-setting rlsSetting CRUD operations\n route-binding routeBinding CRUD operations\n route route CRUD operations\n schema schema CRUD operations\n schema-grant schemaGrant CRUD operations\n site-app-link siteAppLink CRUD operations\n site site CRUD operations\n site-deep-link siteDeepLink CRUD operations\n site-error-page siteErrorPage CRUD operations\n site-metadatum siteMetadatum CRUD operations\n site-module siteModule CRUD operations\n site-theme siteTheme CRUD operations\n site-web-config siteWebConfig CRUD operations\n spatial-relation spatialRelation CRUD operations\n sql-action sqlAction CRUD operations\n table-behavior tableBehavior CRUD operations\n table table CRUD operations\n table-grant tableGrant CRUD operations\n trigger trigger CRUD operations\n trigger-function triggerFunction CRUD operations\n unique-constraint-behavior uniqueConstraintBehavior CRUD operations\n unique-constraint uniqueConstraint CRUD operations\n view-behavior viewBehavior CRUD operations\n view view CRUD operations\n view-grant viewGrant CRUD operations\n view-rule viewRule CRUD operations\n view-table viewTable CRUD operations\n webauthn-setting webauthnSetting CRUD operations\n api-schema-names apiSchemaNames\n apply-registry-defaults applyRegistryDefaults\n resolve-deep-link resolveDeepLink\n resolve-http-route resolveHttpRoute\n resolve-route resolveRoute\n resolve-site-app-links resolveSiteAppLinks\n accept-database-transfer acceptDatabaseTransfer\n apply-rls applyRls\n cancel-database-transfer cancelDatabaseTransfer\n domains-assign-subdomain domainsAssignSubdomain\n platform-domains-assign-subdomain platformDomainsAssignSubdomain\n platform-sites-provision-static-site platformSitesProvisionStaticSite\n provision-bucket Provision an S3 bucket for a logical bucket in the database.\nReads the bucket config via RLS, then creates and configures\nthe S3 bucket with the appropriate privacy policies, CORS rules,\nand lifecycle settings.\n reject-database-transfer rejectDatabaseTransfer\n request-database Requests a database and returns a ticket (database_provision_module row) to poll.\n\nPass exactly one of preset_slug or modules. The pool, presets, and owner bootstrap are private implementation details: a warm pool hit fulfills the ticket immediately (fulfilled_at set, deferred owner bootstrap), otherwise the database is cold-provisioned asynchronously with exactly the requested modules. Poll the ticket until status = 'completed'; it then carries database_id and fulfilled_at.\n\nExample usage:\n SELECT * FROM metaschema_public.request_database('my_app', 'example.com', preset_slug := 'full');\n SELECT * FROM metaschema_public.request_database('my_app', 'example.com', modules := '[\"users_module\", \"emails_module\"]'::jsonb);\n set-field-order setFieldOrder\n sites-provision-static-site sitesProvisionStaticSite\n\n --help, -h Show this help message\n --version, -v Show version\n"; export const commands = async ( argv: Partial>, prompter: Inquirerer, diff --git a/sdk/constructive-cli/src/api/cli/commands/platform-apis.ts b/sdk/constructive-cli/src/api/cli/commands/api.ts similarity index 87% rename from sdk/constructive-cli/src/api/cli/commands/platform-apis.ts rename to sdk/constructive-cli/src/api/cli/commands/api.ts index ebe15c4b82..d7efd0643c 100644 --- a/sdk/constructive-cli/src/api/cli/commands/platform-apis.ts +++ b/sdk/constructive-cli/src/api/cli/commands/api.ts @@ -1,5 +1,5 @@ /** - * CLI commands for PlatformApis + * CLI commands for Api * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -8,17 +8,18 @@ import { getClient } from '../executor'; import { coerceAnswers, parseFindFirstArgs, parseFindManyArgs, stripUndefined } from '../utils'; import type { FieldSchema } from '../utils'; import type { - CreatePlatformApisInput, - PlatformApisPatch, - PlatformApisSelect, - PlatformApisFilter, - PlatformApisOrderBy, + CreateApiInput, + ApiPatch, + ApiSelect, + ApiFilter, + ApiOrderBy, } from '../../orm/input-types'; import type { FindManyArgs, FindFirstArgs } from '../../orm/select-types'; const fieldSchema: FieldSchema = { anonRole: 'string', config: 'json', createdAt: 'string', + databaseId: 'uuid', dbname: 'string', id: 'uuid', isPublished: 'boolean', @@ -27,7 +28,7 @@ const fieldSchema: FieldSchema = { updatedAt: 'string', }; const usage = - '\nplatform-apis \n\nCommands:\n list List platformApis records\n find-first Find first matching platformApis record\n get Get a platformApis by ID\n create Create a new platformApis\n update Update an existing platformApis\n delete Delete a platformApis\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; + '\napi \n\nCommands:\n list List api records\n find-first Find first matching api record\n get Get a api by ID\n create Create a new api\n update Update an existing api\n delete Delete a api\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -80,6 +81,7 @@ async function handleList(argv: Partial>, _prompter: Inq anonRole: true, config: true, createdAt: true, + databaseId: true, dbname: true, id: true, isPublished: true, @@ -88,12 +90,12 @@ async function handleList(argv: Partial>, _prompter: Inq updatedAt: true, }; const findManyArgs = parseFindManyArgs< - FindManyArgs & { - select: PlatformApisSelect; + FindManyArgs & { + select: ApiSelect; } >(argv, defaultSelect); const client = getClient(); - const result = await client.platformApis.findMany(findManyArgs).execute(); + const result = await client.api.findMany(findManyArgs).execute(); console.log(JSON.stringify(result, null, 2)); } catch (error) { console.error('Failed to list records.'); @@ -109,6 +111,7 @@ async function handleFindFirst(argv: Partial>, _prompter anonRole: true, config: true, createdAt: true, + databaseId: true, dbname: true, id: true, isPublished: true, @@ -117,12 +120,12 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { - select: PlatformApisSelect; + FindFirstArgs & { + select: ApiSelect; } >(argv, defaultSelect); const client = getClient(); - const result = await client.platformApis.findFirst(findFirstArgs).execute(); + const result = await client.api.findFirst(findFirstArgs).execute(); console.log(JSON.stringify(result, null, 2)); } catch (error) { console.error('Failed to find record.'); @@ -143,13 +146,14 @@ async function handleGet(argv: Partial>, prompter: Inqui }, ]); const client = getClient(); - const result = await client.platformApis + const result = await client.api .findOne({ id: answers.id as string, select: { anonRole: true, config: true, createdAt: true, + databaseId: true, dbname: true, id: true, isPublished: true, @@ -185,6 +189,12 @@ async function handleCreate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'text', + name: 'databaseId', + message: 'databaseId', + required: true, + }, { type: 'text', name: 'dbname', @@ -214,16 +224,14 @@ async function handleCreate(argv: Partial>, prompter: In }, ]); const answers = coerceAnswers(rawAnswers, fieldSchema); - const cleanedData = stripUndefined( - answers, - fieldSchema - ) as CreatePlatformApisInput['platformApis']; + const cleanedData = stripUndefined(answers, fieldSchema) as CreateApiInput['api']; const client = getClient(); - const result = await client.platformApis + const result = await client.api .create({ data: { anonRole: cleanedData.anonRole, config: cleanedData.config, + databaseId: cleanedData.databaseId, dbname: cleanedData.dbname, isPublished: cleanedData.isPublished, name: cleanedData.name, @@ -233,6 +241,7 @@ async function handleCreate(argv: Partial>, prompter: In anonRole: true, config: true, createdAt: true, + databaseId: true, dbname: true, id: true, isPublished: true, @@ -274,6 +283,12 @@ async function handleUpdate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'text', + name: 'databaseId', + message: 'databaseId', + required: false, + }, { type: 'text', name: 'dbname', @@ -303,9 +318,9 @@ async function handleUpdate(argv: Partial>, prompter: In }, ]); const answers = coerceAnswers(rawAnswers, fieldSchema); - const cleanedData = stripUndefined(answers, fieldSchema) as PlatformApisPatch; + const cleanedData = stripUndefined(answers, fieldSchema) as ApiPatch; const client = getClient(); - const result = await client.platformApis + const result = await client.api .update({ where: { id: answers.id as string, @@ -313,6 +328,7 @@ async function handleUpdate(argv: Partial>, prompter: In data: { anonRole: cleanedData.anonRole, config: cleanedData.config, + databaseId: cleanedData.databaseId, dbname: cleanedData.dbname, isPublished: cleanedData.isPublished, name: cleanedData.name, @@ -322,6 +338,7 @@ async function handleUpdate(argv: Partial>, prompter: In anonRole: true, config: true, createdAt: true, + databaseId: true, dbname: true, id: true, isPublished: true, @@ -352,7 +369,7 @@ async function handleDelete(argv: Partial>, prompter: In ]); const answers = coerceAnswers(rawAnswers, fieldSchema); const client = getClient(); - const result = await client.platformApis + const result = await client.api .delete({ where: { id: answers.id as string, diff --git a/sdk/constructive-cli/src/api/cli/commands/apis.ts b/sdk/constructive-cli/src/api/cli/commands/platform-api.ts similarity index 78% rename from sdk/constructive-cli/src/api/cli/commands/apis.ts rename to sdk/constructive-cli/src/api/cli/commands/platform-api.ts index aadb994945..6338ed05c9 100644 --- a/sdk/constructive-cli/src/api/cli/commands/apis.ts +++ b/sdk/constructive-cli/src/api/cli/commands/platform-api.ts @@ -1,5 +1,5 @@ /** - * CLI commands for Apis + * CLI commands for PlatformApi * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -8,18 +8,17 @@ import { getClient } from '../executor'; import { coerceAnswers, parseFindFirstArgs, parseFindManyArgs, stripUndefined } from '../utils'; import type { FieldSchema } from '../utils'; import type { - CreateApisInput, - ApisPatch, - ApisSelect, - ApisFilter, - ApisOrderBy, + CreatePlatformApiInput, + PlatformApiPatch, + PlatformApiSelect, + PlatformApiFilter, + PlatformApiOrderBy, } from '../../orm/input-types'; import type { FindManyArgs, FindFirstArgs } from '../../orm/select-types'; const fieldSchema: FieldSchema = { anonRole: 'string', config: 'json', createdAt: 'string', - databaseId: 'uuid', dbname: 'string', id: 'uuid', isPublished: 'boolean', @@ -28,7 +27,7 @@ const fieldSchema: FieldSchema = { updatedAt: 'string', }; const usage = - '\napis \n\nCommands:\n list List apis records\n find-first Find first matching apis record\n get Get a apis by ID\n create Create a new apis\n update Update an existing apis\n delete Delete a apis\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; + '\nplatform-api \n\nCommands:\n list List platformApi records\n find-first Find first matching platformApi record\n get Get a platformApi by ID\n create Create a new platformApi\n update Update an existing platformApi\n delete Delete a platformApi\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -81,7 +80,6 @@ async function handleList(argv: Partial>, _prompter: Inq anonRole: true, config: true, createdAt: true, - databaseId: true, dbname: true, id: true, isPublished: true, @@ -90,12 +88,12 @@ async function handleList(argv: Partial>, _prompter: Inq updatedAt: true, }; const findManyArgs = parseFindManyArgs< - FindManyArgs & { - select: ApisSelect; + FindManyArgs & { + select: PlatformApiSelect; } >(argv, defaultSelect); const client = getClient(); - const result = await client.apis.findMany(findManyArgs).execute(); + const result = await client.platformApi.findMany(findManyArgs).execute(); console.log(JSON.stringify(result, null, 2)); } catch (error) { console.error('Failed to list records.'); @@ -111,7 +109,6 @@ async function handleFindFirst(argv: Partial>, _prompter anonRole: true, config: true, createdAt: true, - databaseId: true, dbname: true, id: true, isPublished: true, @@ -120,12 +117,12 @@ async function handleFindFirst(argv: Partial>, _prompter updatedAt: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { - select: ApisSelect; + FindFirstArgs & { + select: PlatformApiSelect; } >(argv, defaultSelect); const client = getClient(); - const result = await client.apis.findFirst(findFirstArgs).execute(); + const result = await client.platformApi.findFirst(findFirstArgs).execute(); console.log(JSON.stringify(result, null, 2)); } catch (error) { console.error('Failed to find record.'); @@ -146,14 +143,13 @@ async function handleGet(argv: Partial>, prompter: Inqui }, ]); const client = getClient(); - const result = await client.apis + const result = await client.platformApi .findOne({ id: answers.id as string, select: { anonRole: true, config: true, createdAt: true, - databaseId: true, dbname: true, id: true, isPublished: true, @@ -189,12 +185,6 @@ async function handleCreate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, - { - type: 'text', - name: 'databaseId', - message: 'databaseId', - required: true, - }, { type: 'text', name: 'dbname', @@ -224,14 +214,16 @@ async function handleCreate(argv: Partial>, prompter: In }, ]); const answers = coerceAnswers(rawAnswers, fieldSchema); - const cleanedData = stripUndefined(answers, fieldSchema) as CreateApisInput['apis']; + const cleanedData = stripUndefined( + answers, + fieldSchema + ) as CreatePlatformApiInput['platformApi']; const client = getClient(); - const result = await client.apis + const result = await client.platformApi .create({ data: { anonRole: cleanedData.anonRole, config: cleanedData.config, - databaseId: cleanedData.databaseId, dbname: cleanedData.dbname, isPublished: cleanedData.isPublished, name: cleanedData.name, @@ -241,7 +233,6 @@ async function handleCreate(argv: Partial>, prompter: In anonRole: true, config: true, createdAt: true, - databaseId: true, dbname: true, id: true, isPublished: true, @@ -283,12 +274,6 @@ async function handleUpdate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, - { - type: 'text', - name: 'databaseId', - message: 'databaseId', - required: false, - }, { type: 'text', name: 'dbname', @@ -318,9 +303,9 @@ async function handleUpdate(argv: Partial>, prompter: In }, ]); const answers = coerceAnswers(rawAnswers, fieldSchema); - const cleanedData = stripUndefined(answers, fieldSchema) as ApisPatch; + const cleanedData = stripUndefined(answers, fieldSchema) as PlatformApiPatch; const client = getClient(); - const result = await client.apis + const result = await client.platformApi .update({ where: { id: answers.id as string, @@ -328,7 +313,6 @@ async function handleUpdate(argv: Partial>, prompter: In data: { anonRole: cleanedData.anonRole, config: cleanedData.config, - databaseId: cleanedData.databaseId, dbname: cleanedData.dbname, isPublished: cleanedData.isPublished, name: cleanedData.name, @@ -338,7 +322,6 @@ async function handleUpdate(argv: Partial>, prompter: In anonRole: true, config: true, createdAt: true, - databaseId: true, dbname: true, id: true, isPublished: true, @@ -369,7 +352,7 @@ async function handleDelete(argv: Partial>, prompter: In ]); const answers = coerceAnswers(rawAnswers, fieldSchema); const client = getClient(); - const result = await client.apis + const result = await client.platformApi .delete({ where: { id: answers.id as string, diff --git a/sdk/constructive-cli/src/api/orm/README.md b/sdk/constructive-cli/src/api/orm/README.md index 485932a4b7..327d694398 100644 --- a/sdk/constructive-cli/src/api/orm/README.md +++ b/sdk/constructive-cli/src/api/orm/README.md @@ -21,9 +21,9 @@ const db = createClient({ | Model | Operations | |-------|------------| +| `api` | findMany, findOne, create, update, delete | | `apiSchema` | findMany, findOne, create, update, delete | | `apiSetting` | findMany, findOne, create, update, delete | -| `apis` | findMany, findOne, create, update, delete | | `astMigration` | findMany, findOne, create, update, delete | | `checkConstraint` | findMany, findOne, create, update, delete | | `compositeType` | findMany, findOne, create, update, delete | @@ -53,9 +53,9 @@ const db = createClient({ | `nodeTypeRegistry` | findMany, findOne, create, update, delete | | `page` | findMany, findOne, create, update, delete | | `partition` | findMany, findOne, create, update, delete | +| `platformApi` | findMany, findOne, create, update, delete | | `platformApiSchema` | findMany, findOne, create, update, delete | | `platformApiSetting` | findMany, findOne, create, update, delete | -| `platformApis` | findMany, findOne, create, update, delete | | `platformCorsSetting` | findMany, findOne, create, update, delete | | `platformDomain` | findMany, findOne, create, update, delete | | `platformDomainEvent` | findMany, findOne, create, update, delete | @@ -104,6 +104,44 @@ const db = createClient({ ## Table Operations +### `db.api` + +CRUD operations for Api records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `anonRole` | String | Yes | +| `config` | JSON | Yes | +| `createdAt` | Datetime | No | +| `databaseId` | UUID | Yes | +| `dbname` | String | Yes | +| `id` | UUID | No | +| `isPublished` | Boolean | Yes | +| `name` | String | Yes | +| `roleName` | String | Yes | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all api records +const items = await db.api.findMany({ select: { anonRole: true, config: true, createdAt: true, databaseId: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.api.findOne({ id: '', select: { anonRole: true, config: true, createdAt: true, databaseId: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }).execute(); + +// Create +const created = await db.api.create({ data: { anonRole: '', config: '', databaseId: '', dbname: '', isPublished: '', name: '', roleName: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.api.update({ where: { id: '' }, data: { anonRole: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.api.delete({ where: { id: '' } }).execute(); +``` + ### `db.apiSchema` CRUD operations for ApiSchema records. @@ -185,44 +223,6 @@ const updated = await db.apiSetting.update({ where: { id: '' }, data: { ap const deleted = await db.apiSetting.delete({ where: { id: '' } }).execute(); ``` -### `db.apis` - -CRUD operations for Apis records. - -**Fields:** - -| Field | Type | Editable | -|-------|------|----------| -| `anonRole` | String | Yes | -| `config` | JSON | Yes | -| `createdAt` | Datetime | No | -| `databaseId` | UUID | Yes | -| `dbname` | String | Yes | -| `id` | UUID | No | -| `isPublished` | Boolean | Yes | -| `name` | String | Yes | -| `roleName` | String | Yes | -| `updatedAt` | Datetime | No | - -**Operations:** - -```typescript -// List all apis records -const items = await db.apis.findMany({ select: { anonRole: true, config: true, createdAt: true, databaseId: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }).execute(); - -// Get one by id -const item = await db.apis.findOne({ id: '', select: { anonRole: true, config: true, createdAt: true, databaseId: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }).execute(); - -// Create -const created = await db.apis.create({ data: { anonRole: '', config: '', databaseId: '', dbname: '', isPublished: '', name: '', roleName: '' }, select: { id: true } }).execute(); - -// Update -const updated = await db.apis.update({ where: { id: '' }, data: { anonRole: '' }, select: { id: true } }).execute(); - -// Delete -const deleted = await db.apis.delete({ where: { id: '' } }).execute(); -``` - ### `db.astMigration` CRUD operations for AstMigration records. @@ -1394,6 +1394,43 @@ const updated = await db.partition.update({ where: { id: '' }, data: { dat const deleted = await db.partition.delete({ where: { id: '' } }).execute(); ``` +### `db.platformApi` + +CRUD operations for PlatformApi records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `anonRole` | String | Yes | +| `config` | JSON | Yes | +| `createdAt` | Datetime | No | +| `dbname` | String | Yes | +| `id` | UUID | No | +| `isPublished` | Boolean | Yes | +| `name` | String | Yes | +| `roleName` | String | Yes | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all platformApi records +const items = await db.platformApi.findMany({ select: { anonRole: true, config: true, createdAt: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.platformApi.findOne({ id: '', select: { anonRole: true, config: true, createdAt: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }).execute(); + +// Create +const created = await db.platformApi.create({ data: { anonRole: '', config: '', dbname: '', isPublished: '', name: '', roleName: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.platformApi.update({ where: { id: '' }, data: { anonRole: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.platformApi.delete({ where: { id: '' } }).execute(); +``` + ### `db.platformApiSchema` CRUD operations for PlatformApiSchema records. @@ -1473,43 +1510,6 @@ const updated = await db.platformApiSetting.update({ where: { id: '' }, da const deleted = await db.platformApiSetting.delete({ where: { id: '' } }).execute(); ``` -### `db.platformApis` - -CRUD operations for PlatformApis records. - -**Fields:** - -| Field | Type | Editable | -|-------|------|----------| -| `anonRole` | String | Yes | -| `config` | JSON | Yes | -| `createdAt` | Datetime | No | -| `dbname` | String | Yes | -| `id` | UUID | No | -| `isPublished` | Boolean | Yes | -| `name` | String | Yes | -| `roleName` | String | Yes | -| `updatedAt` | Datetime | No | - -**Operations:** - -```typescript -// List all platformApis records -const items = await db.platformApis.findMany({ select: { anonRole: true, config: true, createdAt: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }).execute(); - -// Get one by id -const item = await db.platformApis.findOne({ id: '', select: { anonRole: true, config: true, createdAt: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }).execute(); - -// Create -const created = await db.platformApis.create({ data: { anonRole: '', config: '', dbname: '', isPublished: '', name: '', roleName: '' }, select: { id: true } }).execute(); - -// Update -const updated = await db.platformApis.update({ where: { id: '' }, data: { anonRole: '' }, select: { id: true } }).execute(); - -// Delete -const deleted = await db.platformApis.delete({ where: { id: '' } }).execute(); -``` - ### `db.platformCorsSetting` CRUD operations for PlatformCorsSetting records. diff --git a/sdk/constructive-cli/src/api/orm/index.ts b/sdk/constructive-cli/src/api/orm/index.ts index 98c5108b79..a030658a98 100644 --- a/sdk/constructive-cli/src/api/orm/index.ts +++ b/sdk/constructive-cli/src/api/orm/index.ts @@ -5,9 +5,9 @@ */ import { OrmClient } from './client'; import type { OrmClientConfig } from './client'; +import { ApiModel } from './models/api'; import { ApiSchemaModel } from './models/apiSchema'; import { ApiSettingModel } from './models/apiSetting'; -import { ApisModel } from './models/apis'; import { AstMigrationModel } from './models/astMigration'; import { CheckConstraintModel } from './models/checkConstraint'; import { CompositeTypeModel } from './models/compositeType'; @@ -37,9 +37,9 @@ import { ManagedDomainModel } from './models/managedDomain'; import { NodeTypeRegistryModel } from './models/nodeTypeRegistry'; import { PageModel } from './models/page'; import { PartitionModel } from './models/partition'; +import { PlatformApiModel } from './models/platformApi'; import { PlatformApiSchemaModel } from './models/platformApiSchema'; import { PlatformApiSettingModel } from './models/platformApiSetting'; -import { PlatformApisModel } from './models/platformApis'; import { PlatformCorsSettingModel } from './models/platformCorsSetting'; import { PlatformDomainModel } from './models/platformDomain'; import { PlatformDomainEventModel } from './models/platformDomainEvent'; @@ -120,9 +120,9 @@ export { createMutationOperations } from './mutation'; export function createClient(config: OrmClientConfig) { const client = new OrmClient(config); return { + api: new ApiModel(client), apiSchema: new ApiSchemaModel(client), apiSetting: new ApiSettingModel(client), - apis: new ApisModel(client), astMigration: new AstMigrationModel(client), checkConstraint: new CheckConstraintModel(client), compositeType: new CompositeTypeModel(client), @@ -152,9 +152,9 @@ export function createClient(config: OrmClientConfig) { nodeTypeRegistry: new NodeTypeRegistryModel(client), page: new PageModel(client), partition: new PartitionModel(client), + platformApi: new PlatformApiModel(client), platformApiSchema: new PlatformApiSchemaModel(client), platformApiSetting: new PlatformApiSettingModel(client), - platformApis: new PlatformApisModel(client), platformCorsSetting: new PlatformCorsSettingModel(client), platformDomain: new PlatformDomainModel(client), platformDomainEvent: new PlatformDomainEventModel(client), diff --git a/sdk/constructive-cli/src/api/orm/input-types.ts b/sdk/constructive-cli/src/api/orm/input-types.ts index 2347f17ca6..380adaea86 100644 --- a/sdk/constructive-cli/src/api/orm/input-types.ts +++ b/sdk/constructive-cli/src/api/orm/input-types.ts @@ -235,8 +235,28 @@ export type ApiExposureLevel = 'EXPOSABLE' | 'INTERNAL_ONLY' | 'NEVER_EXPOSE'; export type ObjectCategory = 'APP' | 'AUTH' | 'CORE' | 'MEMBERSHIPS' | 'MODULE' | 'PERMISSIONS'; // ============ Custom Scalar Types ============ export type ConstructiveInternalTypeImage = unknown; -/** Join table linking API surfaces to the metaschema schemas they expose */ +/** API surfaces exposed by this scope; publication makes a surface bindable from other scopes */ // ============ Entity Types ============ +export interface Api { + /** Anonymous role the API executes as */ + anonRole?: string | null; + /** Module-specific configuration for this API surface */ + config?: Record | null; + createdAt?: string | null; + /** Database that owns this resource (database-scoped isolation) */ + databaseId?: string | null; + /** Database this API surface serves */ + dbname?: string | null; + id: string; + /** Whether other scopes may see and route to this API surface */ + isPublished?: boolean | null; + /** Owner-local API surface name */ + name?: string | null; + /** Authenticated role the API executes as */ + roleName?: string | null; + updatedAt?: string | null; +} +/** Join table linking API surfaces to the metaschema schemas they expose */ export interface ApiSchema { /** API surface that exposes this schema */ apiId?: string | null; @@ -286,26 +306,6 @@ export interface ApiSetting { statementTimeoutMs?: string | null; updatedAt?: string | null; } -/** API surfaces exposed by this scope; publication makes a surface bindable from other scopes */ -export interface Apis { - /** Anonymous role the API executes as */ - anonRole?: string | null; - /** Module-specific configuration for this API surface */ - config?: Record | null; - createdAt?: string | null; - /** Database that owns this resource (database-scoped isolation) */ - databaseId?: string | null; - /** Database this API surface serves */ - dbname?: string | null; - id: string; - /** Whether other scopes may see and route to this API surface */ - isPublished?: boolean | null; - /** Owner-local API surface name */ - name?: string | null; - /** Authenticated role the API executes as */ - roleName?: string | null; - updatedAt?: string | null; -} export interface AstMigration { actionId?: string | null; actionName?: string | null; @@ -821,6 +821,24 @@ export interface Partition { tableId?: string | null; updatedAt?: string | null; } +/** API surfaces exposed by this scope; publication makes a surface bindable from other scopes */ +export interface PlatformApi { + /** Anonymous role the API executes as */ + anonRole?: string | null; + /** Module-specific configuration for this API surface */ + config?: Record | null; + createdAt?: string | null; + /** Database this API surface serves */ + dbname?: string | null; + id: string; + /** Whether other scopes may see and route to this API surface */ + isPublished?: boolean | null; + /** Owner-local API surface name */ + name?: string | null; + /** Authenticated role the API executes as */ + roleName?: string | null; + updatedAt?: string | null; +} /** Join table linking API surfaces to the metaschema schemas they expose */ export interface PlatformApiSchema { /** API surface that exposes this schema */ @@ -867,24 +885,6 @@ export interface PlatformApiSetting { statementTimeoutMs?: string | null; updatedAt?: string | null; } -/** API surfaces exposed by this scope; publication makes a surface bindable from other scopes */ -export interface PlatformApis { - /** Anonymous role the API executes as */ - anonRole?: string | null; - /** Module-specific configuration for this API surface */ - config?: Record | null; - createdAt?: string | null; - /** Database this API surface serves */ - dbname?: string | null; - id: string; - /** Whether other scopes may see and route to this API surface */ - isPublished?: boolean | null; - /** Owner-local API surface name */ - name?: string | null; - /** Authenticated role the API executes as */ - roleName?: string | null; - updatedAt?: string | null; -} /** Scope-wide and per-API CORS origin configuration; NULL api_id means scope-wide default */ export interface PlatformCorsSetting { /** Array of allowed CORS origins (e.g. https://example.com) */ @@ -1736,17 +1736,17 @@ export interface PageInfo { endCursor?: string | null; } // ============ Entity Relation Types ============ +export interface ApiRelations { + apiSetting?: ApiSetting | null; + apiSchemas?: ConnectionResult; + corsSettings?: ConnectionResult; +} export interface ApiSchemaRelations { - api?: Apis | null; + api?: Api | null; schema?: Schema | null; } export interface ApiSettingRelations { - api?: Apis | null; -} -export interface ApisRelations { - apiSettingByApiId?: ApiSetting | null; - apiSchemasByApiId?: ConnectionResult; - corsSettingsByApiId?: ConnectionResult; + api?: Api | null; } export interface AstMigrationRelations {} export interface CheckConstraintRelations { @@ -1758,7 +1758,7 @@ export interface CompositeTypeRelations { schema?: Schema | null; } export interface CorsSettingRelations { - api?: Apis | null; + api?: Api | null; } export interface DatabaseRelations { checkConstraints?: ConnectionResult; @@ -1896,20 +1896,20 @@ export interface PartitionRelations { partitionKey?: Field | null; table?: Table | null; } +export interface PlatformApiRelations { + platformApiSettingByApiId?: PlatformApiSetting | null; + platformCorsSettingByApiId?: PlatformCorsSetting | null; + platformApiSchemasByApiId?: ConnectionResult; +} export interface PlatformApiSchemaRelations { - api?: PlatformApis | null; + api?: PlatformApi | null; schema?: Schema | null; } export interface PlatformApiSettingRelations { - api?: PlatformApis | null; -} -export interface PlatformApisRelations { - platformApiSettingByApiId?: PlatformApiSetting | null; - platformCorsSettingByApiId?: PlatformCorsSetting | null; - platformApiSchemasByApiId?: ConnectionResult; + api?: PlatformApi | null; } export interface PlatformCorsSettingRelations { - api?: PlatformApis | null; + api?: PlatformApi | null; } export interface PlatformDomainRelations { platformDomainEventsByDomainId?: ConnectionResult; @@ -2139,9 +2139,9 @@ export interface WebauthnSettingRelations { userField?: Field | null; } // ============ Entity Types With Relations ============ +export type ApiWithRelations = Api & ApiRelations; export type ApiSchemaWithRelations = ApiSchema & ApiSchemaRelations; export type ApiSettingWithRelations = ApiSetting & ApiSettingRelations; -export type ApisWithRelations = Apis & ApisRelations; export type AstMigrationWithRelations = AstMigration & AstMigrationRelations; export type CheckConstraintWithRelations = CheckConstraint & CheckConstraintRelations; export type CompositeTypeWithRelations = CompositeType & CompositeTypeRelations; @@ -2173,9 +2173,9 @@ export type ManagedDomainWithRelations = ManagedDomain & ManagedDomainRelations; export type NodeTypeRegistryWithRelations = NodeTypeRegistry & NodeTypeRegistryRelations; export type PageWithRelations = Page & PageRelations; export type PartitionWithRelations = Partition & PartitionRelations; +export type PlatformApiWithRelations = PlatformApi & PlatformApiRelations; export type PlatformApiSchemaWithRelations = PlatformApiSchema & PlatformApiSchemaRelations; export type PlatformApiSettingWithRelations = PlatformApiSetting & PlatformApiSettingRelations; -export type PlatformApisWithRelations = PlatformApis & PlatformApisRelations; export type PlatformCorsSettingWithRelations = PlatformCorsSetting & PlatformCorsSettingRelations; export type PlatformDomainWithRelations = PlatformDomain & PlatformDomainRelations; export type PlatformDomainEventWithRelations = PlatformDomainEvent & PlatformDomainEventRelations; @@ -2230,6 +2230,33 @@ export type ViewRuleWithRelations = ViewRule & ViewRuleRelations; export type ViewTableWithRelations = ViewTable & ViewTableRelations; export type WebauthnSettingWithRelations = WebauthnSetting & WebauthnSettingRelations; // ============ Entity Select Types ============ +export type ApiSelect = { + anonRole?: boolean; + config?: boolean; + createdAt?: boolean; + databaseId?: boolean; + dbname?: boolean; + id?: boolean; + isPublished?: boolean; + name?: boolean; + roleName?: boolean; + updatedAt?: boolean; + apiSetting?: { + select: ApiSettingSelect; + }; + apiSchemas?: { + select: ApiSchemaSelect; + first?: number; + filter?: ApiSchemaFilter; + orderBy?: ApiSchemaOrderBy[]; + }; + corsSettings?: { + select: CorsSettingSelect; + first?: number; + filter?: CorsSettingFilter; + orderBy?: CorsSettingOrderBy[]; + }; +}; export type ApiSchemaSelect = { apiId?: boolean; createdAt?: boolean; @@ -2238,7 +2265,7 @@ export type ApiSchemaSelect = { schemaId?: boolean; updatedAt?: boolean; api?: { - select: ApisSelect; + select: ApiSelect; }; schema?: { select: SchemaSelect; @@ -2265,34 +2292,7 @@ export type ApiSettingSelect = { statementTimeoutMs?: boolean; updatedAt?: boolean; api?: { - select: ApisSelect; - }; -}; -export type ApisSelect = { - anonRole?: boolean; - config?: boolean; - createdAt?: boolean; - databaseId?: boolean; - dbname?: boolean; - id?: boolean; - isPublished?: boolean; - name?: boolean; - roleName?: boolean; - updatedAt?: boolean; - apiSettingByApiId?: { - select: ApiSettingSelect; - }; - apiSchemasByApiId?: { - select: ApiSchemaSelect; - first?: number; - filter?: ApiSchemaFilter; - orderBy?: ApiSchemaOrderBy[]; - }; - corsSettingsByApiId?: { - select: CorsSettingSelect; - first?: number; - filter?: CorsSettingFilter; - orderBy?: CorsSettingOrderBy[]; + select: ApiSelect; }; }; export type AstMigrationSelect = { @@ -2358,7 +2358,7 @@ export type CorsSettingSelect = { id?: boolean; updatedAt?: boolean; api?: { - select: ApisSelect; + select: ApiSelect; }; }; export type DatabaseSelect = { @@ -3135,6 +3135,29 @@ export type PartitionSelect = { select: TableSelect; }; }; +export type PlatformApiSelect = { + anonRole?: boolean; + config?: boolean; + createdAt?: boolean; + dbname?: boolean; + id?: boolean; + isPublished?: boolean; + name?: boolean; + roleName?: boolean; + updatedAt?: boolean; + platformApiSettingByApiId?: { + select: PlatformApiSettingSelect; + }; + platformCorsSettingByApiId?: { + select: PlatformCorsSettingSelect; + }; + platformApiSchemasByApiId?: { + select: PlatformApiSchemaSelect; + first?: number; + filter?: PlatformApiSchemaFilter; + orderBy?: PlatformApiSchemaOrderBy[]; + }; +}; export type PlatformApiSchemaSelect = { apiId?: boolean; createdAt?: boolean; @@ -3142,7 +3165,7 @@ export type PlatformApiSchemaSelect = { schemaId?: boolean; updatedAt?: boolean; api?: { - select: PlatformApisSelect; + select: PlatformApiSelect; }; schema?: { select: SchemaSelect; @@ -3168,30 +3191,7 @@ export type PlatformApiSettingSelect = { statementTimeoutMs?: boolean; updatedAt?: boolean; api?: { - select: PlatformApisSelect; - }; -}; -export type PlatformApisSelect = { - anonRole?: boolean; - config?: boolean; - createdAt?: boolean; - dbname?: boolean; - id?: boolean; - isPublished?: boolean; - name?: boolean; - roleName?: boolean; - updatedAt?: boolean; - platformApiSettingByApiId?: { - select: PlatformApiSettingSelect; - }; - platformCorsSettingByApiId?: { - select: PlatformCorsSettingSelect; - }; - platformApiSchemasByApiId?: { - select: PlatformApiSchemaSelect; - first?: number; - filter?: PlatformApiSchemaFilter; - orderBy?: PlatformApiSchemaOrderBy[]; + select: PlatformApiSelect; }; }; export type PlatformCorsSettingSelect = { @@ -3201,7 +3201,7 @@ export type PlatformCorsSettingSelect = { id?: boolean; updatedAt?: boolean; api?: { - select: PlatformApisSelect; + select: PlatformApiSelect; }; }; export type PlatformDomainSelect = { @@ -4365,11 +4365,51 @@ export type WebauthnSettingSelect = { }; }; // ============ Table Filter Types ============ +export interface ApiFilter { + /** Checks for all expressions in this list. */ + and?: ApiFilter[]; + /** Filter by the object’s `anonRole` field. */ + anonRole?: StringFilter; + /** Filter by the object’s `apiSchemas` relation. */ + apiSchemas?: ApiToManyApiSchemaFilter; + /** `apiSchemas` exist. */ + apiSchemasExist?: boolean; + /** Filter by the object’s `apiSetting` relation. */ + apiSetting?: ApiSettingFilter; + /** A related `apiSetting` exists. */ + apiSettingExists?: boolean; + /** Filter by the object’s `config` field. */ + config?: JSONFilter; + /** Filter by the object’s `corsSettings` relation. */ + corsSettings?: ApiToManyCorsSettingFilter; + /** `corsSettings` exist. */ + corsSettingsExist?: boolean; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `dbname` field. */ + dbname?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isPublished` field. */ + isPublished?: BooleanFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: ApiFilter; + /** Checks for any expressions in this list. */ + or?: ApiFilter[]; + /** Filter by the object’s `roleName` field. */ + roleName?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} export interface ApiSchemaFilter { /** Checks for all expressions in this list. */ and?: ApiSchemaFilter[]; /** Filter by the object’s `api` relation. */ - api?: ApisFilter; + api?: ApiFilter; /** Filter by the object’s `apiId` field. */ apiId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ @@ -4393,7 +4433,7 @@ export interface ApiSettingFilter { /** Checks for all expressions in this list. */ and?: ApiSettingFilter[]; /** Filter by the object’s `api` relation. */ - api?: ApisFilter; + api?: ApiFilter; /** Filter by the object’s `apiId` field. */ apiId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ @@ -4437,46 +4477,6 @@ export interface ApiSettingFilter { /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } -export interface ApisFilter { - /** Checks for all expressions in this list. */ - and?: ApisFilter[]; - /** Filter by the object’s `anonRole` field. */ - anonRole?: StringFilter; - /** Filter by the object’s `apiSchemasByApiId` relation. */ - apiSchemasByApiId?: ApisToManyApiSchemaFilter; - /** `apiSchemasByApiId` exist. */ - apiSchemasByApiIdExist?: boolean; - /** Filter by the object’s `apiSettingByApiId` relation. */ - apiSettingByApiId?: ApiSettingFilter; - /** A related `apiSettingByApiId` exists. */ - apiSettingByApiIdExists?: boolean; - /** Filter by the object’s `config` field. */ - config?: JSONFilter; - /** Filter by the object’s `corsSettingsByApiId` relation. */ - corsSettingsByApiId?: ApisToManyCorsSettingFilter; - /** `corsSettingsByApiId` exist. */ - corsSettingsByApiIdExist?: boolean; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `databaseId` field. */ - databaseId?: UUIDFilter; - /** Filter by the object’s `dbname` field. */ - dbname?: StringFilter; - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `isPublished` field. */ - isPublished?: BooleanFilter; - /** Filter by the object’s `name` field. */ - name?: StringFilter; - /** Negates the expression. */ - not?: ApisFilter; - /** Checks for any expressions in this list. */ - or?: ApisFilter[]; - /** Filter by the object’s `roleName` field. */ - roleName?: StringFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; -} export interface AstMigrationFilter { /** Filter by the object’s `actionId` field. */ actionId?: UUIDFilter; @@ -4589,7 +4589,7 @@ export interface CorsSettingFilter { /** Checks for all expressions in this list. */ and?: CorsSettingFilter[]; /** Filter by the object’s `api` relation. */ - api?: ApisFilter; + api?: ApiFilter; /** A related `api` exists. */ apiExists?: boolean; /** Filter by the object’s `apiId` field. */ @@ -5727,11 +5727,49 @@ export interface PartitionFilter { /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } +export interface PlatformApiFilter { + /** Checks for all expressions in this list. */ + and?: PlatformApiFilter[]; + /** Filter by the object’s `anonRole` field. */ + anonRole?: StringFilter; + /** Filter by the object’s `config` field. */ + config?: JSONFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `dbname` field. */ + dbname?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isPublished` field. */ + isPublished?: BooleanFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: PlatformApiFilter; + /** Checks for any expressions in this list. */ + or?: PlatformApiFilter[]; + /** Filter by the object’s `platformApiSchemasByApiId` relation. */ + platformApiSchemasByApiId?: PlatformApiToManyPlatformApiSchemaFilter; + /** `platformApiSchemasByApiId` exist. */ + platformApiSchemasByApiIdExist?: boolean; + /** Filter by the object’s `platformApiSettingByApiId` relation. */ + platformApiSettingByApiId?: PlatformApiSettingFilter; + /** A related `platformApiSettingByApiId` exists. */ + platformApiSettingByApiIdExists?: boolean; + /** Filter by the object’s `platformCorsSettingByApiId` relation. */ + platformCorsSettingByApiId?: PlatformCorsSettingFilter; + /** A related `platformCorsSettingByApiId` exists. */ + platformCorsSettingByApiIdExists?: boolean; + /** Filter by the object’s `roleName` field. */ + roleName?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} export interface PlatformApiSchemaFilter { /** Checks for all expressions in this list. */ and?: PlatformApiSchemaFilter[]; /** Filter by the object’s `api` relation. */ - api?: PlatformApisFilter; + api?: PlatformApiFilter; /** Filter by the object’s `apiId` field. */ apiId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ @@ -5753,7 +5791,7 @@ export interface PlatformApiSettingFilter { /** Checks for all expressions in this list. */ and?: PlatformApiSettingFilter[]; /** Filter by the object’s `api` relation. */ - api?: PlatformApisFilter; + api?: PlatformApiFilter; /** Filter by the object’s `apiId` field. */ apiId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ @@ -5795,51 +5833,13 @@ export interface PlatformApiSettingFilter { /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } -export interface PlatformApisFilter { - /** Checks for all expressions in this list. */ - and?: PlatformApisFilter[]; - /** Filter by the object’s `anonRole` field. */ - anonRole?: StringFilter; - /** Filter by the object’s `config` field. */ - config?: JSONFilter; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `dbname` field. */ - dbname?: StringFilter; - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `isPublished` field. */ - isPublished?: BooleanFilter; - /** Filter by the object’s `name` field. */ - name?: StringFilter; - /** Negates the expression. */ - not?: PlatformApisFilter; - /** Checks for any expressions in this list. */ - or?: PlatformApisFilter[]; - /** Filter by the object’s `platformApiSchemasByApiId` relation. */ - platformApiSchemasByApiId?: PlatformApisToManyPlatformApiSchemaFilter; - /** `platformApiSchemasByApiId` exist. */ - platformApiSchemasByApiIdExist?: boolean; - /** Filter by the object’s `platformApiSettingByApiId` relation. */ - platformApiSettingByApiId?: PlatformApiSettingFilter; - /** A related `platformApiSettingByApiId` exists. */ - platformApiSettingByApiIdExists?: boolean; - /** Filter by the object’s `platformCorsSettingByApiId` relation. */ - platformCorsSettingByApiId?: PlatformCorsSettingFilter; - /** A related `platformCorsSettingByApiId` exists. */ - platformCorsSettingByApiIdExists?: boolean; - /** Filter by the object’s `roleName` field. */ - roleName?: StringFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; -} export interface PlatformCorsSettingFilter { /** Filter by the object’s `allowedOrigins` field. */ allowedOrigins?: StringListFilter; /** Checks for all expressions in this list. */ and?: PlatformCorsSettingFilter[]; /** Filter by the object’s `api` relation. */ - api?: PlatformApisFilter; + api?: PlatformApiFilter; /** A related `api` exists. */ apiExists?: boolean; /** Filter by the object’s `apiId` field. */ @@ -7642,6 +7642,30 @@ export interface WebauthnSettingFilter { userFieldId?: UUIDFilter; } // ============ OrderBy Types ============ +export type ApiOrderBy = + | 'ANON_ROLE_ASC' + | 'ANON_ROLE_DESC' + | 'CONFIG_ASC' + | 'CONFIG_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'DBNAME_ASC' + | 'DBNAME_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IS_PUBLISHED_ASC' + | 'IS_PUBLISHED_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ROLE_NAME_ASC' + | 'ROLE_NAME_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; export type ApiSchemaOrderBy = | 'API_ID_ASC' | 'API_ID_DESC' @@ -7700,30 +7724,6 @@ export type ApiSettingOrderBy = | 'STATEMENT_TIMEOUT_MS_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; -export type ApisOrderBy = - | 'ANON_ROLE_ASC' - | 'ANON_ROLE_DESC' - | 'CONFIG_ASC' - | 'CONFIG_DESC' - | 'CREATED_AT_ASC' - | 'CREATED_AT_DESC' - | 'DATABASE_ID_ASC' - | 'DATABASE_ID_DESC' - | 'DBNAME_ASC' - | 'DBNAME_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'IS_PUBLISHED_ASC' - | 'IS_PUBLISHED_DESC' - | 'NAME_ASC' - | 'NAME_DESC' - | 'NATURAL' - | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC' - | 'ROLE_NAME_ASC' - | 'ROLE_NAME_DESC' - | 'UPDATED_AT_ASC' - | 'UPDATED_AT_DESC'; export type AstMigrationOrderBy = | 'ACTION_ID_ASC' | 'ACTION_ID_DESC' @@ -8556,6 +8556,28 @@ export type PartitionOrderBy = | 'TABLE_ID_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; +export type PlatformApiOrderBy = + | 'ANON_ROLE_ASC' + | 'ANON_ROLE_DESC' + | 'CONFIG_ASC' + | 'CONFIG_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'DBNAME_ASC' + | 'DBNAME_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IS_PUBLISHED_ASC' + | 'IS_PUBLISHED_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ROLE_NAME_ASC' + | 'ROLE_NAME_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; export type PlatformApiSchemaOrderBy = | 'API_ID_ASC' | 'API_ID_DESC' @@ -8610,28 +8632,6 @@ export type PlatformApiSettingOrderBy = | 'STATEMENT_TIMEOUT_MS_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; -export type PlatformApisOrderBy = - | 'ANON_ROLE_ASC' - | 'ANON_ROLE_DESC' - | 'CONFIG_ASC' - | 'CONFIG_DESC' - | 'CREATED_AT_ASC' - | 'CREATED_AT_DESC' - | 'DBNAME_ASC' - | 'DBNAME_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'IS_PUBLISHED_ASC' - | 'IS_PUBLISHED_DESC' - | 'NAME_ASC' - | 'NAME_DESC' - | 'NATURAL' - | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC' - | 'ROLE_NAME_ASC' - | 'ROLE_NAME_DESC' - | 'UPDATED_AT_ASC' - | 'UPDATED_AT_DESC'; export type PlatformCorsSettingOrderBy = | 'ALLOWED_ORIGINS_ASC' | 'ALLOWED_ORIGINS_DESC' @@ -9801,6 +9801,36 @@ export type WebauthnSettingOrderBy = | 'USER_FIELD_ID_ASC' | 'USER_FIELD_ID_DESC'; // ============ CRUD Input Types ============ +export interface CreateApiInput { + clientMutationId?: string; + api: { + anonRole?: string; + config?: Record; + databaseId: string; + dbname?: string; + isPublished?: boolean; + name: string; + roleName?: string; + }; +} +export interface ApiPatch { + anonRole?: string | null; + config?: Record | null; + databaseId?: string | null; + dbname?: string | null; + isPublished?: boolean | null; + name?: string | null; + roleName?: string | null; +} +export interface UpdateApiInput { + clientMutationId?: string; + id: string; + apiPatch: ApiPatch; +} +export interface DeleteApiInput { + clientMutationId?: string; + id: string; +} export interface CreateApiSchemaInput { clientMutationId?: string; apiSchema: { @@ -9871,36 +9901,6 @@ export interface DeleteApiSettingInput { clientMutationId?: string; id: string; } -export interface CreateApisInput { - clientMutationId?: string; - apis: { - anonRole?: string; - config?: Record; - databaseId: string; - dbname?: string; - isPublished?: boolean; - name: string; - roleName?: string; - }; -} -export interface ApisPatch { - anonRole?: string | null; - config?: Record | null; - databaseId?: string | null; - dbname?: string | null; - isPublished?: boolean | null; - name?: string | null; - roleName?: string | null; -} -export interface UpdateApisInput { - clientMutationId?: string; - id: string; - apisPatch: ApisPatch; -} -export interface DeleteApisInput { - clientMutationId?: string; - id: string; -} export interface CreateAstMigrationInput { clientMutationId?: string; astMigration: { @@ -10939,6 +10939,34 @@ export interface DeletePartitionInput { clientMutationId?: string; id: string; } +export interface CreatePlatformApiInput { + clientMutationId?: string; + platformApi: { + anonRole?: string; + config?: Record; + dbname?: string; + isPublished?: boolean; + name: string; + roleName?: string; + }; +} +export interface PlatformApiPatch { + anonRole?: string | null; + config?: Record | null; + dbname?: string | null; + isPublished?: boolean | null; + name?: string | null; + roleName?: string | null; +} +export interface UpdatePlatformApiInput { + clientMutationId?: string; + id: string; + platformApiPatch: PlatformApiPatch; +} +export interface DeletePlatformApiInput { + clientMutationId?: string; + id: string; +} export interface CreatePlatformApiSchemaInput { clientMutationId?: string; platformApiSchema: { @@ -11005,34 +11033,6 @@ export interface DeletePlatformApiSettingInput { clientMutationId?: string; id: string; } -export interface CreatePlatformApisInput { - clientMutationId?: string; - platformApis: { - anonRole?: string; - config?: Record; - dbname?: string; - isPublished?: boolean; - name: string; - roleName?: string; - }; -} -export interface PlatformApisPatch { - anonRole?: string | null; - config?: Record | null; - dbname?: string | null; - isPublished?: boolean | null; - name?: string | null; - roleName?: string | null; -} -export interface UpdatePlatformApisInput { - clientMutationId?: string; - id: string; - platformApisPatch: PlatformApisPatch; -} -export interface DeletePlatformApisInput { - clientMutationId?: string; - id: string; -} export interface CreatePlatformCorsSettingInput { clientMutationId?: string; platformCorsSetting: { @@ -12503,9 +12503,9 @@ export interface DeleteWebauthnSettingInput { } // ============ Connection Fields Map ============ export const connectionFieldsMap = { - Apis: { - apiSchemasByApiId: 'ApiSchema', - corsSettingsByApiId: 'CorsSetting', + Api: { + apiSchemas: 'ApiSchema', + corsSettings: 'CorsSetting', }, Database: { checkConstraints: 'CheckConstraint', @@ -12564,7 +12564,7 @@ export const connectionFieldsMap = { domainEvents: 'DomainEvent', domainVerifications: 'DomainVerification', }, - PlatformApis: { + PlatformApi: { platformApiSchemasByApiId: 'PlatformApiSchema', }, PlatformDomain: { @@ -12713,7 +12713,7 @@ export interface SitesProvisionStaticSiteInput { siteConfig?: Record; } /** A filter to be used against many `ApiSchema` object types. All fields are combined with a logical ‘and.’ */ -export interface ApisToManyApiSchemaFilter { +export interface ApiToManyApiSchemaFilter { /** Filters to entities where every related entity matches. */ every?: ApiSchemaFilter; /** Filters to entities where no related entity matches. */ @@ -12722,7 +12722,7 @@ export interface ApisToManyApiSchemaFilter { some?: ApiSchemaFilter; } /** A filter to be used against many `CorsSetting` object types. All fields are combined with a logical ‘and.’ */ -export interface ApisToManyCorsSettingFilter { +export interface ApiToManyCorsSettingFilter { /** Filters to entities where every related entity matches. */ every?: CorsSettingFilter; /** Filters to entities where no related entity matches. */ @@ -13161,7 +13161,7 @@ export interface ManagedDomainToManyDomainVerificationFilter { some?: DomainVerificationFilter; } /** A filter to be used against many `PlatformApiSchema` object types. All fields are combined with a logical ‘and.’ */ -export interface PlatformApisToManyPlatformApiSchemaFilter { +export interface PlatformApiToManyPlatformApiSchemaFilter { /** Filters to entities where every related entity matches. */ every?: PlatformApiSchemaFilter; /** Filters to entities where no related entity matches. */ @@ -13670,6 +13670,26 @@ export interface ViewToManyViewTableFilter { /** Filters to entities where at least one related entity matches. */ some?: ViewTableFilter; } +/** An input for mutations affecting `Api` */ +export interface ApiInput { + /** Anonymous role the API executes as */ + anonRole?: string; + /** Module-specific configuration for this API surface */ + config?: Record; + createdAt?: string; + /** Database that owns this resource (database-scoped isolation) */ + databaseId: string; + /** Database this API surface serves */ + dbname?: string; + id?: string; + /** Whether other scopes may see and route to this API surface */ + isPublished?: boolean; + /** Owner-local API surface name */ + name: string; + /** Authenticated role the API executes as */ + roleName?: string; + updatedAt?: string; +} /** An input for mutations affecting `ApiSchema` */ export interface ApiSchemaInput { /** API surface that exposes this schema */ @@ -13720,26 +13740,6 @@ export interface ApiSettingInput { statementTimeoutMs?: string; updatedAt?: string; } -/** An input for mutations affecting `Apis` */ -export interface ApisInput { - /** Anonymous role the API executes as */ - anonRole?: string; - /** Module-specific configuration for this API surface */ - config?: Record; - createdAt?: string; - /** Database that owns this resource (database-scoped isolation) */ - databaseId: string; - /** Database this API surface serves */ - dbname?: string; - id?: string; - /** Whether other scopes may see and route to this API surface */ - isPublished?: boolean; - /** Owner-local API surface name */ - name: string; - /** Authenticated role the API executes as */ - roleName?: string; - updatedAt?: string; -} /** An input for mutations affecting `CheckConstraint` */ export interface CheckConstraintInput { category?: ObjectCategory; @@ -14259,6 +14259,24 @@ export interface PartitionInput { tableId: string; updatedAt?: string; } +/** An input for mutations affecting `PlatformApi` */ +export interface PlatformApiInput { + /** Anonymous role the API executes as */ + anonRole?: string; + /** Module-specific configuration for this API surface */ + config?: Record; + createdAt?: string; + /** Database this API surface serves */ + dbname?: string; + id?: string; + /** Whether other scopes may see and route to this API surface */ + isPublished?: boolean; + /** Owner-local API surface name */ + name: string; + /** Authenticated role the API executes as */ + roleName?: string; + updatedAt?: string; +} /** An input for mutations affecting `PlatformApiSchema` */ export interface PlatformApiSchemaInput { /** API surface that exposes this schema */ @@ -14305,24 +14323,6 @@ export interface PlatformApiSettingInput { statementTimeoutMs?: string; updatedAt?: string; } -/** An input for mutations affecting `PlatformApis` */ -export interface PlatformApisInput { - /** Anonymous role the API executes as */ - anonRole?: string; - /** Module-specific configuration for this API surface */ - config?: Record; - createdAt?: string; - /** Database this API surface serves */ - dbname?: string; - id?: string; - /** Whether other scopes may see and route to this API surface */ - isPublished?: boolean; - /** Owner-local API surface name */ - name: string; - /** Authenticated role the API executes as */ - roleName?: string; - updatedAt?: string; -} /** An input for mutations affecting `PlatformCorsSetting` */ export interface PlatformCorsSettingInput { /** Array of allowed CORS origins (e.g. https://example.com) */ @@ -15166,7 +15166,7 @@ export interface ApiSchemaFilter { /** Checks for all expressions in this list. */ and?: ApiSchemaFilter[]; /** Filter by the object’s `api` relation. */ - api?: ApisFilter; + api?: ApiFilter; /** Filter by the object’s `apiId` field. */ apiId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ @@ -15193,7 +15193,7 @@ export interface CorsSettingFilter { /** Checks for all expressions in this list. */ and?: CorsSettingFilter[]; /** Filter by the object’s `api` relation. */ - api?: ApisFilter; + api?: ApiFilter; /** A related `api` exists. */ apiExists?: boolean; /** Filter by the object’s `apiId` field. */ @@ -16852,7 +16852,7 @@ export interface PlatformApiSchemaFilter { /** Checks for all expressions in this list. */ and?: PlatformApiSchemaFilter[]; /** Filter by the object’s `api` relation. */ - api?: PlatformApisFilter; + api?: PlatformApiFilter; /** Filter by the object’s `apiId` field. */ apiId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ @@ -17302,26 +17302,26 @@ export interface SiteThemeFilter { /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } -/** A filter to be used against `Apis` object types. All fields are combined with a logical ‘and.’ */ -export interface ApisFilter { +/** A filter to be used against `Api` object types. All fields are combined with a logical ‘and.’ */ +export interface ApiFilter { /** Checks for all expressions in this list. */ - and?: ApisFilter[]; + and?: ApiFilter[]; /** Filter by the object’s `anonRole` field. */ anonRole?: StringFilter; - /** Filter by the object’s `apiSchemasByApiId` relation. */ - apiSchemasByApiId?: ApisToManyApiSchemaFilter; - /** `apiSchemasByApiId` exist. */ - apiSchemasByApiIdExist?: boolean; - /** Filter by the object’s `apiSettingByApiId` relation. */ - apiSettingByApiId?: ApiSettingFilter; - /** A related `apiSettingByApiId` exists. */ - apiSettingByApiIdExists?: boolean; + /** Filter by the object’s `apiSchemas` relation. */ + apiSchemas?: ApiToManyApiSchemaFilter; + /** `apiSchemas` exist. */ + apiSchemasExist?: boolean; + /** Filter by the object’s `apiSetting` relation. */ + apiSetting?: ApiSettingFilter; + /** A related `apiSetting` exists. */ + apiSettingExists?: boolean; /** Filter by the object’s `config` field. */ config?: JSONFilter; - /** Filter by the object’s `corsSettingsByApiId` relation. */ - corsSettingsByApiId?: ApisToManyCorsSettingFilter; - /** `corsSettingsByApiId` exist. */ - corsSettingsByApiIdExist?: boolean; + /** Filter by the object’s `corsSettings` relation. */ + corsSettings?: ApiToManyCorsSettingFilter; + /** `corsSettings` exist. */ + corsSettingsExist?: boolean; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; /** Filter by the object’s `databaseId` field. */ @@ -17335,9 +17335,9 @@ export interface ApisFilter { /** Filter by the object’s `name` field. */ name?: StringFilter; /** Negates the expression. */ - not?: ApisFilter; + not?: ApiFilter; /** Checks for any expressions in this list. */ - or?: ApisFilter[]; + or?: ApiFilter[]; /** Filter by the object’s `roleName` field. */ roleName?: StringFilter; /** Filter by the object’s `updatedAt` field. */ @@ -17917,10 +17917,10 @@ export interface ManagedDomainFilter { /** Filter by the object’s `verifiedAt` field. */ verifiedAt?: DatetimeFilter; } -/** A filter to be used against `PlatformApis` object types. All fields are combined with a logical ‘and.’ */ -export interface PlatformApisFilter { +/** A filter to be used against `PlatformApi` object types. All fields are combined with a logical ‘and.’ */ +export interface PlatformApiFilter { /** Checks for all expressions in this list. */ - and?: PlatformApisFilter[]; + and?: PlatformApiFilter[]; /** Filter by the object’s `anonRole` field. */ anonRole?: StringFilter; /** Filter by the object’s `config` field. */ @@ -17936,11 +17936,11 @@ export interface PlatformApisFilter { /** Filter by the object’s `name` field. */ name?: StringFilter; /** Negates the expression. */ - not?: PlatformApisFilter; + not?: PlatformApiFilter; /** Checks for any expressions in this list. */ - or?: PlatformApisFilter[]; + or?: PlatformApiFilter[]; /** Filter by the object’s `platformApiSchemasByApiId` relation. */ - platformApiSchemasByApiId?: PlatformApisToManyPlatformApiSchemaFilter; + platformApiSchemasByApiId?: PlatformApiToManyPlatformApiSchemaFilter; /** `platformApiSchemasByApiId` exist. */ platformApiSchemasByApiIdExist?: boolean; /** Filter by the object’s `platformApiSettingByApiId` relation. */ @@ -18179,7 +18179,7 @@ export interface ApiSettingFilter { /** Checks for all expressions in this list. */ and?: ApiSettingFilter[]; /** Filter by the object’s `api` relation. */ - api?: ApisFilter; + api?: ApiFilter; /** Filter by the object’s `apiId` field. */ apiId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ @@ -18228,7 +18228,7 @@ export interface PlatformApiSettingFilter { /** Checks for all expressions in this list. */ and?: PlatformApiSettingFilter[]; /** Filter by the object’s `api` relation. */ - api?: PlatformApisFilter; + api?: PlatformApiFilter; /** Filter by the object’s `apiId` field. */ apiId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ @@ -18277,7 +18277,7 @@ export interface PlatformCorsSettingFilter { /** Checks for all expressions in this list. */ and?: PlatformCorsSettingFilter[]; /** Filter by the object’s `api` relation. */ - api?: PlatformApisFilter; + api?: PlatformApiFilter; /** A related `api` exists. */ apiExists?: boolean; /** Filter by the object’s `apiId` field. */ @@ -18627,6 +18627,51 @@ export type SitesProvisionStaticSitePayloadSelect = { select: PlatformRouteSelect; }; }; +export interface CreateApiPayload { + /** The `Api` that was created by this mutation. */ + api?: Api | null; + apiEdge?: ApiEdge | null; + clientMutationId?: string | null; +} +export type CreateApiPayloadSelect = { + api?: { + select: ApiSelect; + }; + apiEdge?: { + select: ApiEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface UpdateApiPayload { + /** The `Api` that was updated by this mutation. */ + api?: Api | null; + apiEdge?: ApiEdge | null; + clientMutationId?: string | null; +} +export type UpdateApiPayloadSelect = { + api?: { + select: ApiSelect; + }; + apiEdge?: { + select: ApiEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface DeleteApiPayload { + /** The `Api` that was deleted by this mutation. */ + api?: Api | null; + apiEdge?: ApiEdge | null; + clientMutationId?: string | null; +} +export type DeleteApiPayloadSelect = { + api?: { + select: ApiSelect; + }; + apiEdge?: { + select: ApiEdgeSelect; + }; + clientMutationId?: boolean; +}; export interface CreateApiSchemaPayload { /** The `ApiSchema` that was created by this mutation. */ apiSchema?: ApiSchema | null; @@ -18717,51 +18762,6 @@ export type DeleteApiSettingPayloadSelect = { }; clientMutationId?: boolean; }; -export interface CreateApisPayload { - /** The `Apis` that was created by this mutation. */ - apis?: Apis | null; - apisEdge?: ApisEdge | null; - clientMutationId?: string | null; -} -export type CreateApisPayloadSelect = { - apis?: { - select: ApisSelect; - }; - apisEdge?: { - select: ApisEdgeSelect; - }; - clientMutationId?: boolean; -}; -export interface UpdateApisPayload { - /** The `Apis` that was updated by this mutation. */ - apis?: Apis | null; - apisEdge?: ApisEdge | null; - clientMutationId?: string | null; -} -export type UpdateApisPayloadSelect = { - apis?: { - select: ApisSelect; - }; - apisEdge?: { - select: ApisEdgeSelect; - }; - clientMutationId?: boolean; -}; -export interface DeleteApisPayload { - /** The `Apis` that was deleted by this mutation. */ - apis?: Apis | null; - apisEdge?: ApisEdge | null; - clientMutationId?: string | null; -} -export type DeleteApisPayloadSelect = { - apis?: { - select: ApisSelect; - }; - apisEdge?: { - select: ApisEdgeSelect; - }; - clientMutationId?: boolean; -}; export interface CreateCheckConstraintPayload { /** The `CheckConstraint` that was created by this mutation. */ checkConstraint?: CheckConstraint | null; @@ -20022,6 +20022,51 @@ export type DeletePartitionPayloadSelect = { select: PartitionEdgeSelect; }; }; +export interface CreatePlatformApiPayload { + clientMutationId?: string | null; + /** The `PlatformApi` that was created by this mutation. */ + platformApi?: PlatformApi | null; + platformApiEdge?: PlatformApiEdge | null; +} +export type CreatePlatformApiPayloadSelect = { + clientMutationId?: boolean; + platformApi?: { + select: PlatformApiSelect; + }; + platformApiEdge?: { + select: PlatformApiEdgeSelect; + }; +}; +export interface UpdatePlatformApiPayload { + clientMutationId?: string | null; + /** The `PlatformApi` that was updated by this mutation. */ + platformApi?: PlatformApi | null; + platformApiEdge?: PlatformApiEdge | null; +} +export type UpdatePlatformApiPayloadSelect = { + clientMutationId?: boolean; + platformApi?: { + select: PlatformApiSelect; + }; + platformApiEdge?: { + select: PlatformApiEdgeSelect; + }; +}; +export interface DeletePlatformApiPayload { + clientMutationId?: string | null; + /** The `PlatformApi` that was deleted by this mutation. */ + platformApi?: PlatformApi | null; + platformApiEdge?: PlatformApiEdge | null; +} +export type DeletePlatformApiPayloadSelect = { + clientMutationId?: boolean; + platformApi?: { + select: PlatformApiSelect; + }; + platformApiEdge?: { + select: PlatformApiEdgeSelect; + }; +}; export interface CreatePlatformApiSchemaPayload { clientMutationId?: string | null; /** The `PlatformApiSchema` that was created by this mutation. */ @@ -20112,51 +20157,6 @@ export type DeletePlatformApiSettingPayloadSelect = { select: PlatformApiSettingEdgeSelect; }; }; -export interface CreatePlatformApisPayload { - clientMutationId?: string | null; - /** The `PlatformApis` that was created by this mutation. */ - platformApis?: PlatformApis | null; - platformApisEdge?: PlatformApisEdge | null; -} -export type CreatePlatformApisPayloadSelect = { - clientMutationId?: boolean; - platformApis?: { - select: PlatformApisSelect; - }; - platformApisEdge?: { - select: PlatformApisEdgeSelect; - }; -}; -export interface UpdatePlatformApisPayload { - clientMutationId?: string | null; - /** The `PlatformApis` that was updated by this mutation. */ - platformApis?: PlatformApis | null; - platformApisEdge?: PlatformApisEdge | null; -} -export type UpdatePlatformApisPayloadSelect = { - clientMutationId?: boolean; - platformApis?: { - select: PlatformApisSelect; - }; - platformApisEdge?: { - select: PlatformApisEdgeSelect; - }; -}; -export interface DeletePlatformApisPayload { - clientMutationId?: string | null; - /** The `PlatformApis` that was deleted by this mutation. */ - platformApis?: PlatformApis | null; - platformApisEdge?: PlatformApisEdge | null; -} -export type DeletePlatformApisPayloadSelect = { - clientMutationId?: boolean; - platformApis?: { - select: PlatformApisSelect; - }; - platformApisEdge?: { - select: PlatformApisEdgeSelect; - }; -}; export interface CreatePlatformCorsSettingPayload { clientMutationId?: string | null; /** The `PlatformCorsSetting` that was created by this mutation. */ @@ -22262,6 +22262,18 @@ export type DatabaseProvisionModuleSelect = { subdomain?: boolean; updatedAt?: boolean; }; +/** A `Api` edge in the connection. */ +export interface ApiEdge { + cursor?: string | null; + /** The `Api` at the end of the edge. */ + node?: Api | null; +} +export type ApiEdgeSelect = { + cursor?: boolean; + node?: { + select: ApiSelect; + }; +}; /** A `ApiSchema` edge in the connection. */ export interface ApiSchemaEdge { cursor?: string | null; @@ -22286,18 +22298,6 @@ export type ApiSettingEdgeSelect = { select: ApiSettingSelect; }; }; -/** A `Apis` edge in the connection. */ -export interface ApisEdge { - cursor?: string | null; - /** The `Apis` at the end of the edge. */ - node?: Apis | null; -} -export type ApisEdgeSelect = { - cursor?: boolean; - node?: { - select: ApisSelect; - }; -}; /** A `CheckConstraint` edge in the connection. */ export interface CheckConstraintEdge { cursor?: string | null; @@ -22622,6 +22622,18 @@ export type PartitionEdgeSelect = { select: PartitionSelect; }; }; +/** A `PlatformApi` edge in the connection. */ +export interface PlatformApiEdge { + cursor?: string | null; + /** The `PlatformApi` at the end of the edge. */ + node?: PlatformApi | null; +} +export type PlatformApiEdgeSelect = { + cursor?: boolean; + node?: { + select: PlatformApiSelect; + }; +}; /** A `PlatformApiSchema` edge in the connection. */ export interface PlatformApiSchemaEdge { cursor?: string | null; @@ -22646,18 +22658,6 @@ export type PlatformApiSettingEdgeSelect = { select: PlatformApiSettingSelect; }; }; -/** A `PlatformApis` edge in the connection. */ -export interface PlatformApisEdge { - cursor?: string | null; - /** The `PlatformApis` at the end of the edge. */ - node?: PlatformApis | null; -} -export type PlatformApisEdgeSelect = { - cursor?: boolean; - node?: { - select: PlatformApisSelect; - }; -}; /** A `PlatformCorsSetting` edge in the connection. */ export interface PlatformCorsSettingEdge { cursor?: string | null; diff --git a/sdk/constructive-react/src/api/orm/models/apis.ts b/sdk/constructive-cli/src/api/orm/models/api.ts similarity index 60% rename from sdk/constructive-react/src/api/orm/models/apis.ts rename to sdk/constructive-cli/src/api/orm/models/api.ts index a62444db0f..4d60695731 100644 --- a/sdk/constructive-react/src/api/orm/models/apis.ts +++ b/sdk/constructive-cli/src/api/orm/models/api.ts @@ -1,5 +1,5 @@ /** - * Apis model for ORM client + * Api model for ORM client * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -24,28 +24,28 @@ import type { StrictSelect, } from '../select-types'; import type { - Apis, - ApisWithRelations, - ApisSelect, - ApisFilter, - ApisOrderBy, - CreateApisInput, - UpdateApisInput, - ApisPatch, + Api, + ApiWithRelations, + ApiSelect, + ApiFilter, + ApiOrderBy, + CreateApiInput, + UpdateApiInput, + ApiPatch, } from '../input-types'; import { connectionFieldsMap } from '../input-types'; -export class ApisModel { +export class ApiModel { constructor(private client: OrmClient) {} - findMany( - args: FindManyArgs & { + findMany( + args: FindManyArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - apises: ConnectionResult>; + apis: ConnectionResult>; }> { const { document, variables } = buildFindManyDocument( - 'Apis', - 'apises', + 'Api', + 'apis', args.select, { where: args?.where, @@ -56,65 +56,65 @@ export class ApisModel { before: args?.before, offset: args?.offset, }, - 'ApisFilter', - 'ApisOrderBy', + 'ApiFilter', + 'ApiOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'Apis', - fieldName: 'apises', + operationName: 'Api', + fieldName: 'apis', document, variables, }); } - findFirst( - args: FindFirstArgs & { + findFirst( + args: FindFirstArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - apis: InferSelectResult | null; + api: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( - 'Apis', - 'apises', + 'Api', + 'apis', args.select, { where: args?.where, orderBy: args?.orderBy as string[] | undefined, }, - 'ApisFilter', - 'ApisOrderBy', + 'ApiFilter', + 'ApiOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'Apis', - fieldName: 'apis', + operationName: 'Api', + fieldName: 'api', document, variables, transform: (data: { - apises?: { - nodes?: InferSelectResult[]; + apis?: { + nodes?: InferSelectResult[]; }; }) => ({ - apis: data.apises?.nodes?.[0] ?? null, + api: data.apis?.nodes?.[0] ?? null, }), }); } - findOne( + findOne( args: { id: string; select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - apis: InferSelectResult | null; + api: InferSelectResult | null; }> { const { document, variables } = buildFindManyDocument( - 'Apis', - 'apises', + 'Api', + 'apis', args.select, { where: { @@ -124,91 +124,91 @@ export class ApisModel { }, first: 1, }, - 'ApisFilter', - 'ApisOrderBy', + 'ApiFilter', + 'ApiOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'Apis', - fieldName: 'apis', + operationName: 'Api', + fieldName: 'api', document, variables, transform: (data: { - apises?: { - nodes?: InferSelectResult[]; + apis?: { + nodes?: InferSelectResult[]; }; }) => ({ - apis: data.apises?.nodes?.[0] ?? null, + api: data.apis?.nodes?.[0] ?? null, }), }); } - create( - args: CreateArgs & { + create( + args: CreateArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - createApis: { - apis: InferSelectResult; + createApi: { + api: InferSelectResult; }; }> { const { document, variables } = buildCreateDocument( - 'Apis', - 'createApis', - 'apis', + 'Api', + 'createApi', + 'api', args.select, args.data, - 'CreateApisInput', + 'CreateApiInput', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'Apis', - fieldName: 'createApis', + operationName: 'Api', + fieldName: 'createApi', document, variables, }); } - update( + update( args: UpdateArgs< S, { id: string; }, - ApisPatch + ApiPatch > & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - updateApis: { - apis: InferSelectResult; + updateApi: { + api: InferSelectResult; }; }> { const { document, variables } = buildUpdateByPkDocument( - 'Apis', - 'updateApis', - 'apis', + 'Api', + 'updateApi', + 'api', args.select, args.where.id, args.data, - 'UpdateApisInput', + 'UpdateApiInput', 'id', - 'apisPatch', + 'apiPatch', connectionFieldsMap, undefined ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'Apis', - fieldName: 'updateApis', + operationName: 'Api', + fieldName: 'updateApi', document, variables, }); } - delete( + delete( args: DeleteArgs< { id: string; @@ -216,28 +216,28 @@ export class ApisModel { S > & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - deleteApis: { - apis: InferSelectResult; + deleteApi: { + api: InferSelectResult; }; }> { const { document, variables } = buildDeleteByPkDocument( - 'Apis', - 'deleteApis', - 'apis', + 'Api', + 'deleteApi', + 'api', { id: args.where.id, }, - 'DeleteApisInput', + 'DeleteApiInput', args.select, connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'Apis', - fieldName: 'deleteApis', + operationName: 'Api', + fieldName: 'deleteApi', document, variables, }); diff --git a/sdk/constructive-cli/src/api/orm/models/index.ts b/sdk/constructive-cli/src/api/orm/models/index.ts index a947c4f65f..3a52daef02 100644 --- a/sdk/constructive-cli/src/api/orm/models/index.ts +++ b/sdk/constructive-cli/src/api/orm/models/index.ts @@ -3,9 +3,9 @@ * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ +export { ApiModel } from './api'; export { ApiSchemaModel } from './apiSchema'; export { ApiSettingModel } from './apiSetting'; -export { ApisModel } from './apis'; export { AstMigrationModel } from './astMigration'; export { CheckConstraintModel } from './checkConstraint'; export { CompositeTypeModel } from './compositeType'; @@ -35,9 +35,9 @@ export { ManagedDomainModel } from './managedDomain'; export { NodeTypeRegistryModel } from './nodeTypeRegistry'; export { PageModel } from './page'; export { PartitionModel } from './partition'; +export { PlatformApiModel } from './platformApi'; export { PlatformApiSchemaModel } from './platformApiSchema'; export { PlatformApiSettingModel } from './platformApiSetting'; -export { PlatformApisModel } from './platformApis'; export { PlatformCorsSettingModel } from './platformCorsSetting'; export { PlatformDomainModel } from './platformDomain'; export { PlatformDomainEventModel } from './platformDomainEvent'; diff --git a/sdk/constructive-sdk/src/api/orm/models/platformApis.ts b/sdk/constructive-cli/src/api/orm/models/platformApi.ts similarity index 54% rename from sdk/constructive-sdk/src/api/orm/models/platformApis.ts rename to sdk/constructive-cli/src/api/orm/models/platformApi.ts index 43cd25c9d2..3eee59e6c8 100644 --- a/sdk/constructive-sdk/src/api/orm/models/platformApis.ts +++ b/sdk/constructive-cli/src/api/orm/models/platformApi.ts @@ -1,5 +1,5 @@ /** - * PlatformApis model for ORM client + * PlatformApi model for ORM client * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -24,28 +24,28 @@ import type { StrictSelect, } from '../select-types'; import type { - PlatformApis, - PlatformApisWithRelations, - PlatformApisSelect, - PlatformApisFilter, - PlatformApisOrderBy, - CreatePlatformApisInput, - UpdatePlatformApisInput, - PlatformApisPatch, + PlatformApi, + PlatformApiWithRelations, + PlatformApiSelect, + PlatformApiFilter, + PlatformApiOrderBy, + CreatePlatformApiInput, + UpdatePlatformApiInput, + PlatformApiPatch, } from '../input-types'; import { connectionFieldsMap } from '../input-types'; -export class PlatformApisModel { +export class PlatformApiModel { constructor(private client: OrmClient) {} - findMany( - args: FindManyArgs & { + findMany( + args: FindManyArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - platformApises: ConnectionResult>; + platformApis: ConnectionResult>; }> { const { document, variables } = buildFindManyDocument( - 'PlatformApis', - 'platformApises', + 'PlatformApi', + 'platformApis', args.select, { where: args?.where, @@ -56,65 +56,65 @@ export class PlatformApisModel { before: args?.before, offset: args?.offset, }, - 'PlatformApisFilter', - 'PlatformApisOrderBy', + 'PlatformApiFilter', + 'PlatformApiOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'PlatformApis', - fieldName: 'platformApises', + operationName: 'PlatformApi', + fieldName: 'platformApis', document, variables, }); } - findFirst( - args: FindFirstArgs & { + findFirst( + args: FindFirstArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - platformApis: InferSelectResult | null; + platformApi: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( - 'PlatformApis', - 'platformApises', + 'PlatformApi', + 'platformApis', args.select, { where: args?.where, orderBy: args?.orderBy as string[] | undefined, }, - 'PlatformApisFilter', - 'PlatformApisOrderBy', + 'PlatformApiFilter', + 'PlatformApiOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'PlatformApis', - fieldName: 'platformApis', + operationName: 'PlatformApi', + fieldName: 'platformApi', document, variables, transform: (data: { - platformApises?: { - nodes?: InferSelectResult[]; + platformApis?: { + nodes?: InferSelectResult[]; }; }) => ({ - platformApis: data.platformApises?.nodes?.[0] ?? null, + platformApi: data.platformApis?.nodes?.[0] ?? null, }), }); } - findOne( + findOne( args: { id: string; select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - platformApis: InferSelectResult | null; + platformApi: InferSelectResult | null; }> { const { document, variables } = buildFindManyDocument( - 'PlatformApis', - 'platformApises', + 'PlatformApi', + 'platformApis', args.select, { where: { @@ -124,91 +124,91 @@ export class PlatformApisModel { }, first: 1, }, - 'PlatformApisFilter', - 'PlatformApisOrderBy', + 'PlatformApiFilter', + 'PlatformApiOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'PlatformApis', - fieldName: 'platformApis', + operationName: 'PlatformApi', + fieldName: 'platformApi', document, variables, transform: (data: { - platformApises?: { - nodes?: InferSelectResult[]; + platformApis?: { + nodes?: InferSelectResult[]; }; }) => ({ - platformApis: data.platformApises?.nodes?.[0] ?? null, + platformApi: data.platformApis?.nodes?.[0] ?? null, }), }); } - create( - args: CreateArgs & { + create( + args: CreateArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - createPlatformApis: { - platformApis: InferSelectResult; + createPlatformApi: { + platformApi: InferSelectResult; }; }> { const { document, variables } = buildCreateDocument( - 'PlatformApis', - 'createPlatformApis', - 'platformApis', + 'PlatformApi', + 'createPlatformApi', + 'platformApi', args.select, args.data, - 'CreatePlatformApisInput', + 'CreatePlatformApiInput', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'PlatformApis', - fieldName: 'createPlatformApis', + operationName: 'PlatformApi', + fieldName: 'createPlatformApi', document, variables, }); } - update( + update( args: UpdateArgs< S, { id: string; }, - PlatformApisPatch + PlatformApiPatch > & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - updatePlatformApis: { - platformApis: InferSelectResult; + updatePlatformApi: { + platformApi: InferSelectResult; }; }> { const { document, variables } = buildUpdateByPkDocument( - 'PlatformApis', - 'updatePlatformApis', - 'platformApis', + 'PlatformApi', + 'updatePlatformApi', + 'platformApi', args.select, args.where.id, args.data, - 'UpdatePlatformApisInput', + 'UpdatePlatformApiInput', 'id', - 'platformApisPatch', + 'platformApiPatch', connectionFieldsMap, undefined ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'PlatformApis', - fieldName: 'updatePlatformApis', + operationName: 'PlatformApi', + fieldName: 'updatePlatformApi', document, variables, }); } - delete( + delete( args: DeleteArgs< { id: string; @@ -216,28 +216,28 @@ export class PlatformApisModel { S > & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - deletePlatformApis: { - platformApis: InferSelectResult; + deletePlatformApi: { + platformApi: InferSelectResult; }; }> { const { document, variables } = buildDeleteByPkDocument( - 'PlatformApis', - 'deletePlatformApis', - 'platformApis', + 'PlatformApi', + 'deletePlatformApi', + 'platformApi', { id: args.where.id, }, - 'DeletePlatformApisInput', + 'DeletePlatformApiInput', args.select, connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'PlatformApis', - fieldName: 'deletePlatformApis', + operationName: 'PlatformApi', + fieldName: 'deletePlatformApi', document, variables, }); diff --git a/sdk/constructive-cli/src/compute/README.md b/sdk/constructive-cli/src/compute/README.md index d742ee023a..39caeab4e1 100644 --- a/sdk/constructive-cli/src/compute/README.md +++ b/sdk/constructive-cli/src/compute/README.md @@ -10,7 +10,7 @@ - **Tables:** 69 - **Custom queries:** 1 -- **Custom mutations:** 28 +- **Custom mutations:** 37 **Generators:** ORM, CLI diff --git a/sdk/constructive-cli/src/compute/cli/README.md b/sdk/constructive-cli/src/compute/cli/README.md index ea957a8bd6..caecf19f8c 100644 --- a/sdk/constructive-cli/src/compute/cli/README.md +++ b/sdk/constructive-cli/src/compute/cli/README.md @@ -105,12 +105,19 @@ csdk auth set-token | `import-graph-json` | importGraphJson | | `infra-init-empty-repo` | infraInitEmptyRepo | | `infra-insert-node-at-path` | infraInsertNodeAtPath | +| `infra-insert-nodes-at-paths` | infraInsertNodesAtPaths | +| `infra-set-and-commit` | infraSetAndCommit | | `infra-set-data-at-path` | infraSetDataAtPath | +| `infra-set-many-and-commit` | infraSetManyAndCommit | | `init-empty-repo` | initEmptyRepo | | `insert-node-at-path` | insertNodeAtPath | +| `insert-nodes-at-paths` | insertNodesAtPaths | | `platform-infra-init-empty-repo` | platformInfraInitEmptyRepo | | `platform-infra-insert-node-at-path` | platformInfraInsertNodeAtPath | +| `platform-infra-insert-nodes-at-paths` | platformInfraInsertNodesAtPaths | +| `platform-infra-set-and-commit` | platformInfraSetAndCommit | | `platform-infra-set-data-at-path` | platformInfraSetDataAtPath | +| `platform-infra-set-many-and-commit` | platformInfraSetManyAndCommit | | `platform-resource-installations-install` | platformResourceInstallationsInstall | | `platform-resource-installations-rollback` | platformResourceInstallationsRollback | | `platform-resource-installations-uninstall` | platformResourceInstallationsUninstall | @@ -124,7 +131,9 @@ and lifecycle settings. | | `resource-installations-uninstall` | resourceInstallationsUninstall | | `resource-installations-upgrade` | resourceInstallationsUpgrade | | `save-graph` | saveGraph | +| `set-and-commit` | setAndCommit | | `set-data-at-path` | setDataAtPath | +| `set-many-and-commit` | setManyAndCommit | | `start-execution` | startExecution | | `validate-function-graph` | validateFunctionGraph | @@ -309,6 +318,7 @@ CRUD operations for FunctionDefinition records. | `requiredBuckets` | String | | `requiredConfigs` | ResourceRequirement | | `requiredModels` | String | +| `requiredModules` | String | | `requiredSecrets` | ResourceRequirement | | `resources` | JSON | | `runtime` | String | @@ -322,7 +332,7 @@ CRUD operations for FunctionDefinition records. | `volatile` | Boolean | **Required create fields:** `category`, `databaseId`, `name` -**Optional create fields (backend defaults):** `accessChannels`, `concurrency`, `description`, `fnCategory`, `functionColumns`, `graphId`, `icon`, `image`, `inputs`, `integrations`, `isPublished`, `maxAttempts`, `moduleTable`, `outputs`, `payloadArgs`, `priority`, `props`, `protected`, `publishedAt`, `queueName`, `requiredBuckets`, `requiredConfigs`, `requiredModels`, `requiredSecrets`, `resources`, `runtime`, `scaleMax`, `scaleMin`, `targetFunction`, `targetSchema`, `timeoutSeconds`, `volatile` +**Optional create fields (backend defaults):** `accessChannels`, `concurrency`, `description`, `fnCategory`, `functionColumns`, `graphId`, `icon`, `image`, `inputs`, `integrations`, `isPublished`, `maxAttempts`, `moduleTable`, `outputs`, `payloadArgs`, `priority`, `props`, `protected`, `publishedAt`, `queueName`, `requiredBuckets`, `requiredConfigs`, `requiredModels`, `requiredModules`, `requiredSecrets`, `resources`, `runtime`, `scaleMax`, `scaleMin`, `targetFunction`, `targetSchema`, `timeoutSeconds`, `volatile` ### `function-deployment` @@ -354,6 +364,7 @@ CRUD operations for FunctionDeployment records. | `lastError` | String | | `lastErrorAt` | Datetime | | `namespaceId` | UUID | +| `realm` | String | | `resources` | JSON | | `revision` | Int | | `scaleMax` | Int | @@ -365,7 +376,7 @@ CRUD operations for FunctionDeployment records. | `updatedAt` | Datetime | **Required create fields:** `databaseId`, `image`, `namespaceId` -**Optional create fields (backend defaults):** `annotations`, `concurrency`, `errorCount`, `handlerName`, `imageVersion`, `labels`, `lastError`, `lastErrorAt`, `resources`, `revision`, `scaleMax`, `scaleMin`, `serviceName`, `serviceUrl`, `status`, `timeoutSeconds` +**Optional create fields (backend defaults):** `annotations`, `concurrency`, `errorCount`, `handlerName`, `imageVersion`, `labels`, `lastError`, `lastErrorAt`, `realm`, `resources`, `revision`, `scaleMax`, `scaleMin`, `serviceName`, `serviceUrl`, `status`, `timeoutSeconds` ### `function-deployment-event` @@ -1112,6 +1123,7 @@ CRUD operations for PlatformFunctionDefinition records. | `requiredBuckets` | String | | `requiredConfigs` | ResourceRequirement | | `requiredModels` | String | +| `requiredModules` | String | | `requiredSecrets` | ResourceRequirement | | `resources` | JSON | | `runtime` | String | @@ -1126,7 +1138,7 @@ CRUD operations for PlatformFunctionDefinition records. | `volatile` | Boolean | **Required create fields:** `category`, `name` -**Optional create fields (backend defaults):** `accessChannels`, `billable`, `concurrency`, `description`, `fnCategory`, `functionColumns`, `graphId`, `icon`, `image`, `inputs`, `integrations`, `isPublished`, `maxAttempts`, `moduleTable`, `outputs`, `payloadArgs`, `priority`, `props`, `protected`, `publishedAt`, `queueName`, `requiredBuckets`, `requiredConfigs`, `requiredModels`, `requiredSecrets`, `resources`, `runtime`, `scaleMax`, `scaleMin`, `system`, `targetFunction`, `targetSchema`, `timeoutSeconds`, `volatile` +**Optional create fields (backend defaults):** `accessChannels`, `billable`, `concurrency`, `description`, `fnCategory`, `functionColumns`, `graphId`, `icon`, `image`, `inputs`, `integrations`, `isPublished`, `maxAttempts`, `moduleTable`, `outputs`, `payloadArgs`, `priority`, `props`, `protected`, `publishedAt`, `queueName`, `requiredBuckets`, `requiredConfigs`, `requiredModels`, `requiredModules`, `requiredSecrets`, `resources`, `runtime`, `scaleMax`, `scaleMin`, `system`, `targetFunction`, `targetSchema`, `timeoutSeconds`, `volatile` ### `platform-function-deployment` @@ -1157,6 +1169,7 @@ CRUD operations for PlatformFunctionDeployment records. | `lastError` | String | | `lastErrorAt` | Datetime | | `namespaceId` | UUID | +| `realm` | String | | `resources` | JSON | | `revision` | Int | | `scaleMax` | Int | @@ -1168,7 +1181,7 @@ CRUD operations for PlatformFunctionDeployment records. | `updatedAt` | Datetime | **Required create fields:** `image`, `namespaceId` -**Optional create fields (backend defaults):** `annotations`, `concurrency`, `errorCount`, `handlerName`, `imageVersion`, `labels`, `lastError`, `lastErrorAt`, `resources`, `revision`, `scaleMax`, `scaleMin`, `serviceName`, `serviceUrl`, `status`, `timeoutSeconds` +**Optional create fields (backend defaults):** `annotations`, `concurrency`, `errorCount`, `handlerName`, `imageVersion`, `labels`, `lastError`, `lastErrorAt`, `realm`, `resources`, `revision`, `scaleMax`, `scaleMin`, `serviceName`, `serviceUrl`, `status`, `timeoutSeconds` ### `platform-function-deployment-event` @@ -2641,6 +2654,42 @@ infraInsertNodeAtPath | `--input.root` | UUID | | `--input.sId` | UUID | +### `infra-insert-nodes-at-paths` + +infraInsertNodesAtPaths + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `--input.clientMutationId` | String | + | `--input.datas` | JSON | + | `--input.kidsList` | JSON | + | `--input.ktreeList` | JSON | + | `--input.paths` | JSON | + | `--input.root` | UUID | + | `--input.sId` | UUID | + +### `infra-set-and-commit` + +infraSetAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `--input.clientMutationId` | String | + | `--input.data` | JSON | + | `--input.kids` | UUID | + | `--input.ktree` | String | + | `--input.message` | String | + | `--input.path` | String | + | `--input.refname` | String | + | `--input.sId` | UUID | + | `--input.storeId` | UUID | + ### `infra-set-data-at-path` infraSetDataAtPath @@ -2656,6 +2705,22 @@ infraSetDataAtPath | `--input.root` | UUID | | `--input.sId` | UUID | +### `infra-set-many-and-commit` + +infraSetManyAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `--input.clientMutationId` | String | + | `--input.entries` | JSON | + | `--input.message` | String | + | `--input.refname` | String | + | `--input.sId` | UUID | + | `--input.storeId` | UUID | + ### `init-empty-repo` initEmptyRepo @@ -2686,6 +2751,23 @@ insertNodeAtPath | `--input.root` | UUID | | `--input.sId` | UUID | +### `insert-nodes-at-paths` + +insertNodesAtPaths + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `--input.clientMutationId` | String | + | `--input.datas` | JSON | + | `--input.kidsList` | JSON | + | `--input.ktreeList` | JSON | + | `--input.paths` | JSON | + | `--input.root` | UUID | + | `--input.sId` | UUID | + ### `platform-infra-init-empty-repo` platformInfraInitEmptyRepo @@ -2716,6 +2798,42 @@ platformInfraInsertNodeAtPath | `--input.root` | UUID | | `--input.sId` | UUID | +### `platform-infra-insert-nodes-at-paths` + +platformInfraInsertNodesAtPaths + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `--input.clientMutationId` | String | + | `--input.datas` | JSON | + | `--input.kidsList` | JSON | + | `--input.ktreeList` | JSON | + | `--input.paths` | JSON | + | `--input.root` | UUID | + | `--input.sId` | UUID | + +### `platform-infra-set-and-commit` + +platformInfraSetAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `--input.clientMutationId` | String | + | `--input.data` | JSON | + | `--input.kids` | UUID | + | `--input.ktree` | String | + | `--input.message` | String | + | `--input.path` | String | + | `--input.refname` | String | + | `--input.sId` | UUID | + | `--input.storeId` | UUID | + ### `platform-infra-set-data-at-path` platformInfraSetDataAtPath @@ -2731,6 +2849,22 @@ platformInfraSetDataAtPath | `--input.root` | UUID | | `--input.sId` | UUID | +### `platform-infra-set-many-and-commit` + +platformInfraSetManyAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `--input.clientMutationId` | String | + | `--input.entries` | JSON | + | `--input.message` | String | + | `--input.refname` | String | + | `--input.sId` | UUID | + | `--input.storeId` | UUID | + ### `platform-resource-installations-install` platformResourceInstallationsInstall @@ -2868,6 +3002,25 @@ saveGraph | `--input.message` | String | | `--input.rootHash` | UUID | +### `set-and-commit` + +setAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `--input.clientMutationId` | String | + | `--input.data` | JSON | + | `--input.kids` | UUID | + | `--input.ktree` | String | + | `--input.message` | String | + | `--input.path` | String | + | `--input.refname` | String | + | `--input.sId` | UUID | + | `--input.storeId` | UUID | + ### `set-data-at-path` setDataAtPath @@ -2883,6 +3036,22 @@ setDataAtPath | `--input.root` | UUID | | `--input.sId` | UUID | +### `set-many-and-commit` + +setManyAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `--input.clientMutationId` | String | + | `--input.entries` | JSON | + | `--input.message` | String | + | `--input.refname` | String | + | `--input.sId` | UUID | + | `--input.storeId` | UUID | + ### `start-execution` startExecution diff --git a/sdk/constructive-cli/src/compute/cli/commands.ts b/sdk/constructive-cli/src/compute/cli/commands.ts index 74e0a6f084..442c0df7ba 100644 --- a/sdk/constructive-cli/src/compute/cli/commands.ts +++ b/sdk/constructive-cli/src/compute/cli/commands.ts @@ -85,12 +85,19 @@ import importDefinitionsCmd from './commands/import-definitions'; import importGraphJsonCmd from './commands/import-graph-json'; import infraInitEmptyRepoCmd from './commands/infra-init-empty-repo'; import infraInsertNodeAtPathCmd from './commands/infra-insert-node-at-path'; +import infraInsertNodesAtPathsCmd from './commands/infra-insert-nodes-at-paths'; +import infraSetAndCommitCmd from './commands/infra-set-and-commit'; import infraSetDataAtPathCmd from './commands/infra-set-data-at-path'; +import infraSetManyAndCommitCmd from './commands/infra-set-many-and-commit'; import initEmptyRepoCmd from './commands/init-empty-repo'; import insertNodeAtPathCmd from './commands/insert-node-at-path'; +import insertNodesAtPathsCmd from './commands/insert-nodes-at-paths'; import platformInfraInitEmptyRepoCmd from './commands/platform-infra-init-empty-repo'; import platformInfraInsertNodeAtPathCmd from './commands/platform-infra-insert-node-at-path'; +import platformInfraInsertNodesAtPathsCmd from './commands/platform-infra-insert-nodes-at-paths'; +import platformInfraSetAndCommitCmd from './commands/platform-infra-set-and-commit'; import platformInfraSetDataAtPathCmd from './commands/platform-infra-set-data-at-path'; +import platformInfraSetManyAndCommitCmd from './commands/platform-infra-set-many-and-commit'; import platformResourceInstallationsInstallCmd from './commands/platform-resource-installations-install'; import platformResourceInstallationsRollbackCmd from './commands/platform-resource-installations-rollback'; import platformResourceInstallationsUninstallCmd from './commands/platform-resource-installations-uninstall'; @@ -101,7 +108,9 @@ import resourceInstallationsRollbackCmd from './commands/resource-installations- import resourceInstallationsUninstallCmd from './commands/resource-installations-uninstall'; import resourceInstallationsUpgradeCmd from './commands/resource-installations-upgrade'; import saveGraphCmd from './commands/save-graph'; +import setAndCommitCmd from './commands/set-and-commit'; import setDataAtPathCmd from './commands/set-data-at-path'; +import setManyAndCommitCmd from './commands/set-many-and-commit'; import startExecutionCmd from './commands/start-execution'; import validateFunctionGraphCmd from './commands/validate-function-graph'; const createCommandMap: () => Record< @@ -193,12 +202,19 @@ const createCommandMap: () => Record< 'import-graph-json': importGraphJsonCmd, 'infra-init-empty-repo': infraInitEmptyRepoCmd, 'infra-insert-node-at-path': infraInsertNodeAtPathCmd, + 'infra-insert-nodes-at-paths': infraInsertNodesAtPathsCmd, + 'infra-set-and-commit': infraSetAndCommitCmd, 'infra-set-data-at-path': infraSetDataAtPathCmd, + 'infra-set-many-and-commit': infraSetManyAndCommitCmd, 'init-empty-repo': initEmptyRepoCmd, 'insert-node-at-path': insertNodeAtPathCmd, + 'insert-nodes-at-paths': insertNodesAtPathsCmd, 'platform-infra-init-empty-repo': platformInfraInitEmptyRepoCmd, 'platform-infra-insert-node-at-path': platformInfraInsertNodeAtPathCmd, + 'platform-infra-insert-nodes-at-paths': platformInfraInsertNodesAtPathsCmd, + 'platform-infra-set-and-commit': platformInfraSetAndCommitCmd, 'platform-infra-set-data-at-path': platformInfraSetDataAtPathCmd, + 'platform-infra-set-many-and-commit': platformInfraSetManyAndCommitCmd, 'platform-resource-installations-install': platformResourceInstallationsInstallCmd, 'platform-resource-installations-rollback': platformResourceInstallationsRollbackCmd, 'platform-resource-installations-uninstall': platformResourceInstallationsUninstallCmd, @@ -209,12 +225,14 @@ const createCommandMap: () => Record< 'resource-installations-uninstall': resourceInstallationsUninstallCmd, 'resource-installations-upgrade': resourceInstallationsUpgradeCmd, 'save-graph': saveGraphCmd, + 'set-and-commit': setAndCommitCmd, 'set-data-at-path': setDataAtPathCmd, + 'set-many-and-commit': setManyAndCommitCmd, 'start-execution': startExecutionCmd, 'validate-function-graph': validateFunctionGraphCmd, }); const usage = - '\ncsdk \n\nCommands:\n context Manage API contexts\n auth Manage authentication\n db-preset dbPreset CRUD operations\n function-api-binding functionApiBinding CRUD operations\n function-capability-binding functionCapabilityBinding CRUD operations\n function-definition functionDefinition CRUD operations\n function-deployment functionDeployment CRUD operations\n function-deployment-event functionDeploymentEvent CRUD operations\n function-execution-log functionExecutionLog CRUD operations\n function-graph-commit functionGraphCommit CRUD operations\n function-graph functionGraph CRUD operations\n function-graph-execution functionGraphExecution CRUD operations\n function-graph-execution-node-state functionGraphExecutionNodeState CRUD operations\n function-graph-execution-output functionGraphExecutionOutput CRUD operations\n function-graph-object functionGraphObject CRUD operations\n function-graph-ref functionGraphRef CRUD operations\n function-graph-store functionGraphStore CRUD operations\n function-invocation-attempt functionInvocationAttempt CRUD operations\n function-invocation functionInvocation CRUD operations\n get-all-tree-nodes-record getAllTreeNodesRecord CRUD operations\n infra-commit infraCommit CRUD operations\n infra-get-all-tree-nodes-record infraGetAllTreeNodesRecord CRUD operations\n infra-object infraObject CRUD operations\n infra-ref infraRef CRUD operations\n infra-store infraStore CRUD operations\n integration-provider integrationProvider CRUD operations\n namespace namespace CRUD operations\n namespace-event namespaceEvent CRUD operations\n platform-function-api-binding platformFunctionApiBinding CRUD operations\n platform-function-capability-binding platformFunctionCapabilityBinding CRUD operations\n platform-function-definition platformFunctionDefinition CRUD operations\n platform-function-deployment platformFunctionDeployment CRUD operations\n platform-function-deployment-event platformFunctionDeploymentEvent CRUD operations\n platform-function-execution-log platformFunctionExecutionLog CRUD operations\n platform-function-invocation-attempt platformFunctionInvocationAttempt CRUD operations\n platform-function-invocation platformFunctionInvocation CRUD operations\n platform-infra-commit platformInfraCommit CRUD operations\n platform-infra-get-all-tree-nodes-record platformInfraGetAllTreeNodesRecord CRUD operations\n platform-infra-object platformInfraObject CRUD operations\n platform-infra-ref platformInfraRef CRUD operations\n platform-infra-store platformInfraStore CRUD operations\n platform-namespace platformNamespace CRUD operations\n platform-namespace-event platformNamespaceEvent CRUD operations\n platform-resource platformResource CRUD operations\n platform-resource-declared-capacity platformResourceDeclaredCapacity CRUD operations\n platform-resource-definition platformResourceDefinition CRUD operations\n platform-resource-event platformResourceEvent CRUD operations\n platform-resource-installation platformResourceInstallation CRUD operations\n platform-resource-status-check platformResourceStatusCheck CRUD operations\n platform-resource-usage-log platformResourceUsageLog CRUD operations\n platform-resource-usage-summary platformResourceUsageSummary CRUD operations\n platform-resource-utilization platformResourceUtilization CRUD operations\n platform-resources-health platformResourcesHealth CRUD operations\n platform-resources-requirements-state platformResourcesRequirementsState CRUD operations\n platform-resources-resolved-requirement platformResourcesResolvedRequirement CRUD operations\n platform-webhook-endpoint platformWebhookEndpoint CRUD operations\n platform-webhook-event platformWebhookEvent CRUD operations\n resource resource CRUD operations\n resource-declared-capacity resourceDeclaredCapacity CRUD operations\n resource-definition resourceDefinition CRUD operations\n resource-event resourceEvent CRUD operations\n resource-installation resourceInstallation CRUD operations\n resource-status-check resourceStatusCheck CRUD operations\n resource-usage-log resourceUsageLog CRUD operations\n resource-usage-summary resourceUsageSummary CRUD operations\n resource-utilization resourceUtilization CRUD operations\n resources-health resourcesHealth CRUD operations\n resources-requirements-state resourcesRequirementsState CRUD operations\n resources-resolved-requirement resourcesResolvedRequirement CRUD operations\n webhook-endpoint webhookEndpoint CRUD operations\n webhook-event webhookEvent CRUD operations\n read-function-graph readFunctionGraph\n add-edge addEdge\n add-edge-and-save addEdgeAndSave\n add-node addNode\n add-node-and-save addNodeAndSave\n copy-graph copyGraph\n import-definitions importDefinitions\n import-graph-json importGraphJson\n infra-init-empty-repo infraInitEmptyRepo\n infra-insert-node-at-path infraInsertNodeAtPath\n infra-set-data-at-path infraSetDataAtPath\n init-empty-repo initEmptyRepo\n insert-node-at-path insertNodeAtPath\n platform-infra-init-empty-repo platformInfraInitEmptyRepo\n platform-infra-insert-node-at-path platformInfraInsertNodeAtPath\n platform-infra-set-data-at-path platformInfraSetDataAtPath\n platform-resource-installations-install platformResourceInstallationsInstall\n platform-resource-installations-rollback platformResourceInstallationsRollback\n platform-resource-installations-uninstall platformResourceInstallationsUninstall\n platform-resource-installations-upgrade platformResourceInstallationsUpgrade\n provision-bucket Provision an S3 bucket for a logical bucket in the database.\nReads the bucket config via RLS, then creates and configures\nthe S3 bucket with the appropriate privacy policies, CORS rules,\nand lifecycle settings.\n resource-installations-install resourceInstallationsInstall\n resource-installations-rollback resourceInstallationsRollback\n resource-installations-uninstall resourceInstallationsUninstall\n resource-installations-upgrade resourceInstallationsUpgrade\n save-graph saveGraph\n set-data-at-path setDataAtPath\n start-execution startExecution\n validate-function-graph validateFunctionGraph\n\n --help, -h Show this help message\n --version, -v Show version\n'; + '\ncsdk \n\nCommands:\n context Manage API contexts\n auth Manage authentication\n db-preset dbPreset CRUD operations\n function-api-binding functionApiBinding CRUD operations\n function-capability-binding functionCapabilityBinding CRUD operations\n function-definition functionDefinition CRUD operations\n function-deployment functionDeployment CRUD operations\n function-deployment-event functionDeploymentEvent CRUD operations\n function-execution-log functionExecutionLog CRUD operations\n function-graph-commit functionGraphCommit CRUD operations\n function-graph functionGraph CRUD operations\n function-graph-execution functionGraphExecution CRUD operations\n function-graph-execution-node-state functionGraphExecutionNodeState CRUD operations\n function-graph-execution-output functionGraphExecutionOutput CRUD operations\n function-graph-object functionGraphObject CRUD operations\n function-graph-ref functionGraphRef CRUD operations\n function-graph-store functionGraphStore CRUD operations\n function-invocation-attempt functionInvocationAttempt CRUD operations\n function-invocation functionInvocation CRUD operations\n get-all-tree-nodes-record getAllTreeNodesRecord CRUD operations\n infra-commit infraCommit CRUD operations\n infra-get-all-tree-nodes-record infraGetAllTreeNodesRecord CRUD operations\n infra-object infraObject CRUD operations\n infra-ref infraRef CRUD operations\n infra-store infraStore CRUD operations\n integration-provider integrationProvider CRUD operations\n namespace namespace CRUD operations\n namespace-event namespaceEvent CRUD operations\n platform-function-api-binding platformFunctionApiBinding CRUD operations\n platform-function-capability-binding platformFunctionCapabilityBinding CRUD operations\n platform-function-definition platformFunctionDefinition CRUD operations\n platform-function-deployment platformFunctionDeployment CRUD operations\n platform-function-deployment-event platformFunctionDeploymentEvent CRUD operations\n platform-function-execution-log platformFunctionExecutionLog CRUD operations\n platform-function-invocation-attempt platformFunctionInvocationAttempt CRUD operations\n platform-function-invocation platformFunctionInvocation CRUD operations\n platform-infra-commit platformInfraCommit CRUD operations\n platform-infra-get-all-tree-nodes-record platformInfraGetAllTreeNodesRecord CRUD operations\n platform-infra-object platformInfraObject CRUD operations\n platform-infra-ref platformInfraRef CRUD operations\n platform-infra-store platformInfraStore CRUD operations\n platform-namespace platformNamespace CRUD operations\n platform-namespace-event platformNamespaceEvent CRUD operations\n platform-resource platformResource CRUD operations\n platform-resource-declared-capacity platformResourceDeclaredCapacity CRUD operations\n platform-resource-definition platformResourceDefinition CRUD operations\n platform-resource-event platformResourceEvent CRUD operations\n platform-resource-installation platformResourceInstallation CRUD operations\n platform-resource-status-check platformResourceStatusCheck CRUD operations\n platform-resource-usage-log platformResourceUsageLog CRUD operations\n platform-resource-usage-summary platformResourceUsageSummary CRUD operations\n platform-resource-utilization platformResourceUtilization CRUD operations\n platform-resources-health platformResourcesHealth CRUD operations\n platform-resources-requirements-state platformResourcesRequirementsState CRUD operations\n platform-resources-resolved-requirement platformResourcesResolvedRequirement CRUD operations\n platform-webhook-endpoint platformWebhookEndpoint CRUD operations\n platform-webhook-event platformWebhookEvent CRUD operations\n resource resource CRUD operations\n resource-declared-capacity resourceDeclaredCapacity CRUD operations\n resource-definition resourceDefinition CRUD operations\n resource-event resourceEvent CRUD operations\n resource-installation resourceInstallation CRUD operations\n resource-status-check resourceStatusCheck CRUD operations\n resource-usage-log resourceUsageLog CRUD operations\n resource-usage-summary resourceUsageSummary CRUD operations\n resource-utilization resourceUtilization CRUD operations\n resources-health resourcesHealth CRUD operations\n resources-requirements-state resourcesRequirementsState CRUD operations\n resources-resolved-requirement resourcesResolvedRequirement CRUD operations\n webhook-endpoint webhookEndpoint CRUD operations\n webhook-event webhookEvent CRUD operations\n read-function-graph readFunctionGraph\n add-edge addEdge\n add-edge-and-save addEdgeAndSave\n add-node addNode\n add-node-and-save addNodeAndSave\n copy-graph copyGraph\n import-definitions importDefinitions\n import-graph-json importGraphJson\n infra-init-empty-repo infraInitEmptyRepo\n infra-insert-node-at-path infraInsertNodeAtPath\n infra-insert-nodes-at-paths infraInsertNodesAtPaths\n infra-set-and-commit infraSetAndCommit\n infra-set-data-at-path infraSetDataAtPath\n infra-set-many-and-commit infraSetManyAndCommit\n init-empty-repo initEmptyRepo\n insert-node-at-path insertNodeAtPath\n insert-nodes-at-paths insertNodesAtPaths\n platform-infra-init-empty-repo platformInfraInitEmptyRepo\n platform-infra-insert-node-at-path platformInfraInsertNodeAtPath\n platform-infra-insert-nodes-at-paths platformInfraInsertNodesAtPaths\n platform-infra-set-and-commit platformInfraSetAndCommit\n platform-infra-set-data-at-path platformInfraSetDataAtPath\n platform-infra-set-many-and-commit platformInfraSetManyAndCommit\n platform-resource-installations-install platformResourceInstallationsInstall\n platform-resource-installations-rollback platformResourceInstallationsRollback\n platform-resource-installations-uninstall platformResourceInstallationsUninstall\n platform-resource-installations-upgrade platformResourceInstallationsUpgrade\n provision-bucket Provision an S3 bucket for a logical bucket in the database.\nReads the bucket config via RLS, then creates and configures\nthe S3 bucket with the appropriate privacy policies, CORS rules,\nand lifecycle settings.\n resource-installations-install resourceInstallationsInstall\n resource-installations-rollback resourceInstallationsRollback\n resource-installations-uninstall resourceInstallationsUninstall\n resource-installations-upgrade resourceInstallationsUpgrade\n save-graph saveGraph\n set-and-commit setAndCommit\n set-data-at-path setDataAtPath\n set-many-and-commit setManyAndCommit\n start-execution startExecution\n validate-function-graph validateFunctionGraph\n\n --help, -h Show this help message\n --version, -v Show version\n'; export const commands = async ( argv: Partial>, prompter: Inquirerer, diff --git a/sdk/constructive-cli/src/compute/cli/commands/function-definition.ts b/sdk/constructive-cli/src/compute/cli/commands/function-definition.ts index 4f44ce5afc..fb82f4dfd6 100644 --- a/sdk/constructive-cli/src/compute/cli/commands/function-definition.ts +++ b/sdk/constructive-cli/src/compute/cli/commands/function-definition.ts @@ -48,6 +48,7 @@ const fieldSchema: FieldSchema = { requiredBuckets: 'string', requiredConfigs: 'string', requiredModels: 'string', + requiredModules: 'string', requiredSecrets: 'string', resources: 'json', runtime: 'string', @@ -139,6 +140,7 @@ async function handleList(argv: Partial>, _prompter: Inq requiredBuckets: true, requiredConfigs: true, requiredModels: true, + requiredModules: true, requiredSecrets: true, resources: true, runtime: true, @@ -201,6 +203,7 @@ async function handleFindFirst(argv: Partial>, _prompter requiredBuckets: true, requiredConfigs: true, requiredModels: true, + requiredModules: true, requiredSecrets: true, resources: true, runtime: true, @@ -275,6 +278,7 @@ async function handleGet(argv: Partial>, prompter: Inqui requiredBuckets: true, requiredConfigs: true, requiredModels: true, + requiredModules: true, requiredSecrets: true, resources: true, runtime: true, @@ -479,6 +483,13 @@ async function handleCreate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'text', + name: 'requiredModules', + message: 'requiredModules', + required: false, + skipPrompt: true, + }, { type: 'text', name: 'requiredSecrets', @@ -578,6 +589,7 @@ async function handleCreate(argv: Partial>, prompter: In requiredBuckets: cleanedData.requiredBuckets, requiredConfigs: cleanedData.requiredConfigs, requiredModels: cleanedData.requiredModels, + requiredModules: cleanedData.requiredModules, requiredSecrets: cleanedData.requiredSecrets, resources: cleanedData.resources, runtime: cleanedData.runtime, @@ -617,6 +629,7 @@ async function handleCreate(argv: Partial>, prompter: In requiredBuckets: true, requiredConfigs: true, requiredModels: true, + requiredModules: true, requiredSecrets: true, resources: true, runtime: true, @@ -827,6 +840,13 @@ async function handleUpdate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'text', + name: 'requiredModules', + message: 'requiredModules', + required: false, + skipPrompt: true, + }, { type: 'text', name: 'requiredSecrets', @@ -926,6 +946,7 @@ async function handleUpdate(argv: Partial>, prompter: In requiredBuckets: cleanedData.requiredBuckets, requiredConfigs: cleanedData.requiredConfigs, requiredModels: cleanedData.requiredModels, + requiredModules: cleanedData.requiredModules, requiredSecrets: cleanedData.requiredSecrets, resources: cleanedData.resources, runtime: cleanedData.runtime, @@ -965,6 +986,7 @@ async function handleUpdate(argv: Partial>, prompter: In requiredBuckets: true, requiredConfigs: true, requiredModels: true, + requiredModules: true, requiredSecrets: true, resources: true, runtime: true, diff --git a/sdk/constructive-cli/src/compute/cli/commands/function-deployment.ts b/sdk/constructive-cli/src/compute/cli/commands/function-deployment.ts index 3bd2cf1561..ed01258b96 100644 --- a/sdk/constructive-cli/src/compute/cli/commands/function-deployment.ts +++ b/sdk/constructive-cli/src/compute/cli/commands/function-deployment.ts @@ -29,6 +29,7 @@ const fieldSchema: FieldSchema = { lastError: 'string', lastErrorAt: 'string', namespaceId: 'uuid', + realm: 'string', resources: 'json', revision: 'int', scaleMax: 'int', @@ -103,6 +104,7 @@ async function handleList(argv: Partial>, _prompter: Inq lastError: true, lastErrorAt: true, namespaceId: true, + realm: true, resources: true, revision: true, scaleMax: true, @@ -149,6 +151,7 @@ async function handleFindFirst(argv: Partial>, _prompter lastError: true, lastErrorAt: true, namespaceId: true, + realm: true, resources: true, revision: true, scaleMax: true, @@ -207,6 +210,7 @@ async function handleGet(argv: Partial>, prompter: Inqui lastError: true, lastErrorAt: true, namespaceId: true, + realm: true, resources: true, revision: true, scaleMax: true, @@ -305,6 +309,13 @@ async function handleCreate(argv: Partial>, prompter: In message: 'namespaceId', required: true, }, + { + type: 'text', + name: 'realm', + message: 'realm', + required: false, + skipPrompt: true, + }, { type: 'json', name: 'resources', @@ -382,6 +393,7 @@ async function handleCreate(argv: Partial>, prompter: In lastError: cleanedData.lastError, lastErrorAt: cleanedData.lastErrorAt, namespaceId: cleanedData.namespaceId, + realm: cleanedData.realm, resources: cleanedData.resources, revision: cleanedData.revision, scaleMax: cleanedData.scaleMax, @@ -405,6 +417,7 @@ async function handleCreate(argv: Partial>, prompter: In lastError: true, lastErrorAt: true, namespaceId: true, + realm: true, resources: true, revision: true, scaleMax: true, @@ -509,6 +522,13 @@ async function handleUpdate(argv: Partial>, prompter: In message: 'namespaceId', required: false, }, + { + type: 'text', + name: 'realm', + message: 'realm', + required: false, + skipPrompt: true, + }, { type: 'json', name: 'resources', @@ -586,6 +606,7 @@ async function handleUpdate(argv: Partial>, prompter: In lastError: cleanedData.lastError, lastErrorAt: cleanedData.lastErrorAt, namespaceId: cleanedData.namespaceId, + realm: cleanedData.realm, resources: cleanedData.resources, revision: cleanedData.revision, scaleMax: cleanedData.scaleMax, @@ -609,6 +630,7 @@ async function handleUpdate(argv: Partial>, prompter: In lastError: true, lastErrorAt: true, namespaceId: true, + realm: true, resources: true, revision: true, scaleMax: true, diff --git a/sdk/constructive-cli/src/modules/cli/commands/provision-full-text-search.ts b/sdk/constructive-cli/src/compute/cli/commands/infra-insert-nodes-at-paths.ts similarity index 64% rename from sdk/constructive-cli/src/modules/cli/commands/provision-full-text-search.ts rename to sdk/constructive-cli/src/compute/cli/commands/infra-insert-nodes-at-paths.ts index ef353f9429..ac31ecd67c 100644 --- a/sdk/constructive-cli/src/modules/cli/commands/provision-full-text-search.ts +++ b/sdk/constructive-cli/src/compute/cli/commands/infra-insert-nodes-at-paths.ts @@ -1,13 +1,13 @@ /** - * CLI command for mutation provisionFullTextSearch + * CLI command for mutation infraInsertNodesAtPaths * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ import { CLIOptions, Inquirerer } from 'inquirerer'; import { getClient } from '../executor'; import { unflattenDotNotation, buildSelectFromPaths } from '../utils'; -import type { ProvisionFullTextSearchVariables } from '../../orm/mutation'; -import type { ProvisionFullTextSearchPayloadSelect } from '../../orm/input-types'; +import type { InfraInsertNodesAtPathsVariables } from '../../orm/mutation'; +import type { InfraInsertNodesAtPathsPayloadSelect } from '../../orm/input-types'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -16,7 +16,7 @@ export default async ( try { if (argv.help || argv.h) { console.log( - 'provision-full-text-search - 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.\n\nUsage: provision-full-text-search [OPTIONS]\n' + 'infra-insert-nodes-at-paths - infraInsertNodesAtPaths\n\nUsage: infra-insert-nodes-at-paths [OPTIONS]\n' ); process.exit(0); } @@ -33,18 +33,18 @@ export default async ( const parsedAnswers = unflattenDotNotation(answers); const selectFields = buildSelectFromPaths((argv.select as string) ?? 'clientMutationId'); const result = await client.mutation - .provisionFullTextSearch( - parsedAnswers as unknown as ProvisionFullTextSearchVariables, + .infraInsertNodesAtPaths( + parsedAnswers as unknown as InfraInsertNodesAtPathsVariables, { select: selectFields, } as unknown as { - select: ProvisionFullTextSearchPayloadSelect; + select: InfraInsertNodesAtPathsPayloadSelect; } ) .execute(); console.log(JSON.stringify(result, null, 2)); } catch (error) { - console.error('Failed: provisionFullTextSearch'); + console.error('Failed: infraInsertNodesAtPaths'); if (error instanceof Error) { console.error(error.message); } diff --git a/sdk/constructive-cli/src/modules/cli/commands/provision-index.ts b/sdk/constructive-cli/src/compute/cli/commands/infra-set-and-commit.ts similarity index 62% rename from sdk/constructive-cli/src/modules/cli/commands/provision-index.ts rename to sdk/constructive-cli/src/compute/cli/commands/infra-set-and-commit.ts index 76ad632afa..8a96f988da 100644 --- a/sdk/constructive-cli/src/modules/cli/commands/provision-index.ts +++ b/sdk/constructive-cli/src/compute/cli/commands/infra-set-and-commit.ts @@ -1,13 +1,13 @@ /** - * CLI command for mutation provisionIndex + * CLI command for mutation infraSetAndCommit * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ import { CLIOptions, Inquirerer } from 'inquirerer'; import { getClient } from '../executor'; import { unflattenDotNotation, buildSelectFromPaths } from '../utils'; -import type { ProvisionIndexVariables } from '../../orm/mutation'; -import type { ProvisionIndexPayloadSelect } from '../../orm/input-types'; +import type { InfraSetAndCommitVariables } from '../../orm/mutation'; +import type { InfraSetAndCommitPayloadSelect } from '../../orm/input-types'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -16,7 +16,7 @@ export default async ( try { if (argv.help || argv.h) { console.log( - 'provision-index - 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.\n\nUsage: provision-index [OPTIONS]\n' + 'infra-set-and-commit - infraSetAndCommit\n\nUsage: infra-set-and-commit [OPTIONS]\n' ); process.exit(0); } @@ -33,18 +33,18 @@ export default async ( const parsedAnswers = unflattenDotNotation(answers); const selectFields = buildSelectFromPaths((argv.select as string) ?? 'clientMutationId'); const result = await client.mutation - .provisionIndex( - parsedAnswers as unknown as ProvisionIndexVariables, + .infraSetAndCommit( + parsedAnswers as unknown as InfraSetAndCommitVariables, { select: selectFields, } as unknown as { - select: ProvisionIndexPayloadSelect; + select: InfraSetAndCommitPayloadSelect; } ) .execute(); console.log(JSON.stringify(result, null, 2)); } catch (error) { - console.error('Failed: provisionIndex'); + console.error('Failed: infraSetAndCommit'); if (error instanceof Error) { console.error(error.message); } diff --git a/sdk/constructive-cli/src/modules/cli/commands/provision-table.ts b/sdk/constructive-cli/src/compute/cli/commands/infra-set-many-and-commit.ts similarity index 58% rename from sdk/constructive-cli/src/modules/cli/commands/provision-table.ts rename to sdk/constructive-cli/src/compute/cli/commands/infra-set-many-and-commit.ts index 2d0e98f46f..43af0d53ce 100644 --- a/sdk/constructive-cli/src/modules/cli/commands/provision-table.ts +++ b/sdk/constructive-cli/src/compute/cli/commands/infra-set-many-and-commit.ts @@ -1,13 +1,13 @@ /** - * CLI command for mutation provisionTable + * CLI command for mutation infraSetManyAndCommit * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ import { CLIOptions, Inquirerer } from 'inquirerer'; import { getClient } from '../executor'; import { unflattenDotNotation, buildSelectFromPaths } from '../utils'; -import type { ProvisionTableVariables } from '../../orm/mutation'; -import type { ProvisionTablePayloadSelect } from '../../orm/input-types'; +import type { InfraSetManyAndCommitVariables } from '../../orm/mutation'; +import type { InfraSetManyAndCommitPayloadSelect } from '../../orm/input-types'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -16,7 +16,7 @@ export default async ( try { if (argv.help || argv.h) { console.log( - 'provision-table - Composable table provisioning: creates or finds a table, then creates fields (so Data* modules can reference them), applies N nodes (Data* modules), 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).\n\nUsage: provision-table [OPTIONS]\n' + 'infra-set-many-and-commit - infraSetManyAndCommit\n\nUsage: infra-set-many-and-commit [OPTIONS]\n' ); process.exit(0); } @@ -33,18 +33,18 @@ export default async ( const parsedAnswers = unflattenDotNotation(answers); const selectFields = buildSelectFromPaths((argv.select as string) ?? 'clientMutationId'); const result = await client.mutation - .provisionTable( - parsedAnswers as unknown as ProvisionTableVariables, + .infraSetManyAndCommit( + parsedAnswers as unknown as InfraSetManyAndCommitVariables, { select: selectFields, } as unknown as { - select: ProvisionTablePayloadSelect; + select: InfraSetManyAndCommitPayloadSelect; } ) .execute(); console.log(JSON.stringify(result, null, 2)); } catch (error) { - console.error('Failed: provisionTable'); + console.error('Failed: infraSetManyAndCommit'); if (error instanceof Error) { console.error(error.message); } diff --git a/sdk/constructive-cli/src/compute/cli/commands/insert-nodes-at-paths.ts b/sdk/constructive-cli/src/compute/cli/commands/insert-nodes-at-paths.ts new file mode 100644 index 0000000000..30d2c129a1 --- /dev/null +++ b/sdk/constructive-cli/src/compute/cli/commands/insert-nodes-at-paths.ts @@ -0,0 +1,53 @@ +/** + * CLI command for mutation insertNodesAtPaths + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { CLIOptions, Inquirerer } from 'inquirerer'; +import { getClient } from '../executor'; +import { unflattenDotNotation, buildSelectFromPaths } from '../utils'; +import type { InsertNodesAtPathsVariables } from '../../orm/mutation'; +import type { InsertNodesAtPathsPayloadSelect } from '../../orm/input-types'; +export default async ( + argv: Partial>, + prompter: Inquirerer, + _options: CLIOptions +) => { + try { + if (argv.help || argv.h) { + console.log( + 'insert-nodes-at-paths - insertNodesAtPaths\n\nUsage: insert-nodes-at-paths [OPTIONS]\n' + ); + process.exit(0); + } + const answers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'input', + message: + 'The exclusive input argument for this mutation. An object type, make sure to see documentation for this object\u2019s fields.', + required: true, + }, + ]); + const client = getClient(); + const parsedAnswers = unflattenDotNotation(answers); + const selectFields = buildSelectFromPaths((argv.select as string) ?? 'clientMutationId'); + const result = await client.mutation + .insertNodesAtPaths( + parsedAnswers as unknown as InsertNodesAtPathsVariables, + { + select: selectFields, + } as unknown as { + select: InsertNodesAtPathsPayloadSelect; + } + ) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed: insertNodesAtPaths'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +}; diff --git a/sdk/constructive-cli/src/compute/cli/commands/platform-function-definition.ts b/sdk/constructive-cli/src/compute/cli/commands/platform-function-definition.ts index 66df7440ef..a30654ab95 100644 --- a/sdk/constructive-cli/src/compute/cli/commands/platform-function-definition.ts +++ b/sdk/constructive-cli/src/compute/cli/commands/platform-function-definition.ts @@ -48,6 +48,7 @@ const fieldSchema: FieldSchema = { requiredBuckets: 'string', requiredConfigs: 'string', requiredModels: 'string', + requiredModules: 'string', requiredSecrets: 'string', resources: 'json', runtime: 'string', @@ -140,6 +141,7 @@ async function handleList(argv: Partial>, _prompter: Inq requiredBuckets: true, requiredConfigs: true, requiredModels: true, + requiredModules: true, requiredSecrets: true, resources: true, runtime: true, @@ -203,6 +205,7 @@ async function handleFindFirst(argv: Partial>, _prompter requiredBuckets: true, requiredConfigs: true, requiredModels: true, + requiredModules: true, requiredSecrets: true, resources: true, runtime: true, @@ -278,6 +281,7 @@ async function handleGet(argv: Partial>, prompter: Inqui requiredBuckets: true, requiredConfigs: true, requiredModels: true, + requiredModules: true, requiredSecrets: true, resources: true, runtime: true, @@ -484,6 +488,13 @@ async function handleCreate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'text', + name: 'requiredModules', + message: 'requiredModules', + required: false, + skipPrompt: true, + }, { type: 'text', name: 'requiredSecrets', @@ -590,6 +601,7 @@ async function handleCreate(argv: Partial>, prompter: In requiredBuckets: cleanedData.requiredBuckets, requiredConfigs: cleanedData.requiredConfigs, requiredModels: cleanedData.requiredModels, + requiredModules: cleanedData.requiredModules, requiredSecrets: cleanedData.requiredSecrets, resources: cleanedData.resources, runtime: cleanedData.runtime, @@ -630,6 +642,7 @@ async function handleCreate(argv: Partial>, prompter: In requiredBuckets: true, requiredConfigs: true, requiredModels: true, + requiredModules: true, requiredSecrets: true, resources: true, runtime: true, @@ -842,6 +855,13 @@ async function handleUpdate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'text', + name: 'requiredModules', + message: 'requiredModules', + required: false, + skipPrompt: true, + }, { type: 'text', name: 'requiredSecrets', @@ -948,6 +968,7 @@ async function handleUpdate(argv: Partial>, prompter: In requiredBuckets: cleanedData.requiredBuckets, requiredConfigs: cleanedData.requiredConfigs, requiredModels: cleanedData.requiredModels, + requiredModules: cleanedData.requiredModules, requiredSecrets: cleanedData.requiredSecrets, resources: cleanedData.resources, runtime: cleanedData.runtime, @@ -988,6 +1009,7 @@ async function handleUpdate(argv: Partial>, prompter: In requiredBuckets: true, requiredConfigs: true, requiredModels: true, + requiredModules: true, requiredSecrets: true, resources: true, runtime: true, diff --git a/sdk/constructive-cli/src/compute/cli/commands/platform-function-deployment.ts b/sdk/constructive-cli/src/compute/cli/commands/platform-function-deployment.ts index 6041b82a68..5a3f02f605 100644 --- a/sdk/constructive-cli/src/compute/cli/commands/platform-function-deployment.ts +++ b/sdk/constructive-cli/src/compute/cli/commands/platform-function-deployment.ts @@ -28,6 +28,7 @@ const fieldSchema: FieldSchema = { lastError: 'string', lastErrorAt: 'string', namespaceId: 'uuid', + realm: 'string', resources: 'json', revision: 'int', scaleMax: 'int', @@ -101,6 +102,7 @@ async function handleList(argv: Partial>, _prompter: Inq lastError: true, lastErrorAt: true, namespaceId: true, + realm: true, resources: true, revision: true, scaleMax: true, @@ -146,6 +148,7 @@ async function handleFindFirst(argv: Partial>, _prompter lastError: true, lastErrorAt: true, namespaceId: true, + realm: true, resources: true, revision: true, scaleMax: true, @@ -203,6 +206,7 @@ async function handleGet(argv: Partial>, prompter: Inqui lastError: true, lastErrorAt: true, namespaceId: true, + realm: true, resources: true, revision: true, scaleMax: true, @@ -295,6 +299,13 @@ async function handleCreate(argv: Partial>, prompter: In message: 'namespaceId', required: true, }, + { + type: 'text', + name: 'realm', + message: 'realm', + required: false, + skipPrompt: true, + }, { type: 'json', name: 'resources', @@ -371,6 +382,7 @@ async function handleCreate(argv: Partial>, prompter: In lastError: cleanedData.lastError, lastErrorAt: cleanedData.lastErrorAt, namespaceId: cleanedData.namespaceId, + realm: cleanedData.realm, resources: cleanedData.resources, revision: cleanedData.revision, scaleMax: cleanedData.scaleMax, @@ -393,6 +405,7 @@ async function handleCreate(argv: Partial>, prompter: In lastError: true, lastErrorAt: true, namespaceId: true, + realm: true, resources: true, revision: true, scaleMax: true, @@ -491,6 +504,13 @@ async function handleUpdate(argv: Partial>, prompter: In message: 'namespaceId', required: false, }, + { + type: 'text', + name: 'realm', + message: 'realm', + required: false, + skipPrompt: true, + }, { type: 'json', name: 'resources', @@ -567,6 +587,7 @@ async function handleUpdate(argv: Partial>, prompter: In lastError: cleanedData.lastError, lastErrorAt: cleanedData.lastErrorAt, namespaceId: cleanedData.namespaceId, + realm: cleanedData.realm, resources: cleanedData.resources, revision: cleanedData.revision, scaleMax: cleanedData.scaleMax, @@ -589,6 +610,7 @@ async function handleUpdate(argv: Partial>, prompter: In lastError: true, lastErrorAt: true, namespaceId: true, + realm: true, resources: true, revision: true, scaleMax: true, diff --git a/sdk/constructive-cli/src/compute/cli/commands/platform-infra-insert-nodes-at-paths.ts b/sdk/constructive-cli/src/compute/cli/commands/platform-infra-insert-nodes-at-paths.ts new file mode 100644 index 0000000000..c2c3323919 --- /dev/null +++ b/sdk/constructive-cli/src/compute/cli/commands/platform-infra-insert-nodes-at-paths.ts @@ -0,0 +1,53 @@ +/** + * CLI command for mutation platformInfraInsertNodesAtPaths + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { CLIOptions, Inquirerer } from 'inquirerer'; +import { getClient } from '../executor'; +import { unflattenDotNotation, buildSelectFromPaths } from '../utils'; +import type { PlatformInfraInsertNodesAtPathsVariables } from '../../orm/mutation'; +import type { PlatformInfraInsertNodesAtPathsPayloadSelect } from '../../orm/input-types'; +export default async ( + argv: Partial>, + prompter: Inquirerer, + _options: CLIOptions +) => { + try { + if (argv.help || argv.h) { + console.log( + 'platform-infra-insert-nodes-at-paths - platformInfraInsertNodesAtPaths\n\nUsage: platform-infra-insert-nodes-at-paths [OPTIONS]\n' + ); + process.exit(0); + } + const answers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'input', + message: + 'The exclusive input argument for this mutation. An object type, make sure to see documentation for this object\u2019s fields.', + required: true, + }, + ]); + const client = getClient(); + const parsedAnswers = unflattenDotNotation(answers); + const selectFields = buildSelectFromPaths((argv.select as string) ?? 'clientMutationId'); + const result = await client.mutation + .platformInfraInsertNodesAtPaths( + parsedAnswers as unknown as PlatformInfraInsertNodesAtPathsVariables, + { + select: selectFields, + } as unknown as { + select: PlatformInfraInsertNodesAtPathsPayloadSelect; + } + ) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed: platformInfraInsertNodesAtPaths'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +}; diff --git a/sdk/constructive-cli/src/modules/cli/commands/provision-unique-constraint.ts b/sdk/constructive-cli/src/compute/cli/commands/platform-infra-set-and-commit.ts similarity index 66% rename from sdk/constructive-cli/src/modules/cli/commands/provision-unique-constraint.ts rename to sdk/constructive-cli/src/compute/cli/commands/platform-infra-set-and-commit.ts index 97caac5c74..444f633f00 100644 --- a/sdk/constructive-cli/src/modules/cli/commands/provision-unique-constraint.ts +++ b/sdk/constructive-cli/src/compute/cli/commands/platform-infra-set-and-commit.ts @@ -1,13 +1,13 @@ /** - * CLI command for mutation provisionUniqueConstraint + * CLI command for mutation platformInfraSetAndCommit * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ import { CLIOptions, Inquirerer } from 'inquirerer'; import { getClient } from '../executor'; import { unflattenDotNotation, buildSelectFromPaths } from '../utils'; -import type { ProvisionUniqueConstraintVariables } from '../../orm/mutation'; -import type { ProvisionUniqueConstraintPayloadSelect } from '../../orm/input-types'; +import type { PlatformInfraSetAndCommitVariables } from '../../orm/mutation'; +import type { PlatformInfraSetAndCommitPayloadSelect } from '../../orm/input-types'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -16,7 +16,7 @@ export default async ( try { if (argv.help || argv.h) { console.log( - 'provision-unique-constraint - 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.\n\nUsage: provision-unique-constraint [OPTIONS]\n' + 'platform-infra-set-and-commit - platformInfraSetAndCommit\n\nUsage: platform-infra-set-and-commit [OPTIONS]\n' ); process.exit(0); } @@ -33,18 +33,18 @@ export default async ( const parsedAnswers = unflattenDotNotation(answers); const selectFields = buildSelectFromPaths((argv.select as string) ?? 'clientMutationId'); const result = await client.mutation - .provisionUniqueConstraint( - parsedAnswers as unknown as ProvisionUniqueConstraintVariables, + .platformInfraSetAndCommit( + parsedAnswers as unknown as PlatformInfraSetAndCommitVariables, { select: selectFields, } as unknown as { - select: ProvisionUniqueConstraintPayloadSelect; + select: PlatformInfraSetAndCommitPayloadSelect; } ) .execute(); console.log(JSON.stringify(result, null, 2)); } catch (error) { - console.error('Failed: provisionUniqueConstraint'); + console.error('Failed: platformInfraSetAndCommit'); if (error instanceof Error) { console.error(error.message); } diff --git a/sdk/constructive-cli/src/compute/cli/commands/platform-infra-set-many-and-commit.ts b/sdk/constructive-cli/src/compute/cli/commands/platform-infra-set-many-and-commit.ts new file mode 100644 index 0000000000..1dadf0ef4f --- /dev/null +++ b/sdk/constructive-cli/src/compute/cli/commands/platform-infra-set-many-and-commit.ts @@ -0,0 +1,53 @@ +/** + * CLI command for mutation platformInfraSetManyAndCommit + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { CLIOptions, Inquirerer } from 'inquirerer'; +import { getClient } from '../executor'; +import { unflattenDotNotation, buildSelectFromPaths } from '../utils'; +import type { PlatformInfraSetManyAndCommitVariables } from '../../orm/mutation'; +import type { PlatformInfraSetManyAndCommitPayloadSelect } from '../../orm/input-types'; +export default async ( + argv: Partial>, + prompter: Inquirerer, + _options: CLIOptions +) => { + try { + if (argv.help || argv.h) { + console.log( + 'platform-infra-set-many-and-commit - platformInfraSetManyAndCommit\n\nUsage: platform-infra-set-many-and-commit [OPTIONS]\n' + ); + process.exit(0); + } + const answers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'input', + message: + 'The exclusive input argument for this mutation. An object type, make sure to see documentation for this object\u2019s fields.', + required: true, + }, + ]); + const client = getClient(); + const parsedAnswers = unflattenDotNotation(answers); + const selectFields = buildSelectFromPaths((argv.select as string) ?? 'clientMutationId'); + const result = await client.mutation + .platformInfraSetManyAndCommit( + parsedAnswers as unknown as PlatformInfraSetManyAndCommitVariables, + { + select: selectFields, + } as unknown as { + select: PlatformInfraSetManyAndCommitPayloadSelect; + } + ) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed: platformInfraSetManyAndCommit'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +}; diff --git a/sdk/constructive-cli/src/compute/cli/commands/set-and-commit.ts b/sdk/constructive-cli/src/compute/cli/commands/set-and-commit.ts new file mode 100644 index 0000000000..cb702ff301 --- /dev/null +++ b/sdk/constructive-cli/src/compute/cli/commands/set-and-commit.ts @@ -0,0 +1,51 @@ +/** + * CLI command for mutation setAndCommit + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { CLIOptions, Inquirerer } from 'inquirerer'; +import { getClient } from '../executor'; +import { unflattenDotNotation, buildSelectFromPaths } from '../utils'; +import type { SetAndCommitVariables } from '../../orm/mutation'; +import type { SetAndCommitPayloadSelect } from '../../orm/input-types'; +export default async ( + argv: Partial>, + prompter: Inquirerer, + _options: CLIOptions +) => { + try { + if (argv.help || argv.h) { + console.log('set-and-commit - setAndCommit\n\nUsage: set-and-commit [OPTIONS]\n'); + process.exit(0); + } + const answers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'input', + message: + 'The exclusive input argument for this mutation. An object type, make sure to see documentation for this object\u2019s fields.', + required: true, + }, + ]); + const client = getClient(); + const parsedAnswers = unflattenDotNotation(answers); + const selectFields = buildSelectFromPaths((argv.select as string) ?? 'clientMutationId'); + const result = await client.mutation + .setAndCommit( + parsedAnswers as unknown as SetAndCommitVariables, + { + select: selectFields, + } as unknown as { + select: SetAndCommitPayloadSelect; + } + ) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed: setAndCommit'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +}; diff --git a/sdk/constructive-cli/src/compute/cli/commands/set-many-and-commit.ts b/sdk/constructive-cli/src/compute/cli/commands/set-many-and-commit.ts new file mode 100644 index 0000000000..8b1d8dba43 --- /dev/null +++ b/sdk/constructive-cli/src/compute/cli/commands/set-many-and-commit.ts @@ -0,0 +1,53 @@ +/** + * CLI command for mutation setManyAndCommit + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { CLIOptions, Inquirerer } from 'inquirerer'; +import { getClient } from '../executor'; +import { unflattenDotNotation, buildSelectFromPaths } from '../utils'; +import type { SetManyAndCommitVariables } from '../../orm/mutation'; +import type { SetManyAndCommitPayloadSelect } from '../../orm/input-types'; +export default async ( + argv: Partial>, + prompter: Inquirerer, + _options: CLIOptions +) => { + try { + if (argv.help || argv.h) { + console.log( + 'set-many-and-commit - setManyAndCommit\n\nUsage: set-many-and-commit [OPTIONS]\n' + ); + process.exit(0); + } + const answers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'input', + message: + 'The exclusive input argument for this mutation. An object type, make sure to see documentation for this object\u2019s fields.', + required: true, + }, + ]); + const client = getClient(); + const parsedAnswers = unflattenDotNotation(answers); + const selectFields = buildSelectFromPaths((argv.select as string) ?? 'clientMutationId'); + const result = await client.mutation + .setManyAndCommit( + parsedAnswers as unknown as SetManyAndCommitVariables, + { + select: selectFields, + } as unknown as { + select: SetManyAndCommitPayloadSelect; + } + ) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed: setManyAndCommit'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +}; diff --git a/sdk/constructive-cli/src/compute/orm/README.md b/sdk/constructive-cli/src/compute/orm/README.md index d1a03c4e98..78b236e1d8 100644 --- a/sdk/constructive-cli/src/compute/orm/README.md +++ b/sdk/constructive-cli/src/compute/orm/README.md @@ -245,6 +245,7 @@ CRUD operations for FunctionDefinition records. | `requiredBuckets` | String | Yes | | `requiredConfigs` | ResourceRequirement | Yes | | `requiredModels` | String | Yes | +| `requiredModules` | String | Yes | | `requiredSecrets` | ResourceRequirement | Yes | | `resources` | JSON | Yes | | `runtime` | String | Yes | @@ -261,13 +262,13 @@ CRUD operations for FunctionDefinition records. ```typescript // List all functionDefinition records -const items = await db.functionDefinition.findMany({ select: { accessChannels: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, databaseId: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }).execute(); +const items = await db.functionDefinition.findMany({ select: { accessChannels: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, databaseId: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredModules: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }).execute(); // Get one by id -const item = await db.functionDefinition.findOne({ id: '', select: { accessChannels: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, databaseId: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }).execute(); +const item = await db.functionDefinition.findOne({ id: '', select: { accessChannels: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, databaseId: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredModules: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }).execute(); // Create -const created = await db.functionDefinition.create({ data: { accessChannels: '', category: '', concurrency: '', cpuLimitMillicores: '', cpuRequestMillicores: '', databaseId: '', description: '', fnCategory: '', functionColumns: '', graphId: '', icon: '', image: '', inputs: '', integrations: '', isPublished: '', maxAttempts: '', memoryLimitBytes: '', memoryRequestBytes: '', moduleTable: '', name: '', outputs: '', payloadArgs: '', priority: '', props: '', protected: '', publishedAt: '', queueName: '', requiredBuckets: '', requiredConfigs: '', requiredModels: '', requiredSecrets: '', resources: '', runtime: '', scaleMax: '', scaleMin: '', targetFunction: '', targetSchema: '', taskIdentifier: '', timeoutSeconds: '', volatile: '' }, select: { id: true } }).execute(); +const created = await db.functionDefinition.create({ data: { accessChannels: '', category: '', concurrency: '', cpuLimitMillicores: '', cpuRequestMillicores: '', databaseId: '', description: '', fnCategory: '', functionColumns: '', graphId: '', icon: '', image: '', inputs: '', integrations: '', isPublished: '', maxAttempts: '', memoryLimitBytes: '', memoryRequestBytes: '', moduleTable: '', name: '', outputs: '', payloadArgs: '', priority: '', props: '', protected: '', publishedAt: '', queueName: '', requiredBuckets: '', requiredConfigs: '', requiredModels: '', requiredModules: '', requiredSecrets: '', resources: '', runtime: '', scaleMax: '', scaleMin: '', targetFunction: '', targetSchema: '', taskIdentifier: '', timeoutSeconds: '', volatile: '' }, select: { id: true } }).execute(); // Update const updated = await db.functionDefinition.update({ where: { id: '' }, data: { accessChannels: '' }, select: { id: true } }).execute(); @@ -297,6 +298,7 @@ CRUD operations for FunctionDeployment records. | `lastError` | String | Yes | | `lastErrorAt` | Datetime | Yes | | `namespaceId` | UUID | Yes | +| `realm` | String | Yes | | `resources` | JSON | Yes | | `revision` | Int | Yes | | `scaleMax` | Int | Yes | @@ -311,13 +313,13 @@ CRUD operations for FunctionDeployment records. ```typescript // List all functionDeployment records -const items = await db.functionDeployment.findMany({ select: { annotations: true, concurrency: true, createdAt: true, databaseId: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }).execute(); +const items = await db.functionDeployment.findMany({ select: { annotations: true, concurrency: true, createdAt: true, databaseId: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, realm: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.functionDeployment.findOne({ id: '', select: { annotations: true, concurrency: true, createdAt: true, databaseId: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }).execute(); +const item = await db.functionDeployment.findOne({ id: '', select: { annotations: true, concurrency: true, createdAt: true, databaseId: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, realm: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }).execute(); // Create -const created = await db.functionDeployment.create({ data: { annotations: '', concurrency: '', databaseId: '', errorCount: '', handlerName: '', image: '', imageVersion: '', labels: '', lastError: '', lastErrorAt: '', namespaceId: '', resources: '', revision: '', scaleMax: '', scaleMin: '', serviceName: '', serviceUrl: '', status: '', timeoutSeconds: '' }, select: { id: true } }).execute(); +const created = await db.functionDeployment.create({ data: { annotations: '', concurrency: '', databaseId: '', errorCount: '', handlerName: '', image: '', imageVersion: '', labels: '', lastError: '', lastErrorAt: '', namespaceId: '', realm: '', resources: '', revision: '', scaleMax: '', scaleMin: '', serviceName: '', serviceUrl: '', status: '', timeoutSeconds: '' }, select: { id: true } }).execute(); // Update const updated = await db.functionDeployment.update({ where: { id: '' }, data: { annotations: '' }, select: { id: true } }).execute(); @@ -1227,6 +1229,7 @@ CRUD operations for PlatformFunctionDefinition records. | `requiredBuckets` | String | Yes | | `requiredConfigs` | ResourceRequirement | Yes | | `requiredModels` | String | Yes | +| `requiredModules` | String | Yes | | `requiredSecrets` | ResourceRequirement | Yes | | `resources` | JSON | Yes | | `runtime` | String | Yes | @@ -1244,13 +1247,13 @@ CRUD operations for PlatformFunctionDefinition records. ```typescript // List all platformFunctionDefinition records -const items = await db.platformFunctionDefinition.findMany({ select: { accessChannels: true, billable: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, system: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }).execute(); +const items = await db.platformFunctionDefinition.findMany({ select: { accessChannels: true, billable: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredModules: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, system: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }).execute(); // Get one by id -const item = await db.platformFunctionDefinition.findOne({ id: '', select: { accessChannels: true, billable: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, system: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }).execute(); +const item = await db.platformFunctionDefinition.findOne({ id: '', select: { accessChannels: true, billable: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredModules: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, system: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }).execute(); // Create -const created = await db.platformFunctionDefinition.create({ data: { accessChannels: '', billable: '', category: '', concurrency: '', cpuLimitMillicores: '', cpuRequestMillicores: '', description: '', fnCategory: '', functionColumns: '', graphId: '', icon: '', image: '', inputs: '', integrations: '', isPublished: '', maxAttempts: '', memoryLimitBytes: '', memoryRequestBytes: '', moduleTable: '', name: '', outputs: '', payloadArgs: '', priority: '', props: '', protected: '', publishedAt: '', queueName: '', requiredBuckets: '', requiredConfigs: '', requiredModels: '', requiredSecrets: '', resources: '', runtime: '', scaleMax: '', scaleMin: '', system: '', targetFunction: '', targetSchema: '', taskIdentifier: '', timeoutSeconds: '', volatile: '' }, select: { id: true } }).execute(); +const created = await db.platformFunctionDefinition.create({ data: { accessChannels: '', billable: '', category: '', concurrency: '', cpuLimitMillicores: '', cpuRequestMillicores: '', description: '', fnCategory: '', functionColumns: '', graphId: '', icon: '', image: '', inputs: '', integrations: '', isPublished: '', maxAttempts: '', memoryLimitBytes: '', memoryRequestBytes: '', moduleTable: '', name: '', outputs: '', payloadArgs: '', priority: '', props: '', protected: '', publishedAt: '', queueName: '', requiredBuckets: '', requiredConfigs: '', requiredModels: '', requiredModules: '', requiredSecrets: '', resources: '', runtime: '', scaleMax: '', scaleMin: '', system: '', targetFunction: '', targetSchema: '', taskIdentifier: '', timeoutSeconds: '', volatile: '' }, select: { id: true } }).execute(); // Update const updated = await db.platformFunctionDefinition.update({ where: { id: '' }, data: { accessChannels: '' }, select: { id: true } }).execute(); @@ -1279,6 +1282,7 @@ CRUD operations for PlatformFunctionDeployment records. | `lastError` | String | Yes | | `lastErrorAt` | Datetime | Yes | | `namespaceId` | UUID | Yes | +| `realm` | String | Yes | | `resources` | JSON | Yes | | `revision` | Int | Yes | | `scaleMax` | Int | Yes | @@ -1293,13 +1297,13 @@ CRUD operations for PlatformFunctionDeployment records. ```typescript // List all platformFunctionDeployment records -const items = await db.platformFunctionDeployment.findMany({ select: { annotations: true, concurrency: true, createdAt: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }).execute(); +const items = await db.platformFunctionDeployment.findMany({ select: { annotations: true, concurrency: true, createdAt: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, realm: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.platformFunctionDeployment.findOne({ id: '', select: { annotations: true, concurrency: true, createdAt: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }).execute(); +const item = await db.platformFunctionDeployment.findOne({ id: '', select: { annotations: true, concurrency: true, createdAt: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, realm: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }).execute(); // Create -const created = await db.platformFunctionDeployment.create({ data: { annotations: '', concurrency: '', errorCount: '', handlerName: '', image: '', imageVersion: '', labels: '', lastError: '', lastErrorAt: '', namespaceId: '', resources: '', revision: '', scaleMax: '', scaleMin: '', serviceName: '', serviceUrl: '', status: '', timeoutSeconds: '' }, select: { id: true } }).execute(); +const created = await db.platformFunctionDeployment.create({ data: { annotations: '', concurrency: '', errorCount: '', handlerName: '', image: '', imageVersion: '', labels: '', lastError: '', lastErrorAt: '', namespaceId: '', realm: '', resources: '', revision: '', scaleMax: '', scaleMin: '', serviceName: '', serviceUrl: '', status: '', timeoutSeconds: '' }, select: { id: true } }).execute(); // Update const updated = await db.platformFunctionDeployment.update({ where: { id: '' }, data: { annotations: '' }, select: { id: true } }).execute(); @@ -3053,6 +3057,36 @@ infraInsertNodeAtPath const result = await db.mutation.infraInsertNodeAtPath({ input: '' }).execute(); ``` +### `db.mutation.infraInsertNodesAtPaths` + +infraInsertNodesAtPaths + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | InfraInsertNodesAtPathsInput (required) | + +```typescript +const result = await db.mutation.infraInsertNodesAtPaths({ input: '' }).execute(); +``` + +### `db.mutation.infraSetAndCommit` + +infraSetAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | InfraSetAndCommitInput (required) | + +```typescript +const result = await db.mutation.infraSetAndCommit({ input: '' }).execute(); +``` + ### `db.mutation.infraSetDataAtPath` infraSetDataAtPath @@ -3068,6 +3102,21 @@ infraSetDataAtPath const result = await db.mutation.infraSetDataAtPath({ input: { data: '', path: '', root: '', sId: '' } }).execute(); ``` +### `db.mutation.infraSetManyAndCommit` + +infraSetManyAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | InfraSetManyAndCommitInput (required) | + +```typescript +const result = await db.mutation.infraSetManyAndCommit({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }).execute(); +``` + ### `db.mutation.initEmptyRepo` initEmptyRepo @@ -3098,6 +3147,21 @@ insertNodeAtPath const result = await db.mutation.insertNodeAtPath({ input: '' }).execute(); ``` +### `db.mutation.insertNodesAtPaths` + +insertNodesAtPaths + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | InsertNodesAtPathsInput (required) | + +```typescript +const result = await db.mutation.insertNodesAtPaths({ input: '' }).execute(); +``` + ### `db.mutation.platformInfraInitEmptyRepo` platformInfraInitEmptyRepo @@ -3128,6 +3192,36 @@ platformInfraInsertNodeAtPath const result = await db.mutation.platformInfraInsertNodeAtPath({ input: '' }).execute(); ``` +### `db.mutation.platformInfraInsertNodesAtPaths` + +platformInfraInsertNodesAtPaths + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | PlatformInfraInsertNodesAtPathsInput (required) | + +```typescript +const result = await db.mutation.platformInfraInsertNodesAtPaths({ input: '' }).execute(); +``` + +### `db.mutation.platformInfraSetAndCommit` + +platformInfraSetAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | PlatformInfraSetAndCommitInput (required) | + +```typescript +const result = await db.mutation.platformInfraSetAndCommit({ input: '' }).execute(); +``` + ### `db.mutation.platformInfraSetDataAtPath` platformInfraSetDataAtPath @@ -3143,6 +3237,21 @@ platformInfraSetDataAtPath const result = await db.mutation.platformInfraSetDataAtPath({ input: { data: '', path: '', root: '', sId: '' } }).execute(); ``` +### `db.mutation.platformInfraSetManyAndCommit` + +platformInfraSetManyAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | PlatformInfraSetManyAndCommitInput (required) | + +```typescript +const result = await db.mutation.platformInfraSetManyAndCommit({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }).execute(); +``` + ### `db.mutation.platformResourceInstallationsInstall` platformResourceInstallationsInstall @@ -3296,6 +3405,21 @@ saveGraph const result = await db.mutation.saveGraph({ input: { graphId: '', message: '', rootHash: '' } }).execute(); ``` +### `db.mutation.setAndCommit` + +setAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | SetAndCommitInput (required) | + +```typescript +const result = await db.mutation.setAndCommit({ input: '' }).execute(); +``` + ### `db.mutation.setDataAtPath` setDataAtPath @@ -3311,6 +3435,21 @@ setDataAtPath const result = await db.mutation.setDataAtPath({ input: { data: '', path: '', root: '', sId: '' } }).execute(); ``` +### `db.mutation.setManyAndCommit` + +setManyAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | SetManyAndCommitInput (required) | + +```typescript +const result = await db.mutation.setManyAndCommit({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }).execute(); +``` + ### `db.mutation.startExecution` startExecution diff --git a/sdk/constructive-cli/src/compute/orm/input-types.ts b/sdk/constructive-cli/src/compute/orm/input-types.ts index a132305584..df0c4af565 100644 --- a/sdk/constructive-cli/src/compute/orm/input-types.ts +++ b/sdk/constructive-cli/src/compute/orm/input-types.ts @@ -296,7 +296,7 @@ export interface FunctionCapabilityBinding { } /** Function definitions — registered cloud functions with routing, queue, and retry configuration */ export interface FunctionDefinition { - /** Invocation channels this function may be exposed through (api, graph, cron, sync, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. */ + /** Invocation channels this function may be exposed through (api, graph, cron, sync, page, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. */ accessChannels?: string[] | null; /** Function task category (e.g. email, embed, chunk, custom) */ category?: string | null; @@ -352,12 +352,14 @@ export interface FunctionDefinition { publishedAt?: string | null; /** Job queue name for serialization (e.g. email, ai, default) */ queueName?: string | null; - /** Bucket keys this function needs (e.g. uploads, exports). Empty = no bucket requirements. */ + /** Bucket keys this function needs (e.g. uploads, exports). Tenant-agnostic: each key is resolved per invocation against the tenant's buckets by {tags, type}, or by an explicit capability binding row. Empty = no bucket requirements. */ requiredBuckets?: string[] | null; /** Embedded config requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. */ requiredConfigs?: ResourceRequirement[] | null; /** Inference model whitelist (e.g. gpt-4o, claude-3). Empty = no model requirements. */ requiredModels?: string[] | null; + /** Modules whose api surfaces this function calls, e.g. notifications_module. Suffix . to name which surface when a module's schemas are attached to several (permissions_module.admin), and @ to pin the registration when a module is registered at more than one scope (limits_module@org) — usually unnecessary, since resolution walks the execution's scope chain. A value that is not a module name is read as an api name. Resolved per invocation; empty = no api requirements. */ + requiredModules?: string[] | null; /** Embedded secret requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. */ requiredSecrets?: ResourceRequirement[] | null; /** Container resource requests and limits: {requests: {memory, cpu}, limits: {memory, cpu}} */ @@ -406,6 +408,8 @@ export interface FunctionDeployment { lastErrorAt?: string | null; /** Target namespace for this deployment (maps to a K8s namespace) */ namespaceId?: string | null; + /** Config/secret realm this deployment resolves required keys against. Per key, the realm-specific atom wins over the NULL-realm default. NULL = the default lane (or a runtime-query worker that fetches per-item realms on demand). */ + realm?: string | null; /** K8s resource spec override: {"requests":{"cpu":"100m","memory":"128Mi"},"limits":{...}} */ resources?: Record | null; /** Deployment revision number (incremented on each redeployment) */ @@ -911,7 +915,7 @@ export interface PlatformFunctionCapabilityBinding { } /** Function definitions — registered cloud functions with routing, queue, and retry configuration */ export interface PlatformFunctionDefinition { - /** Invocation channels this function may be exposed through (api, graph, cron, sync, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. */ + /** Invocation channels this function may be exposed through (api, graph, cron, sync, page, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. */ accessChannels?: string[] | null; /** Whether executions are metered through the invocation ledger and billing quota gate */ billable?: boolean | null; @@ -967,12 +971,14 @@ export interface PlatformFunctionDefinition { publishedAt?: string | null; /** Job queue name for serialization (e.g. email, ai, default) */ queueName?: string | null; - /** Bucket keys this function needs (e.g. uploads, exports). Empty = no bucket requirements. */ + /** Bucket keys this function needs (e.g. uploads, exports). Tenant-agnostic: each key is resolved per invocation against the tenant's buckets by {tags, type}, or by an explicit capability binding row. Empty = no bucket requirements. */ requiredBuckets?: string[] | null; /** Embedded config requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. */ requiredConfigs?: ResourceRequirement[] | null; /** Inference model whitelist (e.g. gpt-4o, claude-3). Empty = no model requirements. */ requiredModels?: string[] | null; + /** Modules whose api surfaces this function calls, e.g. notifications_module. Suffix . to name which surface when a module's schemas are attached to several (permissions_module.admin), and @ to pin the registration when a module is registered at more than one scope (limits_module@org) — usually unnecessary, since resolution walks the execution's scope chain. A value that is not a module name is read as an api name. Resolved per invocation; empty = no api requirements. */ + requiredModules?: string[] | null; /** Embedded secret requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. */ requiredSecrets?: ResourceRequirement[] | null; /** Container resource requests and limits: {requests: {memory, cpu}, limits: {memory, cpu}} */ @@ -1021,6 +1027,8 @@ export interface PlatformFunctionDeployment { lastErrorAt?: string | null; /** Target namespace for this deployment (maps to a K8s namespace) */ namespaceId?: string | null; + /** Config/secret realm this deployment resolves required keys against. Per key, the realm-specific atom wins over the NULL-realm default. NULL = the default lane (or a runtime-query worker that fetches per-item realms on demand). */ + realm?: string | null; /** K8s resource spec override: {"requests":{"cpu":"100m","memory":"128Mi"},"limits":{...}} */ resources?: Record | null; /** Deployment revision number (incremented on each redeployment) */ @@ -2284,6 +2292,7 @@ export type FunctionDefinitionSelect = { requiredBuckets?: boolean; requiredConfigs?: boolean; requiredModels?: boolean; + requiredModules?: boolean; requiredSecrets?: boolean; resources?: boolean; runtime?: boolean; @@ -2328,6 +2337,7 @@ export type FunctionDeploymentSelect = { lastError?: boolean; lastErrorAt?: boolean; namespaceId?: boolean; + realm?: boolean; resources?: boolean; revision?: boolean; scaleMax?: boolean; @@ -2697,6 +2707,7 @@ export type PlatformFunctionDefinitionSelect = { requiredBuckets?: boolean; requiredConfigs?: boolean; requiredModels?: boolean; + requiredModules?: boolean; requiredSecrets?: boolean; resources?: boolean; runtime?: boolean; @@ -2744,6 +2755,7 @@ export type PlatformFunctionDeploymentSelect = { lastError?: boolean; lastErrorAt?: boolean; namespaceId?: boolean; + realm?: boolean; resources?: boolean; revision?: boolean; scaleMax?: boolean; @@ -3639,6 +3651,8 @@ export interface FunctionDefinitionFilter { requiredBuckets?: StringListFilter; /** Filter by the object’s `requiredModels` field. */ requiredModels?: StringListFilter; + /** Filter by the object’s `requiredModules` field. */ + requiredModules?: StringListFilter; /** Filter by the object’s `resources` field. */ resources?: JSONFilter; /** Filter by the object’s `runtime` field. */ @@ -3699,6 +3713,8 @@ export interface FunctionDeploymentFilter { not?: FunctionDeploymentFilter; /** Checks for any expressions in this list. */ or?: FunctionDeploymentFilter[]; + /** Filter by the object’s `realm` field. */ + realm?: StringFilter; /** Filter by the object’s `resources` field. */ resources?: JSONFilter; /** Filter by the object’s `revision` field. */ @@ -4451,6 +4467,8 @@ export interface PlatformFunctionDefinitionFilter { requiredBuckets?: StringListFilter; /** Filter by the object’s `requiredModels` field. */ requiredModels?: StringListFilter; + /** Filter by the object’s `requiredModules` field. */ + requiredModules?: StringListFilter; /** Filter by the object’s `resources` field. */ resources?: JSONFilter; /** Filter by the object’s `runtime` field. */ @@ -4507,6 +4525,8 @@ export interface PlatformFunctionDeploymentFilter { not?: PlatformFunctionDeploymentFilter; /** Checks for any expressions in this list. */ or?: PlatformFunctionDeploymentFilter[]; + /** Filter by the object’s `realm` field. */ + realm?: StringFilter; /** Filter by the object’s `resources` field. */ resources?: JSONFilter; /** Filter by the object’s `revision` field. */ @@ -6048,6 +6068,8 @@ export type FunctionDefinitionOrderBy = | 'REQUIRED_CONFIGS_DESC' | 'REQUIRED_MODELS_ASC' | 'REQUIRED_MODELS_DESC' + | 'REQUIRED_MODULES_ASC' + | 'REQUIRED_MODULES_DESC' | 'REQUIRED_SECRETS_ASC' | 'REQUIRED_SECRETS_DESC' | 'RESOURCES_ASC' @@ -6100,6 +6122,8 @@ export type FunctionDeploymentOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' + | 'REALM_ASC' + | 'REALM_DESC' | 'RESOURCES_ASC' | 'RESOURCES_DESC' | 'REVISION_ASC' @@ -6712,6 +6736,8 @@ export type PlatformFunctionDefinitionOrderBy = | 'REQUIRED_CONFIGS_DESC' | 'REQUIRED_MODELS_ASC' | 'REQUIRED_MODELS_DESC' + | 'REQUIRED_MODULES_ASC' + | 'REQUIRED_MODULES_DESC' | 'REQUIRED_SECRETS_ASC' | 'REQUIRED_SECRETS_DESC' | 'RESOURCES_ASC' @@ -6764,6 +6790,8 @@ export type PlatformFunctionDeploymentOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' + | 'REALM_ASC' + | 'REALM_DESC' | 'RESOURCES_ASC' | 'RESOURCES_DESC' | 'REVISION_ASC' @@ -8036,6 +8064,7 @@ export interface CreateFunctionDefinitionInput { requiredBuckets?: string[]; requiredConfigs?: ResourceRequirementInput[]; requiredModels?: string[]; + requiredModules?: string[]; requiredSecrets?: ResourceRequirementInput[]; resources?: Record; runtime?: string; @@ -8074,6 +8103,7 @@ export interface FunctionDefinitionPatch { requiredBuckets?: string[] | null; requiredConfigs?: ResourceRequirementInput[] | null; requiredModels?: string[] | null; + requiredModules?: string[] | null; requiredSecrets?: ResourceRequirementInput[] | null; resources?: Record | null; runtime?: string | null; @@ -8107,6 +8137,7 @@ export interface CreateFunctionDeploymentInput { lastError?: string; lastErrorAt?: string; namespaceId: string; + realm?: string; resources?: Record; revision?: number; scaleMax?: number; @@ -8129,6 +8160,7 @@ export interface FunctionDeploymentPatch { lastError?: string | null; lastErrorAt?: string | null; namespaceId?: string | null; + realm?: string | null; resources?: Record | null; revision?: number | null; scaleMax?: number | null; @@ -8895,6 +8927,7 @@ export interface CreatePlatformFunctionDefinitionInput { requiredBuckets?: string[]; requiredConfigs?: ResourceRequirementInput[]; requiredModels?: string[]; + requiredModules?: string[]; requiredSecrets?: ResourceRequirementInput[]; resources?: Record; runtime?: string; @@ -8934,6 +8967,7 @@ export interface PlatformFunctionDefinitionPatch { requiredBuckets?: string[] | null; requiredConfigs?: ResourceRequirementInput[] | null; requiredModels?: string[] | null; + requiredModules?: string[] | null; requiredSecrets?: ResourceRequirementInput[] | null; resources?: Record | null; runtime?: string | null; @@ -8967,6 +9001,7 @@ export interface CreatePlatformFunctionDeploymentInput { lastError?: string; lastErrorAt?: string; namespaceId: string; + realm?: string; resources?: Record; revision?: number; scaleMax?: number; @@ -8988,6 +9023,7 @@ export interface PlatformFunctionDeploymentPatch { lastError?: string | null; lastErrorAt?: string | null; namespaceId?: string | null; + realm?: string | null; resources?: Record | null; revision?: number | null; scaleMax?: number | null; @@ -10613,6 +10649,26 @@ export interface InfraInsertNodeAtPathInput { root?: string; sId?: string; } +export interface InfraInsertNodesAtPathsInput { + clientMutationId?: string; + datas?: Record[]; + kidsList?: Record; + ktreeList?: Record; + paths?: Record; + root?: string; + sId?: string; +} +export interface InfraSetAndCommitInput { + clientMutationId?: string; + data?: Record; + kids?: string[]; + ktree?: string[]; + message?: string; + path?: string[]; + refname?: string; + sId?: string; + storeId?: string; +} export interface InfraSetDataAtPathInput { clientMutationId?: string; data?: Record; @@ -10620,6 +10676,14 @@ export interface InfraSetDataAtPathInput { root?: string; sId?: string; } +export interface InfraSetManyAndCommitInput { + clientMutationId?: string; + entries?: Record; + message?: string; + refname?: string; + sId?: string; + storeId?: string; +} export interface InitEmptyRepoInput { clientMutationId?: string; sId?: string; @@ -10634,6 +10698,15 @@ export interface InsertNodeAtPathInput { root?: string; sId?: string; } +export interface InsertNodesAtPathsInput { + clientMutationId?: string; + datas?: Record[]; + kidsList?: Record; + ktreeList?: Record; + paths?: Record; + root?: string; + sId?: string; +} export interface PlatformInfraInitEmptyRepoInput { clientMutationId?: string; sId?: string; @@ -10648,6 +10721,26 @@ export interface PlatformInfraInsertNodeAtPathInput { root?: string; sId?: string; } +export interface PlatformInfraInsertNodesAtPathsInput { + clientMutationId?: string; + datas?: Record[]; + kidsList?: Record; + ktreeList?: Record; + paths?: Record; + root?: string; + sId?: string; +} +export interface PlatformInfraSetAndCommitInput { + clientMutationId?: string; + data?: Record; + kids?: string[]; + ktree?: string[]; + message?: string; + path?: string[]; + refname?: string; + sId?: string; + storeId?: string; +} export interface PlatformInfraSetDataAtPathInput { clientMutationId?: string; data?: Record; @@ -10655,6 +10748,14 @@ export interface PlatformInfraSetDataAtPathInput { root?: string; sId?: string; } +export interface PlatformInfraSetManyAndCommitInput { + clientMutationId?: string; + entries?: Record; + message?: string; + refname?: string; + sId?: string; + storeId?: string; +} export interface PlatformResourceInstallationsInstallInput { clientMutationId?: string; definitionIds?: string[]; @@ -10714,6 +10815,17 @@ export interface SaveGraphInput { message?: string; rootHash?: string; } +export interface SetAndCommitInput { + clientMutationId?: string; + data?: Record; + kids?: string[]; + ktree?: string[]; + message?: string; + path?: string[]; + refname?: string; + sId?: string; + storeId?: string; +} export interface SetDataAtPathInput { clientMutationId?: string; data?: Record; @@ -10721,6 +10833,14 @@ export interface SetDataAtPathInput { root?: string; sId?: string; } +export interface SetManyAndCommitInput { + clientMutationId?: string; + entries?: Record; + message?: string; + refname?: string; + sId?: string; + storeId?: string; +} export interface StartExecutionInput { clientMutationId?: string; graphId?: string; @@ -11128,7 +11248,7 @@ export interface FunctionCapabilityBindingInput { } /** An input for mutations affecting `FunctionDefinition` */ export interface FunctionDefinitionInput { - /** Invocation channels this function may be exposed through (api, graph, cron, sync, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. */ + /** Invocation channels this function may be exposed through (api, graph, cron, sync, page, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. */ accessChannels?: string[]; /** Function task category (e.g. email, embed, chunk, custom) */ category: string; @@ -11176,12 +11296,14 @@ export interface FunctionDefinitionInput { publishedAt?: string; /** Job queue name for serialization (e.g. email, ai, default) */ queueName?: string; - /** Bucket keys this function needs (e.g. uploads, exports). Empty = no bucket requirements. */ + /** Bucket keys this function needs (e.g. uploads, exports). Tenant-agnostic: each key is resolved per invocation against the tenant's buckets by {tags, type}, or by an explicit capability binding row. Empty = no bucket requirements. */ requiredBuckets?: string[]; /** Embedded config requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. */ requiredConfigs?: ResourceRequirementInput[]; /** Inference model whitelist (e.g. gpt-4o, claude-3). Empty = no model requirements. */ requiredModels?: string[]; + /** Modules whose api surfaces this function calls, e.g. notifications_module. Suffix . to name which surface when a module's schemas are attached to several (permissions_module.admin), and @ to pin the registration when a module is registered at more than one scope (limits_module@org) — usually unnecessary, since resolution walks the execution's scope chain. A value that is not a module name is read as an api name. Resolved per invocation; empty = no api requirements. */ + requiredModules?: string[]; /** Embedded secret requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. */ requiredSecrets?: ResourceRequirementInput[]; /** Container resource requests and limits: {requests: {memory, cpu}, limits: {memory, cpu}} */ @@ -11234,6 +11356,8 @@ export interface FunctionDeploymentInput { lastErrorAt?: string; /** Target namespace for this deployment (maps to a K8s namespace) */ namespaceId: string; + /** Config/secret realm this deployment resolves required keys against. Per key, the realm-specific atom wins over the NULL-realm default. NULL = the default lane (or a runtime-query worker that fetches per-item realms on demand). */ + realm?: string; /** K8s resource spec override: {"requests":{"cpu":"100m","memory":"128Mi"},"limits":{...}} */ resources?: Record; /** Deployment revision number (incremented on each redeployment) */ @@ -11704,7 +11828,7 @@ export interface PlatformFunctionCapabilityBindingInput { } /** An input for mutations affecting `PlatformFunctionDefinition` */ export interface PlatformFunctionDefinitionInput { - /** Invocation channels this function may be exposed through (api, graph, cron, sync, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. */ + /** Invocation channels this function may be exposed through (api, graph, cron, sync, page, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. */ accessChannels?: string[]; /** Whether executions are metered through the invocation ledger and billing quota gate */ billable?: boolean; @@ -11752,12 +11876,14 @@ export interface PlatformFunctionDefinitionInput { publishedAt?: string; /** Job queue name for serialization (e.g. email, ai, default) */ queueName?: string; - /** Bucket keys this function needs (e.g. uploads, exports). Empty = no bucket requirements. */ + /** Bucket keys this function needs (e.g. uploads, exports). Tenant-agnostic: each key is resolved per invocation against the tenant's buckets by {tags, type}, or by an explicit capability binding row. Empty = no bucket requirements. */ requiredBuckets?: string[]; /** Embedded config requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. */ requiredConfigs?: ResourceRequirementInput[]; /** Inference model whitelist (e.g. gpt-4o, claude-3). Empty = no model requirements. */ requiredModels?: string[]; + /** Modules whose api surfaces this function calls, e.g. notifications_module. Suffix . to name which surface when a module's schemas are attached to several (permissions_module.admin), and @ to pin the registration when a module is registered at more than one scope (limits_module@org) — usually unnecessary, since resolution walks the execution's scope chain. A value that is not a module name is read as an api name. Resolved per invocation; empty = no api requirements. */ + requiredModules?: string[]; /** Embedded secret requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. */ requiredSecrets?: ResourceRequirementInput[]; /** Container resource requests and limits: {requests: {memory, cpu}, limits: {memory, cpu}} */ @@ -11804,6 +11930,8 @@ export interface PlatformFunctionDeploymentInput { lastErrorAt?: string; /** Target namespace for this deployment (maps to a K8s namespace) */ namespaceId: string; + /** Config/secret realm this deployment resolves required keys against. Per key, the realm-specific atom wins over the NULL-realm default. NULL = the default lane (or a runtime-query worker that fetches per-item realms on demand). */ + realm?: string; /** K8s resource spec override: {"requests":{"cpu":"100m","memory":"128Mi"},"limits":{...}} */ resources?: Record; /** Deployment revision number (incremented on each redeployment) */ @@ -12841,6 +12969,8 @@ export interface PlatformFunctionDefinitionFilter { requiredBuckets?: StringListFilter; /** Filter by the object’s `requiredModels` field. */ requiredModels?: StringListFilter; + /** Filter by the object’s `requiredModules` field. */ + requiredModules?: StringListFilter; /** Filter by the object’s `resources` field. */ resources?: JSONFilter; /** Filter by the object’s `runtime` field. */ @@ -12900,6 +13030,8 @@ export interface FunctionDeploymentFilter { not?: FunctionDeploymentFilter; /** Checks for any expressions in this list. */ or?: FunctionDeploymentFilter[]; + /** Filter by the object’s `realm` field. */ + realm?: StringFilter; /** Filter by the object’s `resources` field. */ resources?: JSONFilter; /** Filter by the object’s `revision` field. */ @@ -13282,6 +13414,8 @@ export interface PlatformFunctionDeploymentFilter { not?: PlatformFunctionDeploymentFilter; /** Checks for any expressions in this list. */ or?: PlatformFunctionDeploymentFilter[]; + /** Filter by the object’s `realm` field. */ + realm?: StringFilter; /** Filter by the object’s `resources` field. */ resources?: JSONFilter; /** Filter by the object’s `revision` field. */ @@ -13882,6 +14016,8 @@ export interface FunctionDefinitionFilter { requiredBuckets?: StringListFilter; /** Filter by the object’s `requiredModels` field. */ requiredModels?: StringListFilter; + /** Filter by the object’s `requiredModules` field. */ + requiredModules?: StringListFilter; /** Filter by the object’s `resources` field. */ resources?: JSONFilter; /** Filter by the object’s `runtime` field. */ @@ -14189,6 +14325,28 @@ export type InfraInsertNodeAtPathPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface InfraInsertNodesAtPathsPayload { + clientMutationId?: string | null; + result?: string | null; +} +export type InfraInsertNodesAtPathsPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; +export interface InfraSetAndCommitPayload { + clientMutationId?: string | null; + infraCommitEdge?: InfraCommitEdge | null; + result?: InfraCommit | null; +} +export type InfraSetAndCommitPayloadSelect = { + clientMutationId?: boolean; + infraCommitEdge?: { + select: InfraCommitEdgeSelect; + }; + result?: { + select: InfraCommitSelect; + }; +}; export interface InfraSetDataAtPathPayload { clientMutationId?: string | null; result?: string | null; @@ -14197,6 +14355,20 @@ export type InfraSetDataAtPathPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface InfraSetManyAndCommitPayload { + clientMutationId?: string | null; + infraCommitEdge?: InfraCommitEdge | null; + result?: InfraCommit | null; +} +export type InfraSetManyAndCommitPayloadSelect = { + clientMutationId?: boolean; + infraCommitEdge?: { + select: InfraCommitEdgeSelect; + }; + result?: { + select: InfraCommitSelect; + }; +}; export interface InitEmptyRepoPayload { clientMutationId?: string | null; } @@ -14211,6 +14383,14 @@ export type InsertNodeAtPathPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface InsertNodesAtPathsPayload { + clientMutationId?: string | null; + result?: string | null; +} +export type InsertNodesAtPathsPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; export interface PlatformInfraInitEmptyRepoPayload { clientMutationId?: string | null; } @@ -14225,6 +14405,28 @@ export type PlatformInfraInsertNodeAtPathPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface PlatformInfraInsertNodesAtPathsPayload { + clientMutationId?: string | null; + result?: string | null; +} +export type PlatformInfraInsertNodesAtPathsPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; +export interface PlatformInfraSetAndCommitPayload { + clientMutationId?: string | null; + platformInfraCommitEdge?: PlatformInfraCommitEdge | null; + result?: PlatformInfraCommit | null; +} +export type PlatformInfraSetAndCommitPayloadSelect = { + clientMutationId?: boolean; + platformInfraCommitEdge?: { + select: PlatformInfraCommitEdgeSelect; + }; + result?: { + select: PlatformInfraCommitSelect; + }; +}; export interface PlatformInfraSetDataAtPathPayload { clientMutationId?: string | null; result?: string | null; @@ -14233,6 +14435,20 @@ export type PlatformInfraSetDataAtPathPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface PlatformInfraSetManyAndCommitPayload { + clientMutationId?: string | null; + platformInfraCommitEdge?: PlatformInfraCommitEdge | null; + result?: PlatformInfraCommit | null; +} +export type PlatformInfraSetManyAndCommitPayloadSelect = { + clientMutationId?: boolean; + platformInfraCommitEdge?: { + select: PlatformInfraCommitEdgeSelect; + }; + result?: { + select: PlatformInfraCommitSelect; + }; +}; export interface PlatformResourceInstallationsInstallPayload { clientMutationId?: string | null; result?: string | null; @@ -14315,6 +14531,20 @@ export type SaveGraphPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface SetAndCommitPayload { + clientMutationId?: string | null; + functionGraphCommitEdge?: FunctionGraphCommitEdge | null; + result?: FunctionGraphCommit | null; +} +export type SetAndCommitPayloadSelect = { + clientMutationId?: boolean; + functionGraphCommitEdge?: { + select: FunctionGraphCommitEdgeSelect; + }; + result?: { + select: FunctionGraphCommitSelect; + }; +}; export interface SetDataAtPathPayload { clientMutationId?: string | null; result?: string | null; @@ -14323,6 +14553,20 @@ export type SetDataAtPathPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface SetManyAndCommitPayload { + clientMutationId?: string | null; + functionGraphCommitEdge?: FunctionGraphCommitEdge | null; + result?: FunctionGraphCommit | null; +} +export type SetManyAndCommitPayloadSelect = { + clientMutationId?: boolean; + functionGraphCommitEdge?: { + select: FunctionGraphCommitEdgeSelect; + }; + result?: { + select: FunctionGraphCommitSelect; + }; +}; export interface StartExecutionPayload { clientMutationId?: string | null; result?: string | null; @@ -16852,6 +17096,42 @@ export type DeleteWebhookEventPayloadSelect = { select: WebhookEventEdgeSelect; }; }; +/** A `InfraCommit` edge in the connection. */ +export interface InfraCommitEdge { + cursor?: string | null; + /** The `InfraCommit` at the end of the edge. */ + node?: InfraCommit | null; +} +export type InfraCommitEdgeSelect = { + cursor?: boolean; + node?: { + select: InfraCommitSelect; + }; +}; +/** A `PlatformInfraCommit` edge in the connection. */ +export interface PlatformInfraCommitEdge { + cursor?: string | null; + /** The `PlatformInfraCommit` at the end of the edge. */ + node?: PlatformInfraCommit | null; +} +export type PlatformInfraCommitEdgeSelect = { + cursor?: boolean; + node?: { + select: PlatformInfraCommitSelect; + }; +}; +/** A `FunctionGraphCommit` edge in the connection. */ +export interface FunctionGraphCommitEdge { + cursor?: string | null; + /** The `FunctionGraphCommit` at the end of the edge. */ + node?: FunctionGraphCommit | null; +} +export type FunctionGraphCommitEdgeSelect = { + cursor?: boolean; + node?: { + select: FunctionGraphCommitSelect; + }; +}; /** A `DbPreset` edge in the connection. */ export interface DbPresetEdge { cursor?: string | null; @@ -16936,18 +17216,6 @@ export type FunctionExecutionLogEdgeSelect = { select: FunctionExecutionLogSelect; }; }; -/** A `FunctionGraphCommit` edge in the connection. */ -export interface FunctionGraphCommitEdge { - cursor?: string | null; - /** The `FunctionGraphCommit` at the end of the edge. */ - node?: FunctionGraphCommit | null; -} -export type FunctionGraphCommitEdgeSelect = { - cursor?: boolean; - node?: { - select: FunctionGraphCommitSelect; - }; -}; /** A `FunctionGraph` edge in the connection. */ export interface FunctionGraphEdge { cursor?: string | null; @@ -17056,18 +17324,6 @@ export type FunctionInvocationEdgeSelect = { select: FunctionInvocationSelect; }; }; -/** A `InfraCommit` edge in the connection. */ -export interface InfraCommitEdge { - cursor?: string | null; - /** The `InfraCommit` at the end of the edge. */ - node?: InfraCommit | null; -} -export type InfraCommitEdgeSelect = { - cursor?: boolean; - node?: { - select: InfraCommitSelect; - }; -}; /** A `InfraObject` edge in the connection. */ export interface InfraObjectEdge { cursor?: string | null; @@ -17236,18 +17492,6 @@ export type PlatformFunctionInvocationEdgeSelect = { select: PlatformFunctionInvocationSelect; }; }; -/** A `PlatformInfraCommit` edge in the connection. */ -export interface PlatformInfraCommitEdge { - cursor?: string | null; - /** The `PlatformInfraCommit` at the end of the edge. */ - node?: PlatformInfraCommit | null; -} -export type PlatformInfraCommitEdgeSelect = { - cursor?: boolean; - node?: { - select: PlatformInfraCommitSelect; - }; -}; /** A `PlatformInfraObject` edge in the connection. */ export interface PlatformInfraObjectEdge { cursor?: string | null; diff --git a/sdk/constructive-cli/src/compute/orm/mutation/index.ts b/sdk/constructive-cli/src/compute/orm/mutation/index.ts index c5bc975047..948d1e8903 100644 --- a/sdk/constructive-cli/src/compute/orm/mutation/index.ts +++ b/sdk/constructive-cli/src/compute/orm/mutation/index.ts @@ -16,12 +16,19 @@ import type { ImportGraphJsonInput, InfraInitEmptyRepoInput, InfraInsertNodeAtPathInput, + InfraInsertNodesAtPathsInput, + InfraSetAndCommitInput, InfraSetDataAtPathInput, + InfraSetManyAndCommitInput, InitEmptyRepoInput, InsertNodeAtPathInput, + InsertNodesAtPathsInput, PlatformInfraInitEmptyRepoInput, PlatformInfraInsertNodeAtPathInput, + PlatformInfraInsertNodesAtPathsInput, + PlatformInfraSetAndCommitInput, PlatformInfraSetDataAtPathInput, + PlatformInfraSetManyAndCommitInput, PlatformResourceInstallationsInstallInput, PlatformResourceInstallationsRollbackInput, PlatformResourceInstallationsUninstallInput, @@ -32,7 +39,9 @@ import type { ResourceInstallationsUninstallInput, ResourceInstallationsUpgradeInput, SaveGraphInput, + SetAndCommitInput, SetDataAtPathInput, + SetManyAndCommitInput, StartExecutionInput, ValidateFunctionGraphInput, AddEdgePayload, @@ -44,12 +53,19 @@ import type { ImportGraphJsonPayload, InfraInitEmptyRepoPayload, InfraInsertNodeAtPathPayload, + InfraInsertNodesAtPathsPayload, + InfraSetAndCommitPayload, InfraSetDataAtPathPayload, + InfraSetManyAndCommitPayload, InitEmptyRepoPayload, InsertNodeAtPathPayload, + InsertNodesAtPathsPayload, PlatformInfraInitEmptyRepoPayload, PlatformInfraInsertNodeAtPathPayload, + PlatformInfraInsertNodesAtPathsPayload, + PlatformInfraSetAndCommitPayload, PlatformInfraSetDataAtPathPayload, + PlatformInfraSetManyAndCommitPayload, PlatformResourceInstallationsInstallPayload, PlatformResourceInstallationsRollbackPayload, PlatformResourceInstallationsUninstallPayload, @@ -60,7 +76,9 @@ import type { ResourceInstallationsUninstallPayload, ResourceInstallationsUpgradePayload, SaveGraphPayload, + SetAndCommitPayload, SetDataAtPathPayload, + SetManyAndCommitPayload, StartExecutionPayload, ValidateFunctionGraphPayload, AddEdgePayloadSelect, @@ -72,12 +90,19 @@ import type { ImportGraphJsonPayloadSelect, InfraInitEmptyRepoPayloadSelect, InfraInsertNodeAtPathPayloadSelect, + InfraInsertNodesAtPathsPayloadSelect, + InfraSetAndCommitPayloadSelect, InfraSetDataAtPathPayloadSelect, + InfraSetManyAndCommitPayloadSelect, InitEmptyRepoPayloadSelect, InsertNodeAtPathPayloadSelect, + InsertNodesAtPathsPayloadSelect, PlatformInfraInitEmptyRepoPayloadSelect, PlatformInfraInsertNodeAtPathPayloadSelect, + PlatformInfraInsertNodesAtPathsPayloadSelect, + PlatformInfraSetAndCommitPayloadSelect, PlatformInfraSetDataAtPathPayloadSelect, + PlatformInfraSetManyAndCommitPayloadSelect, PlatformResourceInstallationsInstallPayloadSelect, PlatformResourceInstallationsRollbackPayloadSelect, PlatformResourceInstallationsUninstallPayloadSelect, @@ -88,7 +113,9 @@ import type { ResourceInstallationsUninstallPayloadSelect, ResourceInstallationsUpgradePayloadSelect, SaveGraphPayloadSelect, + SetAndCommitPayloadSelect, SetDataAtPathPayloadSelect, + SetManyAndCommitPayloadSelect, StartExecutionPayloadSelect, ValidateFunctionGraphPayloadSelect, } from '../input-types'; @@ -120,24 +147,45 @@ export interface InfraInitEmptyRepoVariables { export interface InfraInsertNodeAtPathVariables { input: InfraInsertNodeAtPathInput; } +export interface InfraInsertNodesAtPathsVariables { + input: InfraInsertNodesAtPathsInput; +} +export interface InfraSetAndCommitVariables { + input: InfraSetAndCommitInput; +} export interface InfraSetDataAtPathVariables { input: InfraSetDataAtPathInput; } +export interface InfraSetManyAndCommitVariables { + input: InfraSetManyAndCommitInput; +} export interface InitEmptyRepoVariables { input: InitEmptyRepoInput; } export interface InsertNodeAtPathVariables { input: InsertNodeAtPathInput; } +export interface InsertNodesAtPathsVariables { + input: InsertNodesAtPathsInput; +} export interface PlatformInfraInitEmptyRepoVariables { input: PlatformInfraInitEmptyRepoInput; } export interface PlatformInfraInsertNodeAtPathVariables { input: PlatformInfraInsertNodeAtPathInput; } +export interface PlatformInfraInsertNodesAtPathsVariables { + input: PlatformInfraInsertNodesAtPathsInput; +} +export interface PlatformInfraSetAndCommitVariables { + input: PlatformInfraSetAndCommitInput; +} export interface PlatformInfraSetDataAtPathVariables { input: PlatformInfraSetDataAtPathInput; } +export interface PlatformInfraSetManyAndCommitVariables { + input: PlatformInfraSetManyAndCommitInput; +} export interface PlatformResourceInstallationsInstallVariables { input: PlatformResourceInstallationsInstallInput; } @@ -175,9 +223,15 @@ export interface ResourceInstallationsUpgradeVariables { export interface SaveGraphVariables { input: SaveGraphInput; } +export interface SetAndCommitVariables { + input: SetAndCommitInput; +} export interface SetDataAtPathVariables { input: SetDataAtPathInput; } +export interface SetManyAndCommitVariables { + input: SetManyAndCommitInput; +} export interface StartExecutionVariables { input: StartExecutionInput; } @@ -447,6 +501,64 @@ export function createMutationOperations(client: OrmClient) { 'InfraInsertNodeAtPathPayload' ), }), + infraInsertNodesAtPaths: ( + args: InfraInsertNodesAtPathsVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + infraInsertNodesAtPaths: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'InfraInsertNodesAtPaths', + fieldName: 'infraInsertNodesAtPaths', + ...buildCustomDocument( + 'mutation', + 'InfraInsertNodesAtPaths', + 'infraInsertNodesAtPaths', + options.select, + args, + [ + { + name: 'input', + type: 'InfraInsertNodesAtPathsInput!', + }, + ], + connectionFieldsMap, + 'InfraInsertNodesAtPathsPayload' + ), + }), + infraSetAndCommit: ( + args: InfraSetAndCommitVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + infraSetAndCommit: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'InfraSetAndCommit', + fieldName: 'infraSetAndCommit', + ...buildCustomDocument( + 'mutation', + 'InfraSetAndCommit', + 'infraSetAndCommit', + options.select, + args, + [ + { + name: 'input', + type: 'InfraSetAndCommitInput!', + }, + ], + connectionFieldsMap, + 'InfraSetAndCommitPayload' + ), + }), infraSetDataAtPath: ( args: InfraSetDataAtPathVariables, options: { @@ -476,6 +588,35 @@ export function createMutationOperations(client: OrmClient) { 'InfraSetDataAtPathPayload' ), }), + infraSetManyAndCommit: ( + args: InfraSetManyAndCommitVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + infraSetManyAndCommit: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'InfraSetManyAndCommit', + fieldName: 'infraSetManyAndCommit', + ...buildCustomDocument( + 'mutation', + 'InfraSetManyAndCommit', + 'infraSetManyAndCommit', + options.select, + args, + [ + { + name: 'input', + type: 'InfraSetManyAndCommitInput!', + }, + ], + connectionFieldsMap, + 'InfraSetManyAndCommitPayload' + ), + }), initEmptyRepo: ( args: InitEmptyRepoVariables, options: { @@ -534,6 +675,35 @@ export function createMutationOperations(client: OrmClient) { 'InsertNodeAtPathPayload' ), }), + insertNodesAtPaths: ( + args: InsertNodesAtPathsVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + insertNodesAtPaths: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'InsertNodesAtPaths', + fieldName: 'insertNodesAtPaths', + ...buildCustomDocument( + 'mutation', + 'InsertNodesAtPaths', + 'insertNodesAtPaths', + options.select, + args, + [ + { + name: 'input', + type: 'InsertNodesAtPathsInput!', + }, + ], + connectionFieldsMap, + 'InsertNodesAtPathsPayload' + ), + }), platformInfraInitEmptyRepo: ( args: PlatformInfraInitEmptyRepoVariables, options: { @@ -595,6 +765,67 @@ export function createMutationOperations(client: OrmClient) { 'PlatformInfraInsertNodeAtPathPayload' ), }), + platformInfraInsertNodesAtPaths: ( + args: PlatformInfraInsertNodesAtPathsVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + platformInfraInsertNodesAtPaths: InferSelectResult< + PlatformInfraInsertNodesAtPathsPayload, + S + > | null; + }>({ + client, + operation: 'mutation', + operationName: 'PlatformInfraInsertNodesAtPaths', + fieldName: 'platformInfraInsertNodesAtPaths', + ...buildCustomDocument( + 'mutation', + 'PlatformInfraInsertNodesAtPaths', + 'platformInfraInsertNodesAtPaths', + options.select, + args, + [ + { + name: 'input', + type: 'PlatformInfraInsertNodesAtPathsInput!', + }, + ], + connectionFieldsMap, + 'PlatformInfraInsertNodesAtPathsPayload' + ), + }), + platformInfraSetAndCommit: ( + args: PlatformInfraSetAndCommitVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + platformInfraSetAndCommit: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'PlatformInfraSetAndCommit', + fieldName: 'platformInfraSetAndCommit', + ...buildCustomDocument( + 'mutation', + 'PlatformInfraSetAndCommit', + 'platformInfraSetAndCommit', + options.select, + args, + [ + { + name: 'input', + type: 'PlatformInfraSetAndCommitInput!', + }, + ], + connectionFieldsMap, + 'PlatformInfraSetAndCommitPayload' + ), + }), platformInfraSetDataAtPath: ( args: PlatformInfraSetDataAtPathVariables, options: { @@ -624,6 +855,38 @@ export function createMutationOperations(client: OrmClient) { 'PlatformInfraSetDataAtPathPayload' ), }), + platformInfraSetManyAndCommit: ( + args: PlatformInfraSetManyAndCommitVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + platformInfraSetManyAndCommit: InferSelectResult< + PlatformInfraSetManyAndCommitPayload, + S + > | null; + }>({ + client, + operation: 'mutation', + operationName: 'PlatformInfraSetManyAndCommit', + fieldName: 'platformInfraSetManyAndCommit', + ...buildCustomDocument( + 'mutation', + 'PlatformInfraSetManyAndCommit', + 'platformInfraSetManyAndCommit', + options.select, + args, + [ + { + name: 'input', + type: 'PlatformInfraSetManyAndCommitInput!', + }, + ], + connectionFieldsMap, + 'PlatformInfraSetManyAndCommitPayload' + ), + }), platformResourceInstallationsInstall: < S extends PlatformResourceInstallationsInstallPayloadSelect, >( @@ -946,6 +1209,35 @@ export function createMutationOperations(client: OrmClient) { 'SaveGraphPayload' ), }), + setAndCommit: ( + args: SetAndCommitVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + setAndCommit: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'SetAndCommit', + fieldName: 'setAndCommit', + ...buildCustomDocument( + 'mutation', + 'SetAndCommit', + 'setAndCommit', + options.select, + args, + [ + { + name: 'input', + type: 'SetAndCommitInput!', + }, + ], + connectionFieldsMap, + 'SetAndCommitPayload' + ), + }), setDataAtPath: ( args: SetDataAtPathVariables, options: { @@ -975,6 +1267,35 @@ export function createMutationOperations(client: OrmClient) { 'SetDataAtPathPayload' ), }), + setManyAndCommit: ( + args: SetManyAndCommitVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + setManyAndCommit: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'SetManyAndCommit', + fieldName: 'setManyAndCommit', + ...buildCustomDocument( + 'mutation', + 'SetManyAndCommit', + 'setManyAndCommit', + options.select, + args, + [ + { + name: 'input', + type: 'SetManyAndCommitInput!', + }, + ], + connectionFieldsMap, + 'SetManyAndCommitPayload' + ), + }), startExecution: ( args: StartExecutionVariables, options: { diff --git a/sdk/constructive-cli/src/infra/README.md b/sdk/constructive-cli/src/infra/README.md index ab97a0d2bf..c16f858db2 100644 --- a/sdk/constructive-cli/src/infra/README.md +++ b/sdk/constructive-cli/src/infra/README.md @@ -10,7 +10,7 @@ - **Tables:** 10 - **Custom queries:** 0 -- **Custom mutations:** 4 +- **Custom mutations:** 7 **Generators:** ORM, CLI diff --git a/sdk/constructive-cli/src/infra/cli/README.md b/sdk/constructive-cli/src/infra/cli/README.md index 33b764a0f1..b792141db5 100644 --- a/sdk/constructive-cli/src/infra/cli/README.md +++ b/sdk/constructive-cli/src/infra/cli/README.md @@ -38,7 +38,10 @@ csdk auth set-token | `platform-namespace-event` | platformNamespaceEvent CRUD operations | | `platform-infra-init-empty-repo` | platformInfraInitEmptyRepo | | `platform-infra-insert-node-at-path` | platformInfraInsertNodeAtPath | +| `platform-infra-insert-nodes-at-paths` | platformInfraInsertNodesAtPaths | +| `platform-infra-set-and-commit` | platformInfraSetAndCommit | | `platform-infra-set-data-at-path` | platformInfraSetDataAtPath | +| `platform-infra-set-many-and-commit` | platformInfraSetManyAndCommit | | `provision-bucket` | Provision an S3 bucket for a logical bucket in the database. Reads the bucket config via RLS, then creates and configures the S3 bucket with the appropriate privacy policies, CORS rules, @@ -404,6 +407,42 @@ platformInfraInsertNodeAtPath | `--input.root` | UUID | | `--input.sId` | UUID | +### `platform-infra-insert-nodes-at-paths` + +platformInfraInsertNodesAtPaths + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `--input.clientMutationId` | String | + | `--input.datas` | JSON | + | `--input.kidsList` | JSON | + | `--input.ktreeList` | JSON | + | `--input.paths` | JSON | + | `--input.root` | UUID | + | `--input.sId` | UUID | + +### `platform-infra-set-and-commit` + +platformInfraSetAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `--input.clientMutationId` | String | + | `--input.data` | JSON | + | `--input.kids` | UUID | + | `--input.ktree` | String | + | `--input.message` | String | + | `--input.path` | String | + | `--input.refname` | String | + | `--input.sId` | UUID | + | `--input.storeId` | UUID | + ### `platform-infra-set-data-at-path` platformInfraSetDataAtPath @@ -419,6 +458,22 @@ platformInfraSetDataAtPath | `--input.root` | UUID | | `--input.sId` | UUID | +### `platform-infra-set-many-and-commit` + +platformInfraSetManyAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `--input.clientMutationId` | String | + | `--input.entries` | JSON | + | `--input.message` | String | + | `--input.refname` | String | + | `--input.sId` | UUID | + | `--input.storeId` | UUID | + ### `provision-bucket` Provision an S3 bucket for a logical bucket in the database. diff --git a/sdk/constructive-cli/src/infra/cli/commands.ts b/sdk/constructive-cli/src/infra/cli/commands.ts index 9b61cfeec5..a15c03622d 100644 --- a/sdk/constructive-cli/src/infra/cli/commands.ts +++ b/sdk/constructive-cli/src/infra/cli/commands.ts @@ -18,7 +18,10 @@ import platformNamespaceCmd from './commands/platform-namespace'; import platformNamespaceEventCmd from './commands/platform-namespace-event'; import platformInfraInitEmptyRepoCmd from './commands/platform-infra-init-empty-repo'; import platformInfraInsertNodeAtPathCmd from './commands/platform-infra-insert-node-at-path'; +import platformInfraInsertNodesAtPathsCmd from './commands/platform-infra-insert-nodes-at-paths'; +import platformInfraSetAndCommitCmd from './commands/platform-infra-set-and-commit'; import platformInfraSetDataAtPathCmd from './commands/platform-infra-set-data-at-path'; +import platformInfraSetManyAndCommitCmd from './commands/platform-infra-set-many-and-commit'; import provisionBucketCmd from './commands/provision-bucket'; const createCommandMap: () => Record< string, @@ -42,11 +45,14 @@ const createCommandMap: () => Record< 'platform-namespace-event': platformNamespaceEventCmd, 'platform-infra-init-empty-repo': platformInfraInitEmptyRepoCmd, 'platform-infra-insert-node-at-path': platformInfraInsertNodeAtPathCmd, + 'platform-infra-insert-nodes-at-paths': platformInfraInsertNodesAtPathsCmd, + 'platform-infra-set-and-commit': platformInfraSetAndCommitCmd, 'platform-infra-set-data-at-path': platformInfraSetDataAtPathCmd, + 'platform-infra-set-many-and-commit': platformInfraSetManyAndCommitCmd, 'provision-bucket': provisionBucketCmd, }); const usage = - '\ncsdk \n\nCommands:\n context Manage API contexts\n auth Manage authentication\n db-preset dbPreset CRUD operations\n namespace namespace CRUD operations\n namespace-event namespaceEvent CRUD operations\n platform-infra-commit platformInfraCommit CRUD operations\n platform-infra-get-all-tree-nodes-record platformInfraGetAllTreeNodesRecord CRUD operations\n platform-infra-object platformInfraObject CRUD operations\n platform-infra-ref platformInfraRef CRUD operations\n platform-infra-store platformInfraStore CRUD operations\n platform-namespace platformNamespace CRUD operations\n platform-namespace-event platformNamespaceEvent CRUD operations\n platform-infra-init-empty-repo platformInfraInitEmptyRepo\n platform-infra-insert-node-at-path platformInfraInsertNodeAtPath\n platform-infra-set-data-at-path platformInfraSetDataAtPath\n provision-bucket Provision an S3 bucket for a logical bucket in the database.\nReads the bucket config via RLS, then creates and configures\nthe S3 bucket with the appropriate privacy policies, CORS rules,\nand lifecycle settings.\n\n --help, -h Show this help message\n --version, -v Show version\n'; + '\ncsdk \n\nCommands:\n context Manage API contexts\n auth Manage authentication\n db-preset dbPreset CRUD operations\n namespace namespace CRUD operations\n namespace-event namespaceEvent CRUD operations\n platform-infra-commit platformInfraCommit CRUD operations\n platform-infra-get-all-tree-nodes-record platformInfraGetAllTreeNodesRecord CRUD operations\n platform-infra-object platformInfraObject CRUD operations\n platform-infra-ref platformInfraRef CRUD operations\n platform-infra-store platformInfraStore CRUD operations\n platform-namespace platformNamespace CRUD operations\n platform-namespace-event platformNamespaceEvent CRUD operations\n platform-infra-init-empty-repo platformInfraInitEmptyRepo\n platform-infra-insert-node-at-path platformInfraInsertNodeAtPath\n platform-infra-insert-nodes-at-paths platformInfraInsertNodesAtPaths\n platform-infra-set-and-commit platformInfraSetAndCommit\n platform-infra-set-data-at-path platformInfraSetDataAtPath\n platform-infra-set-many-and-commit platformInfraSetManyAndCommit\n provision-bucket Provision an S3 bucket for a logical bucket in the database.\nReads the bucket config via RLS, then creates and configures\nthe S3 bucket with the appropriate privacy policies, CORS rules,\nand lifecycle settings.\n\n --help, -h Show this help message\n --version, -v Show version\n'; export const commands = async ( argv: Partial>, prompter: Inquirerer, diff --git a/sdk/constructive-cli/src/infra/cli/commands/platform-infra-insert-nodes-at-paths.ts b/sdk/constructive-cli/src/infra/cli/commands/platform-infra-insert-nodes-at-paths.ts new file mode 100644 index 0000000000..c2c3323919 --- /dev/null +++ b/sdk/constructive-cli/src/infra/cli/commands/platform-infra-insert-nodes-at-paths.ts @@ -0,0 +1,53 @@ +/** + * CLI command for mutation platformInfraInsertNodesAtPaths + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { CLIOptions, Inquirerer } from 'inquirerer'; +import { getClient } from '../executor'; +import { unflattenDotNotation, buildSelectFromPaths } from '../utils'; +import type { PlatformInfraInsertNodesAtPathsVariables } from '../../orm/mutation'; +import type { PlatformInfraInsertNodesAtPathsPayloadSelect } from '../../orm/input-types'; +export default async ( + argv: Partial>, + prompter: Inquirerer, + _options: CLIOptions +) => { + try { + if (argv.help || argv.h) { + console.log( + 'platform-infra-insert-nodes-at-paths - platformInfraInsertNodesAtPaths\n\nUsage: platform-infra-insert-nodes-at-paths [OPTIONS]\n' + ); + process.exit(0); + } + const answers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'input', + message: + 'The exclusive input argument for this mutation. An object type, make sure to see documentation for this object\u2019s fields.', + required: true, + }, + ]); + const client = getClient(); + const parsedAnswers = unflattenDotNotation(answers); + const selectFields = buildSelectFromPaths((argv.select as string) ?? 'clientMutationId'); + const result = await client.mutation + .platformInfraInsertNodesAtPaths( + parsedAnswers as unknown as PlatformInfraInsertNodesAtPathsVariables, + { + select: selectFields, + } as unknown as { + select: PlatformInfraInsertNodesAtPathsPayloadSelect; + } + ) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed: platformInfraInsertNodesAtPaths'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +}; diff --git a/sdk/constructive-cli/src/infra/cli/commands/platform-infra-set-and-commit.ts b/sdk/constructive-cli/src/infra/cli/commands/platform-infra-set-and-commit.ts new file mode 100644 index 0000000000..444f633f00 --- /dev/null +++ b/sdk/constructive-cli/src/infra/cli/commands/platform-infra-set-and-commit.ts @@ -0,0 +1,53 @@ +/** + * CLI command for mutation platformInfraSetAndCommit + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { CLIOptions, Inquirerer } from 'inquirerer'; +import { getClient } from '../executor'; +import { unflattenDotNotation, buildSelectFromPaths } from '../utils'; +import type { PlatformInfraSetAndCommitVariables } from '../../orm/mutation'; +import type { PlatformInfraSetAndCommitPayloadSelect } from '../../orm/input-types'; +export default async ( + argv: Partial>, + prompter: Inquirerer, + _options: CLIOptions +) => { + try { + if (argv.help || argv.h) { + console.log( + 'platform-infra-set-and-commit - platformInfraSetAndCommit\n\nUsage: platform-infra-set-and-commit [OPTIONS]\n' + ); + process.exit(0); + } + const answers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'input', + message: + 'The exclusive input argument for this mutation. An object type, make sure to see documentation for this object\u2019s fields.', + required: true, + }, + ]); + const client = getClient(); + const parsedAnswers = unflattenDotNotation(answers); + const selectFields = buildSelectFromPaths((argv.select as string) ?? 'clientMutationId'); + const result = await client.mutation + .platformInfraSetAndCommit( + parsedAnswers as unknown as PlatformInfraSetAndCommitVariables, + { + select: selectFields, + } as unknown as { + select: PlatformInfraSetAndCommitPayloadSelect; + } + ) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed: platformInfraSetAndCommit'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +}; diff --git a/sdk/constructive-cli/src/infra/cli/commands/platform-infra-set-many-and-commit.ts b/sdk/constructive-cli/src/infra/cli/commands/platform-infra-set-many-and-commit.ts new file mode 100644 index 0000000000..1dadf0ef4f --- /dev/null +++ b/sdk/constructive-cli/src/infra/cli/commands/platform-infra-set-many-and-commit.ts @@ -0,0 +1,53 @@ +/** + * CLI command for mutation platformInfraSetManyAndCommit + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { CLIOptions, Inquirerer } from 'inquirerer'; +import { getClient } from '../executor'; +import { unflattenDotNotation, buildSelectFromPaths } from '../utils'; +import type { PlatformInfraSetManyAndCommitVariables } from '../../orm/mutation'; +import type { PlatformInfraSetManyAndCommitPayloadSelect } from '../../orm/input-types'; +export default async ( + argv: Partial>, + prompter: Inquirerer, + _options: CLIOptions +) => { + try { + if (argv.help || argv.h) { + console.log( + 'platform-infra-set-many-and-commit - platformInfraSetManyAndCommit\n\nUsage: platform-infra-set-many-and-commit [OPTIONS]\n' + ); + process.exit(0); + } + const answers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'input', + message: + 'The exclusive input argument for this mutation. An object type, make sure to see documentation for this object\u2019s fields.', + required: true, + }, + ]); + const client = getClient(); + const parsedAnswers = unflattenDotNotation(answers); + const selectFields = buildSelectFromPaths((argv.select as string) ?? 'clientMutationId'); + const result = await client.mutation + .platformInfraSetManyAndCommit( + parsedAnswers as unknown as PlatformInfraSetManyAndCommitVariables, + { + select: selectFields, + } as unknown as { + select: PlatformInfraSetManyAndCommitPayloadSelect; + } + ) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed: platformInfraSetManyAndCommit'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +}; diff --git a/sdk/constructive-cli/src/infra/orm/README.md b/sdk/constructive-cli/src/infra/orm/README.md index e303005e2f..e94077638d 100644 --- a/sdk/constructive-cli/src/infra/orm/README.md +++ b/sdk/constructive-cli/src/infra/orm/README.md @@ -424,6 +424,36 @@ platformInfraInsertNodeAtPath const result = await db.mutation.platformInfraInsertNodeAtPath({ input: '' }).execute(); ``` +### `db.mutation.platformInfraInsertNodesAtPaths` + +platformInfraInsertNodesAtPaths + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | PlatformInfraInsertNodesAtPathsInput (required) | + +```typescript +const result = await db.mutation.platformInfraInsertNodesAtPaths({ input: '' }).execute(); +``` + +### `db.mutation.platformInfraSetAndCommit` + +platformInfraSetAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | PlatformInfraSetAndCommitInput (required) | + +```typescript +const result = await db.mutation.platformInfraSetAndCommit({ input: '' }).execute(); +``` + ### `db.mutation.platformInfraSetDataAtPath` platformInfraSetDataAtPath @@ -439,6 +469,21 @@ platformInfraSetDataAtPath const result = await db.mutation.platformInfraSetDataAtPath({ input: { data: '', path: '', root: '', sId: '' } }).execute(); ``` +### `db.mutation.platformInfraSetManyAndCommit` + +platformInfraSetManyAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | PlatformInfraSetManyAndCommitInput (required) | + +```typescript +const result = await db.mutation.platformInfraSetManyAndCommit({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }).execute(); +``` + ### `db.mutation.provisionBucket` Provision an S3 bucket for a logical bucket in the database. diff --git a/sdk/constructive-cli/src/infra/orm/input-types.ts b/sdk/constructive-cli/src/infra/orm/input-types.ts index 23e81e113d..0c0a58a8a6 100644 --- a/sdk/constructive-cli/src/infra/orm/input-types.ts +++ b/sdk/constructive-cli/src/infra/orm/input-types.ts @@ -1268,6 +1268,26 @@ export interface PlatformInfraInsertNodeAtPathInput { root?: string; sId?: string; } +export interface PlatformInfraInsertNodesAtPathsInput { + clientMutationId?: string; + datas?: Record[]; + kidsList?: Record; + ktreeList?: Record; + paths?: Record; + root?: string; + sId?: string; +} +export interface PlatformInfraSetAndCommitInput { + clientMutationId?: string; + data?: Record; + kids?: string[]; + ktree?: string[]; + message?: string; + path?: string[]; + refname?: string; + sId?: string; + storeId?: string; +} export interface PlatformInfraSetDataAtPathInput { clientMutationId?: string; data?: Record; @@ -1275,6 +1295,14 @@ export interface PlatformInfraSetDataAtPathInput { root?: string; sId?: string; } +export interface PlatformInfraSetManyAndCommitInput { + clientMutationId?: string; + entries?: Record; + message?: string; + refname?: string; + sId?: string; + storeId?: string; +} export interface ProvisionBucketInput { /** The logical bucket key (e.g., "public", "private") */ bucketKey: string; @@ -1472,6 +1500,28 @@ export type PlatformInfraInsertNodeAtPathPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface PlatformInfraInsertNodesAtPathsPayload { + clientMutationId?: string | null; + result?: string | null; +} +export type PlatformInfraInsertNodesAtPathsPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; +export interface PlatformInfraSetAndCommitPayload { + clientMutationId?: string | null; + platformInfraCommitEdge?: PlatformInfraCommitEdge | null; + result?: PlatformInfraCommit | null; +} +export type PlatformInfraSetAndCommitPayloadSelect = { + clientMutationId?: boolean; + platformInfraCommitEdge?: { + select: PlatformInfraCommitEdgeSelect; + }; + result?: { + select: PlatformInfraCommitSelect; + }; +}; export interface PlatformInfraSetDataAtPathPayload { clientMutationId?: string | null; result?: string | null; @@ -1480,6 +1530,20 @@ export type PlatformInfraSetDataAtPathPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface PlatformInfraSetManyAndCommitPayload { + clientMutationId?: string | null; + platformInfraCommitEdge?: PlatformInfraCommitEdge | null; + result?: PlatformInfraCommit | null; +} +export type PlatformInfraSetManyAndCommitPayloadSelect = { + clientMutationId?: boolean; + platformInfraCommitEdge?: { + select: PlatformInfraCommitEdgeSelect; + }; + result?: { + select: PlatformInfraCommitSelect; + }; +}; export interface ProvisionBucketPayload { /** The access type applied */ accessType: string; @@ -1907,6 +1971,18 @@ export type DeletePlatformNamespaceEventPayloadSelect = { select: PlatformNamespaceEventEdgeSelect; }; }; +/** A `PlatformInfraCommit` edge in the connection. */ +export interface PlatformInfraCommitEdge { + cursor?: string | null; + /** The `PlatformInfraCommit` at the end of the edge. */ + node?: PlatformInfraCommit | null; +} +export type PlatformInfraCommitEdgeSelect = { + cursor?: boolean; + node?: { + select: PlatformInfraCommitSelect; + }; +}; /** A `DbPreset` edge in the connection. */ export interface DbPresetEdge { cursor?: string | null; @@ -1943,18 +2019,6 @@ export type NamespaceEventEdgeSelect = { select: NamespaceEventSelect; }; }; -/** A `PlatformInfraCommit` edge in the connection. */ -export interface PlatformInfraCommitEdge { - cursor?: string | null; - /** The `PlatformInfraCommit` at the end of the edge. */ - node?: PlatformInfraCommit | null; -} -export type PlatformInfraCommitEdgeSelect = { - cursor?: boolean; - node?: { - select: PlatformInfraCommitSelect; - }; -}; /** A `PlatformInfraObject` edge in the connection. */ export interface PlatformInfraObjectEdge { cursor?: string | null; diff --git a/sdk/constructive-cli/src/infra/orm/mutation/index.ts b/sdk/constructive-cli/src/infra/orm/mutation/index.ts index f266633531..04353e5b5c 100644 --- a/sdk/constructive-cli/src/infra/orm/mutation/index.ts +++ b/sdk/constructive-cli/src/infra/orm/mutation/index.ts @@ -9,15 +9,24 @@ import type { InferSelectResult, StrictSelect } from '../select-types'; import type { PlatformInfraInitEmptyRepoInput, PlatformInfraInsertNodeAtPathInput, + PlatformInfraInsertNodesAtPathsInput, + PlatformInfraSetAndCommitInput, PlatformInfraSetDataAtPathInput, + PlatformInfraSetManyAndCommitInput, ProvisionBucketInput, PlatformInfraInitEmptyRepoPayload, PlatformInfraInsertNodeAtPathPayload, + PlatformInfraInsertNodesAtPathsPayload, + PlatformInfraSetAndCommitPayload, PlatformInfraSetDataAtPathPayload, + PlatformInfraSetManyAndCommitPayload, ProvisionBucketPayload, PlatformInfraInitEmptyRepoPayloadSelect, PlatformInfraInsertNodeAtPathPayloadSelect, + PlatformInfraInsertNodesAtPathsPayloadSelect, + PlatformInfraSetAndCommitPayloadSelect, PlatformInfraSetDataAtPathPayloadSelect, + PlatformInfraSetManyAndCommitPayloadSelect, ProvisionBucketPayloadSelect, } from '../input-types'; import { connectionFieldsMap } from '../input-types'; @@ -27,9 +36,18 @@ export interface PlatformInfraInitEmptyRepoVariables { export interface PlatformInfraInsertNodeAtPathVariables { input: PlatformInfraInsertNodeAtPathInput; } +export interface PlatformInfraInsertNodesAtPathsVariables { + input: PlatformInfraInsertNodesAtPathsInput; +} +export interface PlatformInfraSetAndCommitVariables { + input: PlatformInfraSetAndCommitInput; +} export interface PlatformInfraSetDataAtPathVariables { input: PlatformInfraSetDataAtPathInput; } +export interface PlatformInfraSetManyAndCommitVariables { + input: PlatformInfraSetManyAndCommitInput; +} /** * Variables for provisionBucket * Provision an S3 bucket for a logical bucket in the database. @@ -103,6 +121,67 @@ export function createMutationOperations(client: OrmClient) { 'PlatformInfraInsertNodeAtPathPayload' ), }), + platformInfraInsertNodesAtPaths: ( + args: PlatformInfraInsertNodesAtPathsVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + platformInfraInsertNodesAtPaths: InferSelectResult< + PlatformInfraInsertNodesAtPathsPayload, + S + > | null; + }>({ + client, + operation: 'mutation', + operationName: 'PlatformInfraInsertNodesAtPaths', + fieldName: 'platformInfraInsertNodesAtPaths', + ...buildCustomDocument( + 'mutation', + 'PlatformInfraInsertNodesAtPaths', + 'platformInfraInsertNodesAtPaths', + options.select, + args, + [ + { + name: 'input', + type: 'PlatformInfraInsertNodesAtPathsInput!', + }, + ], + connectionFieldsMap, + 'PlatformInfraInsertNodesAtPathsPayload' + ), + }), + platformInfraSetAndCommit: ( + args: PlatformInfraSetAndCommitVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + platformInfraSetAndCommit: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'PlatformInfraSetAndCommit', + fieldName: 'platformInfraSetAndCommit', + ...buildCustomDocument( + 'mutation', + 'PlatformInfraSetAndCommit', + 'platformInfraSetAndCommit', + options.select, + args, + [ + { + name: 'input', + type: 'PlatformInfraSetAndCommitInput!', + }, + ], + connectionFieldsMap, + 'PlatformInfraSetAndCommitPayload' + ), + }), platformInfraSetDataAtPath: ( args: PlatformInfraSetDataAtPathVariables, options: { @@ -132,6 +211,38 @@ export function createMutationOperations(client: OrmClient) { 'PlatformInfraSetDataAtPathPayload' ), }), + platformInfraSetManyAndCommit: ( + args: PlatformInfraSetManyAndCommitVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + platformInfraSetManyAndCommit: InferSelectResult< + PlatformInfraSetManyAndCommitPayload, + S + > | null; + }>({ + client, + operation: 'mutation', + operationName: 'PlatformInfraSetManyAndCommit', + fieldName: 'platformInfraSetManyAndCommit', + ...buildCustomDocument( + 'mutation', + 'PlatformInfraSetManyAndCommit', + 'platformInfraSetManyAndCommit', + options.select, + args, + [ + { + name: 'input', + type: 'PlatformInfraSetManyAndCommitInput!', + }, + ], + connectionFieldsMap, + 'PlatformInfraSetManyAndCommitPayload' + ), + }), provisionBucket: ( args: ProvisionBucketVariables, options: { diff --git a/sdk/constructive-cli/src/modules/README.md b/sdk/constructive-cli/src/modules/README.md index a33b67a1e3..828d82586d 100644 --- a/sdk/constructive-cli/src/modules/README.md +++ b/sdk/constructive-cli/src/modules/README.md @@ -8,9 +8,9 @@ ## Overview -- **Tables:** 76 -- **Custom queries:** 2 -- **Custom mutations:** 10 +- **Tables:** 78 +- **Custom queries:** 0 +- **Custom mutations:** 3 **Generators:** ORM, CLI diff --git a/sdk/constructive-cli/src/modules/cli/README.md b/sdk/constructive-cli/src/modules/cli/README.md index a3a3ac1bf9..8733fae18f 100644 --- a/sdk/constructive-cli/src/modules/cli/README.md +++ b/sdk/constructive-cli/src/modules/cli/README.md @@ -87,6 +87,7 @@ csdk auth set-token | `resource-module` | resourceModule CRUD operations | | `rls-module` | rlsModule CRUD operations | | `route-module` | routeModule CRUD operations | +| `scope-types-module` | scopeTypesModule CRUD operations | | `secure-table-provision` | secureTableProvision CRUD operations | | `session-secrets-module` | sessionSecretsModule CRUD operations | | `sessions-module` | sessionsModule CRUD operations | @@ -97,26 +98,18 @@ csdk auth set-token | `user-auth-module` | userAuthModule CRUD operations | | `user-credentials-module` | userCredentialsModule CRUD operations | | `user-settings-module` | userSettingsModule CRUD operations | +| `user-settings-security-module` | userSettingsSecurityModule CRUD operations | | `user-state-module` | userStateModule CRUD operations | | `users-module` | usersModule CRUD operations | | `webauthn-auth-module` | webauthnAuthModule CRUD operations | | `webauthn-credentials-module` | webauthnCredentialsModule CRUD operations | | `webhook-module` | webhookModule CRUD operations | -| `resolve-blueprint-field` | Resolves a field_name within a given table_id to a field_id. Throws if no match is found. Used by construct_blueprint to translate user-authored field names (e.g. "location") into field UUIDs for downstream provisioning procedures. table_id must already be resolved (via resolve_blueprint_table) before calling this. | -| `resolve-blueprint-table` | Resolves a table_name (with optional schema_name) to a table_id. Resolution order: (1) if schema_name provided, exact lookup via metaschema_public.schema.name + metaschema_public.table; (2) check local table_map (tables created in current blueprint); (3) search metaschema_public.table by name across all schemas; (4) if multiple matches, throw ambiguous error asking for schema_name; (5) if no match, throw not-found error. | | `construct-blueprint` | Executes a blueprint definition by delegating to provision_* procedures. Creates a blueprint_construction record to track the attempt. Eight phases: (0) entity_type_provision for each membership_type entry — provisions entity tables, membership modules, and security. When a prefix already exists (e.g., 'org'), the entry extends the existing entity type instead of creating a new one; if a storage[] key is present, it provisions entity-scoped storage for that type. (0.5) scope-based storage: each storage[] entry has an optional scope ('app' or 'org' only). App-scoped storage seeds buckets at migration time. Org-scoped storage resolves the org membership type, creates org_buckets/org_files with owner_id, and seeds buckets per-entity via an AFTER INSERT trigger on the users table. When function_module is installed, a private functions bucket is auto-injected into org-scoped or entity-scoped storage entries. (1) provision_table() for each table with nodes[], fields[], policies[], and grants (table-level indexes/fts/unique_constraints/check_constraints are deferred). After provisioning, optional smart_tags (jsonb object) on the table entry are applied via metaschema.append_table_smart_tags(), and optional smart_tags on individual field entries are applied via metaschema.append_field_smart_tags(). (2) provision_relation() for each relation, (3) provision_index() for top-level + deferred indexes, (4) provision_full_text_search() for top-level + deferred FTS, (5) provision_unique_constraint() for top-level + deferred unique constraints, (6) provision_check_constraint() for top-level + deferred check constraints, (7) seed achievements from definition.achievements[] — resolves events_module by entity_prefix and creates INSERT actions for levels, level_requirements, and achievement_rewards tables. Phase 0 entity tables are added to the table_map so subsequent phases can reference them by name. Table-level entries are deferred to phases 3-6 so they can reference columns created by relations in phase 2. Returns the construction record ID on success, NULL on failure. | | `copy-template-to-blueprint` | Creates a new blueprint by copying a template definition. Checks visibility: owners can always copy their own templates, others require public visibility. Increments the template copy_count. Returns the new blueprint ID. | | `provision-bucket` | Provision an S3 bucket for a logical bucket in the database. Reads the bucket config via RLS, then creates and configures the S3 bucket with the appropriate privacy policies, CORS rules, and lifecycle settings. | -| `provision-check-constraint` | Creates a check constraint on a table from a $type + data blueprint definition. Supports: CheckOneOf (enum validation via = ANY(ARRAY[...])), CheckGreaterThan (single-column > value or cross-column), CheckLessThan (single-column < value or cross-column), CheckNotEqual (cross-column inequality). Builds AST expressions via ast_helpers and inserts into metaschema_public.check_constraint. Graceful: skips if a constraint with the same name already exists. | -| `provision-full-text-search` | 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. | -| `provision-index` | 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. | -| `provision-relation` | 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). | -| `provision-spatial-relation` | Idempotent provisioner for metaschema_public.spatial_relation. Inserts a row declaring a spatial predicate between two geometry/geography columns (owner and target). Called from construct_blueprint when a relation entry has $type=RelationSpatial. Graceful: re-running with the same (source_table_id, name) returns the existing id without modifying the row. Operator whitelist and st_dwithin ↔ param_name pairing are enforced by the spatial_relation table CHECKs. Both fields must already exist — this is a metadata-only insert. | -| `provision-table` | Composable table provisioning: creates or finds a table, then creates fields (so Data* modules can reference them), applies N nodes (Data* modules), 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). | -| `provision-unique-constraint` | 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. | ## Infrastructure Commands @@ -369,16 +362,22 @@ CRUD operations for BillingProviderModule records. | `apiName` | String | | `billingCustomersTableId` | UUID | | `billingCustomersTableName` | String | +| `billingInvoicesTableId` | UUID | +| `billingInvoicesTableName` | String | | `billingPricesTableId` | UUID | | `billingPricesTableName` | String | | `billingProductsTableId` | UUID | | `billingProductsTableName` | String | +| `billingRefundsTableId` | UUID | +| `billingRefundsTableName` | String | | `billingSubscriptionsTableId` | UUID | | `billingSubscriptionsTableName` | String | | `billingWebhookEventsTableId` | UUID | | `billingWebhookEventsTableName` | String | | `databaseId` | UUID | | `id` | UUID | +| `listPendingUsageSyncFunction` | String | +| `markUsageSyncedFunction` | String | | `prefix` | String | | `pricesTableId` | UUID | | `privateApiName` | String | @@ -386,11 +385,13 @@ CRUD operations for BillingProviderModule records. | `processBillingEventFunction` | String | | `productsTableId` | UUID | | `provider` | String | +| `recordRefundFunction` | String | | `schemaId` | UUID | | `subscriptionsTableId` | UUID | +| `upsertInvoiceFunction` | String | **Required create fields:** `databaseId` -**Optional create fields (backend defaults):** `apiName`, `billingCustomersTableId`, `billingCustomersTableName`, `billingPricesTableId`, `billingPricesTableName`, `billingProductsTableId`, `billingProductsTableName`, `billingSubscriptionsTableId`, `billingSubscriptionsTableName`, `billingWebhookEventsTableId`, `billingWebhookEventsTableName`, `prefix`, `pricesTableId`, `privateApiName`, `privateSchemaId`, `processBillingEventFunction`, `productsTableId`, `provider`, `schemaId`, `subscriptionsTableId` +**Optional create fields (backend defaults):** `apiName`, `billingCustomersTableId`, `billingCustomersTableName`, `billingInvoicesTableId`, `billingInvoicesTableName`, `billingPricesTableId`, `billingPricesTableName`, `billingProductsTableId`, `billingProductsTableName`, `billingRefundsTableId`, `billingRefundsTableName`, `billingSubscriptionsTableId`, `billingSubscriptionsTableName`, `billingWebhookEventsTableId`, `billingWebhookEventsTableName`, `listPendingUsageSyncFunction`, `markUsageSyncedFunction`, `prefix`, `pricesTableId`, `privateApiName`, `privateSchemaId`, `processBillingEventFunction`, `productsTableId`, `provider`, `recordRefundFunction`, `schemaId`, `subscriptionsTableId`, `upsertInvoiceFunction` ### `blueprint` @@ -520,6 +521,8 @@ CRUD operations for CatalogModule records. | `apisTableName` | String | | `appsTableId` | UUID | | `appsTableName` | String | +| `bindingsTableId` | UUID | +| `bindingsTableName` | String | | `bucketsTableId` | UUID | | `bucketsTableName` | String | | `databaseId` | UUID | @@ -556,7 +559,7 @@ CRUD operations for CatalogModule records. | `sitesWebConfigTableName` | String | **Required create fields:** `databaseId`, `scope` -**Optional create fields (backend defaults):** `apiName`, `apisTableId`, `apisTableName`, `appsTableId`, `appsTableName`, `bucketsTableId`, `bucketsTableName`, `defaultPermissions`, `domainsTableId`, `domainsTableName`, `entityTableId`, `functionsTableId`, `functionsTableName`, `namespacesTableId`, `namespacesTableName`, `policies`, `privateApiName`, `provisions`, `publicSchemaName`, `resourceDefinitionsTableId`, `resourceDefinitionsTableName`, `resourceInstallationsTableId`, `resourceInstallationsTableName`, `resourcesTableId`, `resourcesTableName`, `schemaId`, `sitesAppLinksTableId`, `sitesAppLinksTableName`, `sitesDeepLinksTableId`, `sitesDeepLinksTableName`, `sitesErrorPagesTableId`, `sitesErrorPagesTableName`, `sitesTableId`, `sitesTableName`, `sitesWebConfigTableId`, `sitesWebConfigTableName` +**Optional create fields (backend defaults):** `apiName`, `apisTableId`, `apisTableName`, `appsTableId`, `appsTableName`, `bindingsTableId`, `bindingsTableName`, `bucketsTableId`, `bucketsTableName`, `defaultPermissions`, `domainsTableId`, `domainsTableName`, `entityTableId`, `functionsTableId`, `functionsTableName`, `namespacesTableId`, `namespacesTableName`, `policies`, `privateApiName`, `provisions`, `publicSchemaName`, `resourceDefinitionsTableId`, `resourceDefinitionsTableName`, `resourceInstallationsTableId`, `resourceInstallationsTableName`, `resourcesTableId`, `resourcesTableName`, `schemaId`, `sitesAppLinksTableId`, `sitesAppLinksTableName`, `sitesDeepLinksTableId`, `sitesDeepLinksTableName`, `sitesErrorPagesTableId`, `sitesErrorPagesTableName`, `sitesTableId`, `sitesTableName`, `sitesWebConfigTableId`, `sitesWebConfigTableName` ### `compute-log-module` @@ -2594,8 +2597,10 @@ CRUD operations for RouteModule records. | Field | Type | |-------|------| | `apiName` | String | +| `appLinksFunctionName` | String | | `catalogModuleId` | UUID | | `databaseId` | UUID | +| `deepLinkFunctionName` | String | | `defaultPermissions` | String | | `domainModuleId` | UUID | | `entityField` | String | @@ -2619,7 +2624,33 @@ CRUD operations for RouteModule records. | `scope` | String | **Required create fields:** `databaseId`, `scope` -**Optional create fields (backend defaults):** `apiName`, `catalogModuleId`, `defaultPermissions`, `domainModuleId`, `entityField`, `entityTableId`, `hostnameBindingsTableId`, `hostnameBindingsTableName`, `policies`, `prefix`, `privateApiName`, `privateSchemaId`, `privateSchemaName`, `provisions`, `publicSchemaName`, `resolverFunctionName`, `routeBindingsTableId`, `routeBindingsTableName`, `routesTableId`, `routesTableName`, `schemaId` +**Optional create fields (backend defaults):** `apiName`, `appLinksFunctionName`, `catalogModuleId`, `deepLinkFunctionName`, `defaultPermissions`, `domainModuleId`, `entityField`, `entityTableId`, `hostnameBindingsTableId`, `hostnameBindingsTableName`, `policies`, `prefix`, `privateApiName`, `privateSchemaId`, `privateSchemaName`, `provisions`, `publicSchemaName`, `resolverFunctionName`, `routeBindingsTableId`, `routeBindingsTableName`, `routesTableId`, `routesTableName`, `schemaId` + +### `scope-types-module` + +CRUD operations for ScopeTypesModule records. + +| Subcommand | Description | +|------------|-------------| +| `list` | List all scopeTypesModule records | +| `find-first` | Find first matching scopeTypesModule record | +| `get` | Get a scopeTypesModule by id | +| `create` | Create a new scopeTypesModule | +| `update` | Update an existing scopeTypesModule | +| `delete` | Delete a scopeTypesModule | + +**Fields:** + +| Field | Type | +|-------|------| +| `databaseId` | UUID | +| `id` | UUID | +| `privateSchemaName` | String | +| `schemaId` | UUID | +| `scopeTypesTableId` | UUID | + +**Required create fields:** `databaseId` +**Optional create fields (backend defaults):** `privateSchemaName`, `schemaId`, `scopeTypesTableId` ### `secure-table-provision` @@ -3014,6 +3045,34 @@ CRUD operations for UserSettingsModule records. **Required create fields:** `databaseId` **Optional create fields (backend defaults):** `apiName`, `ownerTableId`, `schemaId`, `tableId`, `tableName` +### `user-settings-security-module` + +CRUD operations for UserSettingsSecurityModule records. + +| Subcommand | Description | +|------------|-------------| +| `list` | List all userSettingsSecurityModule records | +| `find-first` | Find first matching userSettingsSecurityModule record | +| `get` | Get a userSettingsSecurityModule by id | +| `create` | Create a new userSettingsSecurityModule | +| `update` | Update an existing userSettingsSecurityModule | +| `delete` | Delete a userSettingsSecurityModule | + +**Fields:** + +| Field | Type | +|-------|------| +| `apiName` | String | +| `databaseId` | UUID | +| `id` | UUID | +| `ownerTableId` | UUID | +| `schemaId` | UUID | +| `tableId` | UUID | +| `tableName` | String | + +**Required create fields:** `databaseId` +**Optional create fields (backend defaults):** `apiName`, `ownerTableId`, `schemaId`, `tableId`, `tableName` + ### `user-state-module` CRUD operations for UserStateModule records. @@ -3184,34 +3243,6 @@ CRUD operations for WebhookModule records. ## Custom Operations -### `resolve-blueprint-field` - -Resolves a field_name within a given table_id to a field_id. Throws if no match is found. Used by construct_blueprint to translate user-authored field names (e.g. "location") into field UUIDs for downstream provisioning procedures. table_id must already be resolved (via resolve_blueprint_table) before calling this. - -- **Type:** query -- **Arguments:** - - | Argument | Type | - |----------|------| - | `--databaseId` | UUID | - | `--fieldName` | String | - | `--tableId` | UUID | - -### `resolve-blueprint-table` - -Resolves a table_name (with optional schema_name) to a table_id. Resolution order: (1) if schema_name provided, exact lookup via metaschema_public.schema.name + metaschema_public.table; (2) check local table_map (tables created in current blueprint); (3) search metaschema_public.table by name across all schemas; (4) if multiple matches, throw ambiguous error asking for schema_name; (5) if no match, throw not-found error. - -- **Type:** query -- **Arguments:** - - | Argument | Type | - |----------|------| - | `--databaseId` | UUID | - | `--defaultSchemaId` | UUID | - | `--schemaName` | String | - | `--tableMap` | JSON | - | `--tableName` | String | - ### `construct-blueprint` Executes a blueprint definition by delegating to provision_* procedures. Creates a blueprint_construction record to track the attempt. Eight phases: (0) entity_type_provision for each membership_type entry — provisions entity tables, membership modules, and security. When a prefix already exists (e.g., 'org'), the entry extends the existing entity type instead of creating a new one; if a storage[] key is present, it provisions entity-scoped storage for that type. (0.5) scope-based storage: each storage[] entry has an optional scope ('app' or 'org' only). App-scoped storage seeds buckets at migration time. Org-scoped storage resolves the org membership type, creates org_buckets/org_files with owner_id, and seeds buckets per-entity via an AFTER INSERT trigger on the users table. When function_module is installed, a private functions bucket is auto-injected into org-scoped or entity-scoped storage entries. (1) provision_table() for each table with nodes[], fields[], policies[], and grants (table-level indexes/fts/unique_constraints/check_constraints are deferred). After provisioning, optional smart_tags (jsonb object) on the table entry are applied via metaschema.append_table_smart_tags(), and optional smart_tags on individual field entries are applied via metaschema.append_field_smart_tags(). (2) provision_relation() for each relation, (3) provision_index() for top-level + deferred indexes, (4) provision_full_text_search() for top-level + deferred FTS, (5) provision_unique_constraint() for top-level + deferred unique constraints, (6) provision_check_constraint() for top-level + deferred check constraints, (7) seed achievements from definition.achievements[] — resolves events_module by entity_prefix and creates INSERT actions for levels, level_requirements, and achievement_rewards tables. Phase 0 entity tables are added to the table_map so subsequent phases can reference them by name. Table-level entries are deferred to phases 3-6 so they can reference columns created by relations in phase 2. Returns the construction record ID on success, NULL on failure. @@ -3256,135 +3287,6 @@ and lifecycle settings. | `--input.bucketKey` | String (required) | | `--input.ownerId` | UUID | -### `provision-check-constraint` - -Creates a check constraint on a table from a $type + data blueprint definition. Supports: CheckOneOf (enum validation via = ANY(ARRAY[...])), CheckGreaterThan (single-column > value or cross-column), CheckLessThan (single-column < value or cross-column), CheckNotEqual (cross-column inequality). Builds AST expressions via ast_helpers and inserts into metaschema_public.check_constraint. Graceful: skips if a constraint with the same name already exists. - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `--input.clientMutationId` | String | - | `--input.databaseId` | UUID | - | `--input.definition` | JSON | - | `--input.tableId` | UUID | - -### `provision-full-text-search` - -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. - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `--input.clientMutationId` | String | - | `--input.databaseId` | UUID | - | `--input.definition` | JSON | - | `--input.tableId` | UUID | - -### `provision-index` - -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. - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `--input.clientMutationId` | String | - | `--input.databaseId` | UUID | - | `--input.definition` | JSON | - | `--input.tableId` | UUID | - -### `provision-relation` - -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). - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `--input.apiRequired` | Boolean | - | `--input.clientMutationId` | String | - | `--input.createIndex` | Boolean | - | `--input.databaseId` | UUID | - | `--input.deleteAction` | String | - | `--input.exposeInApi` | Boolean | - | `--input.fieldName` | String | - | `--input.grants` | JSON | - | `--input.isRequired` | Boolean | - | `--input.junctionSchemaId` | UUID | - | `--input.junctionTableId` | UUID | - | `--input.junctionTableName` | String | - | `--input.nodes` | JSON | - | `--input.policies` | JSON | - | `--input.relationType` | String | - | `--input.sourceFieldName` | String | - | `--input.sourceTableId` | UUID | - | `--input.targetFieldName` | String | - | `--input.targetTableId` | UUID | - | `--input.useCompositeKey` | Boolean | - -### `provision-spatial-relation` - -Idempotent provisioner for metaschema_public.spatial_relation. Inserts a row declaring a spatial predicate between two geometry/geography columns (owner and target). Called from construct_blueprint when a relation entry has $type=RelationSpatial. Graceful: re-running with the same (source_table_id, name) returns the existing id without modifying the row. Operator whitelist and st_dwithin ↔ param_name pairing are enforced by the spatial_relation table CHECKs. Both fields must already exist — this is a metadata-only insert. - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `--input.clientMutationId` | String | - | `--input.databaseId` | UUID | - | `--input.name` | String | - | `--input.operator` | String | - | `--input.paramName` | String | - | `--input.sourceFieldId` | UUID | - | `--input.sourceTableId` | UUID | - | `--input.targetFieldId` | UUID | - | `--input.targetTableId` | UUID | - -### `provision-table` - -Composable table provisioning: creates or finds a table, then creates fields (so Data* modules can reference them), applies N nodes (Data* modules), 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). - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `--input.clientMutationId` | String | - | `--input.databaseId` | UUID | - | `--input.description` | String | - | `--input.fields` | JSON | - | `--input.fullTextSearches` | JSON | - | `--input.grants` | JSON | - | `--input.indexes` | JSON | - | `--input.nodes` | JSON | - | `--input.policies` | JSON | - | `--input.schemaId` | UUID | - | `--input.tableId` | UUID | - | `--input.tableName` | String | - | `--input.uniqueConstraints` | JSON | - | `--input.useRls` | Boolean | - -### `provision-unique-constraint` - -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. - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `--input.clientMutationId` | String | - | `--input.databaseId` | UUID | - | `--input.definition` | JSON | - | `--input.tableId` | UUID | - ## Output All commands output JSON to stdout. Pipe to `jq` for formatting: diff --git a/sdk/constructive-cli/src/modules/cli/commands.ts b/sdk/constructive-cli/src/modules/cli/commands.ts index bbf4123da1..19aa42b9b4 100644 --- a/sdk/constructive-cli/src/modules/cli/commands.ts +++ b/sdk/constructive-cli/src/modules/cli/commands.ts @@ -67,6 +67,7 @@ import relationProvisionCmd from './commands/relation-provision'; import resourceModuleCmd from './commands/resource-module'; import rlsModuleCmd from './commands/rls-module'; import routeModuleCmd from './commands/route-module'; +import scopeTypesModuleCmd from './commands/scope-types-module'; import secureTableProvisionCmd from './commands/secure-table-provision'; import sessionSecretsModuleCmd from './commands/session-secrets-module'; import sessionsModuleCmd from './commands/sessions-module'; @@ -77,23 +78,15 @@ import transferLogModuleCmd from './commands/transfer-log-module'; import userAuthModuleCmd from './commands/user-auth-module'; import userCredentialsModuleCmd from './commands/user-credentials-module'; import userSettingsModuleCmd from './commands/user-settings-module'; +import userSettingsSecurityModuleCmd from './commands/user-settings-security-module'; import userStateModuleCmd from './commands/user-state-module'; import usersModuleCmd from './commands/users-module'; import webauthnAuthModuleCmd from './commands/webauthn-auth-module'; import webauthnCredentialsModuleCmd from './commands/webauthn-credentials-module'; import webhookModuleCmd from './commands/webhook-module'; -import resolveBlueprintFieldCmd from './commands/resolve-blueprint-field'; -import resolveBlueprintTableCmd from './commands/resolve-blueprint-table'; import constructBlueprintCmd from './commands/construct-blueprint'; import copyTemplateToBlueprintCmd from './commands/copy-template-to-blueprint'; import provisionBucketCmd from './commands/provision-bucket'; -import provisionCheckConstraintCmd from './commands/provision-check-constraint'; -import provisionFullTextSearchCmd from './commands/provision-full-text-search'; -import provisionIndexCmd from './commands/provision-index'; -import provisionRelationCmd from './commands/provision-relation'; -import provisionSpatialRelationCmd from './commands/provision-spatial-relation'; -import provisionTableCmd from './commands/provision-table'; -import provisionUniqueConstraintCmd from './commands/provision-unique-constraint'; const createCommandMap: () => Record< string, ( @@ -165,6 +158,7 @@ const createCommandMap: () => Record< 'resource-module': resourceModuleCmd, 'rls-module': rlsModuleCmd, 'route-module': routeModuleCmd, + 'scope-types-module': scopeTypesModuleCmd, 'secure-table-provision': secureTableProvisionCmd, 'session-secrets-module': sessionSecretsModuleCmd, 'sessions-module': sessionsModuleCmd, @@ -175,26 +169,18 @@ const createCommandMap: () => Record< 'user-auth-module': userAuthModuleCmd, 'user-credentials-module': userCredentialsModuleCmd, 'user-settings-module': userSettingsModuleCmd, + 'user-settings-security-module': userSettingsSecurityModuleCmd, 'user-state-module': userStateModuleCmd, 'users-module': usersModuleCmd, 'webauthn-auth-module': webauthnAuthModuleCmd, 'webauthn-credentials-module': webauthnCredentialsModuleCmd, 'webhook-module': webhookModuleCmd, - 'resolve-blueprint-field': resolveBlueprintFieldCmd, - 'resolve-blueprint-table': resolveBlueprintTableCmd, 'construct-blueprint': constructBlueprintCmd, 'copy-template-to-blueprint': copyTemplateToBlueprintCmd, 'provision-bucket': provisionBucketCmd, - 'provision-check-constraint': provisionCheckConstraintCmd, - 'provision-full-text-search': provisionFullTextSearchCmd, - 'provision-index': provisionIndexCmd, - 'provision-relation': provisionRelationCmd, - 'provision-spatial-relation': provisionSpatialRelationCmd, - 'provision-table': provisionTableCmd, - 'provision-unique-constraint': provisionUniqueConstraintCmd, }); const usage = - "\ncsdk \n\nCommands:\n context Manage API contexts\n auth Manage authentication\n agent-module agentModule CRUD operations\n api-surface-module apiSurfaceModule CRUD operations\n app-module appModule CRUD operations\n billing-module billingModule CRUD operations\n billing-provider-module billingProviderModule CRUD operations\n blueprint blueprint CRUD operations\n blueprint-construction blueprintConstruction CRUD operations\n blueprint-template blueprintTemplate CRUD operations\n catalog-module catalogModule CRUD operations\n compute-log-module computeLogModule CRUD operations\n config-secrets-user-module configSecretsUserModule CRUD operations\n connected-accounts-module connectedAccountsModule CRUD operations\n crypto-addresses-module cryptoAddressesModule CRUD operations\n crypto-auth-module cryptoAuthModule CRUD operations\n database-provision-module databaseProvisionModule CRUD operations\n database-settings-module databaseSettingsModule CRUD operations\n db-pool-config dbPoolConfig CRUD operations\n db-pool dbPool CRUD operations\n db-preset-module dbPresetModule CRUD operations\n db-usage-module dbUsageModule CRUD operations\n default-ids-module defaultIdsModule CRUD operations\n denormalized-table-field denormalizedTableField CRUD operations\n devices-module devicesModule CRUD operations\n domain-module domainModule CRUD operations\n emails-module emailsModule CRUD operations\n entity-type-provision entityTypeProvision CRUD operations\n events-module eventsModule CRUD operations\n function-deployment-module functionDeploymentModule CRUD operations\n function-invocation-module functionInvocationModule CRUD operations\n function-module functionModule CRUD operations\n graph-execution-module graphExecutionModule CRUD operations\n graph-module graphModule CRUD operations\n hierarchy-module hierarchyModule CRUD operations\n http-route-module httpRouteModule CRUD operations\n i-18-n-module i18NModule CRUD operations\n identity-providers-module identityProvidersModule CRUD operations\n inference-log-module inferenceLogModule CRUD operations\n infra-config-module infraConfigModule CRUD operations\n infra-secrets-module infraSecretsModule CRUD operations\n integration-providers-module integrationProvidersModule CRUD operations\n internal-secrets-module internalSecretsModule CRUD operations\n invites-module invitesModule CRUD operations\n limits-module limitsModule CRUD operations\n membership-types-module membershipTypesModule CRUD operations\n memberships-module membershipsModule CRUD operations\n merkle-store-module merkleStoreModule CRUD operations\n namespace-module namespaceModule CRUD operations\n notifications-module notificationsModule CRUD operations\n pages-module pagesModule CRUD operations\n permissions-module permissionsModule CRUD operations\n phone-numbers-module phoneNumbersModule CRUD operations\n plans-module plansModule CRUD operations\n principal-auth-module principalAuthModule CRUD operations\n profiles-module profilesModule CRUD operations\n rate-limit-meters-module rateLimitMetersModule CRUD operations\n rate-limits-module rateLimitsModule CRUD operations\n realtime-module realtimeModule CRUD operations\n relation-provision relationProvision CRUD operations\n resource-module resourceModule CRUD operations\n rls-module rlsModule CRUD operations\n route-module routeModule CRUD operations\n secure-table-provision secureTableProvision CRUD operations\n session-secrets-module sessionSecretsModule CRUD operations\n sessions-module sessionsModule CRUD operations\n site-surface-module siteSurfaceModule CRUD operations\n storage-log-module storageLogModule CRUD operations\n storage-module storageModule CRUD operations\n transfer-log-module transferLogModule CRUD operations\n user-auth-module userAuthModule CRUD operations\n user-credentials-module userCredentialsModule CRUD operations\n user-settings-module userSettingsModule CRUD operations\n user-state-module userStateModule CRUD operations\n users-module usersModule CRUD operations\n webauthn-auth-module webauthnAuthModule CRUD operations\n webauthn-credentials-module webauthnCredentialsModule CRUD operations\n webhook-module webhookModule CRUD operations\n resolve-blueprint-field Resolves a field_name within a given table_id to a field_id. Throws if no match is found. Used by construct_blueprint to translate user-authored field names (e.g. \"location\") into field UUIDs for downstream provisioning procedures. table_id must already be resolved (via resolve_blueprint_table) before calling this.\n resolve-blueprint-table Resolves a table_name (with optional schema_name) to a table_id. Resolution order: (1) if schema_name provided, exact lookup via metaschema_public.schema.name + metaschema_public.table; (2) check local table_map (tables created in current blueprint); (3) search metaschema_public.table by name across all schemas; (4) if multiple matches, throw ambiguous error asking for schema_name; (5) if no match, throw not-found error.\n construct-blueprint Executes a blueprint definition by delegating to provision_* procedures. Creates a blueprint_construction record to track the attempt. Eight phases: (0) entity_type_provision for each membership_type entry \u2014 provisions entity tables, membership modules, and security. When a prefix already exists (e.g., 'org'), the entry extends the existing entity type instead of creating a new one; if a storage[] key is present, it provisions entity-scoped storage for that type. (0.5) scope-based storage: each storage[] entry has an optional scope ('app' or 'org' only). App-scoped storage seeds buckets at migration time. Org-scoped storage resolves the org membership type, creates org_buckets/org_files with owner_id, and seeds buckets per-entity via an AFTER INSERT trigger on the users table. When function_module is installed, a private functions bucket is auto-injected into org-scoped or entity-scoped storage entries. (1) provision_table() for each table with nodes[], fields[], policies[], and grants (table-level indexes/fts/unique_constraints/check_constraints are deferred). After provisioning, optional smart_tags (jsonb object) on the table entry are applied via metaschema.append_table_smart_tags(), and optional smart_tags on individual field entries are applied via metaschema.append_field_smart_tags(). (2) provision_relation() for each relation, (3) provision_index() for top-level + deferred indexes, (4) provision_full_text_search() for top-level + deferred FTS, (5) provision_unique_constraint() for top-level + deferred unique constraints, (6) provision_check_constraint() for top-level + deferred check constraints, (7) seed achievements from definition.achievements[] \u2014 resolves events_module by entity_prefix and creates INSERT actions for levels, level_requirements, and achievement_rewards tables. Phase 0 entity tables are added to the table_map so subsequent phases can reference them by name. Table-level entries are deferred to phases 3-6 so they can reference columns created by relations in phase 2. Returns the construction record ID on success, NULL on failure.\n copy-template-to-blueprint Creates a new blueprint by copying a template definition. Checks visibility: owners can always copy their own templates, others require public visibility. Increments the template copy_count. Returns the new blueprint ID.\n provision-bucket Provision an S3 bucket for a logical bucket in the database.\nReads the bucket config via RLS, then creates and configures\nthe S3 bucket with the appropriate privacy policies, CORS rules,\nand lifecycle settings.\n provision-check-constraint Creates a check constraint on a table from a $type + data blueprint definition. Supports: CheckOneOf (enum validation via = ANY(ARRAY[...])), CheckGreaterThan (single-column > value or cross-column), CheckLessThan (single-column < value or cross-column), CheckNotEqual (cross-column inequality). Builds AST expressions via ast_helpers and inserts into metaschema_public.check_constraint. Graceful: skips if a constraint with the same name already exists.\n provision-full-text-search 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.\n provision-index 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.\n provision-relation 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).\n provision-spatial-relation Idempotent provisioner for metaschema_public.spatial_relation. Inserts a row declaring a spatial predicate between two geometry/geography columns (owner and target). Called from construct_blueprint when a relation entry has $type=RelationSpatial. Graceful: re-running with the same (source_table_id, name) returns the existing id without modifying the row. Operator whitelist and st_dwithin \u2194 param_name pairing are enforced by the spatial_relation table CHECKs. Both fields must already exist \u2014 this is a metadata-only insert.\n provision-table Composable table provisioning: creates or finds a table, then creates fields (so Data* modules can reference them), applies N nodes (Data* modules), 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).\n provision-unique-constraint 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.\n\n --help, -h Show this help message\n --version, -v Show version\n"; + "\ncsdk \n\nCommands:\n context Manage API contexts\n auth Manage authentication\n agent-module agentModule CRUD operations\n api-surface-module apiSurfaceModule CRUD operations\n app-module appModule CRUD operations\n billing-module billingModule CRUD operations\n billing-provider-module billingProviderModule CRUD operations\n blueprint blueprint CRUD operations\n blueprint-construction blueprintConstruction CRUD operations\n blueprint-template blueprintTemplate CRUD operations\n catalog-module catalogModule CRUD operations\n compute-log-module computeLogModule CRUD operations\n config-secrets-user-module configSecretsUserModule CRUD operations\n connected-accounts-module connectedAccountsModule CRUD operations\n crypto-addresses-module cryptoAddressesModule CRUD operations\n crypto-auth-module cryptoAuthModule CRUD operations\n database-provision-module databaseProvisionModule CRUD operations\n database-settings-module databaseSettingsModule CRUD operations\n db-pool-config dbPoolConfig CRUD operations\n db-pool dbPool CRUD operations\n db-preset-module dbPresetModule CRUD operations\n db-usage-module dbUsageModule CRUD operations\n default-ids-module defaultIdsModule CRUD operations\n denormalized-table-field denormalizedTableField CRUD operations\n devices-module devicesModule CRUD operations\n domain-module domainModule CRUD operations\n emails-module emailsModule CRUD operations\n entity-type-provision entityTypeProvision CRUD operations\n events-module eventsModule CRUD operations\n function-deployment-module functionDeploymentModule CRUD operations\n function-invocation-module functionInvocationModule CRUD operations\n function-module functionModule CRUD operations\n graph-execution-module graphExecutionModule CRUD operations\n graph-module graphModule CRUD operations\n hierarchy-module hierarchyModule CRUD operations\n http-route-module httpRouteModule CRUD operations\n i-18-n-module i18NModule CRUD operations\n identity-providers-module identityProvidersModule CRUD operations\n inference-log-module inferenceLogModule CRUD operations\n infra-config-module infraConfigModule CRUD operations\n infra-secrets-module infraSecretsModule CRUD operations\n integration-providers-module integrationProvidersModule CRUD operations\n internal-secrets-module internalSecretsModule CRUD operations\n invites-module invitesModule CRUD operations\n limits-module limitsModule CRUD operations\n membership-types-module membershipTypesModule CRUD operations\n memberships-module membershipsModule CRUD operations\n merkle-store-module merkleStoreModule CRUD operations\n namespace-module namespaceModule CRUD operations\n notifications-module notificationsModule CRUD operations\n pages-module pagesModule CRUD operations\n permissions-module permissionsModule CRUD operations\n phone-numbers-module phoneNumbersModule CRUD operations\n plans-module plansModule CRUD operations\n principal-auth-module principalAuthModule CRUD operations\n profiles-module profilesModule CRUD operations\n rate-limit-meters-module rateLimitMetersModule CRUD operations\n rate-limits-module rateLimitsModule CRUD operations\n realtime-module realtimeModule CRUD operations\n relation-provision relationProvision CRUD operations\n resource-module resourceModule CRUD operations\n rls-module rlsModule CRUD operations\n route-module routeModule CRUD operations\n scope-types-module scopeTypesModule CRUD operations\n secure-table-provision secureTableProvision CRUD operations\n session-secrets-module sessionSecretsModule CRUD operations\n sessions-module sessionsModule CRUD operations\n site-surface-module siteSurfaceModule CRUD operations\n storage-log-module storageLogModule CRUD operations\n storage-module storageModule CRUD operations\n transfer-log-module transferLogModule CRUD operations\n user-auth-module userAuthModule CRUD operations\n user-credentials-module userCredentialsModule CRUD operations\n user-settings-module userSettingsModule CRUD operations\n user-settings-security-module userSettingsSecurityModule CRUD operations\n user-state-module userStateModule CRUD operations\n users-module usersModule CRUD operations\n webauthn-auth-module webauthnAuthModule CRUD operations\n webauthn-credentials-module webauthnCredentialsModule CRUD operations\n webhook-module webhookModule CRUD operations\n construct-blueprint Executes a blueprint definition by delegating to provision_* procedures. Creates a blueprint_construction record to track the attempt. Eight phases: (0) entity_type_provision for each membership_type entry \u2014 provisions entity tables, membership modules, and security. When a prefix already exists (e.g., 'org'), the entry extends the existing entity type instead of creating a new one; if a storage[] key is present, it provisions entity-scoped storage for that type. (0.5) scope-based storage: each storage[] entry has an optional scope ('app' or 'org' only). App-scoped storage seeds buckets at migration time. Org-scoped storage resolves the org membership type, creates org_buckets/org_files with owner_id, and seeds buckets per-entity via an AFTER INSERT trigger on the users table. When function_module is installed, a private functions bucket is auto-injected into org-scoped or entity-scoped storage entries. (1) provision_table() for each table with nodes[], fields[], policies[], and grants (table-level indexes/fts/unique_constraints/check_constraints are deferred). After provisioning, optional smart_tags (jsonb object) on the table entry are applied via metaschema.append_table_smart_tags(), and optional smart_tags on individual field entries are applied via metaschema.append_field_smart_tags(). (2) provision_relation() for each relation, (3) provision_index() for top-level + deferred indexes, (4) provision_full_text_search() for top-level + deferred FTS, (5) provision_unique_constraint() for top-level + deferred unique constraints, (6) provision_check_constraint() for top-level + deferred check constraints, (7) seed achievements from definition.achievements[] \u2014 resolves events_module by entity_prefix and creates INSERT actions for levels, level_requirements, and achievement_rewards tables. Phase 0 entity tables are added to the table_map so subsequent phases can reference them by name. Table-level entries are deferred to phases 3-6 so they can reference columns created by relations in phase 2. Returns the construction record ID on success, NULL on failure.\n copy-template-to-blueprint Creates a new blueprint by copying a template definition. Checks visibility: owners can always copy their own templates, others require public visibility. Increments the template copy_count. Returns the new blueprint ID.\n provision-bucket Provision an S3 bucket for a logical bucket in the database.\nReads the bucket config via RLS, then creates and configures\nthe S3 bucket with the appropriate privacy policies, CORS rules,\nand lifecycle settings.\n\n --help, -h Show this help message\n --version, -v Show version\n"; export const commands = async ( argv: Partial>, prompter: Inquirerer, diff --git a/sdk/constructive-cli/src/modules/cli/commands/billing-provider-module.ts b/sdk/constructive-cli/src/modules/cli/commands/billing-provider-module.ts index 74e9a0d3f1..4a0a7c67c6 100644 --- a/sdk/constructive-cli/src/modules/cli/commands/billing-provider-module.ts +++ b/sdk/constructive-cli/src/modules/cli/commands/billing-provider-module.ts @@ -19,16 +19,22 @@ const fieldSchema: FieldSchema = { apiName: 'string', billingCustomersTableId: 'uuid', billingCustomersTableName: 'string', + billingInvoicesTableId: 'uuid', + billingInvoicesTableName: 'string', billingPricesTableId: 'uuid', billingPricesTableName: 'string', billingProductsTableId: 'uuid', billingProductsTableName: 'string', + billingRefundsTableId: 'uuid', + billingRefundsTableName: 'string', billingSubscriptionsTableId: 'uuid', billingSubscriptionsTableName: 'string', billingWebhookEventsTableId: 'uuid', billingWebhookEventsTableName: 'string', databaseId: 'uuid', id: 'uuid', + listPendingUsageSyncFunction: 'string', + markUsageSyncedFunction: 'string', prefix: 'string', pricesTableId: 'uuid', privateApiName: 'string', @@ -36,8 +42,10 @@ const fieldSchema: FieldSchema = { processBillingEventFunction: 'string', productsTableId: 'uuid', provider: 'string', + recordRefundFunction: 'string', schemaId: 'uuid', subscriptionsTableId: 'uuid', + upsertInvoiceFunction: 'string', }; const usage = '\nbilling-provider-module \n\nCommands:\n list List billingProviderModule records\n find-first Find first matching billingProviderModule record\n get Get a billingProviderModule by ID\n create Create a new billingProviderModule\n update Update an existing billingProviderModule\n delete Delete a billingProviderModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; @@ -93,16 +101,22 @@ async function handleList(argv: Partial>, _prompter: Inq apiName: true, billingCustomersTableId: true, billingCustomersTableName: true, + billingInvoicesTableId: true, + billingInvoicesTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, + billingRefundsTableId: true, + billingRefundsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, databaseId: true, id: true, + listPendingUsageSyncFunction: true, + markUsageSyncedFunction: true, prefix: true, pricesTableId: true, privateApiName: true, @@ -110,8 +124,10 @@ async function handleList(argv: Partial>, _prompter: Inq processBillingEventFunction: true, productsTableId: true, provider: true, + recordRefundFunction: true, schemaId: true, subscriptionsTableId: true, + upsertInvoiceFunction: true, }; const findManyArgs = parseFindManyArgs< FindManyArgs< @@ -139,16 +155,22 @@ async function handleFindFirst(argv: Partial>, _prompter apiName: true, billingCustomersTableId: true, billingCustomersTableName: true, + billingInvoicesTableId: true, + billingInvoicesTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, + billingRefundsTableId: true, + billingRefundsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, databaseId: true, id: true, + listPendingUsageSyncFunction: true, + markUsageSyncedFunction: true, prefix: true, pricesTableId: true, privateApiName: true, @@ -156,8 +178,10 @@ async function handleFindFirst(argv: Partial>, _prompter processBillingEventFunction: true, productsTableId: true, provider: true, + recordRefundFunction: true, schemaId: true, subscriptionsTableId: true, + upsertInvoiceFunction: true, }; const findFirstArgs = parseFindFirstArgs< FindFirstArgs< @@ -197,16 +221,22 @@ async function handleGet(argv: Partial>, prompter: Inqui apiName: true, billingCustomersTableId: true, billingCustomersTableName: true, + billingInvoicesTableId: true, + billingInvoicesTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, + billingRefundsTableId: true, + billingRefundsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, databaseId: true, id: true, + listPendingUsageSyncFunction: true, + markUsageSyncedFunction: true, prefix: true, pricesTableId: true, privateApiName: true, @@ -214,8 +244,10 @@ async function handleGet(argv: Partial>, prompter: Inqui processBillingEventFunction: true, productsTableId: true, provider: true, + recordRefundFunction: true, schemaId: true, subscriptionsTableId: true, + upsertInvoiceFunction: true, }, }) .execute(); @@ -252,6 +284,20 @@ async function handleCreate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'text', + name: 'billingInvoicesTableId', + message: 'billingInvoicesTableId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'billingInvoicesTableName', + message: 'billingInvoicesTableName', + required: false, + skipPrompt: true, + }, { type: 'text', name: 'billingPricesTableId', @@ -280,6 +326,20 @@ async function handleCreate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'text', + name: 'billingRefundsTableId', + message: 'billingRefundsTableId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'billingRefundsTableName', + message: 'billingRefundsTableName', + required: false, + skipPrompt: true, + }, { type: 'text', name: 'billingSubscriptionsTableId', @@ -314,6 +374,20 @@ async function handleCreate(argv: Partial>, prompter: In message: 'databaseId', required: true, }, + { + type: 'text', + name: 'listPendingUsageSyncFunction', + message: 'listPendingUsageSyncFunction', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'markUsageSyncedFunction', + message: 'markUsageSyncedFunction', + required: false, + skipPrompt: true, + }, { type: 'text', name: 'prefix', @@ -363,6 +437,13 @@ async function handleCreate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'text', + name: 'recordRefundFunction', + message: 'recordRefundFunction', + required: false, + skipPrompt: true, + }, { type: 'text', name: 'schemaId', @@ -377,6 +458,13 @@ async function handleCreate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'text', + name: 'upsertInvoiceFunction', + message: 'upsertInvoiceFunction', + required: false, + skipPrompt: true, + }, ]); const answers = coerceAnswers(rawAnswers, fieldSchema); const cleanedData = stripUndefined( @@ -390,15 +478,21 @@ async function handleCreate(argv: Partial>, prompter: In apiName: cleanedData.apiName, billingCustomersTableId: cleanedData.billingCustomersTableId, billingCustomersTableName: cleanedData.billingCustomersTableName, + billingInvoicesTableId: cleanedData.billingInvoicesTableId, + billingInvoicesTableName: cleanedData.billingInvoicesTableName, billingPricesTableId: cleanedData.billingPricesTableId, billingPricesTableName: cleanedData.billingPricesTableName, billingProductsTableId: cleanedData.billingProductsTableId, billingProductsTableName: cleanedData.billingProductsTableName, + billingRefundsTableId: cleanedData.billingRefundsTableId, + billingRefundsTableName: cleanedData.billingRefundsTableName, billingSubscriptionsTableId: cleanedData.billingSubscriptionsTableId, billingSubscriptionsTableName: cleanedData.billingSubscriptionsTableName, billingWebhookEventsTableId: cleanedData.billingWebhookEventsTableId, billingWebhookEventsTableName: cleanedData.billingWebhookEventsTableName, databaseId: cleanedData.databaseId, + listPendingUsageSyncFunction: cleanedData.listPendingUsageSyncFunction, + markUsageSyncedFunction: cleanedData.markUsageSyncedFunction, prefix: cleanedData.prefix, pricesTableId: cleanedData.pricesTableId, privateApiName: cleanedData.privateApiName, @@ -406,23 +500,31 @@ async function handleCreate(argv: Partial>, prompter: In processBillingEventFunction: cleanedData.processBillingEventFunction, productsTableId: cleanedData.productsTableId, provider: cleanedData.provider, + recordRefundFunction: cleanedData.recordRefundFunction, schemaId: cleanedData.schemaId, subscriptionsTableId: cleanedData.subscriptionsTableId, + upsertInvoiceFunction: cleanedData.upsertInvoiceFunction, }, select: { apiName: true, billingCustomersTableId: true, billingCustomersTableName: true, + billingInvoicesTableId: true, + billingInvoicesTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, + billingRefundsTableId: true, + billingRefundsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, databaseId: true, id: true, + listPendingUsageSyncFunction: true, + markUsageSyncedFunction: true, prefix: true, pricesTableId: true, privateApiName: true, @@ -430,8 +532,10 @@ async function handleCreate(argv: Partial>, prompter: In processBillingEventFunction: true, productsTableId: true, provider: true, + recordRefundFunction: true, schemaId: true, subscriptionsTableId: true, + upsertInvoiceFunction: true, }, }) .execute(); @@ -474,6 +578,20 @@ async function handleUpdate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'text', + name: 'billingInvoicesTableId', + message: 'billingInvoicesTableId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'billingInvoicesTableName', + message: 'billingInvoicesTableName', + required: false, + skipPrompt: true, + }, { type: 'text', name: 'billingPricesTableId', @@ -502,6 +620,20 @@ async function handleUpdate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'text', + name: 'billingRefundsTableId', + message: 'billingRefundsTableId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'billingRefundsTableName', + message: 'billingRefundsTableName', + required: false, + skipPrompt: true, + }, { type: 'text', name: 'billingSubscriptionsTableId', @@ -536,6 +668,20 @@ async function handleUpdate(argv: Partial>, prompter: In message: 'databaseId', required: false, }, + { + type: 'text', + name: 'listPendingUsageSyncFunction', + message: 'listPendingUsageSyncFunction', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'markUsageSyncedFunction', + message: 'markUsageSyncedFunction', + required: false, + skipPrompt: true, + }, { type: 'text', name: 'prefix', @@ -585,6 +731,13 @@ async function handleUpdate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'text', + name: 'recordRefundFunction', + message: 'recordRefundFunction', + required: false, + skipPrompt: true, + }, { type: 'text', name: 'schemaId', @@ -599,6 +752,13 @@ async function handleUpdate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'text', + name: 'upsertInvoiceFunction', + message: 'upsertInvoiceFunction', + required: false, + skipPrompt: true, + }, ]); const answers = coerceAnswers(rawAnswers, fieldSchema); const cleanedData = stripUndefined(answers, fieldSchema) as BillingProviderModulePatch; @@ -612,15 +772,21 @@ async function handleUpdate(argv: Partial>, prompter: In apiName: cleanedData.apiName, billingCustomersTableId: cleanedData.billingCustomersTableId, billingCustomersTableName: cleanedData.billingCustomersTableName, + billingInvoicesTableId: cleanedData.billingInvoicesTableId, + billingInvoicesTableName: cleanedData.billingInvoicesTableName, billingPricesTableId: cleanedData.billingPricesTableId, billingPricesTableName: cleanedData.billingPricesTableName, billingProductsTableId: cleanedData.billingProductsTableId, billingProductsTableName: cleanedData.billingProductsTableName, + billingRefundsTableId: cleanedData.billingRefundsTableId, + billingRefundsTableName: cleanedData.billingRefundsTableName, billingSubscriptionsTableId: cleanedData.billingSubscriptionsTableId, billingSubscriptionsTableName: cleanedData.billingSubscriptionsTableName, billingWebhookEventsTableId: cleanedData.billingWebhookEventsTableId, billingWebhookEventsTableName: cleanedData.billingWebhookEventsTableName, databaseId: cleanedData.databaseId, + listPendingUsageSyncFunction: cleanedData.listPendingUsageSyncFunction, + markUsageSyncedFunction: cleanedData.markUsageSyncedFunction, prefix: cleanedData.prefix, pricesTableId: cleanedData.pricesTableId, privateApiName: cleanedData.privateApiName, @@ -628,23 +794,31 @@ async function handleUpdate(argv: Partial>, prompter: In processBillingEventFunction: cleanedData.processBillingEventFunction, productsTableId: cleanedData.productsTableId, provider: cleanedData.provider, + recordRefundFunction: cleanedData.recordRefundFunction, schemaId: cleanedData.schemaId, subscriptionsTableId: cleanedData.subscriptionsTableId, + upsertInvoiceFunction: cleanedData.upsertInvoiceFunction, }, select: { apiName: true, billingCustomersTableId: true, billingCustomersTableName: true, + billingInvoicesTableId: true, + billingInvoicesTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, + billingRefundsTableId: true, + billingRefundsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, databaseId: true, id: true, + listPendingUsageSyncFunction: true, + markUsageSyncedFunction: true, prefix: true, pricesTableId: true, privateApiName: true, @@ -652,8 +826,10 @@ async function handleUpdate(argv: Partial>, prompter: In processBillingEventFunction: true, productsTableId: true, provider: true, + recordRefundFunction: true, schemaId: true, subscriptionsTableId: true, + upsertInvoiceFunction: true, }, }) .execute(); diff --git a/sdk/constructive-cli/src/modules/cli/commands/catalog-module.ts b/sdk/constructive-cli/src/modules/cli/commands/catalog-module.ts index 07a555cbc9..a2e2ff3e2e 100644 --- a/sdk/constructive-cli/src/modules/cli/commands/catalog-module.ts +++ b/sdk/constructive-cli/src/modules/cli/commands/catalog-module.ts @@ -21,6 +21,8 @@ const fieldSchema: FieldSchema = { apisTableName: 'string', appsTableId: 'uuid', appsTableName: 'string', + bindingsTableId: 'uuid', + bindingsTableName: 'string', bucketsTableId: 'uuid', bucketsTableName: 'string', databaseId: 'uuid', @@ -112,6 +114,8 @@ async function handleList(argv: Partial>, _prompter: Inq apisTableName: true, appsTableId: true, appsTableName: true, + bindingsTableId: true, + bindingsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, @@ -171,6 +175,8 @@ async function handleFindFirst(argv: Partial>, _prompter apisTableName: true, appsTableId: true, appsTableName: true, + bindingsTableId: true, + bindingsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, @@ -242,6 +248,8 @@ async function handleGet(argv: Partial>, prompter: Inqui apisTableName: true, appsTableId: true, appsTableName: true, + bindingsTableId: true, + bindingsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, @@ -326,6 +334,20 @@ async function handleCreate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'text', + name: 'bindingsTableId', + message: 'bindingsTableId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'bindingsTableName', + message: 'bindingsTableName', + required: false, + skipPrompt: true, + }, { type: 'text', name: 'bucketsTableId', @@ -570,6 +592,8 @@ async function handleCreate(argv: Partial>, prompter: In apisTableName: cleanedData.apisTableName, appsTableId: cleanedData.appsTableId, appsTableName: cleanedData.appsTableName, + bindingsTableId: cleanedData.bindingsTableId, + bindingsTableName: cleanedData.bindingsTableName, bucketsTableId: cleanedData.bucketsTableId, bucketsTableName: cleanedData.bucketsTableName, databaseId: cleanedData.databaseId, @@ -610,6 +634,8 @@ async function handleCreate(argv: Partial>, prompter: In apisTableName: true, appsTableId: true, appsTableName: true, + bindingsTableId: true, + bindingsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, @@ -700,6 +726,20 @@ async function handleUpdate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'text', + name: 'bindingsTableId', + message: 'bindingsTableId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'bindingsTableName', + message: 'bindingsTableName', + required: false, + skipPrompt: true, + }, { type: 'text', name: 'bucketsTableId', @@ -944,6 +984,8 @@ async function handleUpdate(argv: Partial>, prompter: In apisTableName: cleanedData.apisTableName, appsTableId: cleanedData.appsTableId, appsTableName: cleanedData.appsTableName, + bindingsTableId: cleanedData.bindingsTableId, + bindingsTableName: cleanedData.bindingsTableName, bucketsTableId: cleanedData.bucketsTableId, bucketsTableName: cleanedData.bucketsTableName, databaseId: cleanedData.databaseId, @@ -984,6 +1026,8 @@ async function handleUpdate(argv: Partial>, prompter: In apisTableName: true, appsTableId: true, appsTableName: true, + bindingsTableId: true, + bindingsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, diff --git a/sdk/constructive-cli/src/modules/cli/commands/provision-check-constraint.ts b/sdk/constructive-cli/src/modules/cli/commands/provision-check-constraint.ts deleted file mode 100644 index 9139f8dfb1..0000000000 --- a/sdk/constructive-cli/src/modules/cli/commands/provision-check-constraint.ts +++ /dev/null @@ -1,53 +0,0 @@ -/** - * CLI command for mutation provisionCheckConstraint - * @generated by @constructive-io/graphql-codegen - * DO NOT EDIT - changes will be overwritten - */ -import { CLIOptions, Inquirerer } from 'inquirerer'; -import { getClient } from '../executor'; -import { unflattenDotNotation, buildSelectFromPaths } from '../utils'; -import type { ProvisionCheckConstraintVariables } from '../../orm/mutation'; -import type { ProvisionCheckConstraintPayloadSelect } from '../../orm/input-types'; -export default async ( - argv: Partial>, - prompter: Inquirerer, - _options: CLIOptions -) => { - try { - if (argv.help || argv.h) { - console.log( - 'provision-check-constraint - Creates a check constraint on a table from a $type + data blueprint definition. Supports: CheckOneOf (enum validation via = ANY(ARRAY[...])), CheckGreaterThan (single-column > value or cross-column), CheckLessThan (single-column < value or cross-column), CheckNotEqual (cross-column inequality). Builds AST expressions via ast_helpers and inserts into metaschema_public.check_constraint. Graceful: skips if a constraint with the same name already exists.\n\nUsage: provision-check-constraint [OPTIONS]\n' - ); - process.exit(0); - } - const answers = await prompter.prompt(argv, [ - { - type: 'text', - name: 'input', - message: - 'The exclusive input argument for this mutation. An object type, make sure to see documentation for this object\u2019s fields.', - required: true, - }, - ]); - const client = getClient(); - const parsedAnswers = unflattenDotNotation(answers); - const selectFields = buildSelectFromPaths((argv.select as string) ?? 'clientMutationId'); - const result = await client.mutation - .provisionCheckConstraint( - parsedAnswers as unknown as ProvisionCheckConstraintVariables, - { - select: selectFields, - } as unknown as { - select: ProvisionCheckConstraintPayloadSelect; - } - ) - .execute(); - console.log(JSON.stringify(result, null, 2)); - } catch (error) { - console.error('Failed: provisionCheckConstraint'); - if (error instanceof Error) { - console.error(error.message); - } - process.exit(1); - } -}; diff --git a/sdk/constructive-cli/src/modules/cli/commands/provision-relation.ts b/sdk/constructive-cli/src/modules/cli/commands/provision-relation.ts deleted file mode 100644 index 3d924f2028..0000000000 --- a/sdk/constructive-cli/src/modules/cli/commands/provision-relation.ts +++ /dev/null @@ -1,53 +0,0 @@ -/** - * CLI command for mutation provisionRelation - * @generated by @constructive-io/graphql-codegen - * DO NOT EDIT - changes will be overwritten - */ -import { CLIOptions, Inquirerer } from 'inquirerer'; -import { getClient } from '../executor'; -import { unflattenDotNotation, buildSelectFromPaths } from '../utils'; -import type { ProvisionRelationVariables } from '../../orm/mutation'; -import type { ProvisionRelationPayloadSelect } from '../../orm/input-types'; -export default async ( - argv: Partial>, - prompter: Inquirerer, - _options: CLIOptions -) => { - try { - if (argv.help || argv.h) { - console.log( - 'provision-relation - 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).\n\nUsage: provision-relation [OPTIONS]\n' - ); - process.exit(0); - } - const answers = await prompter.prompt(argv, [ - { - type: 'text', - name: 'input', - message: - 'The exclusive input argument for this mutation. An object type, make sure to see documentation for this object\u2019s fields.', - required: true, - }, - ]); - const client = getClient(); - const parsedAnswers = unflattenDotNotation(answers); - const selectFields = buildSelectFromPaths((argv.select as string) ?? 'clientMutationId'); - const result = await client.mutation - .provisionRelation( - parsedAnswers as unknown as ProvisionRelationVariables, - { - select: selectFields, - } as unknown as { - select: ProvisionRelationPayloadSelect; - } - ) - .execute(); - console.log(JSON.stringify(result, null, 2)); - } catch (error) { - console.error('Failed: provisionRelation'); - if (error instanceof Error) { - console.error(error.message); - } - process.exit(1); - } -}; diff --git a/sdk/constructive-cli/src/modules/cli/commands/provision-spatial-relation.ts b/sdk/constructive-cli/src/modules/cli/commands/provision-spatial-relation.ts deleted file mode 100644 index fd46815bb8..0000000000 --- a/sdk/constructive-cli/src/modules/cli/commands/provision-spatial-relation.ts +++ /dev/null @@ -1,53 +0,0 @@ -/** - * CLI command for mutation provisionSpatialRelation - * @generated by @constructive-io/graphql-codegen - * DO NOT EDIT - changes will be overwritten - */ -import { CLIOptions, Inquirerer } from 'inquirerer'; -import { getClient } from '../executor'; -import { unflattenDotNotation, buildSelectFromPaths } from '../utils'; -import type { ProvisionSpatialRelationVariables } from '../../orm/mutation'; -import type { ProvisionSpatialRelationPayloadSelect } from '../../orm/input-types'; -export default async ( - argv: Partial>, - prompter: Inquirerer, - _options: CLIOptions -) => { - try { - if (argv.help || argv.h) { - console.log( - 'provision-spatial-relation - Idempotent provisioner for metaschema_public.spatial_relation. Inserts a row declaring a spatial predicate between two geometry/geography columns (owner and target). Called from construct_blueprint when a relation entry has $type=RelationSpatial. Graceful: re-running with the same (source_table_id, name) returns the existing id without modifying the row. Operator whitelist and st_dwithin \u2194 param_name pairing are enforced by the spatial_relation table CHECKs. Both fields must already exist \u2014 this is a metadata-only insert.\n\nUsage: provision-spatial-relation [OPTIONS]\n' - ); - process.exit(0); - } - const answers = await prompter.prompt(argv, [ - { - type: 'text', - name: 'input', - message: - 'The exclusive input argument for this mutation. An object type, make sure to see documentation for this object\u2019s fields.', - required: true, - }, - ]); - const client = getClient(); - const parsedAnswers = unflattenDotNotation(answers); - const selectFields = buildSelectFromPaths((argv.select as string) ?? 'clientMutationId'); - const result = await client.mutation - .provisionSpatialRelation( - parsedAnswers as unknown as ProvisionSpatialRelationVariables, - { - select: selectFields, - } as unknown as { - select: ProvisionSpatialRelationPayloadSelect; - } - ) - .execute(); - console.log(JSON.stringify(result, null, 2)); - } catch (error) { - console.error('Failed: provisionSpatialRelation'); - if (error instanceof Error) { - console.error(error.message); - } - process.exit(1); - } -}; diff --git a/sdk/constructive-cli/src/modules/cli/commands/resolve-blueprint-field.ts b/sdk/constructive-cli/src/modules/cli/commands/resolve-blueprint-field.ts deleted file mode 100644 index 020df9055a..0000000000 --- a/sdk/constructive-cli/src/modules/cli/commands/resolve-blueprint-field.ts +++ /dev/null @@ -1,50 +0,0 @@ -/** - * CLI command for query resolveBlueprintField - * @generated by @constructive-io/graphql-codegen - * DO NOT EDIT - changes will be overwritten - */ -import { CLIOptions, Inquirerer } from 'inquirerer'; -import { getClient } from '../executor'; -import type { ResolveBlueprintFieldVariables } from '../../orm/query'; -export default async ( - argv: Partial>, - prompter: Inquirerer, - _options: CLIOptions -) => { - try { - if (argv.help || argv.h) { - console.log( - 'resolve-blueprint-field - Resolves a field_name within a given table_id to a field_id. Throws if no match is found. Used by construct_blueprint to translate user-authored field names (e.g. "location") into field UUIDs for downstream provisioning procedures. table_id must already be resolved (via resolve_blueprint_table) before calling this.\n\nUsage: resolve-blueprint-field [OPTIONS]\n' - ); - process.exit(0); - } - const answers = await prompter.prompt(argv, [ - { - type: 'text', - name: 'databaseId', - message: 'databaseId', - }, - { - type: 'text', - name: 'fieldName', - message: 'fieldName', - }, - { - type: 'text', - name: 'tableId', - message: 'tableId', - }, - ]); - const client = getClient(); - const result = await client.query - .resolveBlueprintField(answers as unknown as ResolveBlueprintFieldVariables) - .execute(); - console.log(JSON.stringify(result, null, 2)); - } catch (error) { - console.error('Failed: resolveBlueprintField'); - if (error instanceof Error) { - console.error(error.message); - } - process.exit(1); - } -}; diff --git a/sdk/constructive-cli/src/modules/cli/commands/resolve-blueprint-table.ts b/sdk/constructive-cli/src/modules/cli/commands/resolve-blueprint-table.ts deleted file mode 100644 index 8dbd6f1b8b..0000000000 --- a/sdk/constructive-cli/src/modules/cli/commands/resolve-blueprint-table.ts +++ /dev/null @@ -1,60 +0,0 @@ -/** - * CLI command for query resolveBlueprintTable - * @generated by @constructive-io/graphql-codegen - * DO NOT EDIT - changes will be overwritten - */ -import { CLIOptions, Inquirerer } from 'inquirerer'; -import { getClient } from '../executor'; -import type { ResolveBlueprintTableVariables } from '../../orm/query'; -export default async ( - argv: Partial>, - prompter: Inquirerer, - _options: CLIOptions -) => { - try { - if (argv.help || argv.h) { - console.log( - 'resolve-blueprint-table - Resolves a table_name (with optional schema_name) to a table_id. Resolution order: (1) if schema_name provided, exact lookup via metaschema_public.schema.name + metaschema_public.table; (2) check local table_map (tables created in current blueprint); (3) search metaschema_public.table by name across all schemas; (4) if multiple matches, throw ambiguous error asking for schema_name; (5) if no match, throw not-found error.\n\nUsage: resolve-blueprint-table [OPTIONS]\n' - ); - process.exit(0); - } - const answers = await prompter.prompt(argv, [ - { - type: 'text', - name: 'databaseId', - message: 'databaseId', - }, - { - type: 'text', - name: 'defaultSchemaId', - message: 'defaultSchemaId', - }, - { - type: 'text', - name: 'schemaName', - message: 'schemaName', - }, - { - type: 'text', - name: 'tableMap', - message: 'tableMap', - }, - { - type: 'text', - name: 'tableName', - message: 'tableName', - }, - ]); - const client = getClient(); - const result = await client.query - .resolveBlueprintTable(answers as unknown as ResolveBlueprintTableVariables) - .execute(); - console.log(JSON.stringify(result, null, 2)); - } catch (error) { - console.error('Failed: resolveBlueprintTable'); - if (error instanceof Error) { - console.error(error.message); - } - process.exit(1); - } -}; diff --git a/sdk/constructive-cli/src/modules/cli/commands/route-module.ts b/sdk/constructive-cli/src/modules/cli/commands/route-module.ts index 695b24b67d..ed2887ec2b 100644 --- a/sdk/constructive-cli/src/modules/cli/commands/route-module.ts +++ b/sdk/constructive-cli/src/modules/cli/commands/route-module.ts @@ -17,8 +17,10 @@ import type { import type { FindManyArgs, FindFirstArgs } from '../../orm/select-types'; const fieldSchema: FieldSchema = { apiName: 'string', + appLinksFunctionName: 'string', catalogModuleId: 'uuid', databaseId: 'uuid', + deepLinkFunctionName: 'string', defaultPermissions: 'string', domainModuleId: 'uuid', entityField: 'string', @@ -93,8 +95,10 @@ async function handleList(argv: Partial>, _prompter: Inq try { const defaultSelect = { apiName: true, + appLinksFunctionName: true, catalogModuleId: true, databaseId: true, + deepLinkFunctionName: true, defaultPermissions: true, domainModuleId: true, entityField: true, @@ -137,8 +141,10 @@ async function handleFindFirst(argv: Partial>, _prompter try { const defaultSelect = { apiName: true, + appLinksFunctionName: true, catalogModuleId: true, databaseId: true, + deepLinkFunctionName: true, defaultPermissions: true, domainModuleId: true, entityField: true, @@ -193,8 +199,10 @@ async function handleGet(argv: Partial>, prompter: Inqui id: answers.id as string, select: { apiName: true, + appLinksFunctionName: true, catalogModuleId: true, databaseId: true, + deepLinkFunctionName: true, defaultPermissions: true, domainModuleId: true, entityField: true, @@ -238,6 +246,13 @@ async function handleCreate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'text', + name: 'appLinksFunctionName', + message: 'appLinksFunctionName', + required: false, + skipPrompt: true, + }, { type: 'text', name: 'catalogModuleId', @@ -251,6 +266,13 @@ async function handleCreate(argv: Partial>, prompter: In message: 'databaseId', required: true, }, + { + type: 'text', + name: 'deepLinkFunctionName', + message: 'deepLinkFunctionName', + required: false, + skipPrompt: true, + }, { type: 'text', name: 'defaultPermissions', @@ -401,8 +423,10 @@ async function handleCreate(argv: Partial>, prompter: In .create({ data: { apiName: cleanedData.apiName, + appLinksFunctionName: cleanedData.appLinksFunctionName, catalogModuleId: cleanedData.catalogModuleId, databaseId: cleanedData.databaseId, + deepLinkFunctionName: cleanedData.deepLinkFunctionName, defaultPermissions: cleanedData.defaultPermissions, domainModuleId: cleanedData.domainModuleId, entityField: cleanedData.entityField, @@ -426,8 +450,10 @@ async function handleCreate(argv: Partial>, prompter: In }, select: { apiName: true, + appLinksFunctionName: true, catalogModuleId: true, databaseId: true, + deepLinkFunctionName: true, defaultPermissions: true, domainModuleId: true, entityField: true, @@ -477,6 +503,13 @@ async function handleUpdate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'text', + name: 'appLinksFunctionName', + message: 'appLinksFunctionName', + required: false, + skipPrompt: true, + }, { type: 'text', name: 'catalogModuleId', @@ -490,6 +523,13 @@ async function handleUpdate(argv: Partial>, prompter: In message: 'databaseId', required: false, }, + { + type: 'text', + name: 'deepLinkFunctionName', + message: 'deepLinkFunctionName', + required: false, + skipPrompt: true, + }, { type: 'text', name: 'defaultPermissions', @@ -640,8 +680,10 @@ async function handleUpdate(argv: Partial>, prompter: In }, data: { apiName: cleanedData.apiName, + appLinksFunctionName: cleanedData.appLinksFunctionName, catalogModuleId: cleanedData.catalogModuleId, databaseId: cleanedData.databaseId, + deepLinkFunctionName: cleanedData.deepLinkFunctionName, defaultPermissions: cleanedData.defaultPermissions, domainModuleId: cleanedData.domainModuleId, entityField: cleanedData.entityField, @@ -665,8 +707,10 @@ async function handleUpdate(argv: Partial>, prompter: In }, select: { apiName: true, + appLinksFunctionName: true, catalogModuleId: true, databaseId: true, + deepLinkFunctionName: true, defaultPermissions: true, domainModuleId: true, entityField: true, diff --git a/sdk/constructive-cli/src/modules/cli/commands/scope-types-module.ts b/sdk/constructive-cli/src/modules/cli/commands/scope-types-module.ts new file mode 100644 index 0000000000..bb64174ac0 --- /dev/null +++ b/sdk/constructive-cli/src/modules/cli/commands/scope-types-module.ts @@ -0,0 +1,317 @@ +/** + * CLI commands for ScopeTypesModule + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { CLIOptions, Inquirerer, extractFirst } from 'inquirerer'; +import { getClient } from '../executor'; +import { coerceAnswers, parseFindFirstArgs, parseFindManyArgs, stripUndefined } from '../utils'; +import type { FieldSchema } from '../utils'; +import type { + CreateScopeTypesModuleInput, + ScopeTypesModulePatch, + ScopeTypesModuleSelect, + ScopeTypesModuleFilter, + ScopeTypesModuleOrderBy, +} from '../../orm/input-types'; +import type { FindManyArgs, FindFirstArgs } from '../../orm/select-types'; +const fieldSchema: FieldSchema = { + databaseId: 'uuid', + id: 'uuid', + privateSchemaName: 'string', + schemaId: 'uuid', + scopeTypesTableId: 'uuid', +}; +const usage = + '\nscope-types-module \n\nCommands:\n list List scopeTypesModule records\n find-first Find first matching scopeTypesModule record\n get Get a scopeTypesModule by ID\n create Create a new scopeTypesModule\n update Update an existing scopeTypesModule\n delete Delete a scopeTypesModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; +export default async ( + argv: Partial>, + prompter: Inquirerer, + _options: CLIOptions +) => { + if (argv.help || argv.h) { + console.log(usage); + process.exit(0); + } + const { first: subcommand, newArgv } = extractFirst(argv); + if (!subcommand) { + const answer = await prompter.prompt(argv, [ + { + type: 'autocomplete', + name: 'subcommand', + message: 'What do you want to do?', + options: ['list', 'find-first', 'get', 'create', 'update', 'delete'], + }, + ]); + return handleTableSubcommand(answer.subcommand as string, newArgv, prompter); + } + return handleTableSubcommand(subcommand, newArgv, prompter); +}; +async function handleTableSubcommand( + subcommand: string, + argv: Partial>, + prompter: Inquirerer +) { + switch (subcommand) { + case 'list': + return handleList(argv, prompter); + case 'find-first': + return handleFindFirst(argv, prompter); + case 'get': + return handleGet(argv, prompter); + case 'create': + return handleCreate(argv, prompter); + case 'update': + return handleUpdate(argv, prompter); + case 'delete': + return handleDelete(argv, prompter); + default: + console.log(usage); + process.exit(1); + } +} +async function handleList(argv: Partial>, _prompter: Inquirerer) { + try { + const defaultSelect = { + databaseId: true, + id: true, + privateSchemaName: true, + schemaId: true, + scopeTypesTableId: true, + }; + const findManyArgs = parseFindManyArgs< + FindManyArgs & { + select: ScopeTypesModuleSelect; + } + >(argv, defaultSelect); + const client = getClient(); + const result = await client.scopeTypesModule.findMany(findManyArgs).execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed to list records.'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +} +async function handleFindFirst(argv: Partial>, _prompter: Inquirerer) { + try { + const defaultSelect = { + databaseId: true, + id: true, + privateSchemaName: true, + schemaId: true, + scopeTypesTableId: true, + }; + const findFirstArgs = parseFindFirstArgs< + FindFirstArgs & { + select: ScopeTypesModuleSelect; + } + >(argv, defaultSelect); + const client = getClient(); + const result = await client.scopeTypesModule.findFirst(findFirstArgs).execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed to find record.'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +} +async function handleGet(argv: Partial>, prompter: Inquirerer) { + try { + const answers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'id', + message: 'id', + required: true, + }, + ]); + const client = getClient(); + const result = await client.scopeTypesModule + .findOne({ + id: answers.id as string, + select: { + databaseId: true, + id: true, + privateSchemaName: true, + schemaId: true, + scopeTypesTableId: true, + }, + }) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Record not found.'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +} +async function handleCreate(argv: Partial>, prompter: Inquirerer) { + try { + const rawAnswers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'databaseId', + message: 'databaseId', + required: true, + }, + { + type: 'text', + name: 'privateSchemaName', + message: 'privateSchemaName', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'schemaId', + message: 'schemaId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'scopeTypesTableId', + message: 'scopeTypesTableId', + required: false, + skipPrompt: true, + }, + ]); + const answers = coerceAnswers(rawAnswers, fieldSchema); + const cleanedData = stripUndefined( + answers, + fieldSchema + ) as CreateScopeTypesModuleInput['scopeTypesModule']; + const client = getClient(); + const result = await client.scopeTypesModule + .create({ + data: { + databaseId: cleanedData.databaseId, + privateSchemaName: cleanedData.privateSchemaName, + schemaId: cleanedData.schemaId, + scopeTypesTableId: cleanedData.scopeTypesTableId, + }, + select: { + databaseId: true, + id: true, + privateSchemaName: true, + schemaId: true, + scopeTypesTableId: true, + }, + }) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed to create record.'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +} +async function handleUpdate(argv: Partial>, prompter: Inquirerer) { + try { + const rawAnswers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'id', + message: 'id', + required: true, + }, + { + type: 'text', + name: 'databaseId', + message: 'databaseId', + required: false, + }, + { + type: 'text', + name: 'privateSchemaName', + message: 'privateSchemaName', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'schemaId', + message: 'schemaId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'scopeTypesTableId', + message: 'scopeTypesTableId', + required: false, + skipPrompt: true, + }, + ]); + const answers = coerceAnswers(rawAnswers, fieldSchema); + const cleanedData = stripUndefined(answers, fieldSchema) as ScopeTypesModulePatch; + const client = getClient(); + const result = await client.scopeTypesModule + .update({ + where: { + id: answers.id as string, + }, + data: { + databaseId: cleanedData.databaseId, + privateSchemaName: cleanedData.privateSchemaName, + schemaId: cleanedData.schemaId, + scopeTypesTableId: cleanedData.scopeTypesTableId, + }, + select: { + databaseId: true, + id: true, + privateSchemaName: true, + schemaId: true, + scopeTypesTableId: true, + }, + }) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed to update record.'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +} +async function handleDelete(argv: Partial>, prompter: Inquirerer) { + try { + const rawAnswers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'id', + message: 'id', + required: true, + }, + ]); + const answers = coerceAnswers(rawAnswers, fieldSchema); + const client = getClient(); + const result = await client.scopeTypesModule + .delete({ + where: { + id: answers.id as string, + }, + select: { + id: true, + }, + }) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed to delete record.'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +} diff --git a/sdk/constructive-cli/src/modules/cli/commands/user-settings-security-module.ts b/sdk/constructive-cli/src/modules/cli/commands/user-settings-security-module.ts new file mode 100644 index 0000000000..0d227bba3a --- /dev/null +++ b/sdk/constructive-cli/src/modules/cli/commands/user-settings-security-module.ts @@ -0,0 +1,369 @@ +/** + * CLI commands for UserSettingsSecurityModule + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { CLIOptions, Inquirerer, extractFirst } from 'inquirerer'; +import { getClient } from '../executor'; +import { coerceAnswers, parseFindFirstArgs, parseFindManyArgs, stripUndefined } from '../utils'; +import type { FieldSchema } from '../utils'; +import type { + CreateUserSettingsSecurityModuleInput, + UserSettingsSecurityModulePatch, + UserSettingsSecurityModuleSelect, + UserSettingsSecurityModuleFilter, + UserSettingsSecurityModuleOrderBy, +} from '../../orm/input-types'; +import type { FindManyArgs, FindFirstArgs } from '../../orm/select-types'; +const fieldSchema: FieldSchema = { + apiName: 'string', + databaseId: 'uuid', + id: 'uuid', + ownerTableId: 'uuid', + schemaId: 'uuid', + tableId: 'uuid', + tableName: 'string', +}; +const usage = + '\nuser-settings-security-module \n\nCommands:\n list List userSettingsSecurityModule records\n find-first Find first matching userSettingsSecurityModule record\n get Get a userSettingsSecurityModule by ID\n create Create a new userSettingsSecurityModule\n update Update an existing userSettingsSecurityModule\n delete Delete a userSettingsSecurityModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n'; +export default async ( + argv: Partial>, + prompter: Inquirerer, + _options: CLIOptions +) => { + if (argv.help || argv.h) { + console.log(usage); + process.exit(0); + } + const { first: subcommand, newArgv } = extractFirst(argv); + if (!subcommand) { + const answer = await prompter.prompt(argv, [ + { + type: 'autocomplete', + name: 'subcommand', + message: 'What do you want to do?', + options: ['list', 'find-first', 'get', 'create', 'update', 'delete'], + }, + ]); + return handleTableSubcommand(answer.subcommand as string, newArgv, prompter); + } + return handleTableSubcommand(subcommand, newArgv, prompter); +}; +async function handleTableSubcommand( + subcommand: string, + argv: Partial>, + prompter: Inquirerer +) { + switch (subcommand) { + case 'list': + return handleList(argv, prompter); + case 'find-first': + return handleFindFirst(argv, prompter); + case 'get': + return handleGet(argv, prompter); + case 'create': + return handleCreate(argv, prompter); + case 'update': + return handleUpdate(argv, prompter); + case 'delete': + return handleDelete(argv, prompter); + default: + console.log(usage); + process.exit(1); + } +} +async function handleList(argv: Partial>, _prompter: Inquirerer) { + try { + const defaultSelect = { + apiName: true, + databaseId: true, + id: true, + ownerTableId: true, + schemaId: true, + tableId: true, + tableName: true, + }; + const findManyArgs = parseFindManyArgs< + FindManyArgs< + UserSettingsSecurityModuleSelect, + UserSettingsSecurityModuleFilter, + UserSettingsSecurityModuleOrderBy + > & { + select: UserSettingsSecurityModuleSelect; + } + >(argv, defaultSelect); + const client = getClient(); + const result = await client.userSettingsSecurityModule.findMany(findManyArgs).execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed to list records.'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +} +async function handleFindFirst(argv: Partial>, _prompter: Inquirerer) { + try { + const defaultSelect = { + apiName: true, + databaseId: true, + id: true, + ownerTableId: true, + schemaId: true, + tableId: true, + tableName: true, + }; + const findFirstArgs = parseFindFirstArgs< + FindFirstArgs< + UserSettingsSecurityModuleSelect, + UserSettingsSecurityModuleFilter, + UserSettingsSecurityModuleOrderBy + > & { + select: UserSettingsSecurityModuleSelect; + } + >(argv, defaultSelect); + const client = getClient(); + const result = await client.userSettingsSecurityModule.findFirst(findFirstArgs).execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed to find record.'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +} +async function handleGet(argv: Partial>, prompter: Inquirerer) { + try { + const answers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'id', + message: 'id', + required: true, + }, + ]); + const client = getClient(); + const result = await client.userSettingsSecurityModule + .findOne({ + id: answers.id as string, + select: { + apiName: true, + databaseId: true, + id: true, + ownerTableId: true, + schemaId: true, + tableId: true, + tableName: true, + }, + }) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Record not found.'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +} +async function handleCreate(argv: Partial>, prompter: Inquirerer) { + try { + const rawAnswers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'apiName', + message: 'apiName', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'databaseId', + message: 'databaseId', + required: true, + }, + { + type: 'text', + name: 'ownerTableId', + message: 'ownerTableId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'schemaId', + message: 'schemaId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'tableId', + message: 'tableId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'tableName', + message: 'tableName', + required: false, + skipPrompt: true, + }, + ]); + const answers = coerceAnswers(rawAnswers, fieldSchema); + const cleanedData = stripUndefined( + answers, + fieldSchema + ) as CreateUserSettingsSecurityModuleInput['userSettingsSecurityModule']; + const client = getClient(); + const result = await client.userSettingsSecurityModule + .create({ + data: { + apiName: cleanedData.apiName, + databaseId: cleanedData.databaseId, + ownerTableId: cleanedData.ownerTableId, + schemaId: cleanedData.schemaId, + tableId: cleanedData.tableId, + tableName: cleanedData.tableName, + }, + select: { + apiName: true, + databaseId: true, + id: true, + ownerTableId: true, + schemaId: true, + tableId: true, + tableName: true, + }, + }) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed to create record.'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +} +async function handleUpdate(argv: Partial>, prompter: Inquirerer) { + try { + const rawAnswers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'id', + message: 'id', + required: true, + }, + { + type: 'text', + name: 'apiName', + message: 'apiName', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'databaseId', + message: 'databaseId', + required: false, + }, + { + type: 'text', + name: 'ownerTableId', + message: 'ownerTableId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'schemaId', + message: 'schemaId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'tableId', + message: 'tableId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'tableName', + message: 'tableName', + required: false, + skipPrompt: true, + }, + ]); + const answers = coerceAnswers(rawAnswers, fieldSchema); + const cleanedData = stripUndefined(answers, fieldSchema) as UserSettingsSecurityModulePatch; + const client = getClient(); + const result = await client.userSettingsSecurityModule + .update({ + where: { + id: answers.id as string, + }, + data: { + apiName: cleanedData.apiName, + databaseId: cleanedData.databaseId, + ownerTableId: cleanedData.ownerTableId, + schemaId: cleanedData.schemaId, + tableId: cleanedData.tableId, + tableName: cleanedData.tableName, + }, + select: { + apiName: true, + databaseId: true, + id: true, + ownerTableId: true, + schemaId: true, + tableId: true, + tableName: true, + }, + }) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed to update record.'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +} +async function handleDelete(argv: Partial>, prompter: Inquirerer) { + try { + const rawAnswers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'id', + message: 'id', + required: true, + }, + ]); + const answers = coerceAnswers(rawAnswers, fieldSchema); + const client = getClient(); + const result = await client.userSettingsSecurityModule + .delete({ + where: { + id: answers.id as string, + }, + select: { + id: true, + }, + }) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed to delete record.'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +} diff --git a/sdk/constructive-cli/src/modules/orm/README.md b/sdk/constructive-cli/src/modules/orm/README.md index 7982fe489a..7348b2a287 100644 --- a/sdk/constructive-cli/src/modules/orm/README.md +++ b/sdk/constructive-cli/src/modules/orm/README.md @@ -82,6 +82,7 @@ const db = createClient({ | `resourceModule` | findMany, findOne, create, update, delete | | `rlsModule` | findMany, findOne, create, update, delete | | `routeModule` | findMany, findOne, create, update, delete | +| `scopeTypesModule` | findMany, findOne, create, update, delete | | `secureTableProvision` | findMany, findOne, create, update, delete | | `sessionSecretsModule` | findMany, findOne, create, update, delete | | `sessionsModule` | findMany, findOne, create, update, delete | @@ -92,6 +93,7 @@ const db = createClient({ | `userAuthModule` | findMany, findOne, create, update, delete | | `userCredentialsModule` | findMany, findOne, create, update, delete | | `userSettingsModule` | findMany, findOne, create, update, delete | +| `userSettingsSecurityModule` | findMany, findOne, create, update, delete | | `userStateModule` | findMany, findOne, create, update, delete | | `usersModule` | findMany, findOne, create, update, delete | | `webauthnAuthModule` | findMany, findOne, create, update, delete | @@ -329,16 +331,22 @@ CRUD operations for BillingProviderModule records. | `apiName` | String | Yes | | `billingCustomersTableId` | UUID | Yes | | `billingCustomersTableName` | String | Yes | +| `billingInvoicesTableId` | UUID | Yes | +| `billingInvoicesTableName` | String | Yes | | `billingPricesTableId` | UUID | Yes | | `billingPricesTableName` | String | Yes | | `billingProductsTableId` | UUID | Yes | | `billingProductsTableName` | String | Yes | +| `billingRefundsTableId` | UUID | Yes | +| `billingRefundsTableName` | String | Yes | | `billingSubscriptionsTableId` | UUID | Yes | | `billingSubscriptionsTableName` | String | Yes | | `billingWebhookEventsTableId` | UUID | Yes | | `billingWebhookEventsTableName` | String | Yes | | `databaseId` | UUID | Yes | | `id` | UUID | No | +| `listPendingUsageSyncFunction` | String | Yes | +| `markUsageSyncedFunction` | String | Yes | | `prefix` | String | Yes | | `pricesTableId` | UUID | Yes | | `privateApiName` | String | Yes | @@ -346,20 +354,22 @@ CRUD operations for BillingProviderModule records. | `processBillingEventFunction` | String | Yes | | `productsTableId` | UUID | Yes | | `provider` | String | Yes | +| `recordRefundFunction` | String | Yes | | `schemaId` | UUID | Yes | | `subscriptionsTableId` | UUID | Yes | +| `upsertInvoiceFunction` | String | Yes | **Operations:** ```typescript // List all billingProviderModule records -const items = await db.billingProviderModule.findMany({ select: { apiName: true, billingCustomersTableId: true, billingCustomersTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, databaseId: true, id: true, prefix: true, pricesTableId: true, privateApiName: true, privateSchemaId: true, processBillingEventFunction: true, productsTableId: true, provider: true, schemaId: true, subscriptionsTableId: true } }).execute(); +const items = await db.billingProviderModule.findMany({ select: { apiName: true, billingCustomersTableId: true, billingCustomersTableName: true, billingInvoicesTableId: true, billingInvoicesTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, billingRefundsTableId: true, billingRefundsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, databaseId: true, id: true, listPendingUsageSyncFunction: true, markUsageSyncedFunction: true, prefix: true, pricesTableId: true, privateApiName: true, privateSchemaId: true, processBillingEventFunction: true, productsTableId: true, provider: true, recordRefundFunction: true, schemaId: true, subscriptionsTableId: true, upsertInvoiceFunction: true } }).execute(); // Get one by id -const item = await db.billingProviderModule.findOne({ id: '', select: { apiName: true, billingCustomersTableId: true, billingCustomersTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, databaseId: true, id: true, prefix: true, pricesTableId: true, privateApiName: true, privateSchemaId: true, processBillingEventFunction: true, productsTableId: true, provider: true, schemaId: true, subscriptionsTableId: true } }).execute(); +const item = await db.billingProviderModule.findOne({ id: '', select: { apiName: true, billingCustomersTableId: true, billingCustomersTableName: true, billingInvoicesTableId: true, billingInvoicesTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, billingRefundsTableId: true, billingRefundsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, databaseId: true, id: true, listPendingUsageSyncFunction: true, markUsageSyncedFunction: true, prefix: true, pricesTableId: true, privateApiName: true, privateSchemaId: true, processBillingEventFunction: true, productsTableId: true, provider: true, recordRefundFunction: true, schemaId: true, subscriptionsTableId: true, upsertInvoiceFunction: true } }).execute(); // Create -const created = await db.billingProviderModule.create({ data: { apiName: '', billingCustomersTableId: '', billingCustomersTableName: '', billingPricesTableId: '', billingPricesTableName: '', billingProductsTableId: '', billingProductsTableName: '', billingSubscriptionsTableId: '', billingSubscriptionsTableName: '', billingWebhookEventsTableId: '', billingWebhookEventsTableName: '', databaseId: '', prefix: '', pricesTableId: '', privateApiName: '', privateSchemaId: '', processBillingEventFunction: '', productsTableId: '', provider: '', schemaId: '', subscriptionsTableId: '' }, select: { id: true } }).execute(); +const created = await db.billingProviderModule.create({ data: { apiName: '', billingCustomersTableId: '', billingCustomersTableName: '', billingInvoicesTableId: '', billingInvoicesTableName: '', billingPricesTableId: '', billingPricesTableName: '', billingProductsTableId: '', billingProductsTableName: '', billingRefundsTableId: '', billingRefundsTableName: '', billingSubscriptionsTableId: '', billingSubscriptionsTableName: '', billingWebhookEventsTableId: '', billingWebhookEventsTableName: '', databaseId: '', listPendingUsageSyncFunction: '', markUsageSyncedFunction: '', prefix: '', pricesTableId: '', privateApiName: '', privateSchemaId: '', processBillingEventFunction: '', productsTableId: '', provider: '', recordRefundFunction: '', schemaId: '', subscriptionsTableId: '', upsertInvoiceFunction: '' }, select: { id: true } }).execute(); // Update const updated = await db.billingProviderModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -508,6 +518,8 @@ CRUD operations for CatalogModule records. | `apisTableName` | String | Yes | | `appsTableId` | UUID | Yes | | `appsTableName` | String | Yes | +| `bindingsTableId` | UUID | Yes | +| `bindingsTableName` | String | Yes | | `bucketsTableId` | UUID | Yes | | `bucketsTableName` | String | Yes | | `databaseId` | UUID | Yes | @@ -547,13 +559,13 @@ CRUD operations for CatalogModule records. ```typescript // List all catalogModule records -const items = await db.catalogModule.findMany({ select: { apiName: true, apisTableId: true, apisTableName: true, appsTableId: true, appsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultPermissions: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } }).execute(); +const items = await db.catalogModule.findMany({ select: { apiName: true, apisTableId: true, apisTableName: true, appsTableId: true, appsTableName: true, bindingsTableId: true, bindingsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultPermissions: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } }).execute(); // Get one by id -const item = await db.catalogModule.findOne({ id: '', select: { apiName: true, apisTableId: true, apisTableName: true, appsTableId: true, appsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultPermissions: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } }).execute(); +const item = await db.catalogModule.findOne({ id: '', select: { apiName: true, apisTableId: true, apisTableName: true, appsTableId: true, appsTableName: true, bindingsTableId: true, bindingsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultPermissions: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } }).execute(); // Create -const created = await db.catalogModule.create({ data: { apiName: '', apisTableId: '', apisTableName: '', appsTableId: '', appsTableName: '', bucketsTableId: '', bucketsTableName: '', databaseId: '', defaultPermissions: '', domainsTableId: '', domainsTableName: '', entityTableId: '', functionsTableId: '', functionsTableName: '', namespacesTableId: '', namespacesTableName: '', policies: '', privateApiName: '', provisions: '', publicSchemaName: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourcesTableId: '', resourcesTableName: '', schemaId: '', scope: '', sitesAppLinksTableId: '', sitesAppLinksTableName: '', sitesDeepLinksTableId: '', sitesDeepLinksTableName: '', sitesErrorPagesTableId: '', sitesErrorPagesTableName: '', sitesTableId: '', sitesTableName: '', sitesWebConfigTableId: '', sitesWebConfigTableName: '' }, select: { id: true } }).execute(); +const created = await db.catalogModule.create({ data: { apiName: '', apisTableId: '', apisTableName: '', appsTableId: '', appsTableName: '', bindingsTableId: '', bindingsTableName: '', bucketsTableId: '', bucketsTableName: '', databaseId: '', defaultPermissions: '', domainsTableId: '', domainsTableName: '', entityTableId: '', functionsTableId: '', functionsTableName: '', namespacesTableId: '', namespacesTableName: '', policies: '', privateApiName: '', provisions: '', publicSchemaName: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourcesTableId: '', resourcesTableName: '', schemaId: '', scope: '', sitesAppLinksTableId: '', sitesAppLinksTableName: '', sitesDeepLinksTableId: '', sitesDeepLinksTableName: '', sitesErrorPagesTableId: '', sitesErrorPagesTableName: '', sitesTableId: '', sitesTableName: '', sitesWebConfigTableId: '', sitesWebConfigTableName: '' }, select: { id: true } }).execute(); // Update const updated = await db.catalogModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -2947,8 +2959,10 @@ CRUD operations for RouteModule records. | Field | Type | Editable | |-------|------|----------| | `apiName` | String | Yes | +| `appLinksFunctionName` | String | Yes | | `catalogModuleId` | UUID | Yes | | `databaseId` | UUID | Yes | +| `deepLinkFunctionName` | String | Yes | | `defaultPermissions` | String | Yes | | `domainModuleId` | UUID | Yes | | `entityField` | String | Yes | @@ -2975,13 +2989,13 @@ CRUD operations for RouteModule records. ```typescript // List all routeModule records -const items = await db.routeModule.findMany({ select: { apiName: true, catalogModuleId: true, databaseId: true, defaultPermissions: true, domainModuleId: true, entityField: true, entityTableId: true, hostnameBindingsTableId: true, hostnameBindingsTableName: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, resolverFunctionName: true, routeBindingsTableId: true, routeBindingsTableName: true, routesTableId: true, routesTableName: true, schemaId: true, scope: true } }).execute(); +const items = await db.routeModule.findMany({ select: { apiName: true, appLinksFunctionName: true, catalogModuleId: true, databaseId: true, deepLinkFunctionName: true, defaultPermissions: true, domainModuleId: true, entityField: true, entityTableId: true, hostnameBindingsTableId: true, hostnameBindingsTableName: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, resolverFunctionName: true, routeBindingsTableId: true, routeBindingsTableName: true, routesTableId: true, routesTableName: true, schemaId: true, scope: true } }).execute(); // Get one by id -const item = await db.routeModule.findOne({ id: '', select: { apiName: true, catalogModuleId: true, databaseId: true, defaultPermissions: true, domainModuleId: true, entityField: true, entityTableId: true, hostnameBindingsTableId: true, hostnameBindingsTableName: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, resolverFunctionName: true, routeBindingsTableId: true, routeBindingsTableName: true, routesTableId: true, routesTableName: true, schemaId: true, scope: true } }).execute(); +const item = await db.routeModule.findOne({ id: '', select: { apiName: true, appLinksFunctionName: true, catalogModuleId: true, databaseId: true, deepLinkFunctionName: true, defaultPermissions: true, domainModuleId: true, entityField: true, entityTableId: true, hostnameBindingsTableId: true, hostnameBindingsTableName: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, resolverFunctionName: true, routeBindingsTableId: true, routeBindingsTableName: true, routesTableId: true, routesTableName: true, schemaId: true, scope: true } }).execute(); // Create -const created = await db.routeModule.create({ data: { apiName: '', catalogModuleId: '', databaseId: '', defaultPermissions: '', domainModuleId: '', entityField: '', entityTableId: '', hostnameBindingsTableId: '', hostnameBindingsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', resolverFunctionName: '', routeBindingsTableId: '', routeBindingsTableName: '', routesTableId: '', routesTableName: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); +const created = await db.routeModule.create({ data: { apiName: '', appLinksFunctionName: '', catalogModuleId: '', databaseId: '', deepLinkFunctionName: '', defaultPermissions: '', domainModuleId: '', entityField: '', entityTableId: '', hostnameBindingsTableId: '', hostnameBindingsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', resolverFunctionName: '', routeBindingsTableId: '', routeBindingsTableName: '', routesTableId: '', routesTableName: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); // Update const updated = await db.routeModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -2990,6 +3004,39 @@ const updated = await db.routeModule.update({ where: { id: '' }, data: { a const deleted = await db.routeModule.delete({ where: { id: '' } }).execute(); ``` +### `db.scopeTypesModule` + +CRUD operations for ScopeTypesModule records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `databaseId` | UUID | Yes | +| `id` | UUID | No | +| `privateSchemaName` | String | Yes | +| `schemaId` | UUID | Yes | +| `scopeTypesTableId` | UUID | Yes | + +**Operations:** + +```typescript +// List all scopeTypesModule records +const items = await db.scopeTypesModule.findMany({ select: { databaseId: true, id: true, privateSchemaName: true, schemaId: true, scopeTypesTableId: true } }).execute(); + +// Get one by id +const item = await db.scopeTypesModule.findOne({ id: '', select: { databaseId: true, id: true, privateSchemaName: true, schemaId: true, scopeTypesTableId: true } }).execute(); + +// Create +const created = await db.scopeTypesModule.create({ data: { databaseId: '', privateSchemaName: '', schemaId: '', scopeTypesTableId: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.scopeTypesModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.scopeTypesModule.delete({ where: { id: '' } }).execute(); +``` + ### `db.secureTableProvision` CRUD operations for SecureTableProvision records. @@ -3453,6 +3500,41 @@ const updated = await db.userSettingsModule.update({ where: { id: '' }, da const deleted = await db.userSettingsModule.delete({ where: { id: '' } }).execute(); ``` +### `db.userSettingsSecurityModule` + +CRUD operations for UserSettingsSecurityModule records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `apiName` | String | Yes | +| `databaseId` | UUID | Yes | +| `id` | UUID | No | +| `ownerTableId` | UUID | Yes | +| `schemaId` | UUID | Yes | +| `tableId` | UUID | Yes | +| `tableName` | String | Yes | + +**Operations:** + +```typescript +// List all userSettingsSecurityModule records +const items = await db.userSettingsSecurityModule.findMany({ select: { apiName: true, databaseId: true, id: true, ownerTableId: true, schemaId: true, tableId: true, tableName: true } }).execute(); + +// Get one by id +const item = await db.userSettingsSecurityModule.findOne({ id: '', select: { apiName: true, databaseId: true, id: true, ownerTableId: true, schemaId: true, tableId: true, tableName: true } }).execute(); + +// Create +const created = await db.userSettingsSecurityModule.create({ data: { apiName: '', databaseId: '', ownerTableId: '', schemaId: '', tableId: '', tableName: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.userSettingsSecurityModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.userSettingsSecurityModule.delete({ where: { id: '' } }).execute(); +``` + ### `db.userStateModule` CRUD operations for UserStateModule records. @@ -3658,42 +3740,6 @@ const deleted = await db.webhookModule.delete({ where: { id: '' } }).execu ## Custom Operations -### `db.query.resolveBlueprintField` - -Resolves a field_name within a given table_id to a field_id. Throws if no match is found. Used by construct_blueprint to translate user-authored field names (e.g. "location") into field UUIDs for downstream provisioning procedures. table_id must already be resolved (via resolve_blueprint_table) before calling this. - -- **Type:** query -- **Arguments:** - - | Argument | Type | - |----------|------| - | `databaseId` | UUID | - | `fieldName` | String | - | `tableId` | UUID | - -```typescript -const result = await db.query.resolveBlueprintField({ databaseId: '', fieldName: '', tableId: '' }).execute(); -``` - -### `db.query.resolveBlueprintTable` - -Resolves a table_name (with optional schema_name) to a table_id. Resolution order: (1) if schema_name provided, exact lookup via metaschema_public.schema.name + metaschema_public.table; (2) check local table_map (tables created in current blueprint); (3) search metaschema_public.table by name across all schemas; (4) if multiple matches, throw ambiguous error asking for schema_name; (5) if no match, throw not-found error. - -- **Type:** query -- **Arguments:** - - | Argument | Type | - |----------|------| - | `databaseId` | UUID | - | `defaultSchemaId` | UUID | - | `schemaName` | String | - | `tableMap` | JSON | - | `tableName` | String | - -```typescript -const result = await db.query.resolveBlueprintTable({ databaseId: '', defaultSchemaId: '', schemaName: '', tableMap: '', tableName: '' }).execute(); -``` - ### `db.mutation.constructBlueprint` Executes a blueprint definition by delegating to provision_* procedures. Creates a blueprint_construction record to track the attempt. Eight phases: (0) entity_type_provision for each membership_type entry — provisions entity tables, membership modules, and security. When a prefix already exists (e.g., 'org'), the entry extends the existing entity type instead of creating a new one; if a storage[] key is present, it provisions entity-scoped storage for that type. (0.5) scope-based storage: each storage[] entry has an optional scope ('app' or 'org' only). App-scoped storage seeds buckets at migration time. Org-scoped storage resolves the org membership type, creates org_buckets/org_files with owner_id, and seeds buckets per-entity via an AFTER INSERT trigger on the users table. When function_module is installed, a private functions bucket is auto-injected into org-scoped or entity-scoped storage entries. (1) provision_table() for each table with nodes[], fields[], policies[], and grants (table-level indexes/fts/unique_constraints/check_constraints are deferred). After provisioning, optional smart_tags (jsonb object) on the table entry are applied via metaschema.append_table_smart_tags(), and optional smart_tags on individual field entries are applied via metaschema.append_field_smart_tags(). (2) provision_relation() for each relation, (3) provision_index() for top-level + deferred indexes, (4) provision_full_text_search() for top-level + deferred FTS, (5) provision_unique_constraint() for top-level + deferred unique constraints, (6) provision_check_constraint() for top-level + deferred check constraints, (7) seed achievements from definition.achievements[] — resolves events_module by entity_prefix and creates INSERT actions for levels, level_requirements, and achievement_rewards tables. Phase 0 entity tables are added to the table_map so subsequent phases can reference them by name. Table-level entries are deferred to phases 3-6 so they can reference columns created by relations in phase 2. Returns the construction record ID on success, NULL on failure. @@ -3742,111 +3788,6 @@ and lifecycle settings. const result = await db.mutation.provisionBucket({ input: { bucketKey: '', ownerId: '' } }).execute(); ``` -### `db.mutation.provisionCheckConstraint` - -Creates a check constraint on a table from a $type + data blueprint definition. Supports: CheckOneOf (enum validation via = ANY(ARRAY[...])), CheckGreaterThan (single-column > value or cross-column), CheckLessThan (single-column < value or cross-column), CheckNotEqual (cross-column inequality). Builds AST expressions via ast_helpers and inserts into metaschema_public.check_constraint. Graceful: skips if a constraint with the same name already exists. - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | ProvisionCheckConstraintInput (required) | - -```typescript -const result = await db.mutation.provisionCheckConstraint({ input: { databaseId: '', definition: '', tableId: '' } }).execute(); -``` - -### `db.mutation.provisionFullTextSearch` - -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. - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | ProvisionFullTextSearchInput (required) | - -```typescript -const result = await db.mutation.provisionFullTextSearch({ input: { databaseId: '', definition: '', tableId: '' } }).execute(); -``` - -### `db.mutation.provisionIndex` - -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. - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | ProvisionIndexInput (required) | - -```typescript -const result = await db.mutation.provisionIndex({ input: { databaseId: '', definition: '', tableId: '' } }).execute(); -``` - -### `db.mutation.provisionRelation` - -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). - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | ProvisionRelationInput (required) | - -```typescript -const result = await db.mutation.provisionRelation({ input: '' }).execute(); -``` - -### `db.mutation.provisionSpatialRelation` - -Idempotent provisioner for metaschema_public.spatial_relation. Inserts a row declaring a spatial predicate between two geometry/geography columns (owner and target). Called from construct_blueprint when a relation entry has $type=RelationSpatial. Graceful: re-running with the same (source_table_id, name) returns the existing id without modifying the row. Operator whitelist and st_dwithin ↔ param_name pairing are enforced by the spatial_relation table CHECKs. Both fields must already exist — this is a metadata-only insert. - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | ProvisionSpatialRelationInput (required) | - -```typescript -const result = await db.mutation.provisionSpatialRelation({ input: '' }).execute(); -``` - -### `db.mutation.provisionTable` - -Composable table provisioning: creates or finds a table, then creates fields (so Data* modules can reference them), applies N nodes (Data* modules), 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). - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | ProvisionTableInput (required) | - -```typescript -const result = await db.mutation.provisionTable({ input: '' }).execute(); -``` - -### `db.mutation.provisionUniqueConstraint` - -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. - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | ProvisionUniqueConstraintInput (required) | - -```typescript -const result = await db.mutation.provisionUniqueConstraint({ input: { databaseId: '', definition: '', tableId: '' } }).execute(); -``` - --- Built by the [Constructive](https://constructive.io) team. diff --git a/sdk/constructive-cli/src/modules/orm/index.ts b/sdk/constructive-cli/src/modules/orm/index.ts index 0951126688..6b46df1203 100644 --- a/sdk/constructive-cli/src/modules/orm/index.ts +++ b/sdk/constructive-cli/src/modules/orm/index.ts @@ -66,6 +66,7 @@ import { RelationProvisionModel } from './models/relationProvision'; import { ResourceModuleModel } from './models/resourceModule'; import { RlsModuleModel } from './models/rlsModule'; import { RouteModuleModel } from './models/routeModule'; +import { ScopeTypesModuleModel } from './models/scopeTypesModule'; import { SecureTableProvisionModel } from './models/secureTableProvision'; import { SessionSecretsModuleModel } from './models/sessionSecretsModule'; import { SessionsModuleModel } from './models/sessionsModule'; @@ -76,19 +77,18 @@ import { TransferLogModuleModel } from './models/transferLogModule'; import { UserAuthModuleModel } from './models/userAuthModule'; import { UserCredentialsModuleModel } from './models/userCredentialsModule'; import { UserSettingsModuleModel } from './models/userSettingsModule'; +import { UserSettingsSecurityModuleModel } from './models/userSettingsSecurityModule'; import { UserStateModuleModel } from './models/userStateModule'; import { UsersModuleModel } from './models/usersModule'; import { WebauthnAuthModuleModel } from './models/webauthnAuthModule'; import { WebauthnCredentialsModuleModel } from './models/webauthnCredentialsModule'; import { WebhookModuleModel } from './models/webhookModule'; -import { createQueryOperations } from './query'; import { createMutationOperations } from './mutation'; export type { OrmClientConfig, QueryResult, GraphQLError, GraphQLAdapter } from './client'; export { GraphQLRequestError, FetchAdapter } from './client'; export { QueryBuilder } from './query-builder'; export * from './select-types'; export * from './models'; -export { createQueryOperations } from './query'; export { createMutationOperations } from './mutation'; /** * Create an ORM client instance @@ -177,6 +177,7 @@ export function createClient(config: OrmClientConfig) { resourceModule: new ResourceModuleModel(client), rlsModule: new RlsModuleModel(client), routeModule: new RouteModuleModel(client), + scopeTypesModule: new ScopeTypesModuleModel(client), secureTableProvision: new SecureTableProvisionModel(client), sessionSecretsModule: new SessionSecretsModuleModel(client), sessionsModule: new SessionsModuleModel(client), @@ -187,12 +188,12 @@ export function createClient(config: OrmClientConfig) { userAuthModule: new UserAuthModuleModel(client), userCredentialsModule: new UserCredentialsModuleModel(client), userSettingsModule: new UserSettingsModuleModel(client), + userSettingsSecurityModule: new UserSettingsSecurityModuleModel(client), userStateModule: new UserStateModuleModel(client), usersModule: new UsersModuleModel(client), webauthnAuthModule: new WebauthnAuthModuleModel(client), webauthnCredentialsModule: new WebauthnCredentialsModuleModel(client), webhookModule: new WebhookModuleModel(client), - query: createQueryOperations(client), mutation: createMutationOperations(client), }; } diff --git a/sdk/constructive-cli/src/modules/orm/input-types.ts b/sdk/constructive-cli/src/modules/orm/input-types.ts index ed552e4810..611116f58f 100644 --- a/sdk/constructive-cli/src/modules/orm/input-types.ts +++ b/sdk/constructive-cli/src/modules/orm/input-types.ts @@ -349,16 +349,22 @@ export interface BillingProviderModule { apiName?: string | null; billingCustomersTableId?: string | null; billingCustomersTableName?: string | null; + billingInvoicesTableId?: string | null; + billingInvoicesTableName?: string | null; billingPricesTableId?: string | null; billingPricesTableName?: string | null; billingProductsTableId?: string | null; billingProductsTableName?: string | null; + billingRefundsTableId?: string | null; + billingRefundsTableName?: string | null; billingSubscriptionsTableId?: string | null; billingSubscriptionsTableName?: string | null; billingWebhookEventsTableId?: string | null; billingWebhookEventsTableName?: string | null; databaseId?: string | null; id: string; + listPendingUsageSyncFunction?: string | null; + markUsageSyncedFunction?: string | null; prefix?: string | null; pricesTableId?: string | null; privateApiName?: string | null; @@ -366,8 +372,10 @@ export interface BillingProviderModule { processBillingEventFunction?: string | null; productsTableId?: string | null; provider?: string | null; + recordRefundFunction?: string | null; schemaId?: string | null; subscriptionsTableId?: string | null; + upsertInvoiceFunction?: string | null; } /** An owned, editable blueprint scoped to a specific database. Created by copying from a blueprint_template via copy_template_to_blueprint() or built from scratch. The owner can customize the definition at any time. Execute it with construct_blueprint() which creates a separate blueprint_construction record to track the build. */ export interface Blueprint { @@ -470,6 +478,8 @@ export interface CatalogModule { apisTableName?: string | null; appsTableId?: string | null; appsTableName?: string | null; + bindingsTableId?: string | null; + bindingsTableName?: string | null; bucketsTableId?: string | null; bucketsTableName?: string | null; databaseId?: string | null; @@ -1019,7 +1029,7 @@ export interface EntityTypeProvision { tableName?: string | null; /** * Single jsonb object describing the full security setup to apply to the entity table. - * Uses the same vocabulary as metaschema_modules_public.provision_table() and blueprint tables[] + * Uses the same vocabulary as metaschema_modules_private.provision_table() and blueprint tables[] * entries, so an entity table is configured the same way an ordinary blueprint table is. * Defaults to NULL; when non-NULL, the five default policies are implicitly replaced by * table_provision.policies[] (is_visible becomes a no-op on this path). @@ -1937,8 +1947,10 @@ export interface RlsModule { } export interface RouteModule { apiName?: string | null; + appLinksFunctionName?: string | null; catalogModuleId?: string | null; databaseId?: string | null; + deepLinkFunctionName?: string | null; defaultPermissions?: string[] | null; domainModuleId?: string | null; entityField?: string | null; @@ -1961,6 +1973,13 @@ export interface RouteModule { schemaId?: string | null; scope?: string | null; } +export interface ScopeTypesModule { + databaseId?: string | null; + id: string; + privateSchemaName?: string | null; + schemaId?: string | null; + scopeTypesTableId?: string | null; +} /** Provisions security, fields, grants, and policies onto a table. Each row can independently: (1) create fields via nodes[] array (supporting multiple Data* modules per row), (2) grant privileges via grants[] array (supporting per-role privilege targeting), (3) create RLS policies via policies[] array (supporting multiple Authz* policies per row). Multiple rows can target the same table to compose different concerns. All three concerns are optional and independent. */ export interface SecureTableProvision { /** The database this provision belongs to. Required. */ @@ -2183,6 +2202,15 @@ export interface UserSettingsModule { tableId?: string | null; tableName?: string | null; } +export interface UserSettingsSecurityModule { + apiName?: string | null; + databaseId?: string | null; + id: string; + ownerTableId?: string | null; + schemaId?: string | null; + tableId?: string | null; + tableName?: string | null; +} export interface UserStateModule { databaseId?: string | null; entityField?: string | null; @@ -2395,6 +2423,7 @@ export interface RouteModuleRelations { catalogModule?: CatalogModule | null; domainModule?: DomainModule | null; } +export interface ScopeTypesModuleRelations {} export interface SecureTableProvisionRelations {} export interface SessionSecretsModuleRelations {} export interface SessionsModuleRelations {} @@ -2410,6 +2439,7 @@ export interface TransferLogModuleRelations {} export interface UserAuthModuleRelations {} export interface UserCredentialsModuleRelations {} export interface UserSettingsModuleRelations {} +export interface UserSettingsSecurityModuleRelations {} export interface UserStateModuleRelations {} export interface UsersModuleRelations {} export interface WebauthnAuthModuleRelations {} @@ -2498,6 +2528,7 @@ export type RelationProvisionWithRelations = RelationProvision & RelationProvisi export type ResourceModuleWithRelations = ResourceModule & ResourceModuleRelations; export type RlsModuleWithRelations = RlsModule & RlsModuleRelations; export type RouteModuleWithRelations = RouteModule & RouteModuleRelations; +export type ScopeTypesModuleWithRelations = ScopeTypesModule & ScopeTypesModuleRelations; export type SecureTableProvisionWithRelations = SecureTableProvision & SecureTableProvisionRelations; export type SessionSecretsModuleWithRelations = SessionSecretsModule & @@ -2511,6 +2542,8 @@ export type UserAuthModuleWithRelations = UserAuthModule & UserAuthModuleRelatio export type UserCredentialsModuleWithRelations = UserCredentialsModule & UserCredentialsModuleRelations; export type UserSettingsModuleWithRelations = UserSettingsModule & UserSettingsModuleRelations; +export type UserSettingsSecurityModuleWithRelations = UserSettingsSecurityModule & + UserSettingsSecurityModuleRelations; export type UserStateModuleWithRelations = UserStateModule & UserStateModuleRelations; export type UsersModuleWithRelations = UsersModule & UsersModuleRelations; export type WebauthnAuthModuleWithRelations = WebauthnAuthModule & WebauthnAuthModuleRelations; @@ -2642,16 +2675,22 @@ export type BillingProviderModuleSelect = { apiName?: boolean; billingCustomersTableId?: boolean; billingCustomersTableName?: boolean; + billingInvoicesTableId?: boolean; + billingInvoicesTableName?: boolean; billingPricesTableId?: boolean; billingPricesTableName?: boolean; billingProductsTableId?: boolean; billingProductsTableName?: boolean; + billingRefundsTableId?: boolean; + billingRefundsTableName?: boolean; billingSubscriptionsTableId?: boolean; billingSubscriptionsTableName?: boolean; billingWebhookEventsTableId?: boolean; billingWebhookEventsTableName?: boolean; databaseId?: boolean; id?: boolean; + listPendingUsageSyncFunction?: boolean; + markUsageSyncedFunction?: boolean; prefix?: boolean; pricesTableId?: boolean; privateApiName?: boolean; @@ -2659,8 +2698,10 @@ export type BillingProviderModuleSelect = { processBillingEventFunction?: boolean; productsTableId?: boolean; provider?: boolean; + recordRefundFunction?: boolean; schemaId?: boolean; subscriptionsTableId?: boolean; + upsertInvoiceFunction?: boolean; }; export type BlueprintSelect = { createdAt?: boolean; @@ -2744,6 +2785,8 @@ export type CatalogModuleSelect = { apisTableName?: boolean; appsTableId?: boolean; appsTableName?: boolean; + bindingsTableId?: boolean; + bindingsTableName?: boolean; bucketsTableId?: boolean; bucketsTableName?: boolean; databaseId?: boolean; @@ -3990,8 +4033,10 @@ export type RlsModuleSelect = { }; export type RouteModuleSelect = { apiName?: boolean; + appLinksFunctionName?: boolean; catalogModuleId?: boolean; databaseId?: boolean; + deepLinkFunctionName?: boolean; defaultPermissions?: boolean; domainModuleId?: boolean; entityField?: boolean; @@ -4020,6 +4065,13 @@ export type RouteModuleSelect = { select: DomainModuleSelect; }; }; +export type ScopeTypesModuleSelect = { + databaseId?: boolean; + id?: boolean; + privateSchemaName?: boolean; + schemaId?: boolean; + scopeTypesTableId?: boolean; +}; export type SecureTableProvisionSelect = { databaseId?: boolean; fields?: boolean; @@ -4238,6 +4290,15 @@ export type UserSettingsModuleSelect = { tableId?: boolean; tableName?: boolean; }; +export type UserSettingsSecurityModuleSelect = { + apiName?: boolean; + databaseId?: boolean; + id?: boolean; + ownerTableId?: boolean; + schemaId?: boolean; + tableId?: boolean; + tableName?: boolean; +}; export type UserStateModuleSelect = { databaseId?: boolean; entityField?: boolean; @@ -4585,6 +4646,10 @@ export interface BillingProviderModuleFilter { billingCustomersTableId?: UUIDFilter; /** Filter by the object’s `billingCustomersTableName` field. */ billingCustomersTableName?: StringFilter; + /** Filter by the object’s `billingInvoicesTableId` field. */ + billingInvoicesTableId?: UUIDFilter; + /** Filter by the object’s `billingInvoicesTableName` field. */ + billingInvoicesTableName?: StringFilter; /** Filter by the object’s `billingPricesTableId` field. */ billingPricesTableId?: UUIDFilter; /** Filter by the object’s `billingPricesTableName` field. */ @@ -4593,6 +4658,10 @@ export interface BillingProviderModuleFilter { billingProductsTableId?: UUIDFilter; /** Filter by the object’s `billingProductsTableName` field. */ billingProductsTableName?: StringFilter; + /** Filter by the object’s `billingRefundsTableId` field. */ + billingRefundsTableId?: UUIDFilter; + /** Filter by the object’s `billingRefundsTableName` field. */ + billingRefundsTableName?: StringFilter; /** Filter by the object’s `billingSubscriptionsTableId` field. */ billingSubscriptionsTableId?: UUIDFilter; /** Filter by the object’s `billingSubscriptionsTableName` field. */ @@ -4605,6 +4674,10 @@ export interface BillingProviderModuleFilter { databaseId?: UUIDFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; + /** Filter by the object’s `listPendingUsageSyncFunction` field. */ + listPendingUsageSyncFunction?: StringFilter; + /** Filter by the object’s `markUsageSyncedFunction` field. */ + markUsageSyncedFunction?: StringFilter; /** Negates the expression. */ not?: BillingProviderModuleFilter; /** Checks for any expressions in this list. */ @@ -4623,10 +4696,14 @@ export interface BillingProviderModuleFilter { productsTableId?: UUIDFilter; /** Filter by the object’s `provider` field. */ provider?: StringFilter; + /** Filter by the object’s `recordRefundFunction` field. */ + recordRefundFunction?: StringFilter; /** Filter by the object’s `schemaId` field. */ schemaId?: UUIDFilter; /** Filter by the object’s `subscriptionsTableId` field. */ subscriptionsTableId?: UUIDFilter; + /** Filter by the object’s `upsertInvoiceFunction` field. */ + upsertInvoiceFunction?: StringFilter; } export interface BlueprintFilter { /** Checks for all expressions in this list. */ @@ -4781,6 +4858,10 @@ export interface CatalogModuleFilter { appsTableId?: UUIDFilter; /** Filter by the object’s `appsTableName` field. */ appsTableName?: StringFilter; + /** Filter by the object’s `bindingsTableId` field. */ + bindingsTableId?: UUIDFilter; + /** Filter by the object’s `bindingsTableName` field. */ + bindingsTableName?: StringFilter; /** Filter by the object’s `bucketsTableId` field. */ bucketsTableId?: UUIDFilter; /** Filter by the object’s `bucketsTableName` field. */ @@ -7279,6 +7360,8 @@ export interface RouteModuleFilter { and?: RouteModuleFilter[]; /** Filter by the object’s `apiName` field. */ apiName?: StringFilter; + /** Filter by the object’s `appLinksFunctionName` field. */ + appLinksFunctionName?: StringFilter; /** Filter by the object’s `catalogModule` relation. */ catalogModule?: CatalogModuleFilter; /** A related `catalogModule` exists. */ @@ -7287,6 +7370,8 @@ export interface RouteModuleFilter { catalogModuleId?: UUIDFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; + /** Filter by the object’s `deepLinkFunctionName` field. */ + deepLinkFunctionName?: StringFilter; /** Filter by the object’s `defaultPermissions` field. */ defaultPermissions?: StringListFilter; /** Filter by the object’s `domainModule` relation. */ @@ -7338,6 +7423,24 @@ export interface RouteModuleFilter { /** Filter by the object’s `scope` field. */ scope?: StringFilter; } +export interface ScopeTypesModuleFilter { + /** Checks for all expressions in this list. */ + and?: ScopeTypesModuleFilter[]; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: ScopeTypesModuleFilter; + /** Checks for any expressions in this list. */ + or?: ScopeTypesModuleFilter[]; + /** Filter by the object’s `privateSchemaName` field. */ + privateSchemaName?: StringFilter; + /** Filter by the object’s `schemaId` field. */ + schemaId?: UUIDFilter; + /** Filter by the object’s `scopeTypesTableId` field. */ + scopeTypesTableId?: UUIDFilter; +} export interface SecureTableProvisionFilter { /** Checks for all expressions in this list. */ and?: SecureTableProvisionFilter[]; @@ -7796,6 +7899,28 @@ export interface UserSettingsModuleFilter { /** Filter by the object’s `tableName` field. */ tableName?: StringFilter; } +export interface UserSettingsSecurityModuleFilter { + /** Checks for all expressions in this list. */ + and?: UserSettingsSecurityModuleFilter[]; + /** Filter by the object’s `apiName` field. */ + apiName?: StringFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: UserSettingsSecurityModuleFilter; + /** Checks for any expressions in this list. */ + or?: UserSettingsSecurityModuleFilter[]; + /** Filter by the object’s `ownerTableId` field. */ + ownerTableId?: UUIDFilter; + /** Filter by the object’s `schemaId` field. */ + schemaId?: UUIDFilter; + /** Filter by the object’s `tableId` field. */ + tableId?: UUIDFilter; + /** Filter by the object’s `tableName` field. */ + tableName?: StringFilter; +} export interface UserStateModuleFilter { /** Checks for all expressions in this list. */ and?: UserStateModuleFilter[]; @@ -8214,6 +8339,10 @@ export type BillingProviderModuleOrderBy = | 'BILLING_CUSTOMERS_TABLE_ID_DESC' | 'BILLING_CUSTOMERS_TABLE_NAME_ASC' | 'BILLING_CUSTOMERS_TABLE_NAME_DESC' + | 'BILLING_INVOICES_TABLE_ID_ASC' + | 'BILLING_INVOICES_TABLE_ID_DESC' + | 'BILLING_INVOICES_TABLE_NAME_ASC' + | 'BILLING_INVOICES_TABLE_NAME_DESC' | 'BILLING_PRICES_TABLE_ID_ASC' | 'BILLING_PRICES_TABLE_ID_DESC' | 'BILLING_PRICES_TABLE_NAME_ASC' @@ -8222,6 +8351,10 @@ export type BillingProviderModuleOrderBy = | 'BILLING_PRODUCTS_TABLE_ID_DESC' | 'BILLING_PRODUCTS_TABLE_NAME_ASC' | 'BILLING_PRODUCTS_TABLE_NAME_DESC' + | 'BILLING_REFUNDS_TABLE_ID_ASC' + | 'BILLING_REFUNDS_TABLE_ID_DESC' + | 'BILLING_REFUNDS_TABLE_NAME_ASC' + | 'BILLING_REFUNDS_TABLE_NAME_DESC' | 'BILLING_SUBSCRIPTIONS_TABLE_ID_ASC' | 'BILLING_SUBSCRIPTIONS_TABLE_ID_DESC' | 'BILLING_SUBSCRIPTIONS_TABLE_NAME_ASC' @@ -8234,6 +8367,10 @@ export type BillingProviderModuleOrderBy = | 'DATABASE_ID_DESC' | 'ID_ASC' | 'ID_DESC' + | 'LIST_PENDING_USAGE_SYNC_FUNCTION_ASC' + | 'LIST_PENDING_USAGE_SYNC_FUNCTION_DESC' + | 'MARK_USAGE_SYNCED_FUNCTION_ASC' + | 'MARK_USAGE_SYNCED_FUNCTION_DESC' | 'NATURAL' | 'PREFIX_ASC' | 'PREFIX_DESC' @@ -8251,10 +8388,14 @@ export type BillingProviderModuleOrderBy = | 'PRODUCTS_TABLE_ID_DESC' | 'PROVIDER_ASC' | 'PROVIDER_DESC' + | 'RECORD_REFUND_FUNCTION_ASC' + | 'RECORD_REFUND_FUNCTION_DESC' | 'SCHEMA_ID_ASC' | 'SCHEMA_ID_DESC' | 'SUBSCRIPTIONS_TABLE_ID_ASC' - | 'SUBSCRIPTIONS_TABLE_ID_DESC'; + | 'SUBSCRIPTIONS_TABLE_ID_DESC' + | 'UPSERT_INVOICE_FUNCTION_ASC' + | 'UPSERT_INVOICE_FUNCTION_DESC'; export type BlueprintOrderBy = | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' @@ -8364,6 +8505,10 @@ export type CatalogModuleOrderBy = | 'APPS_TABLE_ID_DESC' | 'APPS_TABLE_NAME_ASC' | 'APPS_TABLE_NAME_DESC' + | 'BINDINGS_TABLE_ID_ASC' + | 'BINDINGS_TABLE_ID_DESC' + | 'BINDINGS_TABLE_NAME_ASC' + | 'BINDINGS_TABLE_NAME_DESC' | 'BUCKETS_TABLE_ID_ASC' | 'BUCKETS_TABLE_ID_DESC' | 'BUCKETS_TABLE_NAME_ASC' @@ -10538,10 +10683,14 @@ export type RlsModuleOrderBy = export type RouteModuleOrderBy = | 'API_NAME_ASC' | 'API_NAME_DESC' + | 'APP_LINKS_FUNCTION_NAME_ASC' + | 'APP_LINKS_FUNCTION_NAME_DESC' | 'CATALOG_MODULE_ID_ASC' | 'CATALOG_MODULE_ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' + | 'DEEP_LINK_FUNCTION_NAME_ASC' + | 'DEEP_LINK_FUNCTION_NAME_DESC' | 'DEFAULT_PERMISSIONS_ASC' | 'DEFAULT_PERMISSIONS_DESC' | 'DOMAIN_MODULE_ID_ASC' @@ -10587,6 +10736,20 @@ export type RouteModuleOrderBy = | 'SCHEMA_ID_DESC' | 'SCOPE_ASC' | 'SCOPE_DESC'; +export type ScopeTypesModuleOrderBy = + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'PRIVATE_SCHEMA_NAME_ASC' + | 'PRIVATE_SCHEMA_NAME_DESC' + | 'SCHEMA_ID_ASC' + | 'SCHEMA_ID_DESC' + | 'SCOPE_TYPES_TABLE_ID_ASC' + | 'SCOPE_TYPES_TABLE_ID_DESC'; export type SecureTableProvisionOrderBy = | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' @@ -10993,6 +11156,24 @@ export type UserSettingsModuleOrderBy = | 'TABLE_ID_DESC' | 'TABLE_NAME_ASC' | 'TABLE_NAME_DESC'; +export type UserSettingsSecurityModuleOrderBy = + | 'API_NAME_ASC' + | 'API_NAME_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NATURAL' + | 'OWNER_TABLE_ID_ASC' + | 'OWNER_TABLE_ID_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'SCHEMA_ID_ASC' + | 'SCHEMA_ID_DESC' + | 'TABLE_ID_ASC' + | 'TABLE_ID_DESC' + | 'TABLE_NAME_ASC' + | 'TABLE_NAME_DESC'; export type UserStateModuleOrderBy = | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' @@ -11414,15 +11595,21 @@ export interface CreateBillingProviderModuleInput { apiName?: string; billingCustomersTableId?: string; billingCustomersTableName?: string; + billingInvoicesTableId?: string; + billingInvoicesTableName?: string; billingPricesTableId?: string; billingPricesTableName?: string; billingProductsTableId?: string; billingProductsTableName?: string; + billingRefundsTableId?: string; + billingRefundsTableName?: string; billingSubscriptionsTableId?: string; billingSubscriptionsTableName?: string; billingWebhookEventsTableId?: string; billingWebhookEventsTableName?: string; databaseId: string; + listPendingUsageSyncFunction?: string; + markUsageSyncedFunction?: string; prefix?: string; pricesTableId?: string; privateApiName?: string; @@ -11430,23 +11617,31 @@ export interface CreateBillingProviderModuleInput { processBillingEventFunction?: string; productsTableId?: string; provider?: string; + recordRefundFunction?: string; schemaId?: string; subscriptionsTableId?: string; + upsertInvoiceFunction?: string; }; } export interface BillingProviderModulePatch { apiName?: string | null; billingCustomersTableId?: string | null; billingCustomersTableName?: string | null; + billingInvoicesTableId?: string | null; + billingInvoicesTableName?: string | null; billingPricesTableId?: string | null; billingPricesTableName?: string | null; billingProductsTableId?: string | null; billingProductsTableName?: string | null; + billingRefundsTableId?: string | null; + billingRefundsTableName?: string | null; billingSubscriptionsTableId?: string | null; billingSubscriptionsTableName?: string | null; billingWebhookEventsTableId?: string | null; billingWebhookEventsTableName?: string | null; databaseId?: string | null; + listPendingUsageSyncFunction?: string | null; + markUsageSyncedFunction?: string | null; prefix?: string | null; pricesTableId?: string | null; privateApiName?: string | null; @@ -11454,8 +11649,10 @@ export interface BillingProviderModulePatch { processBillingEventFunction?: string | null; productsTableId?: string | null; provider?: string | null; + recordRefundFunction?: string | null; schemaId?: string | null; subscriptionsTableId?: string | null; + upsertInvoiceFunction?: string | null; } export interface UpdateBillingProviderModuleInput { clientMutationId?: string; @@ -11590,6 +11787,8 @@ export interface CreateCatalogModuleInput { apisTableName?: string; appsTableId?: string; appsTableName?: string; + bindingsTableId?: string; + bindingsTableName?: string; bucketsTableId?: string; bucketsTableName?: string; databaseId: string; @@ -11631,6 +11830,8 @@ export interface CatalogModulePatch { apisTableName?: string | null; appsTableId?: string | null; appsTableName?: string | null; + bindingsTableId?: string | null; + bindingsTableName?: string | null; bucketsTableId?: string | null; bucketsTableName?: string | null; databaseId?: string | null; @@ -14264,8 +14465,10 @@ export interface CreateRouteModuleInput { clientMutationId?: string; routeModule: { apiName?: string; + appLinksFunctionName?: string; catalogModuleId?: string; databaseId: string; + deepLinkFunctionName?: string; defaultPermissions?: string[]; domainModuleId?: string; entityField?: string; @@ -14290,8 +14493,10 @@ export interface CreateRouteModuleInput { } export interface RouteModulePatch { apiName?: string | null; + appLinksFunctionName?: string | null; catalogModuleId?: string | null; databaseId?: string | null; + deepLinkFunctionName?: string | null; defaultPermissions?: string[] | null; domainModuleId?: string | null; entityField?: string | null; @@ -14322,6 +14527,30 @@ export interface DeleteRouteModuleInput { clientMutationId?: string; id: string; } +export interface CreateScopeTypesModuleInput { + clientMutationId?: string; + scopeTypesModule: { + databaseId: string; + privateSchemaName?: string; + schemaId?: string; + scopeTypesTableId?: string; + }; +} +export interface ScopeTypesModulePatch { + databaseId?: string | null; + privateSchemaName?: string | null; + schemaId?: string | null; + scopeTypesTableId?: string | null; +} +export interface UpdateScopeTypesModuleInput { + clientMutationId?: string; + id: string; + scopeTypesModulePatch: ScopeTypesModulePatch; +} +export interface DeleteScopeTypesModuleInput { + clientMutationId?: string; + id: string; +} export interface CreateSecureTableProvisionInput { clientMutationId?: string; secureTableProvision: { @@ -14828,6 +15057,34 @@ export interface DeleteUserSettingsModuleInput { clientMutationId?: string; id: string; } +export interface CreateUserSettingsSecurityModuleInput { + clientMutationId?: string; + userSettingsSecurityModule: { + apiName?: string; + databaseId: string; + ownerTableId?: string; + schemaId?: string; + tableId?: string; + tableName?: string; + }; +} +export interface UserSettingsSecurityModulePatch { + apiName?: string | null; + databaseId?: string | null; + ownerTableId?: string | null; + schemaId?: string | null; + tableId?: string | null; + tableName?: string | null; +} +export interface UpdateUserSettingsSecurityModuleInput { + clientMutationId?: string; + id: string; + userSettingsSecurityModulePatch: UserSettingsSecurityModulePatch; +} +export interface DeleteUserSettingsSecurityModuleInput { + clientMutationId?: string; + id: string; +} export interface CreateUserStateModuleInput { clientMutationId?: string; userStateModule: { @@ -15101,79 +15358,6 @@ export interface ProvisionBucketInput { */ ownerId?: string; } -export interface ProvisionCheckConstraintInput { - clientMutationId?: string; - databaseId?: string; - definition?: Record; - tableId?: string; -} -export interface ProvisionFullTextSearchInput { - clientMutationId?: string; - databaseId?: string; - definition?: Record; - tableId?: string; -} -export interface ProvisionIndexInput { - clientMutationId?: string; - databaseId?: string; - definition?: Record; - tableId?: string; -} -export interface ProvisionRelationInput { - apiRequired?: boolean; - clientMutationId?: string; - createIndex?: boolean; - databaseId?: string; - deleteAction?: string; - exposeInApi?: boolean; - fieldName?: string; - grants?: Record; - isRequired?: boolean; - junctionSchemaId?: string; - junctionTableId?: string; - junctionTableName?: string; - nodes?: Record; - policies?: Record; - relationType?: string; - sourceFieldName?: string; - sourceTableId?: string; - targetFieldName?: string; - targetTableId?: string; - useCompositeKey?: boolean; -} -export interface ProvisionSpatialRelationInput { - clientMutationId?: string; - databaseId?: string; - name?: string; - operator?: string; - paramName?: string; - sourceFieldId?: string; - sourceTableId?: string; - targetFieldId?: string; - targetTableId?: string; -} -export interface ProvisionTableInput { - clientMutationId?: string; - databaseId?: string; - description?: string; - fields?: Record; - fullTextSearches?: Record; - grants?: Record; - indexes?: Record; - nodes?: Record; - policies?: Record; - schemaId?: string; - tableId?: string; - tableName?: string; - uniqueConstraints?: Record; - useRls?: boolean; -} -export interface ProvisionUniqueConstraintInput { - clientMutationId?: string; - databaseId?: string; - definition?: Record; - tableId?: string; -} /** A filter to be used against many `BlueprintConstruction` object types. All fields are combined with a logical ‘and.’ */ export interface BlueprintToManyBlueprintConstructionFilter { /** Filters to entities where every related entity matches. */ @@ -15586,16 +15770,22 @@ export interface BillingProviderModuleInput { apiName?: string; billingCustomersTableId?: string; billingCustomersTableName?: string; + billingInvoicesTableId?: string; + billingInvoicesTableName?: string; billingPricesTableId?: string; billingPricesTableName?: string; billingProductsTableId?: string; billingProductsTableName?: string; + billingRefundsTableId?: string; + billingRefundsTableName?: string; billingSubscriptionsTableId?: string; billingSubscriptionsTableName?: string; billingWebhookEventsTableId?: string; billingWebhookEventsTableName?: string; databaseId: string; id?: string; + listPendingUsageSyncFunction?: string; + markUsageSyncedFunction?: string; prefix?: string; pricesTableId?: string; privateApiName?: string; @@ -15603,8 +15793,10 @@ export interface BillingProviderModuleInput { processBillingEventFunction?: string; productsTableId?: string; provider?: string; + recordRefundFunction?: string; schemaId?: string; subscriptionsTableId?: string; + upsertInvoiceFunction?: string; } /** An input for mutations affecting `Blueprint` */ export interface BlueprintInput { @@ -15708,6 +15900,8 @@ export interface CatalogModuleInput { apisTableName?: string; appsTableId?: string; appsTableName?: string; + bindingsTableId?: string; + bindingsTableName?: string; bucketsTableId?: string; bucketsTableName?: string; databaseId: string; @@ -16280,7 +16474,7 @@ export interface EntityTypeProvisionInput { tableName?: string; /** * Single jsonb object describing the full security setup to apply to the entity table. - * Uses the same vocabulary as metaschema_modules_public.provision_table() and blueprint tables[] + * Uses the same vocabulary as metaschema_modules_private.provision_table() and blueprint tables[] * entries, so an entity table is configured the same way an ordinary blueprint table is. * Defaults to NULL; when non-NULL, the five default policies are implicitly replaced by * table_provision.policies[] (is_visible becomes a no-op on this path). @@ -17201,8 +17395,10 @@ export interface RlsModuleInput { /** An input for mutations affecting `RouteModule` */ export interface RouteModuleInput { apiName?: string; + appLinksFunctionName?: string; catalogModuleId?: string; databaseId: string; + deepLinkFunctionName?: string; defaultPermissions?: string[]; domainModuleId?: string; entityField?: string; @@ -17225,6 +17421,14 @@ export interface RouteModuleInput { schemaId?: string; scope: string; } +/** An input for mutations affecting `ScopeTypesModule` */ +export interface ScopeTypesModuleInput { + databaseId: string; + id?: string; + privateSchemaName?: string; + schemaId?: string; + scopeTypesTableId?: string; +} /** An input for mutations affecting `SecureTableProvision` */ export interface SecureTableProvisionInput { /** The database this provision belongs to. Required. */ @@ -17450,6 +17654,16 @@ export interface UserSettingsModuleInput { tableId?: string; tableName?: string; } +/** An input for mutations affecting `UserSettingsSecurityModule` */ +export interface UserSettingsSecurityModuleInput { + apiName?: string; + databaseId: string; + id?: string; + ownerTableId?: string; + schemaId?: string; + tableId?: string; + tableName?: string; +} /** An input for mutations affecting `UserStateModule` */ export interface UserStateModuleInput { databaseId: string; @@ -17845,6 +18059,8 @@ export interface RouteModuleFilter { and?: RouteModuleFilter[]; /** Filter by the object’s `apiName` field. */ apiName?: StringFilter; + /** Filter by the object’s `appLinksFunctionName` field. */ + appLinksFunctionName?: StringFilter; /** Filter by the object’s `catalogModule` relation. */ catalogModule?: CatalogModuleFilter; /** A related `catalogModule` exists. */ @@ -17853,6 +18069,8 @@ export interface RouteModuleFilter { catalogModuleId?: UUIDFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; + /** Filter by the object’s `deepLinkFunctionName` field. */ + deepLinkFunctionName?: StringFilter; /** Filter by the object’s `defaultPermissions` field. */ defaultPermissions?: StringListFilter; /** Filter by the object’s `domainModule` relation. */ @@ -18725,6 +18943,10 @@ export interface CatalogModuleFilter { appsTableId?: UUIDFilter; /** Filter by the object’s `appsTableName` field. */ appsTableName?: StringFilter; + /** Filter by the object’s `bindingsTableId` field. */ + bindingsTableId?: UUIDFilter; + /** Filter by the object’s `bindingsTableName` field. */ + bindingsTableName?: StringFilter; /** Filter by the object’s `bucketsTableId` field. */ bucketsTableId?: UUIDFilter; /** Filter by the object’s `bucketsTableName` field. */ @@ -19279,62 +19501,6 @@ export type ProvisionBucketPayloadSelect = { provider?: boolean; success?: boolean; }; -export interface ProvisionCheckConstraintPayload { - clientMutationId?: string | null; -} -export type ProvisionCheckConstraintPayloadSelect = { - clientMutationId?: boolean; -}; -export interface ProvisionFullTextSearchPayload { - clientMutationId?: string | null; - result?: string | null; -} -export type ProvisionFullTextSearchPayloadSelect = { - clientMutationId?: boolean; - result?: boolean; -}; -export interface ProvisionIndexPayload { - clientMutationId?: string | null; - result?: string | null; -} -export type ProvisionIndexPayloadSelect = { - clientMutationId?: boolean; - result?: boolean; -}; -export interface ProvisionRelationPayload { - clientMutationId?: string | null; - result?: ProvisionRelationRecord[] | null; -} -export type ProvisionRelationPayloadSelect = { - clientMutationId?: boolean; - result?: { - select: ProvisionRelationRecordSelect; - }; -}; -export interface ProvisionSpatialRelationPayload { - clientMutationId?: string | null; - result?: string | null; -} -export type ProvisionSpatialRelationPayloadSelect = { - clientMutationId?: boolean; - result?: boolean; -}; -export interface ProvisionTablePayload { - clientMutationId?: string | null; - result?: ProvisionTableRecord[] | null; -} -export type ProvisionTablePayloadSelect = { - clientMutationId?: boolean; - result?: { - select: ProvisionTableRecordSelect; - }; -}; -export interface ProvisionUniqueConstraintPayload { - clientMutationId?: string | null; -} -export type ProvisionUniqueConstraintPayloadSelect = { - clientMutationId?: boolean; -}; export interface CreateAgentModulePayload { /** The `AgentModule` that was created by this mutation. */ agentModule?: AgentModule | null; @@ -22080,6 +22246,51 @@ export type DeleteRouteModulePayloadSelect = { select: RouteModuleEdgeSelect; }; }; +export interface CreateScopeTypesModulePayload { + clientMutationId?: string | null; + /** The `ScopeTypesModule` that was created by this mutation. */ + scopeTypesModule?: ScopeTypesModule | null; + scopeTypesModuleEdge?: ScopeTypesModuleEdge | null; +} +export type CreateScopeTypesModulePayloadSelect = { + clientMutationId?: boolean; + scopeTypesModule?: { + select: ScopeTypesModuleSelect; + }; + scopeTypesModuleEdge?: { + select: ScopeTypesModuleEdgeSelect; + }; +}; +export interface UpdateScopeTypesModulePayload { + clientMutationId?: string | null; + /** The `ScopeTypesModule` that was updated by this mutation. */ + scopeTypesModule?: ScopeTypesModule | null; + scopeTypesModuleEdge?: ScopeTypesModuleEdge | null; +} +export type UpdateScopeTypesModulePayloadSelect = { + clientMutationId?: boolean; + scopeTypesModule?: { + select: ScopeTypesModuleSelect; + }; + scopeTypesModuleEdge?: { + select: ScopeTypesModuleEdgeSelect; + }; +}; +export interface DeleteScopeTypesModulePayload { + clientMutationId?: string | null; + /** The `ScopeTypesModule` that was deleted by this mutation. */ + scopeTypesModule?: ScopeTypesModule | null; + scopeTypesModuleEdge?: ScopeTypesModuleEdge | null; +} +export type DeleteScopeTypesModulePayloadSelect = { + clientMutationId?: boolean; + scopeTypesModule?: { + select: ScopeTypesModuleSelect; + }; + scopeTypesModuleEdge?: { + select: ScopeTypesModuleEdgeSelect; + }; +}; export interface CreateSecureTableProvisionPayload { clientMutationId?: string | null; /** The `SecureTableProvision` that was created by this mutation. */ @@ -22530,6 +22741,51 @@ export type DeleteUserSettingsModulePayloadSelect = { select: UserSettingsModuleEdgeSelect; }; }; +export interface CreateUserSettingsSecurityModulePayload { + clientMutationId?: string | null; + /** The `UserSettingsSecurityModule` that was created by this mutation. */ + userSettingsSecurityModule?: UserSettingsSecurityModule | null; + userSettingsSecurityModuleEdge?: UserSettingsSecurityModuleEdge | null; +} +export type CreateUserSettingsSecurityModulePayloadSelect = { + clientMutationId?: boolean; + userSettingsSecurityModule?: { + select: UserSettingsSecurityModuleSelect; + }; + userSettingsSecurityModuleEdge?: { + select: UserSettingsSecurityModuleEdgeSelect; + }; +}; +export interface UpdateUserSettingsSecurityModulePayload { + clientMutationId?: string | null; + /** The `UserSettingsSecurityModule` that was updated by this mutation. */ + userSettingsSecurityModule?: UserSettingsSecurityModule | null; + userSettingsSecurityModuleEdge?: UserSettingsSecurityModuleEdge | null; +} +export type UpdateUserSettingsSecurityModulePayloadSelect = { + clientMutationId?: boolean; + userSettingsSecurityModule?: { + select: UserSettingsSecurityModuleSelect; + }; + userSettingsSecurityModuleEdge?: { + select: UserSettingsSecurityModuleEdgeSelect; + }; +}; +export interface DeleteUserSettingsSecurityModulePayload { + clientMutationId?: string | null; + /** The `UserSettingsSecurityModule` that was deleted by this mutation. */ + userSettingsSecurityModule?: UserSettingsSecurityModule | null; + userSettingsSecurityModuleEdge?: UserSettingsSecurityModuleEdge | null; +} +export type DeleteUserSettingsSecurityModulePayloadSelect = { + clientMutationId?: boolean; + userSettingsSecurityModule?: { + select: UserSettingsSecurityModuleSelect; + }; + userSettingsSecurityModuleEdge?: { + select: UserSettingsSecurityModuleEdgeSelect; + }; +}; export interface CreateUserStateModulePayload { clientMutationId?: string | null; /** The `UserStateModule` that was created by this mutation. */ @@ -22755,26 +23011,6 @@ export type DeleteWebhookModulePayloadSelect = { select: WebhookModuleEdgeSelect; }; }; -export interface ProvisionRelationRecord { - outFieldId?: string | null; - outJunctionTableId?: string | null; - outSourceFieldId?: string | null; - outTargetFieldId?: string | null; -} -export type ProvisionRelationRecordSelect = { - outFieldId?: boolean; - outJunctionTableId?: boolean; - outSourceFieldId?: boolean; - outTargetFieldId?: boolean; -}; -export interface ProvisionTableRecord { - outFields?: string[] | null; - outTableId?: string | null; -} -export type ProvisionTableRecordSelect = { - outFields?: boolean; - outTableId?: boolean; -}; /** A `AgentModule` edge in the connection. */ export interface AgentModuleEdge { cursor?: string | null; @@ -23507,6 +23743,18 @@ export type RouteModuleEdgeSelect = { select: RouteModuleSelect; }; }; +/** A `ScopeTypesModule` edge in the connection. */ +export interface ScopeTypesModuleEdge { + cursor?: string | null; + /** The `ScopeTypesModule` at the end of the edge. */ + node?: ScopeTypesModule | null; +} +export type ScopeTypesModuleEdgeSelect = { + cursor?: boolean; + node?: { + select: ScopeTypesModuleSelect; + }; +}; /** A `SecureTableProvision` edge in the connection. */ export interface SecureTableProvisionEdge { cursor?: string | null; @@ -23627,6 +23875,18 @@ export type UserSettingsModuleEdgeSelect = { select: UserSettingsModuleSelect; }; }; +/** A `UserSettingsSecurityModule` edge in the connection. */ +export interface UserSettingsSecurityModuleEdge { + cursor?: string | null; + /** The `UserSettingsSecurityModule` at the end of the edge. */ + node?: UserSettingsSecurityModule | null; +} +export type UserSettingsSecurityModuleEdgeSelect = { + cursor?: boolean; + node?: { + select: UserSettingsSecurityModuleSelect; + }; +}; /** A `UserStateModule` edge in the connection. */ export interface UserStateModuleEdge { cursor?: string | null; diff --git a/sdk/constructive-cli/src/modules/orm/models/index.ts b/sdk/constructive-cli/src/modules/orm/models/index.ts index 55e18104c1..7dcf593d78 100644 --- a/sdk/constructive-cli/src/modules/orm/models/index.ts +++ b/sdk/constructive-cli/src/modules/orm/models/index.ts @@ -64,6 +64,7 @@ export { RelationProvisionModel } from './relationProvision'; export { ResourceModuleModel } from './resourceModule'; export { RlsModuleModel } from './rlsModule'; export { RouteModuleModel } from './routeModule'; +export { ScopeTypesModuleModel } from './scopeTypesModule'; export { SecureTableProvisionModel } from './secureTableProvision'; export { SessionSecretsModuleModel } from './sessionSecretsModule'; export { SessionsModuleModel } from './sessionsModule'; @@ -74,6 +75,7 @@ export { TransferLogModuleModel } from './transferLogModule'; export { UserAuthModuleModel } from './userAuthModule'; export { UserCredentialsModuleModel } from './userCredentialsModule'; export { UserSettingsModuleModel } from './userSettingsModule'; +export { UserSettingsSecurityModuleModel } from './userSettingsSecurityModule'; export { UserStateModuleModel } from './userStateModule'; export { UsersModuleModel } from './usersModule'; export { WebauthnAuthModuleModel } from './webauthnAuthModule'; diff --git a/sdk/constructive-cli/src/modules/orm/models/scopeTypesModule.ts b/sdk/constructive-cli/src/modules/orm/models/scopeTypesModule.ts new file mode 100644 index 0000000000..1cbd281d05 --- /dev/null +++ b/sdk/constructive-cli/src/modules/orm/models/scopeTypesModule.ts @@ -0,0 +1,245 @@ +/** + * ScopeTypesModule model for ORM client + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { OrmClient } from '../client'; +import { + QueryBuilder, + buildFindManyDocument, + buildFindFirstDocument, + buildFindOneDocument, + buildCreateDocument, + buildUpdateByPkDocument, + buildDeleteByPkDocument, +} from '../query-builder'; +import type { + ConnectionResult, + FindManyArgs, + FindFirstArgs, + CreateArgs, + UpdateArgs, + DeleteArgs, + InferSelectResult, + StrictSelect, +} from '../select-types'; +import type { + ScopeTypesModule, + ScopeTypesModuleWithRelations, + ScopeTypesModuleSelect, + ScopeTypesModuleFilter, + ScopeTypesModuleOrderBy, + CreateScopeTypesModuleInput, + UpdateScopeTypesModuleInput, + ScopeTypesModulePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class ScopeTypesModuleModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + scopeTypesModules: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'ScopeTypesModule', + 'scopeTypesModules', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + first: args?.first, + last: args?.last, + after: args?.after, + before: args?.before, + offset: args?.offset, + }, + 'ScopeTypesModuleFilter', + 'ScopeTypesModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'ScopeTypesModule', + fieldName: 'scopeTypesModules', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + scopeTypesModule: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'ScopeTypesModule', + 'scopeTypesModules', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'ScopeTypesModuleFilter', + 'ScopeTypesModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'ScopeTypesModule', + fieldName: 'scopeTypesModule', + document, + variables, + transform: (data: { + scopeTypesModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + scopeTypesModule: data.scopeTypesModules?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + scopeTypesModule: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'ScopeTypesModule', + 'scopeTypesModules', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'ScopeTypesModuleFilter', + 'ScopeTypesModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'ScopeTypesModule', + fieldName: 'scopeTypesModule', + document, + variables, + transform: (data: { + scopeTypesModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + scopeTypesModule: data.scopeTypesModules?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createScopeTypesModule: { + scopeTypesModule: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'ScopeTypesModule', + 'createScopeTypesModule', + 'scopeTypesModule', + args.select, + args.data, + 'CreateScopeTypesModuleInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'ScopeTypesModule', + fieldName: 'createScopeTypesModule', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + ScopeTypesModulePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateScopeTypesModule: { + scopeTypesModule: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'ScopeTypesModule', + 'updateScopeTypesModule', + 'scopeTypesModule', + args.select, + args.where.id, + args.data, + 'UpdateScopeTypesModuleInput', + 'id', + 'scopeTypesModulePatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'ScopeTypesModule', + fieldName: 'updateScopeTypesModule', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteScopeTypesModule: { + scopeTypesModule: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'ScopeTypesModule', + 'deleteScopeTypesModule', + 'scopeTypesModule', + { + id: args.where.id, + }, + 'DeleteScopeTypesModuleInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'ScopeTypesModule', + fieldName: 'deleteScopeTypesModule', + document, + variables, + }); + } +} diff --git a/sdk/constructive-cli/src/modules/orm/models/userSettingsSecurityModule.ts b/sdk/constructive-cli/src/modules/orm/models/userSettingsSecurityModule.ts new file mode 100644 index 0000000000..13b7c87010 --- /dev/null +++ b/sdk/constructive-cli/src/modules/orm/models/userSettingsSecurityModule.ts @@ -0,0 +1,253 @@ +/** + * UserSettingsSecurityModule model for ORM client + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { OrmClient } from '../client'; +import { + QueryBuilder, + buildFindManyDocument, + buildFindFirstDocument, + buildFindOneDocument, + buildCreateDocument, + buildUpdateByPkDocument, + buildDeleteByPkDocument, +} from '../query-builder'; +import type { + ConnectionResult, + FindManyArgs, + FindFirstArgs, + CreateArgs, + UpdateArgs, + DeleteArgs, + InferSelectResult, + StrictSelect, +} from '../select-types'; +import type { + UserSettingsSecurityModule, + UserSettingsSecurityModuleWithRelations, + UserSettingsSecurityModuleSelect, + UserSettingsSecurityModuleFilter, + UserSettingsSecurityModuleOrderBy, + CreateUserSettingsSecurityModuleInput, + UpdateUserSettingsSecurityModuleInput, + UserSettingsSecurityModulePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class UserSettingsSecurityModuleModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + userSettingsSecurityModules: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'UserSettingsSecurityModule', + 'userSettingsSecurityModules', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + first: args?.first, + last: args?.last, + after: args?.after, + before: args?.before, + offset: args?.offset, + }, + 'UserSettingsSecurityModuleFilter', + 'UserSettingsSecurityModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'UserSettingsSecurityModule', + fieldName: 'userSettingsSecurityModules', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + userSettingsSecurityModule: InferSelectResult< + UserSettingsSecurityModuleWithRelations, + S + > | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'UserSettingsSecurityModule', + 'userSettingsSecurityModules', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'UserSettingsSecurityModuleFilter', + 'UserSettingsSecurityModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'UserSettingsSecurityModule', + fieldName: 'userSettingsSecurityModule', + document, + variables, + transform: (data: { + userSettingsSecurityModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + userSettingsSecurityModule: data.userSettingsSecurityModules?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + userSettingsSecurityModule: InferSelectResult< + UserSettingsSecurityModuleWithRelations, + S + > | null; + }> { + const { document, variables } = buildFindManyDocument( + 'UserSettingsSecurityModule', + 'userSettingsSecurityModules', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'UserSettingsSecurityModuleFilter', + 'UserSettingsSecurityModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'UserSettingsSecurityModule', + fieldName: 'userSettingsSecurityModule', + document, + variables, + transform: (data: { + userSettingsSecurityModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + userSettingsSecurityModule: data.userSettingsSecurityModules?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createUserSettingsSecurityModule: { + userSettingsSecurityModule: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'UserSettingsSecurityModule', + 'createUserSettingsSecurityModule', + 'userSettingsSecurityModule', + args.select, + args.data, + 'CreateUserSettingsSecurityModuleInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'UserSettingsSecurityModule', + fieldName: 'createUserSettingsSecurityModule', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + UserSettingsSecurityModulePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateUserSettingsSecurityModule: { + userSettingsSecurityModule: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'UserSettingsSecurityModule', + 'updateUserSettingsSecurityModule', + 'userSettingsSecurityModule', + args.select, + args.where.id, + args.data, + 'UpdateUserSettingsSecurityModuleInput', + 'id', + 'userSettingsSecurityModulePatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'UserSettingsSecurityModule', + fieldName: 'updateUserSettingsSecurityModule', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteUserSettingsSecurityModule: { + userSettingsSecurityModule: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'UserSettingsSecurityModule', + 'deleteUserSettingsSecurityModule', + 'userSettingsSecurityModule', + { + id: args.where.id, + }, + 'DeleteUserSettingsSecurityModuleInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'UserSettingsSecurityModule', + fieldName: 'deleteUserSettingsSecurityModule', + document, + variables, + }); + } +} diff --git a/sdk/constructive-cli/src/modules/orm/mutation/index.ts b/sdk/constructive-cli/src/modules/orm/mutation/index.ts index 60041efadb..5450eca294 100644 --- a/sdk/constructive-cli/src/modules/orm/mutation/index.ts +++ b/sdk/constructive-cli/src/modules/orm/mutation/index.ts @@ -10,33 +10,12 @@ import type { ConstructBlueprintInput, CopyTemplateToBlueprintInput, ProvisionBucketInput, - ProvisionCheckConstraintInput, - ProvisionFullTextSearchInput, - ProvisionIndexInput, - ProvisionRelationInput, - ProvisionSpatialRelationInput, - ProvisionTableInput, - ProvisionUniqueConstraintInput, ConstructBlueprintPayload, CopyTemplateToBlueprintPayload, ProvisionBucketPayload, - ProvisionCheckConstraintPayload, - ProvisionFullTextSearchPayload, - ProvisionIndexPayload, - ProvisionRelationPayload, - ProvisionSpatialRelationPayload, - ProvisionTablePayload, - ProvisionUniqueConstraintPayload, ConstructBlueprintPayloadSelect, CopyTemplateToBlueprintPayloadSelect, ProvisionBucketPayloadSelect, - ProvisionCheckConstraintPayloadSelect, - ProvisionFullTextSearchPayloadSelect, - ProvisionIndexPayloadSelect, - ProvisionRelationPayloadSelect, - ProvisionSpatialRelationPayloadSelect, - ProvisionTablePayloadSelect, - ProvisionUniqueConstraintPayloadSelect, } from '../input-types'; import { connectionFieldsMap } from '../input-types'; /** @@ -63,55 +42,6 @@ and lifecycle settings. export interface ProvisionBucketVariables { input: ProvisionBucketInput; } -/** - * Variables for provisionCheckConstraint - * Creates a check constraint on a table from a $type + data blueprint definition. Supports: CheckOneOf (enum validation via = ANY(ARRAY[...])), CheckGreaterThan (single-column > value or cross-column), CheckLessThan (single-column < value or cross-column), CheckNotEqual (cross-column inequality). Builds AST expressions via ast_helpers and inserts into metaschema_public.check_constraint. Graceful: skips if a constraint with the same name already exists. - */ -export interface ProvisionCheckConstraintVariables { - input: ProvisionCheckConstraintInput; -} -/** - * Variables for provisionFullTextSearch - * 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. - */ -export interface ProvisionFullTextSearchVariables { - input: ProvisionFullTextSearchInput; -} -/** - * Variables for provisionIndex - * 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. - */ -export interface ProvisionIndexVariables { - input: ProvisionIndexInput; -} -/** - * Variables for provisionRelation - * 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). - */ -export interface ProvisionRelationVariables { - input: ProvisionRelationInput; -} -/** - * Variables for provisionSpatialRelation - * Idempotent provisioner for metaschema_public.spatial_relation. Inserts a row declaring a spatial predicate between two geometry/geography columns (owner and target). Called from construct_blueprint when a relation entry has $type=RelationSpatial. Graceful: re-running with the same (source_table_id, name) returns the existing id without modifying the row. Operator whitelist and st_dwithin ↔ param_name pairing are enforced by the spatial_relation table CHECKs. Both fields must already exist — this is a metadata-only insert. - */ -export interface ProvisionSpatialRelationVariables { - input: ProvisionSpatialRelationInput; -} -/** - * Variables for provisionTable - * Composable table provisioning: creates or finds a table, then creates fields (so Data* modules can reference them), applies N nodes (Data* modules), 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). - */ -export interface ProvisionTableVariables { - input: ProvisionTableInput; -} -/** - * Variables for provisionUniqueConstraint - * 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. - */ -export interface ProvisionUniqueConstraintVariables { - input: ProvisionUniqueConstraintInput; -} export function createMutationOperations(client: OrmClient) { return { constructBlueprint: ( @@ -201,208 +131,5 @@ export function createMutationOperations(client: OrmClient) { 'ProvisionBucketPayload' ), }), - provisionCheckConstraint: ( - args: ProvisionCheckConstraintVariables, - options: { - select: S; - } & StrictSelect - ) => - new QueryBuilder<{ - provisionCheckConstraint: InferSelectResult | null; - }>({ - client, - operation: 'mutation', - operationName: 'ProvisionCheckConstraint', - fieldName: 'provisionCheckConstraint', - ...buildCustomDocument( - 'mutation', - 'ProvisionCheckConstraint', - 'provisionCheckConstraint', - options.select, - args, - [ - { - name: 'input', - type: 'ProvisionCheckConstraintInput!', - }, - ], - connectionFieldsMap, - 'ProvisionCheckConstraintPayload' - ), - }), - provisionFullTextSearch: ( - args: ProvisionFullTextSearchVariables, - options: { - select: S; - } & StrictSelect - ) => - new QueryBuilder<{ - provisionFullTextSearch: InferSelectResult | null; - }>({ - client, - operation: 'mutation', - operationName: 'ProvisionFullTextSearch', - fieldName: 'provisionFullTextSearch', - ...buildCustomDocument( - 'mutation', - 'ProvisionFullTextSearch', - 'provisionFullTextSearch', - options.select, - args, - [ - { - name: 'input', - type: 'ProvisionFullTextSearchInput!', - }, - ], - connectionFieldsMap, - 'ProvisionFullTextSearchPayload' - ), - }), - provisionIndex: ( - args: ProvisionIndexVariables, - options: { - select: S; - } & StrictSelect - ) => - new QueryBuilder<{ - provisionIndex: InferSelectResult | null; - }>({ - client, - operation: 'mutation', - operationName: 'ProvisionIndex', - fieldName: 'provisionIndex', - ...buildCustomDocument( - 'mutation', - 'ProvisionIndex', - 'provisionIndex', - options.select, - args, - [ - { - name: 'input', - type: 'ProvisionIndexInput!', - }, - ], - connectionFieldsMap, - 'ProvisionIndexPayload' - ), - }), - provisionRelation: ( - args: ProvisionRelationVariables, - options: { - select: S; - } & StrictSelect - ) => - new QueryBuilder<{ - provisionRelation: InferSelectResult | null; - }>({ - client, - operation: 'mutation', - operationName: 'ProvisionRelation', - fieldName: 'provisionRelation', - ...buildCustomDocument( - 'mutation', - 'ProvisionRelation', - 'provisionRelation', - options.select, - args, - [ - { - name: 'input', - type: 'ProvisionRelationInput!', - }, - ], - connectionFieldsMap, - 'ProvisionRelationPayload' - ), - }), - provisionSpatialRelation: ( - args: ProvisionSpatialRelationVariables, - options: { - select: S; - } & StrictSelect - ) => - new QueryBuilder<{ - provisionSpatialRelation: InferSelectResult | null; - }>({ - client, - operation: 'mutation', - operationName: 'ProvisionSpatialRelation', - fieldName: 'provisionSpatialRelation', - ...buildCustomDocument( - 'mutation', - 'ProvisionSpatialRelation', - 'provisionSpatialRelation', - options.select, - args, - [ - { - name: 'input', - type: 'ProvisionSpatialRelationInput!', - }, - ], - connectionFieldsMap, - 'ProvisionSpatialRelationPayload' - ), - }), - provisionTable: ( - args: ProvisionTableVariables, - options: { - select: S; - } & StrictSelect - ) => - new QueryBuilder<{ - provisionTable: InferSelectResult | null; - }>({ - client, - operation: 'mutation', - operationName: 'ProvisionTable', - fieldName: 'provisionTable', - ...buildCustomDocument( - 'mutation', - 'ProvisionTable', - 'provisionTable', - options.select, - args, - [ - { - name: 'input', - type: 'ProvisionTableInput!', - }, - ], - connectionFieldsMap, - 'ProvisionTablePayload' - ), - }), - provisionUniqueConstraint: ( - args: ProvisionUniqueConstraintVariables, - options: { - select: S; - } & StrictSelect - ) => - new QueryBuilder<{ - provisionUniqueConstraint: InferSelectResult | null; - }>({ - client, - operation: 'mutation', - operationName: 'ProvisionUniqueConstraint', - fieldName: 'provisionUniqueConstraint', - ...buildCustomDocument( - 'mutation', - 'ProvisionUniqueConstraint', - 'provisionUniqueConstraint', - options.select, - args, - [ - { - name: 'input', - type: 'ProvisionUniqueConstraintInput!', - }, - ], - connectionFieldsMap, - 'ProvisionUniqueConstraintPayload' - ), - }), }; } diff --git a/sdk/constructive-cli/src/modules/orm/query/index.ts b/sdk/constructive-cli/src/modules/orm/query/index.ts deleted file mode 100644 index 70496d57ba..0000000000 --- a/sdk/constructive-cli/src/modules/orm/query/index.ts +++ /dev/null @@ -1,115 +0,0 @@ -/** - * Custom query operations - * @generated by @constructive-io/graphql-codegen - * DO NOT EDIT - changes will be overwritten - */ -import { OrmClient } from '../client'; -import { QueryBuilder, buildCustomDocument } from '../query-builder'; -import type { InferSelectResult, StrictSelect } from '../select-types'; -import { connectionFieldsMap } from '../input-types'; -/** - * Variables for resolveBlueprintField - * Resolves a field_name within a given table_id to a field_id. Throws if no match is found. Used by construct_blueprint to translate user-authored field names (e.g. "location") into field UUIDs for downstream provisioning procedures. table_id must already be resolved (via resolve_blueprint_table) before calling this. - */ -export interface ResolveBlueprintFieldVariables { - databaseId?: string; - fieldName?: string; - tableId?: string; -} -/** - * Variables for resolveBlueprintTable - * Resolves a table_name (with optional schema_name) to a table_id. Resolution order: (1) if schema_name provided, exact lookup via metaschema_public.schema.name + metaschema_public.table; (2) check local table_map (tables created in current blueprint); (3) search metaschema_public.table by name across all schemas; (4) if multiple matches, throw ambiguous error asking for schema_name; (5) if no match, throw not-found error. - */ -export interface ResolveBlueprintTableVariables { - databaseId?: string; - defaultSchemaId?: string; - schemaName?: string; - tableMap?: unknown; - tableName?: string; -} -export function createQueryOperations(client: OrmClient) { - return { - resolveBlueprintField: ( - args: ResolveBlueprintFieldVariables, - options?: { - select?: Record; - } - ) => - new QueryBuilder<{ - resolveBlueprintField: string | null; - }>({ - client, - operation: 'query', - operationName: 'ResolveBlueprintField', - fieldName: 'resolveBlueprintField', - ...buildCustomDocument( - 'query', - 'ResolveBlueprintField', - 'resolveBlueprintField', - options?.select, - args, - [ - { - name: 'databaseId', - type: 'UUID', - }, - { - name: 'fieldName', - type: 'String', - }, - { - name: 'tableId', - type: 'UUID', - }, - ], - connectionFieldsMap, - undefined - ), - }), - resolveBlueprintTable: ( - args: ResolveBlueprintTableVariables, - options?: { - select?: Record; - } - ) => - new QueryBuilder<{ - resolveBlueprintTable: string | null; - }>({ - client, - operation: 'query', - operationName: 'ResolveBlueprintTable', - fieldName: 'resolveBlueprintTable', - ...buildCustomDocument( - 'query', - 'ResolveBlueprintTable', - 'resolveBlueprintTable', - options?.select, - args, - [ - { - name: 'databaseId', - type: 'UUID', - }, - { - name: 'defaultSchemaId', - type: 'UUID', - }, - { - name: 'schemaName', - type: 'String', - }, - { - name: 'tableMap', - type: 'JSON', - }, - { - name: 'tableName', - type: 'String', - }, - ], - connectionFieldsMap, - undefined - ), - }), - }; -} diff --git a/sdk/constructive-cli/src/objects/README.md b/sdk/constructive-cli/src/objects/README.md index 12fb58cf20..7d8e4c1ac0 100644 --- a/sdk/constructive-cli/src/objects/README.md +++ b/sdk/constructive-cli/src/objects/README.md @@ -10,7 +10,7 @@ - **Tables:** 5 - **Custom queries:** 0 -- **Custom mutations:** 4 +- **Custom mutations:** 7 **Generators:** ORM, CLI diff --git a/sdk/constructive-cli/src/objects/cli/README.md b/sdk/constructive-cli/src/objects/cli/README.md index e4314fc6e7..b0f3cea7c8 100644 --- a/sdk/constructive-cli/src/objects/cli/README.md +++ b/sdk/constructive-cli/src/objects/cli/README.md @@ -33,11 +33,14 @@ csdk auth set-token | `store` | store CRUD operations | | `init-empty-repo` | initEmptyRepo | | `insert-node-at-path` | insertNodeAtPath | +| `insert-nodes-at-paths` | insertNodesAtPaths | | `provision-bucket` | Provision an S3 bucket for a logical bucket in the database. Reads the bucket config via RLS, then creates and configures the S3 bucket with the appropriate privacy policies, CORS rules, and lifecycle settings. | +| `set-and-commit` | setAndCommit | | `set-data-at-path` | setDataAtPath | +| `set-many-and-commit` | setManyAndCommit | ## Infrastructure Commands @@ -243,6 +246,23 @@ insertNodeAtPath | `--input.root` | UUID | | `--input.sId` | UUID | +### `insert-nodes-at-paths` + +insertNodesAtPaths + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `--input.clientMutationId` | String | + | `--input.datas` | JSON | + | `--input.kidsList` | JSON | + | `--input.ktreeList` | JSON | + | `--input.paths` | JSON | + | `--input.root` | UUID | + | `--input.sId` | UUID | + ### `provision-bucket` Provision an S3 bucket for a logical bucket in the database. @@ -258,6 +278,25 @@ and lifecycle settings. | `--input.bucketKey` | String (required) | | `--input.ownerId` | UUID | +### `set-and-commit` + +setAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `--input.clientMutationId` | String | + | `--input.data` | JSON | + | `--input.kids` | UUID | + | `--input.ktree` | String | + | `--input.message` | String | + | `--input.path` | String | + | `--input.refname` | String | + | `--input.sId` | UUID | + | `--input.storeId` | UUID | + ### `set-data-at-path` setDataAtPath @@ -273,6 +312,22 @@ setDataAtPath | `--input.root` | UUID | | `--input.sId` | UUID | +### `set-many-and-commit` + +setManyAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `--input.clientMutationId` | String | + | `--input.entries` | JSON | + | `--input.message` | String | + | `--input.refname` | String | + | `--input.sId` | UUID | + | `--input.storeId` | UUID | + ## Output All commands output JSON to stdout. Pipe to `jq` for formatting: diff --git a/sdk/constructive-cli/src/objects/cli/commands.ts b/sdk/constructive-cli/src/objects/cli/commands.ts index e04db329a7..601e2e2f66 100644 --- a/sdk/constructive-cli/src/objects/cli/commands.ts +++ b/sdk/constructive-cli/src/objects/cli/commands.ts @@ -13,8 +13,11 @@ import refCmd from './commands/ref'; import storeCmd from './commands/store'; import initEmptyRepoCmd from './commands/init-empty-repo'; import insertNodeAtPathCmd from './commands/insert-node-at-path'; +import insertNodesAtPathsCmd from './commands/insert-nodes-at-paths'; import provisionBucketCmd from './commands/provision-bucket'; +import setAndCommitCmd from './commands/set-and-commit'; import setDataAtPathCmd from './commands/set-data-at-path'; +import setManyAndCommitCmd from './commands/set-many-and-commit'; const createCommandMap: () => Record< string, ( @@ -32,11 +35,14 @@ const createCommandMap: () => Record< store: storeCmd, 'init-empty-repo': initEmptyRepoCmd, 'insert-node-at-path': insertNodeAtPathCmd, + 'insert-nodes-at-paths': insertNodesAtPathsCmd, 'provision-bucket': provisionBucketCmd, + 'set-and-commit': setAndCommitCmd, 'set-data-at-path': setDataAtPathCmd, + 'set-many-and-commit': setManyAndCommitCmd, }); const usage = - '\ncsdk \n\nCommands:\n context Manage API contexts\n auth Manage authentication\n commit commit CRUD operations\n get-all-tree-nodes-record getAllTreeNodesRecord CRUD operations\n object object CRUD operations\n ref ref CRUD operations\n store store CRUD operations\n init-empty-repo initEmptyRepo\n insert-node-at-path insertNodeAtPath\n provision-bucket Provision an S3 bucket for a logical bucket in the database.\nReads the bucket config via RLS, then creates and configures\nthe S3 bucket with the appropriate privacy policies, CORS rules,\nand lifecycle settings.\n set-data-at-path setDataAtPath\n\n --help, -h Show this help message\n --version, -v Show version\n'; + '\ncsdk \n\nCommands:\n context Manage API contexts\n auth Manage authentication\n commit commit CRUD operations\n get-all-tree-nodes-record getAllTreeNodesRecord CRUD operations\n object object CRUD operations\n ref ref CRUD operations\n store store CRUD operations\n init-empty-repo initEmptyRepo\n insert-node-at-path insertNodeAtPath\n insert-nodes-at-paths insertNodesAtPaths\n provision-bucket Provision an S3 bucket for a logical bucket in the database.\nReads the bucket config via RLS, then creates and configures\nthe S3 bucket with the appropriate privacy policies, CORS rules,\nand lifecycle settings.\n set-and-commit setAndCommit\n set-data-at-path setDataAtPath\n set-many-and-commit setManyAndCommit\n\n --help, -h Show this help message\n --version, -v Show version\n'; export const commands = async ( argv: Partial>, prompter: Inquirerer, diff --git a/sdk/constructive-cli/src/objects/cli/commands/insert-nodes-at-paths.ts b/sdk/constructive-cli/src/objects/cli/commands/insert-nodes-at-paths.ts new file mode 100644 index 0000000000..30d2c129a1 --- /dev/null +++ b/sdk/constructive-cli/src/objects/cli/commands/insert-nodes-at-paths.ts @@ -0,0 +1,53 @@ +/** + * CLI command for mutation insertNodesAtPaths + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { CLIOptions, Inquirerer } from 'inquirerer'; +import { getClient } from '../executor'; +import { unflattenDotNotation, buildSelectFromPaths } from '../utils'; +import type { InsertNodesAtPathsVariables } from '../../orm/mutation'; +import type { InsertNodesAtPathsPayloadSelect } from '../../orm/input-types'; +export default async ( + argv: Partial>, + prompter: Inquirerer, + _options: CLIOptions +) => { + try { + if (argv.help || argv.h) { + console.log( + 'insert-nodes-at-paths - insertNodesAtPaths\n\nUsage: insert-nodes-at-paths [OPTIONS]\n' + ); + process.exit(0); + } + const answers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'input', + message: + 'The exclusive input argument for this mutation. An object type, make sure to see documentation for this object\u2019s fields.', + required: true, + }, + ]); + const client = getClient(); + const parsedAnswers = unflattenDotNotation(answers); + const selectFields = buildSelectFromPaths((argv.select as string) ?? 'clientMutationId'); + const result = await client.mutation + .insertNodesAtPaths( + parsedAnswers as unknown as InsertNodesAtPathsVariables, + { + select: selectFields, + } as unknown as { + select: InsertNodesAtPathsPayloadSelect; + } + ) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed: insertNodesAtPaths'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +}; diff --git a/sdk/constructive-cli/src/objects/cli/commands/set-and-commit.ts b/sdk/constructive-cli/src/objects/cli/commands/set-and-commit.ts new file mode 100644 index 0000000000..cb702ff301 --- /dev/null +++ b/sdk/constructive-cli/src/objects/cli/commands/set-and-commit.ts @@ -0,0 +1,51 @@ +/** + * CLI command for mutation setAndCommit + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { CLIOptions, Inquirerer } from 'inquirerer'; +import { getClient } from '../executor'; +import { unflattenDotNotation, buildSelectFromPaths } from '../utils'; +import type { SetAndCommitVariables } from '../../orm/mutation'; +import type { SetAndCommitPayloadSelect } from '../../orm/input-types'; +export default async ( + argv: Partial>, + prompter: Inquirerer, + _options: CLIOptions +) => { + try { + if (argv.help || argv.h) { + console.log('set-and-commit - setAndCommit\n\nUsage: set-and-commit [OPTIONS]\n'); + process.exit(0); + } + const answers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'input', + message: + 'The exclusive input argument for this mutation. An object type, make sure to see documentation for this object\u2019s fields.', + required: true, + }, + ]); + const client = getClient(); + const parsedAnswers = unflattenDotNotation(answers); + const selectFields = buildSelectFromPaths((argv.select as string) ?? 'clientMutationId'); + const result = await client.mutation + .setAndCommit( + parsedAnswers as unknown as SetAndCommitVariables, + { + select: selectFields, + } as unknown as { + select: SetAndCommitPayloadSelect; + } + ) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed: setAndCommit'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +}; diff --git a/sdk/constructive-cli/src/objects/cli/commands/set-many-and-commit.ts b/sdk/constructive-cli/src/objects/cli/commands/set-many-and-commit.ts new file mode 100644 index 0000000000..8b1d8dba43 --- /dev/null +++ b/sdk/constructive-cli/src/objects/cli/commands/set-many-and-commit.ts @@ -0,0 +1,53 @@ +/** + * CLI command for mutation setManyAndCommit + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { CLIOptions, Inquirerer } from 'inquirerer'; +import { getClient } from '../executor'; +import { unflattenDotNotation, buildSelectFromPaths } from '../utils'; +import type { SetManyAndCommitVariables } from '../../orm/mutation'; +import type { SetManyAndCommitPayloadSelect } from '../../orm/input-types'; +export default async ( + argv: Partial>, + prompter: Inquirerer, + _options: CLIOptions +) => { + try { + if (argv.help || argv.h) { + console.log( + 'set-many-and-commit - setManyAndCommit\n\nUsage: set-many-and-commit [OPTIONS]\n' + ); + process.exit(0); + } + const answers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'input', + message: + 'The exclusive input argument for this mutation. An object type, make sure to see documentation for this object\u2019s fields.', + required: true, + }, + ]); + const client = getClient(); + const parsedAnswers = unflattenDotNotation(answers); + const selectFields = buildSelectFromPaths((argv.select as string) ?? 'clientMutationId'); + const result = await client.mutation + .setManyAndCommit( + parsedAnswers as unknown as SetManyAndCommitVariables, + { + select: selectFields, + } as unknown as { + select: SetManyAndCommitPayloadSelect; + } + ) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed: setManyAndCommit'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +}; diff --git a/sdk/constructive-cli/src/objects/orm/README.md b/sdk/constructive-cli/src/objects/orm/README.md index 2a09348ad0..e112c19ae0 100644 --- a/sdk/constructive-cli/src/objects/orm/README.md +++ b/sdk/constructive-cli/src/objects/orm/README.md @@ -228,6 +228,21 @@ insertNodeAtPath const result = await db.mutation.insertNodeAtPath({ input: '' }).execute(); ``` +### `db.mutation.insertNodesAtPaths` + +insertNodesAtPaths + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | InsertNodesAtPathsInput (required) | + +```typescript +const result = await db.mutation.insertNodesAtPaths({ input: '' }).execute(); +``` + ### `db.mutation.provisionBucket` Provision an S3 bucket for a logical bucket in the database. @@ -246,6 +261,21 @@ and lifecycle settings. const result = await db.mutation.provisionBucket({ input: { bucketKey: '', ownerId: '' } }).execute(); ``` +### `db.mutation.setAndCommit` + +setAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | SetAndCommitInput (required) | + +```typescript +const result = await db.mutation.setAndCommit({ input: '' }).execute(); +``` + ### `db.mutation.setDataAtPath` setDataAtPath @@ -261,6 +291,21 @@ setDataAtPath const result = await db.mutation.setDataAtPath({ input: { data: '', path: '', root: '', sId: '' } }).execute(); ``` +### `db.mutation.setManyAndCommit` + +setManyAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | SetManyAndCommitInput (required) | + +```typescript +const result = await db.mutation.setManyAndCommit({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }).execute(); +``` + --- Built by the [Constructive](https://constructive.io) team. diff --git a/sdk/constructive-cli/src/objects/orm/input-types.ts b/sdk/constructive-cli/src/objects/orm/input-types.ts index bab07456e0..1ca44bc9d7 100644 --- a/sdk/constructive-cli/src/objects/orm/input-types.ts +++ b/sdk/constructive-cli/src/objects/orm/input-types.ts @@ -665,6 +665,15 @@ export interface InsertNodeAtPathInput { root?: string; sId?: string; } +export interface InsertNodesAtPathsInput { + clientMutationId?: string; + datas?: Record[]; + kidsList?: Record; + ktreeList?: Record; + paths?: Record; + root?: string; + sId?: string; +} export interface ProvisionBucketInput { /** The logical bucket key (e.g., "public", "private") */ bucketKey: string; @@ -674,6 +683,17 @@ export interface ProvisionBucketInput { */ ownerId?: string; } +export interface SetAndCommitInput { + clientMutationId?: string; + data?: Record; + kids?: string[]; + ktree?: string[]; + message?: string; + path?: string[]; + refname?: string; + sId?: string; + storeId?: string; +} export interface SetDataAtPathInput { clientMutationId?: string; data?: Record; @@ -681,6 +701,14 @@ export interface SetDataAtPathInput { root?: string; sId?: string; } +export interface SetManyAndCommitInput { + clientMutationId?: string; + entries?: Record; + message?: string; + refname?: string; + sId?: string; + storeId?: string; +} /** An input for mutations affecting `Commit` */ export interface CommitInput { /** User who authored the changes */ @@ -758,6 +786,14 @@ export type InsertNodeAtPathPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface InsertNodesAtPathsPayload { + clientMutationId?: string | null; + result?: string | null; +} +export type InsertNodesAtPathsPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; export interface ProvisionBucketPayload { /** The access type applied */ accessType: string; @@ -780,6 +816,20 @@ export type ProvisionBucketPayloadSelect = { provider?: boolean; success?: boolean; }; +export interface SetAndCommitPayload { + clientMutationId?: string | null; + commitEdge?: CommitEdge | null; + result?: Commit | null; +} +export type SetAndCommitPayloadSelect = { + clientMutationId?: boolean; + commitEdge?: { + select: CommitEdgeSelect; + }; + result?: { + select: CommitSelect; + }; +}; export interface SetDataAtPathPayload { clientMutationId?: string | null; result?: string | null; @@ -788,6 +838,20 @@ export type SetDataAtPathPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface SetManyAndCommitPayload { + clientMutationId?: string | null; + commitEdge?: CommitEdge | null; + result?: Commit | null; +} +export type SetManyAndCommitPayloadSelect = { + clientMutationId?: boolean; + commitEdge?: { + select: CommitEdgeSelect; + }; + result?: { + select: CommitSelect; + }; +}; export interface CreateCommitPayload { clientMutationId?: string | null; /** The `Commit` that was created by this mutation. */ diff --git a/sdk/constructive-cli/src/objects/orm/mutation/index.ts b/sdk/constructive-cli/src/objects/orm/mutation/index.ts index a0c21cb2bd..7d08bdc42e 100644 --- a/sdk/constructive-cli/src/objects/orm/mutation/index.ts +++ b/sdk/constructive-cli/src/objects/orm/mutation/index.ts @@ -9,16 +9,25 @@ import type { InferSelectResult, StrictSelect } from '../select-types'; import type { InitEmptyRepoInput, InsertNodeAtPathInput, + InsertNodesAtPathsInput, ProvisionBucketInput, + SetAndCommitInput, SetDataAtPathInput, + SetManyAndCommitInput, InitEmptyRepoPayload, InsertNodeAtPathPayload, + InsertNodesAtPathsPayload, ProvisionBucketPayload, + SetAndCommitPayload, SetDataAtPathPayload, + SetManyAndCommitPayload, InitEmptyRepoPayloadSelect, InsertNodeAtPathPayloadSelect, + InsertNodesAtPathsPayloadSelect, ProvisionBucketPayloadSelect, + SetAndCommitPayloadSelect, SetDataAtPathPayloadSelect, + SetManyAndCommitPayloadSelect, } from '../input-types'; import { connectionFieldsMap } from '../input-types'; export interface InitEmptyRepoVariables { @@ -27,6 +36,9 @@ export interface InitEmptyRepoVariables { export interface InsertNodeAtPathVariables { input: InsertNodeAtPathInput; } +export interface InsertNodesAtPathsVariables { + input: InsertNodesAtPathsInput; +} /** * Variables for provisionBucket * Provision an S3 bucket for a logical bucket in the database. @@ -37,9 +49,15 @@ and lifecycle settings. export interface ProvisionBucketVariables { input: ProvisionBucketInput; } +export interface SetAndCommitVariables { + input: SetAndCommitInput; +} export interface SetDataAtPathVariables { input: SetDataAtPathInput; } +export interface SetManyAndCommitVariables { + input: SetManyAndCommitInput; +} export function createMutationOperations(client: OrmClient) { return { initEmptyRepo: ( @@ -100,6 +118,35 @@ export function createMutationOperations(client: OrmClient) { 'InsertNodeAtPathPayload' ), }), + insertNodesAtPaths: ( + args: InsertNodesAtPathsVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + insertNodesAtPaths: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'InsertNodesAtPaths', + fieldName: 'insertNodesAtPaths', + ...buildCustomDocument( + 'mutation', + 'InsertNodesAtPaths', + 'insertNodesAtPaths', + options.select, + args, + [ + { + name: 'input', + type: 'InsertNodesAtPathsInput!', + }, + ], + connectionFieldsMap, + 'InsertNodesAtPathsPayload' + ), + }), provisionBucket: ( args: ProvisionBucketVariables, options: { @@ -129,6 +176,35 @@ export function createMutationOperations(client: OrmClient) { 'ProvisionBucketPayload' ), }), + setAndCommit: ( + args: SetAndCommitVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + setAndCommit: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'SetAndCommit', + fieldName: 'setAndCommit', + ...buildCustomDocument( + 'mutation', + 'SetAndCommit', + 'setAndCommit', + options.select, + args, + [ + { + name: 'input', + type: 'SetAndCommitInput!', + }, + ], + connectionFieldsMap, + 'SetAndCommitPayload' + ), + }), setDataAtPath: ( args: SetDataAtPathVariables, options: { @@ -158,5 +234,34 @@ export function createMutationOperations(client: OrmClient) { 'SetDataAtPathPayload' ), }), + setManyAndCommit: ( + args: SetManyAndCommitVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + setManyAndCommit: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'SetManyAndCommit', + fieldName: 'setManyAndCommit', + ...buildCustomDocument( + 'mutation', + 'SetManyAndCommit', + 'setManyAndCommit', + options.select, + args, + [ + { + name: 'input', + type: 'SetManyAndCommitInput!', + }, + ], + connectionFieldsMap, + 'SetManyAndCommitPayload' + ), + }), }; } diff --git a/sdk/constructive-react/src/api/hooks/README.md b/sdk/constructive-react/src/api/hooks/README.md index 4302e4764b..72d344f9b3 100644 --- a/sdk/constructive-react/src/api/hooks/README.md +++ b/sdk/constructive-react/src/api/hooks/README.md @@ -32,6 +32,11 @@ function App() { | Hook | Type | Description | |------|------|-------------| +| `useApisQuery` | Query | API surfaces exposed by this scope; publication makes a surface bindable from other scopes | +| `useApiQuery` | Query | API surfaces exposed by this scope; publication makes a surface bindable from other scopes | +| `useCreateApiMutation` | Mutation | API surfaces exposed by this scope; publication makes a surface bindable from other scopes | +| `useUpdateApiMutation` | Mutation | API surfaces exposed by this scope; publication makes a surface bindable from other scopes | +| `useDeleteApiMutation` | Mutation | API surfaces exposed by this scope; publication makes a surface bindable from other scopes | | `useApiSchemasQuery` | Query | Join table linking API surfaces to the metaschema schemas they expose | | `useApiSchemaQuery` | Query | Join table linking API surfaces to the metaschema schemas they expose | | `useCreateApiSchemaMutation` | Mutation | Join table linking API surfaces to the metaschema schemas they expose | @@ -42,11 +47,6 @@ function App() { | `useCreateApiSettingMutation` | Mutation | Per-API feature flag overrides; NULL columns inherit from database_settings | | `useUpdateApiSettingMutation` | Mutation | Per-API feature flag overrides; NULL columns inherit from database_settings | | `useDeleteApiSettingMutation` | Mutation | Per-API feature flag overrides; NULL columns inherit from database_settings | -| `useApisesQuery` | Query | API surfaces exposed by this scope; publication makes a surface bindable from other scopes | -| `useApisQuery` | Query | API surfaces exposed by this scope; publication makes a surface bindable from other scopes | -| `useCreateApisMutation` | Mutation | API surfaces exposed by this scope; publication makes a surface bindable from other scopes | -| `useUpdateApisMutation` | Mutation | API surfaces exposed by this scope; publication makes a surface bindable from other scopes | -| `useDeleteApisMutation` | Mutation | API surfaces exposed by this scope; publication makes a surface bindable from other scopes | | `useAstMigrationsQuery` | Query | List all astMigrations | | `useAstMigrationQuery` | Query | Get one astMigration | | `useCreateAstMigrationMutation` | Mutation | Create a astMigration | @@ -192,6 +192,11 @@ function App() { | `useCreatePartitionMutation` | Mutation | Create a partition | | `useUpdatePartitionMutation` | Mutation | Update a partition | | `useDeletePartitionMutation` | Mutation | Delete a partition | +| `usePlatformApisQuery` | Query | API surfaces exposed by this scope; publication makes a surface bindable from other scopes | +| `usePlatformApiQuery` | Query | API surfaces exposed by this scope; publication makes a surface bindable from other scopes | +| `useCreatePlatformApiMutation` | Mutation | API surfaces exposed by this scope; publication makes a surface bindable from other scopes | +| `useUpdatePlatformApiMutation` | Mutation | API surfaces exposed by this scope; publication makes a surface bindable from other scopes | +| `useDeletePlatformApiMutation` | Mutation | API surfaces exposed by this scope; publication makes a surface bindable from other scopes | | `usePlatformApiSchemasQuery` | Query | Join table linking API surfaces to the metaschema schemas they expose | | `usePlatformApiSchemaQuery` | Query | Join table linking API surfaces to the metaschema schemas they expose | | `useCreatePlatformApiSchemaMutation` | Mutation | Join table linking API surfaces to the metaschema schemas they expose | @@ -202,11 +207,6 @@ function App() { | `useCreatePlatformApiSettingMutation` | Mutation | Per-API feature flag overrides; NULL columns inherit from database_settings | | `useUpdatePlatformApiSettingMutation` | Mutation | Per-API feature flag overrides; NULL columns inherit from database_settings | | `useDeletePlatformApiSettingMutation` | Mutation | Per-API feature flag overrides; NULL columns inherit from database_settings | -| `usePlatformApisesQuery` | Query | API surfaces exposed by this scope; publication makes a surface bindable from other scopes | -| `usePlatformApisQuery` | Query | API surfaces exposed by this scope; publication makes a surface bindable from other scopes | -| `useCreatePlatformApisMutation` | Mutation | API surfaces exposed by this scope; publication makes a surface bindable from other scopes | -| `useUpdatePlatformApisMutation` | Mutation | API surfaces exposed by this scope; publication makes a surface bindable from other scopes | -| `useDeletePlatformApisMutation` | Mutation | API surfaces exposed by this scope; publication makes a surface bindable from other scopes | | `usePlatformCorsSettingsQuery` | Query | Scope-wide and per-API CORS origin configuration; NULL api_id means scope-wide default | | `usePlatformCorsSettingQuery` | Query | Scope-wide and per-API CORS origin configuration; NULL api_id means scope-wide default | | `useCreatePlatformCorsSettingMutation` | Mutation | Scope-wide and per-API CORS origin configuration; NULL api_id means scope-wide default | @@ -461,6 +461,27 @@ Example usage: ## Table Hooks +### Api + +```typescript +// List all apis +const { data, isLoading } = useApisQuery({ + selection: { fields: { anonRole: true, config: true, createdAt: true, databaseId: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }, +}); + +// Get one api +const { data: item } = useApiQuery({ + id: '', + selection: { fields: { anonRole: true, config: true, createdAt: true, databaseId: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }, +}); + +// Create a api +const { mutate: create } = useCreateApiMutation({ + selection: { fields: { id: true } }, +}); +create({ anonRole: '', config: '', databaseId: '', dbname: '', isPublished: '', name: '', roleName: '' }); +``` + ### ApiSchema ```typescript @@ -503,27 +524,6 @@ const { mutate: create } = useCreateApiSettingMutation({ create({ apiId: '', databaseId: '', enableAggregates: '', enableBulk: '', enableConnectionFilter: '', enableDirectUploads: '', enableI18N: '', enableLlm: '', enableLtree: '', enableManyToMany: '', enablePostgis: '', enablePresignedUploads: '', enableRealtime: '', enableSearch: '', options: '', statementTimeoutMs: '' }); ``` -### Apis - -```typescript -// List all apises -const { data, isLoading } = useApisesQuery({ - selection: { fields: { anonRole: true, config: true, createdAt: true, databaseId: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }, -}); - -// Get one apis -const { data: item } = useApisQuery({ - id: '', - selection: { fields: { anonRole: true, config: true, createdAt: true, databaseId: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }, -}); - -// Create a apis -const { mutate: create } = useCreateApisMutation({ - selection: { fields: { id: true } }, -}); -create({ anonRole: '', config: '', databaseId: '', dbname: '', isPublished: '', name: '', roleName: '' }); -``` - ### AstMigration ```typescript @@ -1133,6 +1133,27 @@ const { mutate: create } = useCreatePartitionMutation({ create({ databaseId: '', interval: '', isParented: '', namingPattern: '', partitionKeyId: '', premake: '', retention: '', retentionKeepTable: '', strategy: '', tableId: '' }); ``` +### PlatformApi + +```typescript +// List all platformApis +const { data, isLoading } = usePlatformApisQuery({ + selection: { fields: { anonRole: true, config: true, createdAt: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }, +}); + +// Get one platformApi +const { data: item } = usePlatformApiQuery({ + id: '', + selection: { fields: { anonRole: true, config: true, createdAt: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }, +}); + +// Create a platformApi +const { mutate: create } = useCreatePlatformApiMutation({ + selection: { fields: { id: true } }, +}); +create({ anonRole: '', config: '', dbname: '', isPublished: '', name: '', roleName: '' }); +``` + ### PlatformApiSchema ```typescript @@ -1175,27 +1196,6 @@ const { mutate: create } = useCreatePlatformApiSettingMutation({ create({ apiId: '', enableAggregates: '', enableBulk: '', enableConnectionFilter: '', enableDirectUploads: '', enableI18N: '', enableLlm: '', enableLtree: '', enableManyToMany: '', enablePostgis: '', enablePresignedUploads: '', enableRealtime: '', enableSearch: '', options: '', statementTimeoutMs: '' }); ``` -### PlatformApis - -```typescript -// List all platformApises -const { data, isLoading } = usePlatformApisesQuery({ - selection: { fields: { anonRole: true, config: true, createdAt: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }, -}); - -// Get one platformApis -const { data: item } = usePlatformApisQuery({ - id: '', - selection: { fields: { anonRole: true, config: true, createdAt: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }, -}); - -// Create a platformApis -const { mutate: create } = useCreatePlatformApisMutation({ - selection: { fields: { id: true } }, -}); -create({ anonRole: '', config: '', dbname: '', isPublished: '', name: '', roleName: '' }); -``` - ### PlatformCorsSetting ```typescript diff --git a/sdk/constructive-react/src/api/hooks/index.ts b/sdk/constructive-react/src/api/hooks/index.ts index 256a08f646..b7274ad052 100644 --- a/sdk/constructive-react/src/api/hooks/index.ts +++ b/sdk/constructive-react/src/api/hooks/index.ts @@ -2,7 +2,7 @@ * GraphQL SDK * @generated by @constructive-io/graphql-codegen * - * Tables: ApiSchema, ApiSetting, Apis, AstMigration, CheckConstraint, CompositeType, CorsSetting, Database, DatabaseSetting, DatabaseTransfer, DefaultPrivilege, Derive, Domain, DomainEvent, DomainType, DomainVerification, EmbeddingChunk, Enum, ExclusionConstraint, FieldBehavior, Field, ForeignKeyConstraintBehavior, ForeignKeyConstraint, FullTextSearch, Function, HostnameBinding, HttpRoute, Index, ManagedDomain, NodeTypeRegistry, Page, Partition, PlatformApiSchema, PlatformApiSetting, PlatformApis, PlatformCorsSetting, PlatformDomain, PlatformDomainEvent, PlatformDomainVerification, PlatformManagedDomain, PlatformPage, PlatformSiteAppLink, PlatformSite, PlatformSiteDeepLink, PlatformSiteErrorPage, PlatformSiteMetadatum, PlatformSiteModule, PlatformSiteTheme, PlatformSiteWebConfig, Policy, PrimaryKeyConstraint, PubkeySetting, RlsSetting, RouteBinding, Route, Schema, SchemaGrant, SiteAppLink, Site, SiteDeepLink, SiteErrorPage, SiteMetadatum, SiteModule, SiteTheme, SiteWebConfig, SpatialRelation, SqlAction, TableBehavior, Table, TableGrant, Trigger, TriggerFunction, UniqueConstraintBehavior, UniqueConstraint, ViewBehavior, View, ViewGrant, ViewRule, ViewTable, WebauthnSetting + * Tables: Api, ApiSchema, ApiSetting, AstMigration, CheckConstraint, CompositeType, CorsSetting, Database, DatabaseSetting, DatabaseTransfer, DefaultPrivilege, Derive, Domain, DomainEvent, DomainType, DomainVerification, EmbeddingChunk, Enum, ExclusionConstraint, FieldBehavior, Field, ForeignKeyConstraintBehavior, ForeignKeyConstraint, FullTextSearch, Function, HostnameBinding, HttpRoute, Index, ManagedDomain, NodeTypeRegistry, Page, Partition, PlatformApi, PlatformApiSchema, PlatformApiSetting, PlatformCorsSetting, PlatformDomain, PlatformDomainEvent, PlatformDomainVerification, PlatformManagedDomain, PlatformPage, PlatformSiteAppLink, PlatformSite, PlatformSiteDeepLink, PlatformSiteErrorPage, PlatformSiteMetadatum, PlatformSiteModule, PlatformSiteTheme, PlatformSiteWebConfig, Policy, PrimaryKeyConstraint, PubkeySetting, RlsSetting, RouteBinding, Route, Schema, SchemaGrant, SiteAppLink, Site, SiteDeepLink, SiteErrorPage, SiteMetadatum, SiteModule, SiteTheme, SiteWebConfig, SpatialRelation, SqlAction, TableBehavior, Table, TableGrant, Trigger, TriggerFunction, UniqueConstraintBehavior, UniqueConstraint, ViewBehavior, View, ViewGrant, ViewRule, ViewTable, WebauthnSetting * * Usage: * diff --git a/sdk/constructive-react/src/api/hooks/invalidation.ts b/sdk/constructive-react/src/api/hooks/invalidation.ts index affc385899..4afb186dbe 100644 --- a/sdk/constructive-react/src/api/hooks/invalidation.ts +++ b/sdk/constructive-react/src/api/hooks/invalidation.ts @@ -15,9 +15,9 @@ import type { QueryClient } from '@tanstack/react-query'; import { + apiKeys, apiSchemaKeys, apiSettingKeys, - apisKeys, astMigrationKeys, checkConstraintKeys, compositeTypeKeys, @@ -47,9 +47,9 @@ import { nodeTypeRegistryKeys, pageKeys, partitionKeys, + platformApiKeys, platformApiSchemaKeys, platformApiSettingKeys, - platformApisKeys, platformCorsSettingKeys, platformDomainKeys, platformDomainEventKeys, @@ -116,6 +116,20 @@ import { * ``` */ export const invalidate = { + /** Invalidate api queries */ api: { + /** Invalidate all api queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: apiKeys.all, + }), + /** Invalidate api list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: apiKeys.lists(), + }), + /** Invalidate a specific api */ detail: (queryClient: QueryClient, id: string | number) => + queryClient.invalidateQueries({ + queryKey: apiKeys.detail(id), + }), + }, /** Invalidate apiSchema queries */ apiSchema: { /** Invalidate all apiSchema queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ @@ -150,20 +164,6 @@ export const invalidate = { queryKey: apiSettingKeys.detail(id), }), }, - /** Invalidate apis queries */ apis: { - /** Invalidate all apis queries */ all: (queryClient: QueryClient) => - queryClient.invalidateQueries({ - queryKey: apisKeys.all, - }), - /** Invalidate apis list queries */ lists: (queryClient: QueryClient) => - queryClient.invalidateQueries({ - queryKey: apisKeys.lists(), - }), - /** Invalidate a specific apis */ detail: (queryClient: QueryClient, id: string | number) => - queryClient.invalidateQueries({ - queryKey: apisKeys.detail(id), - }), - }, /** Invalidate astMigration queries */ astMigration: { /** Invalidate all astMigration queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ @@ -633,6 +633,23 @@ export const invalidate = { queryKey: partitionKeys.detail(id), }), }, + /** Invalidate platformApi queries */ platformApi: { + /** Invalidate all platformApi queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: platformApiKeys.all, + }), + /** Invalidate platformApi list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: platformApiKeys.lists(), + }), + /** Invalidate a specific platformApi */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: platformApiKeys.detail(id), + }), + }, /** Invalidate platformApiSchema queries */ platformApiSchema: { /** Invalidate all platformApiSchema queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ @@ -667,23 +684,6 @@ export const invalidate = { queryKey: platformApiSettingKeys.detail(id), }), }, - /** Invalidate platformApis queries */ platformApis: { - /** Invalidate all platformApis queries */ all: (queryClient: QueryClient) => - queryClient.invalidateQueries({ - queryKey: platformApisKeys.all, - }), - /** Invalidate platformApis list queries */ lists: (queryClient: QueryClient) => - queryClient.invalidateQueries({ - queryKey: platformApisKeys.lists(), - }), - /** Invalidate a specific platformApis */ detail: ( - queryClient: QueryClient, - id: string | number - ) => - queryClient.invalidateQueries({ - queryKey: platformApisKeys.detail(id), - }), - }, /** Invalidate platformCorsSetting queries */ platformCorsSetting: { /** Invalidate all platformCorsSetting queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ @@ -1438,6 +1438,11 @@ export const invalidate = { * instead of just invalidating (which would trigger a refetch). */ export const remove = { + /** Remove api from cache */ api: (queryClient: QueryClient, id: string | number) => { + queryClient.removeQueries({ + queryKey: apiKeys.detail(id), + }); + }, /** Remove apiSchema from cache */ apiSchema: (queryClient: QueryClient, id: string | number) => { queryClient.removeQueries({ queryKey: apiSchemaKeys.detail(id), @@ -1451,11 +1456,6 @@ export const remove = { queryKey: apiSettingKeys.detail(id), }); }, - /** Remove apis from cache */ apis: (queryClient: QueryClient, id: string | number) => { - queryClient.removeQueries({ - queryKey: apisKeys.detail(id), - }); - }, /** Remove astMigration from cache */ astMigration: ( queryClient: QueryClient, id: string | number @@ -1658,28 +1658,28 @@ export const remove = { queryKey: partitionKeys.detail(id), }); }, - /** Remove platformApiSchema from cache */ platformApiSchema: ( + /** Remove platformApi from cache */ platformApi: ( queryClient: QueryClient, id: string | number ) => { queryClient.removeQueries({ - queryKey: platformApiSchemaKeys.detail(id), + queryKey: platformApiKeys.detail(id), }); }, - /** Remove platformApiSetting from cache */ platformApiSetting: ( + /** Remove platformApiSchema from cache */ platformApiSchema: ( queryClient: QueryClient, id: string | number ) => { queryClient.removeQueries({ - queryKey: platformApiSettingKeys.detail(id), + queryKey: platformApiSchemaKeys.detail(id), }); }, - /** Remove platformApis from cache */ platformApis: ( + /** Remove platformApiSetting from cache */ platformApiSetting: ( queryClient: QueryClient, id: string | number ) => { queryClient.removeQueries({ - queryKey: platformApisKeys.detail(id), + queryKey: platformApiSettingKeys.detail(id), }); }, /** Remove platformCorsSetting from cache */ platformCorsSetting: ( diff --git a/sdk/constructive-react/src/api/hooks/mutation-keys.ts b/sdk/constructive-react/src/api/hooks/mutation-keys.ts index fe0df59a18..59653e2be2 100644 --- a/sdk/constructive-react/src/api/hooks/mutation-keys.ts +++ b/sdk/constructive-react/src/api/hooks/mutation-keys.ts @@ -18,6 +18,14 @@ // Entity Mutation Keys // ============================================================================ +export const apiMutationKeys = { + /** All api mutation keys */ all: ['mutation', 'api'] as const, + /** Create api mutation key */ create: () => ['mutation', 'api', 'create'] as const, + /** Update api mutation key */ update: (id: string | number) => + ['mutation', 'api', 'update', id] as const, + /** Delete api mutation key */ delete: (id: string | number) => + ['mutation', 'api', 'delete', id] as const, +} as const; export const apiSchemaMutationKeys = { /** All apiSchema mutation keys */ all: ['mutation', 'apischema'] as const, /** Create apiSchema mutation key */ create: () => ['mutation', 'apischema', 'create'] as const, @@ -34,14 +42,6 @@ export const apiSettingMutationKeys = { /** Delete apiSetting mutation key */ delete: (id: string | number) => ['mutation', 'apisetting', 'delete', id] as const, } as const; -export const apisMutationKeys = { - /** All apis mutation keys */ all: ['mutation', 'apis'] as const, - /** Create apis mutation key */ create: () => ['mutation', 'apis', 'create'] as const, - /** Update apis mutation key */ update: (id: string | number) => - ['mutation', 'apis', 'update', id] as const, - /** Delete apis mutation key */ delete: (id: string | number) => - ['mutation', 'apis', 'delete', id] as const, -} as const; export const astMigrationMutationKeys = { /** All astMigration mutation keys */ all: ['mutation', 'astmigration'] as const, /** Create astMigration mutation key */ create: () => @@ -295,6 +295,15 @@ export const partitionMutationKeys = { /** Delete partition mutation key */ delete: (id: string | number) => ['mutation', 'partition', 'delete', id] as const, } as const; +export const platformApiMutationKeys = { + /** All platformApi mutation keys */ all: ['mutation', 'platformapi'] as const, + /** Create platformApi mutation key */ create: () => + ['mutation', 'platformapi', 'create'] as const, + /** Update platformApi mutation key */ update: (id: string | number) => + ['mutation', 'platformapi', 'update', id] as const, + /** Delete platformApi mutation key */ delete: (id: string | number) => + ['mutation', 'platformapi', 'delete', id] as const, +} as const; export const platformApiSchemaMutationKeys = { /** All platformApiSchema mutation keys */ all: ['mutation', 'platformapischema'] as const, /** Create platformApiSchema mutation key */ create: () => @@ -313,15 +322,6 @@ export const platformApiSettingMutationKeys = { /** Delete platformApiSetting mutation key */ delete: (id: string | number) => ['mutation', 'platformapisetting', 'delete', id] as const, } as const; -export const platformApisMutationKeys = { - /** All platformApis mutation keys */ all: ['mutation', 'platformapis'] as const, - /** Create platformApis mutation key */ create: () => - ['mutation', 'platformapis', 'create'] as const, - /** Update platformApis mutation key */ update: (id: string | number) => - ['mutation', 'platformapis', 'update', id] as const, - /** Delete platformApis mutation key */ delete: (id: string | number) => - ['mutation', 'platformapis', 'delete', id] as const, -} as const; export const platformCorsSettingMutationKeys = { /** All platformCorsSetting mutation keys */ all: ['mutation', 'platformcorssetting'] as const, /** Create platformCorsSetting mutation key */ create: () => @@ -810,9 +810,9 @@ export const customMutationKeys = { * ``` */ export const mutationKeys = { + api: apiMutationKeys, apiSchema: apiSchemaMutationKeys, apiSetting: apiSettingMutationKeys, - apis: apisMutationKeys, astMigration: astMigrationMutationKeys, checkConstraint: checkConstraintMutationKeys, compositeType: compositeTypeMutationKeys, @@ -842,9 +842,9 @@ export const mutationKeys = { nodeTypeRegistry: nodeTypeRegistryMutationKeys, page: pageMutationKeys, partition: partitionMutationKeys, + platformApi: platformApiMutationKeys, platformApiSchema: platformApiSchemaMutationKeys, platformApiSetting: platformApiSettingMutationKeys, - platformApis: platformApisMutationKeys, platformCorsSetting: platformCorsSettingMutationKeys, platformDomain: platformDomainMutationKeys, platformDomainEvent: platformDomainEventMutationKeys, diff --git a/sdk/constructive-react/src/api/hooks/mutations/index.ts b/sdk/constructive-react/src/api/hooks/mutations/index.ts index e0db6a299c..3fd824fc6b 100644 --- a/sdk/constructive-react/src/api/hooks/mutations/index.ts +++ b/sdk/constructive-react/src/api/hooks/mutations/index.ts @@ -3,15 +3,15 @@ * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ +export * from './useCreateApiMutation'; +export * from './useUpdateApiMutation'; +export * from './useDeleteApiMutation'; export * from './useCreateApiSchemaMutation'; export * from './useUpdateApiSchemaMutation'; export * from './useDeleteApiSchemaMutation'; export * from './useCreateApiSettingMutation'; export * from './useUpdateApiSettingMutation'; export * from './useDeleteApiSettingMutation'; -export * from './useCreateApisMutation'; -export * from './useUpdateApisMutation'; -export * from './useDeleteApisMutation'; export * from './useCreateAstMigrationMutation'; export * from './useCreateCheckConstraintMutation'; export * from './useUpdateCheckConstraintMutation'; @@ -97,15 +97,15 @@ export * from './useDeletePageMutation'; export * from './useCreatePartitionMutation'; export * from './useUpdatePartitionMutation'; export * from './useDeletePartitionMutation'; +export * from './useCreatePlatformApiMutation'; +export * from './useUpdatePlatformApiMutation'; +export * from './useDeletePlatformApiMutation'; export * from './useCreatePlatformApiSchemaMutation'; export * from './useUpdatePlatformApiSchemaMutation'; export * from './useDeletePlatformApiSchemaMutation'; export * from './useCreatePlatformApiSettingMutation'; export * from './useUpdatePlatformApiSettingMutation'; export * from './useDeletePlatformApiSettingMutation'; -export * from './useCreatePlatformApisMutation'; -export * from './useUpdatePlatformApisMutation'; -export * from './useDeletePlatformApisMutation'; export * from './useCreatePlatformCorsSettingMutation'; export * from './useUpdatePlatformCorsSettingMutation'; export * from './useDeletePlatformCorsSettingMutation'; diff --git a/sdk/constructive-react/src/api/hooks/mutations/useCreateApisMutation.ts b/sdk/constructive-react/src/api/hooks/mutations/useCreateApiMutation.ts similarity index 56% rename from sdk/constructive-react/src/api/hooks/mutations/useCreateApisMutation.ts rename to sdk/constructive-react/src/api/hooks/mutations/useCreateApiMutation.ts index eed3e05eb7..1ffaaef3f9 100644 --- a/sdk/constructive-react/src/api/hooks/mutations/useCreateApisMutation.ts +++ b/sdk/constructive-react/src/api/hooks/mutations/useCreateApiMutation.ts @@ -9,70 +9,70 @@ import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-quer import { getClient } from '../client'; import { buildSelectionArgs } from '../selection'; import type { SelectionConfig } from '../selection'; -import { apisKeys } from '../query-keys'; -import { apisMutationKeys } from '../mutation-keys'; -import type { ApisSelect, ApisWithRelations, CreateApisInput } from '../../orm/input-types'; +import { apiKeys } from '../query-keys'; +import { apiMutationKeys } from '../mutation-keys'; +import type { ApiSelect, ApiWithRelations, CreateApiInput } from '../../orm/input-types'; import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { ApisSelect, ApisWithRelations, CreateApisInput } from '../../orm/input-types'; +export type { ApiSelect, ApiWithRelations, CreateApiInput } from '../../orm/input-types'; /** * API surfaces exposed by this scope; publication makes a surface bindable from other scopes * * @example * ```tsx - * const { mutate, isPending } = useCreateApisMutation({ + * const { mutate, isPending } = useCreateApiMutation({ * selection: { fields: { id: true, name: true } }, * }); * * mutate({ name: 'New item' }); * ``` */ -export function useCreateApisMutation( +export function useCreateApiMutation( params: { selection: { - fields: S & ApisSelect; - } & HookStrictSelect, ApisSelect>; + fields: S & ApiSelect; + } & HookStrictSelect, ApiSelect>; } & Omit< UseMutationOptions< { - createApis: { - apis: InferSelectResult; + createApi: { + api: InferSelectResult; }; }, Error, - CreateApisInput['apis'] + CreateApiInput['api'] >, 'mutationFn' > ): UseMutationResult< { - createApis: { - apis: InferSelectResult; + createApi: { + api: InferSelectResult; }; }, Error, - CreateApisInput['apis'] + CreateApiInput['api'] >; -export function useCreateApisMutation( +export function useCreateApiMutation( params: { - selection: SelectionConfig; - } & Omit, 'mutationFn'> + selection: SelectionConfig; + } & Omit, 'mutationFn'> ) { - const args = buildSelectionArgs(params.selection); + const args = buildSelectionArgs(params.selection); const { selection: _selection, ...mutationOptions } = params ?? {}; void _selection; const queryClient = useQueryClient(); return useMutation({ - mutationKey: apisMutationKeys.create(), - mutationFn: (data: CreateApisInput['apis']) => + mutationKey: apiMutationKeys.create(), + mutationFn: (data: CreateApiInput['api']) => getClient() - .apis.create({ + .api.create({ data, select: args.select, }) .unwrap(), onSuccess: () => { queryClient.invalidateQueries({ - queryKey: apisKeys.lists(), + queryKey: apiKeys.lists(), }); }, ...mutationOptions, diff --git a/sdk/constructive-react/src/api/hooks/mutations/useCreatePlatformApisMutation.ts b/sdk/constructive-react/src/api/hooks/mutations/useCreatePlatformApiMutation.ts similarity index 53% rename from sdk/constructive-react/src/api/hooks/mutations/useCreatePlatformApisMutation.ts rename to sdk/constructive-react/src/api/hooks/mutations/useCreatePlatformApiMutation.ts index 3d4f64d5ac..91c2ab0235 100644 --- a/sdk/constructive-react/src/api/hooks/mutations/useCreatePlatformApisMutation.ts +++ b/sdk/constructive-react/src/api/hooks/mutations/useCreatePlatformApiMutation.ts @@ -9,78 +9,78 @@ import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-quer import { getClient } from '../client'; import { buildSelectionArgs } from '../selection'; import type { SelectionConfig } from '../selection'; -import { platformApisKeys } from '../query-keys'; -import { platformApisMutationKeys } from '../mutation-keys'; +import { platformApiKeys } from '../query-keys'; +import { platformApiMutationKeys } from '../mutation-keys'; import type { - PlatformApisSelect, - PlatformApisWithRelations, - CreatePlatformApisInput, + PlatformApiSelect, + PlatformApiWithRelations, + CreatePlatformApiInput, } from '../../orm/input-types'; import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; export type { - PlatformApisSelect, - PlatformApisWithRelations, - CreatePlatformApisInput, + PlatformApiSelect, + PlatformApiWithRelations, + CreatePlatformApiInput, } from '../../orm/input-types'; /** * API surfaces exposed by this scope; publication makes a surface bindable from other scopes * * @example * ```tsx - * const { mutate, isPending } = useCreatePlatformApisMutation({ + * const { mutate, isPending } = useCreatePlatformApiMutation({ * selection: { fields: { id: true, name: true } }, * }); * * mutate({ name: 'New item' }); * ``` */ -export function useCreatePlatformApisMutation( +export function useCreatePlatformApiMutation( params: { selection: { - fields: S & PlatformApisSelect; - } & HookStrictSelect, PlatformApisSelect>; + fields: S & PlatformApiSelect; + } & HookStrictSelect, PlatformApiSelect>; } & Omit< UseMutationOptions< { - createPlatformApis: { - platformApis: InferSelectResult; + createPlatformApi: { + platformApi: InferSelectResult; }; }, Error, - CreatePlatformApisInput['platformApis'] + CreatePlatformApiInput['platformApi'] >, 'mutationFn' > ): UseMutationResult< { - createPlatformApis: { - platformApis: InferSelectResult; + createPlatformApi: { + platformApi: InferSelectResult; }; }, Error, - CreatePlatformApisInput['platformApis'] + CreatePlatformApiInput['platformApi'] >; -export function useCreatePlatformApisMutation( +export function useCreatePlatformApiMutation( params: { - selection: SelectionConfig; - } & Omit, 'mutationFn'> + selection: SelectionConfig; + } & Omit, 'mutationFn'> ) { - const args = buildSelectionArgs(params.selection); + const args = buildSelectionArgs(params.selection); const { selection: _selection, ...mutationOptions } = params ?? {}; void _selection; const queryClient = useQueryClient(); return useMutation({ - mutationKey: platformApisMutationKeys.create(), - mutationFn: (data: CreatePlatformApisInput['platformApis']) => + mutationKey: platformApiMutationKeys.create(), + mutationFn: (data: CreatePlatformApiInput['platformApi']) => getClient() - .platformApis.create({ + .platformApi.create({ data, select: args.select, }) .unwrap(), onSuccess: () => { queryClient.invalidateQueries({ - queryKey: platformApisKeys.lists(), + queryKey: platformApiKeys.lists(), }); }, ...mutationOptions, diff --git a/sdk/constructive-react/src/api/hooks/mutations/useDeleteApisMutation.ts b/sdk/constructive-react/src/api/hooks/mutations/useDeleteApiMutation.ts similarity index 65% rename from sdk/constructive-react/src/api/hooks/mutations/useDeleteApisMutation.ts rename to sdk/constructive-react/src/api/hooks/mutations/useDeleteApiMutation.ts index 29b6be869c..54c518339d 100644 --- a/sdk/constructive-react/src/api/hooks/mutations/useDeleteApisMutation.ts +++ b/sdk/constructive-react/src/api/hooks/mutations/useDeleteApiMutation.ts @@ -9,33 +9,33 @@ import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-quer import { getClient } from '../client'; import { buildSelectionArgs } from '../selection'; import type { SelectionConfig } from '../selection'; -import { apisKeys } from '../query-keys'; -import { apisMutationKeys } from '../mutation-keys'; -import type { ApisSelect, ApisWithRelations } from '../../orm/input-types'; +import { apiKeys } from '../query-keys'; +import { apiMutationKeys } from '../mutation-keys'; +import type { ApiSelect, ApiWithRelations } from '../../orm/input-types'; import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { ApisSelect, ApisWithRelations } from '../../orm/input-types'; +export type { ApiSelect, ApiWithRelations } from '../../orm/input-types'; /** * API surfaces exposed by this scope; publication makes a surface bindable from other scopes * * @example * ```tsx - * const { mutate, isPending } = useDeleteApisMutation({ + * const { mutate, isPending } = useDeleteApiMutation({ * selection: { fields: { id: true } }, * }); * * mutate({ id: 'value-to-delete' }); * ``` */ -export function useDeleteApisMutation( +export function useDeleteApiMutation( params: { selection: { - fields: S & ApisSelect; - } & HookStrictSelect, ApisSelect>; + fields: S & ApiSelect; + } & HookStrictSelect, ApiSelect>; } & Omit< UseMutationOptions< { - deleteApis: { - apis: InferSelectResult; + deleteApi: { + api: InferSelectResult; }; }, Error, @@ -47,8 +47,8 @@ export function useDeleteApisMutation( > ): UseMutationResult< { - deleteApis: { - apis: InferSelectResult; + deleteApi: { + api: InferSelectResult; }; }, Error, @@ -56,9 +56,9 @@ export function useDeleteApisMutation( id: string; } >; -export function useDeleteApisMutation( +export function useDeleteApiMutation( params: { - selection: SelectionConfig; + selection: SelectionConfig; } & Omit< UseMutationOptions< any, @@ -70,15 +70,15 @@ export function useDeleteApisMutation( 'mutationFn' > ) { - const args = buildSelectionArgs(params.selection); + const args = buildSelectionArgs(params.selection); const { selection: _selection, ...mutationOptions } = params ?? {}; void _selection; const queryClient = useQueryClient(); return useMutation({ - mutationKey: apisMutationKeys.all, + mutationKey: apiMutationKeys.all, mutationFn: ({ id }: { id: string }) => getClient() - .apis.delete({ + .api.delete({ where: { id, }, @@ -87,10 +87,10 @@ export function useDeleteApisMutation( .unwrap(), onSuccess: (_, variables) => { queryClient.removeQueries({ - queryKey: apisKeys.detail(variables.id), + queryKey: apiKeys.detail(variables.id), }); queryClient.invalidateQueries({ - queryKey: apisKeys.lists(), + queryKey: apiKeys.lists(), }); }, ...mutationOptions, diff --git a/sdk/constructive-react/src/api/hooks/mutations/useDeletePlatformApisMutation.ts b/sdk/constructive-react/src/api/hooks/mutations/useDeletePlatformApiMutation.ts similarity index 60% rename from sdk/constructive-react/src/api/hooks/mutations/useDeletePlatformApisMutation.ts rename to sdk/constructive-react/src/api/hooks/mutations/useDeletePlatformApiMutation.ts index 15ec0ad8d3..fe62269435 100644 --- a/sdk/constructive-react/src/api/hooks/mutations/useDeletePlatformApisMutation.ts +++ b/sdk/constructive-react/src/api/hooks/mutations/useDeletePlatformApiMutation.ts @@ -9,33 +9,33 @@ import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-quer import { getClient } from '../client'; import { buildSelectionArgs } from '../selection'; import type { SelectionConfig } from '../selection'; -import { platformApisKeys } from '../query-keys'; -import { platformApisMutationKeys } from '../mutation-keys'; -import type { PlatformApisSelect, PlatformApisWithRelations } from '../../orm/input-types'; +import { platformApiKeys } from '../query-keys'; +import { platformApiMutationKeys } from '../mutation-keys'; +import type { PlatformApiSelect, PlatformApiWithRelations } from '../../orm/input-types'; import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { PlatformApisSelect, PlatformApisWithRelations } from '../../orm/input-types'; +export type { PlatformApiSelect, PlatformApiWithRelations } from '../../orm/input-types'; /** * API surfaces exposed by this scope; publication makes a surface bindable from other scopes * * @example * ```tsx - * const { mutate, isPending } = useDeletePlatformApisMutation({ + * const { mutate, isPending } = useDeletePlatformApiMutation({ * selection: { fields: { id: true } }, * }); * * mutate({ id: 'value-to-delete' }); * ``` */ -export function useDeletePlatformApisMutation( +export function useDeletePlatformApiMutation( params: { selection: { - fields: S & PlatformApisSelect; - } & HookStrictSelect, PlatformApisSelect>; + fields: S & PlatformApiSelect; + } & HookStrictSelect, PlatformApiSelect>; } & Omit< UseMutationOptions< { - deletePlatformApis: { - platformApis: InferSelectResult; + deletePlatformApi: { + platformApi: InferSelectResult; }; }, Error, @@ -47,8 +47,8 @@ export function useDeletePlatformApisMutation( > ): UseMutationResult< { - deletePlatformApis: { - platformApis: InferSelectResult; + deletePlatformApi: { + platformApi: InferSelectResult; }; }, Error, @@ -56,9 +56,9 @@ export function useDeletePlatformApisMutation( id: string; } >; -export function useDeletePlatformApisMutation( +export function useDeletePlatformApiMutation( params: { - selection: SelectionConfig; + selection: SelectionConfig; } & Omit< UseMutationOptions< any, @@ -70,15 +70,15 @@ export function useDeletePlatformApisMutation( 'mutationFn' > ) { - const args = buildSelectionArgs(params.selection); + const args = buildSelectionArgs(params.selection); const { selection: _selection, ...mutationOptions } = params ?? {}; void _selection; const queryClient = useQueryClient(); return useMutation({ - mutationKey: platformApisMutationKeys.all, + mutationKey: platformApiMutationKeys.all, mutationFn: ({ id }: { id: string }) => getClient() - .platformApis.delete({ + .platformApi.delete({ where: { id, }, @@ -87,10 +87,10 @@ export function useDeletePlatformApisMutation( .unwrap(), onSuccess: (_, variables) => { queryClient.removeQueries({ - queryKey: platformApisKeys.detail(variables.id), + queryKey: platformApiKeys.detail(variables.id), }); queryClient.invalidateQueries({ - queryKey: platformApisKeys.lists(), + queryKey: platformApiKeys.lists(), }); }, ...mutationOptions, diff --git a/sdk/constructive-react/src/api/hooks/mutations/useUpdateApisMutation.ts b/sdk/constructive-react/src/api/hooks/mutations/useUpdateApiMutation.ts similarity index 57% rename from sdk/constructive-react/src/api/hooks/mutations/useUpdateApisMutation.ts rename to sdk/constructive-react/src/api/hooks/mutations/useUpdateApiMutation.ts index 45ed1398bd..8b7a7de7eb 100644 --- a/sdk/constructive-react/src/api/hooks/mutations/useUpdateApisMutation.ts +++ b/sdk/constructive-react/src/api/hooks/mutations/useUpdateApiMutation.ts @@ -9,92 +9,92 @@ import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-quer import { getClient } from '../client'; import { buildSelectionArgs } from '../selection'; import type { SelectionConfig } from '../selection'; -import { apisKeys } from '../query-keys'; -import { apisMutationKeys } from '../mutation-keys'; -import type { ApisSelect, ApisWithRelations, ApisPatch } from '../../orm/input-types'; +import { apiKeys } from '../query-keys'; +import { apiMutationKeys } from '../mutation-keys'; +import type { ApiSelect, ApiWithRelations, ApiPatch } from '../../orm/input-types'; import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { ApisSelect, ApisWithRelations, ApisPatch } from '../../orm/input-types'; +export type { ApiSelect, ApiWithRelations, ApiPatch } from '../../orm/input-types'; /** * API surfaces exposed by this scope; publication makes a surface bindable from other scopes * * @example * ```tsx - * const { mutate, isPending } = useUpdateApisMutation({ + * const { mutate, isPending } = useUpdateApiMutation({ * selection: { fields: { id: true, name: true } }, * }); * - * mutate({ id: 'value-here', apisPatch: { name: 'Updated' } }); + * mutate({ id: 'value-here', apiPatch: { name: 'Updated' } }); * ``` */ -export function useUpdateApisMutation( +export function useUpdateApiMutation( params: { selection: { - fields: S & ApisSelect; - } & HookStrictSelect, ApisSelect>; + fields: S & ApiSelect; + } & HookStrictSelect, ApiSelect>; } & Omit< UseMutationOptions< { - updateApis: { - apis: InferSelectResult; + updateApi: { + api: InferSelectResult; }; }, Error, { id: string; - apisPatch: ApisPatch; + apiPatch: ApiPatch; } >, 'mutationFn' > ): UseMutationResult< { - updateApis: { - apis: InferSelectResult; + updateApi: { + api: InferSelectResult; }; }, Error, { id: string; - apisPatch: ApisPatch; + apiPatch: ApiPatch; } >; -export function useUpdateApisMutation( +export function useUpdateApiMutation( params: { - selection: SelectionConfig; + selection: SelectionConfig; } & Omit< UseMutationOptions< any, Error, { id: string; - apisPatch: ApisPatch; + apiPatch: ApiPatch; } >, 'mutationFn' > ) { - const args = buildSelectionArgs(params.selection); + const args = buildSelectionArgs(params.selection); const { selection: _selection, ...mutationOptions } = params ?? {}; void _selection; const queryClient = useQueryClient(); return useMutation({ - mutationKey: apisMutationKeys.all, - mutationFn: ({ id, apisPatch }: { id: string; apisPatch: ApisPatch }) => + mutationKey: apiMutationKeys.all, + mutationFn: ({ id, apiPatch }: { id: string; apiPatch: ApiPatch }) => getClient() - .apis.update({ + .api.update({ where: { id, }, - data: apisPatch, + data: apiPatch, select: args.select, }) .unwrap(), onSuccess: (_, variables) => { queryClient.invalidateQueries({ - queryKey: apisKeys.detail(variables.id), + queryKey: apiKeys.detail(variables.id), }); queryClient.invalidateQueries({ - queryKey: apisKeys.lists(), + queryKey: apiKeys.lists(), }); }, ...mutationOptions, diff --git a/sdk/constructive-react/src/api/hooks/mutations/useUpdatePlatformApisMutation.ts b/sdk/constructive-react/src/api/hooks/mutations/useUpdatePlatformApiMutation.ts similarity index 55% rename from sdk/constructive-react/src/api/hooks/mutations/useUpdatePlatformApisMutation.ts rename to sdk/constructive-react/src/api/hooks/mutations/useUpdatePlatformApiMutation.ts index fb26308115..7cf22a2193 100644 --- a/sdk/constructive-react/src/api/hooks/mutations/useUpdatePlatformApisMutation.ts +++ b/sdk/constructive-react/src/api/hooks/mutations/useUpdatePlatformApiMutation.ts @@ -9,100 +9,100 @@ import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-quer import { getClient } from '../client'; import { buildSelectionArgs } from '../selection'; import type { SelectionConfig } from '../selection'; -import { platformApisKeys } from '../query-keys'; -import { platformApisMutationKeys } from '../mutation-keys'; +import { platformApiKeys } from '../query-keys'; +import { platformApiMutationKeys } from '../mutation-keys'; import type { - PlatformApisSelect, - PlatformApisWithRelations, - PlatformApisPatch, + PlatformApiSelect, + PlatformApiWithRelations, + PlatformApiPatch, } from '../../orm/input-types'; import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; export type { - PlatformApisSelect, - PlatformApisWithRelations, - PlatformApisPatch, + PlatformApiSelect, + PlatformApiWithRelations, + PlatformApiPatch, } from '../../orm/input-types'; /** * API surfaces exposed by this scope; publication makes a surface bindable from other scopes * * @example * ```tsx - * const { mutate, isPending } = useUpdatePlatformApisMutation({ + * const { mutate, isPending } = useUpdatePlatformApiMutation({ * selection: { fields: { id: true, name: true } }, * }); * - * mutate({ id: 'value-here', platformApisPatch: { name: 'Updated' } }); + * mutate({ id: 'value-here', platformApiPatch: { name: 'Updated' } }); * ``` */ -export function useUpdatePlatformApisMutation( +export function useUpdatePlatformApiMutation( params: { selection: { - fields: S & PlatformApisSelect; - } & HookStrictSelect, PlatformApisSelect>; + fields: S & PlatformApiSelect; + } & HookStrictSelect, PlatformApiSelect>; } & Omit< UseMutationOptions< { - updatePlatformApis: { - platformApis: InferSelectResult; + updatePlatformApi: { + platformApi: InferSelectResult; }; }, Error, { id: string; - platformApisPatch: PlatformApisPatch; + platformApiPatch: PlatformApiPatch; } >, 'mutationFn' > ): UseMutationResult< { - updatePlatformApis: { - platformApis: InferSelectResult; + updatePlatformApi: { + platformApi: InferSelectResult; }; }, Error, { id: string; - platformApisPatch: PlatformApisPatch; + platformApiPatch: PlatformApiPatch; } >; -export function useUpdatePlatformApisMutation( +export function useUpdatePlatformApiMutation( params: { - selection: SelectionConfig; + selection: SelectionConfig; } & Omit< UseMutationOptions< any, Error, { id: string; - platformApisPatch: PlatformApisPatch; + platformApiPatch: PlatformApiPatch; } >, 'mutationFn' > ) { - const args = buildSelectionArgs(params.selection); + const args = buildSelectionArgs(params.selection); const { selection: _selection, ...mutationOptions } = params ?? {}; void _selection; const queryClient = useQueryClient(); return useMutation({ - mutationKey: platformApisMutationKeys.all, - mutationFn: ({ id, platformApisPatch }: { id: string; platformApisPatch: PlatformApisPatch }) => + mutationKey: platformApiMutationKeys.all, + mutationFn: ({ id, platformApiPatch }: { id: string; platformApiPatch: PlatformApiPatch }) => getClient() - .platformApis.update({ + .platformApi.update({ where: { id, }, - data: platformApisPatch, + data: platformApiPatch, select: args.select, }) .unwrap(), onSuccess: (_, variables) => { queryClient.invalidateQueries({ - queryKey: platformApisKeys.detail(variables.id), + queryKey: platformApiKeys.detail(variables.id), }); queryClient.invalidateQueries({ - queryKey: platformApisKeys.lists(), + queryKey: platformApiKeys.lists(), }); }, ...mutationOptions, diff --git a/sdk/constructive-react/src/api/hooks/queries/index.ts b/sdk/constructive-react/src/api/hooks/queries/index.ts index de1eb956b2..4b55a0fa47 100644 --- a/sdk/constructive-react/src/api/hooks/queries/index.ts +++ b/sdk/constructive-react/src/api/hooks/queries/index.ts @@ -3,12 +3,12 @@ * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ +export * from './useApisQuery'; +export * from './useApiQuery'; export * from './useApiSchemasQuery'; export * from './useApiSchemaQuery'; export * from './useApiSettingsQuery'; export * from './useApiSettingQuery'; -export * from './useApisesQuery'; -export * from './useApisQuery'; export * from './useAstMigrationsQuery'; export * from './useAstMigrationQuery'; export * from './useCheckConstraintsQuery'; @@ -67,12 +67,12 @@ export * from './usePagesQuery'; export * from './usePageQuery'; export * from './usePartitionsQuery'; export * from './usePartitionQuery'; +export * from './usePlatformApisQuery'; +export * from './usePlatformApiQuery'; export * from './usePlatformApiSchemasQuery'; export * from './usePlatformApiSchemaQuery'; export * from './usePlatformApiSettingsQuery'; export * from './usePlatformApiSettingQuery'; -export * from './usePlatformApisesQuery'; -export * from './usePlatformApisQuery'; export * from './usePlatformCorsSettingsQuery'; export * from './usePlatformCorsSettingQuery'; export * from './usePlatformDomainsQuery'; diff --git a/sdk/constructive-react/src/api/hooks/queries/useApiQuery.ts b/sdk/constructive-react/src/api/hooks/queries/useApiQuery.ts new file mode 100644 index 0000000000..f7c45a4c09 --- /dev/null +++ b/sdk/constructive-react/src/api/hooks/queries/useApiQuery.ts @@ -0,0 +1,138 @@ +/** + * API surfaces exposed by this scope; publication makes a surface bindable from other scopes + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useQuery } from '@tanstack/react-query'; +import type { UseQueryOptions, UseQueryResult, QueryClient } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { apiKeys } from '../query-keys'; +import type { ApiSelect, ApiWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { ApiSelect, ApiWithRelations } from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const apiQueryKey = apiKeys.detail; +/** + * API surfaces exposed by this scope; publication makes a surface bindable from other scopes + * + * @example + * ```tsx + * const { data, isLoading } = useApiQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useApiQuery< + S extends ApiSelect, + TData = { + api: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, ApiSelect>; + } & Omit< + UseQueryOptions< + { + api: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useApiQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: apiKeys.detail(params.id), + queryFn: () => + getClient() + .api.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * API surfaces exposed by this scope; publication makes a surface bindable from other scopes + * + * @example + * ```ts + * const data = await fetchApiQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchApiQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, ApiSelect>; +}): Promise<{ + api: InferSelectResult | null; +}>; +export async function fetchApiQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .api.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * API surfaces exposed by this scope; publication makes a surface bindable from other scopes + * + * @example + * ```ts + * await prefetchApiQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchApiQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, ApiSelect>; + } +): Promise; +export async function prefetchApiQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: apiKeys.detail(params.id), + queryFn: () => + getClient() + .api.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/api/hooks/queries/useApisQuery.ts b/sdk/constructive-react/src/api/hooks/queries/useApisQuery.ts index a7544af975..1109f42993 100644 --- a/sdk/constructive-react/src/api/hooks/queries/useApisQuery.ts +++ b/sdk/constructive-react/src/api/hooks/queries/useApisQuery.ts @@ -7,40 +7,49 @@ import { useQuery } from '@tanstack/react-query'; import type { UseQueryOptions, UseQueryResult, QueryClient } from '@tanstack/react-query'; import { getClient } from '../client'; -import { buildSelectionArgs } from '../selection'; -import type { SelectionConfig } from '../selection'; -import { apisKeys } from '../query-keys'; -import type { ApisSelect, ApisWithRelations } from '../../orm/input-types'; -import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { ApisSelect, ApisWithRelations } from '../../orm/input-types'; +import { buildListSelectionArgs } from '../selection'; +import type { ListSelectionConfig } from '../selection'; +import { apiKeys } from '../query-keys'; +import type { ApiSelect, ApiWithRelations, ApiFilter, ApiOrderBy } from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { ApiSelect, ApiWithRelations, ApiFilter, ApiOrderBy } from '../../orm/input-types'; /** Query key factory - re-exported from query-keys.ts */ -export const apisQueryKey = apisKeys.detail; +export const apisQueryKey = apiKeys.list; /** * API surfaces exposed by this scope; publication makes a surface bindable from other scopes * * @example * ```tsx * const { data, isLoading } = useApisQuery({ - * id: 'some-id', - * selection: { fields: { id: true, name: true } }, + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, * }); * ``` */ export function useApisQuery< - S extends ApisSelect, + S extends ApiSelect, TData = { - apis: InferSelectResult | null; + apis: ConnectionResult>; }, >( params: { - id: string; selection: { fields: S; - } & HookStrictSelect, ApisSelect>; + } & Omit, 'fields'> & + HookStrictSelect, ApiSelect>; } & Omit< UseQueryOptions< { - apis: InferSelectResult | null; + apis: ConnectionResult>; }, Error, TData @@ -50,22 +59,15 @@ export function useApisQuery< ): UseQueryResult; export function useApisQuery( params: { - id: string; - selection: SelectionConfig; + selection: ListSelectionConfig; } & Omit, 'queryKey' | 'queryFn'> ) { - const args = buildSelectionArgs(params.selection); + const args = buildListSelectionArgs(params.selection); const { selection: _selection, ...queryOptions } = params ?? {}; void _selection; return useQuery({ - queryKey: apisKeys.detail(params.id), - queryFn: () => - getClient() - .apis.findOne({ - id: params.id, - select: args.select, - }) - .unwrap(), + queryKey: apiKeys.list(args), + queryFn: () => getClient().api.findMany(args).unwrap(), ...queryOptions, }); } @@ -75,64 +77,53 @@ export function useApisQuery( * @example * ```ts * const data = await fetchApisQuery({ - * id: 'some-id', - * selection: { fields: { id: true } }, + * selection: { + * fields: { id: true }, + * first: 10, + * }, * }); * ``` */ -export async function fetchApisQuery(params: { - id: string; +export async function fetchApisQuery(params: { selection: { fields: S; - } & HookStrictSelect, ApisSelect>; + } & Omit, 'fields'> & + HookStrictSelect, ApiSelect>; }): Promise<{ - apis: InferSelectResult | null; + apis: ConnectionResult>; }>; export async function fetchApisQuery(params: { - id: string; - selection: SelectionConfig; -}): Promise { - const args = buildSelectionArgs(params.selection); - return getClient() - .apis.findOne({ - id: params.id, - select: args.select, - }) - .unwrap(); + selection: ListSelectionConfig; +}) { + const args = buildListSelectionArgs(params.selection); + return getClient().api.findMany(args).unwrap(); } /** * API surfaces exposed by this scope; publication makes a surface bindable from other scopes * * @example * ```ts - * await prefetchApisQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * await prefetchApisQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); * ``` */ -export async function prefetchApisQuery( +export async function prefetchApisQuery( queryClient: QueryClient, params: { - id: string; selection: { fields: S; - } & HookStrictSelect, ApisSelect>; + } & Omit, 'fields'> & + HookStrictSelect, ApiSelect>; } ): Promise; export async function prefetchApisQuery( queryClient: QueryClient, params: { - id: string; - selection: SelectionConfig; + selection: ListSelectionConfig; } ): Promise { - const args = buildSelectionArgs(params.selection); + const args = buildListSelectionArgs(params.selection); await queryClient.prefetchQuery({ - queryKey: apisKeys.detail(params.id), - queryFn: () => - getClient() - .apis.findOne({ - id: params.id, - select: args.select, - }) - .unwrap(), + queryKey: apiKeys.list(args), + queryFn: () => getClient().api.findMany(args).unwrap(), }); } diff --git a/sdk/constructive-react/src/api/hooks/queries/useApisesQuery.ts b/sdk/constructive-react/src/api/hooks/queries/useApisesQuery.ts deleted file mode 100644 index eaddf7d664..0000000000 --- a/sdk/constructive-react/src/api/hooks/queries/useApisesQuery.ts +++ /dev/null @@ -1,129 +0,0 @@ -/** - * API surfaces exposed by this scope; publication makes a surface bindable from other scopes - * @generated by @constructive-io/graphql-codegen - * DO NOT EDIT - changes will be overwritten - */ - -import { useQuery } from '@tanstack/react-query'; -import type { UseQueryOptions, UseQueryResult, QueryClient } from '@tanstack/react-query'; -import { getClient } from '../client'; -import { buildListSelectionArgs } from '../selection'; -import type { ListSelectionConfig } from '../selection'; -import { apisKeys } from '../query-keys'; -import type { ApisSelect, ApisWithRelations, ApisFilter, ApisOrderBy } from '../../orm/input-types'; -import type { - FindManyArgs, - InferSelectResult, - ConnectionResult, - HookStrictSelect, -} from '../../orm/select-types'; -export type { ApisSelect, ApisWithRelations, ApisFilter, ApisOrderBy } from '../../orm/input-types'; -/** Query key factory - re-exported from query-keys.ts */ -export const apisesQueryKey = apisKeys.list; -/** - * API surfaces exposed by this scope; publication makes a surface bindable from other scopes - * - * @example - * ```tsx - * const { data, isLoading } = useApisesQuery({ - * selection: { - * fields: { id: true, name: true }, - * where: { name: { equalTo: "example" } }, - * orderBy: ['CREATED_AT_DESC'], - * first: 10, - * }, - * }); - * ``` - */ -export function useApisesQuery< - S extends ApisSelect, - TData = { - apises: ConnectionResult>; - }, ->( - params: { - selection: { - fields: S; - } & Omit, 'fields'> & - HookStrictSelect, ApisSelect>; - } & Omit< - UseQueryOptions< - { - apises: ConnectionResult>; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult; -export function useApisesQuery( - params: { - selection: ListSelectionConfig; - } & Omit, 'queryKey' | 'queryFn'> -) { - const args = buildListSelectionArgs(params.selection); - const { selection: _selection, ...queryOptions } = params ?? {}; - void _selection; - return useQuery({ - queryKey: apisKeys.list(args), - queryFn: () => getClient().apis.findMany(args).unwrap(), - ...queryOptions, - }); -} -/** - * API surfaces exposed by this scope; publication makes a surface bindable from other scopes - * - * @example - * ```ts - * const data = await fetchApisesQuery({ - * selection: { - * fields: { id: true }, - * first: 10, - * }, - * }); - * ``` - */ -export async function fetchApisesQuery(params: { - selection: { - fields: S; - } & Omit, 'fields'> & - HookStrictSelect, ApisSelect>; -}): Promise<{ - apises: ConnectionResult>; -}>; -export async function fetchApisesQuery(params: { - selection: ListSelectionConfig; -}) { - const args = buildListSelectionArgs(params.selection); - return getClient().apis.findMany(args).unwrap(); -} -/** - * API surfaces exposed by this scope; publication makes a surface bindable from other scopes - * - * @example - * ```ts - * await prefetchApisesQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); - * ``` - */ -export async function prefetchApisesQuery( - queryClient: QueryClient, - params: { - selection: { - fields: S; - } & Omit, 'fields'> & - HookStrictSelect, ApisSelect>; - } -): Promise; -export async function prefetchApisesQuery( - queryClient: QueryClient, - params: { - selection: ListSelectionConfig; - } -): Promise { - const args = buildListSelectionArgs(params.selection); - await queryClient.prefetchQuery({ - queryKey: apisKeys.list(args), - queryFn: () => getClient().apis.findMany(args).unwrap(), - }); -} diff --git a/sdk/constructive-react/src/api/hooks/queries/usePlatformApiQuery.ts b/sdk/constructive-react/src/api/hooks/queries/usePlatformApiQuery.ts new file mode 100644 index 0000000000..d3e15ed945 --- /dev/null +++ b/sdk/constructive-react/src/api/hooks/queries/usePlatformApiQuery.ts @@ -0,0 +1,138 @@ +/** + * API surfaces exposed by this scope; publication makes a surface bindable from other scopes + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useQuery } from '@tanstack/react-query'; +import type { UseQueryOptions, UseQueryResult, QueryClient } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { platformApiKeys } from '../query-keys'; +import type { PlatformApiSelect, PlatformApiWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { PlatformApiSelect, PlatformApiWithRelations } from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const platformApiQueryKey = platformApiKeys.detail; +/** + * API surfaces exposed by this scope; publication makes a surface bindable from other scopes + * + * @example + * ```tsx + * const { data, isLoading } = usePlatformApiQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function usePlatformApiQuery< + S extends PlatformApiSelect, + TData = { + platformApi: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PlatformApiSelect>; + } & Omit< + UseQueryOptions< + { + platformApi: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function usePlatformApiQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: platformApiKeys.detail(params.id), + queryFn: () => + getClient() + .platformApi.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * API surfaces exposed by this scope; publication makes a surface bindable from other scopes + * + * @example + * ```ts + * const data = await fetchPlatformApiQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchPlatformApiQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PlatformApiSelect>; +}): Promise<{ + platformApi: InferSelectResult | null; +}>; +export async function fetchPlatformApiQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .platformApi.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * API surfaces exposed by this scope; publication makes a surface bindable from other scopes + * + * @example + * ```ts + * await prefetchPlatformApiQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchPlatformApiQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, PlatformApiSelect>; + } +): Promise; +export async function prefetchPlatformApiQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: platformApiKeys.detail(params.id), + queryFn: () => + getClient() + .platformApi.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/api/hooks/queries/usePlatformApisQuery.ts b/sdk/constructive-react/src/api/hooks/queries/usePlatformApisQuery.ts index a7da730853..37b47ae91c 100644 --- a/sdk/constructive-react/src/api/hooks/queries/usePlatformApisQuery.ts +++ b/sdk/constructive-react/src/api/hooks/queries/usePlatformApisQuery.ts @@ -7,40 +7,59 @@ import { useQuery } from '@tanstack/react-query'; import type { UseQueryOptions, UseQueryResult, QueryClient } from '@tanstack/react-query'; import { getClient } from '../client'; -import { buildSelectionArgs } from '../selection'; -import type { SelectionConfig } from '../selection'; -import { platformApisKeys } from '../query-keys'; -import type { PlatformApisSelect, PlatformApisWithRelations } from '../../orm/input-types'; -import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { PlatformApisSelect, PlatformApisWithRelations } from '../../orm/input-types'; +import { buildListSelectionArgs } from '../selection'; +import type { ListSelectionConfig } from '../selection'; +import { platformApiKeys } from '../query-keys'; +import type { + PlatformApiSelect, + PlatformApiWithRelations, + PlatformApiFilter, + PlatformApiOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + PlatformApiSelect, + PlatformApiWithRelations, + PlatformApiFilter, + PlatformApiOrderBy, +} from '../../orm/input-types'; /** Query key factory - re-exported from query-keys.ts */ -export const platformApisQueryKey = platformApisKeys.detail; +export const platformApisQueryKey = platformApiKeys.list; /** * API surfaces exposed by this scope; publication makes a surface bindable from other scopes * * @example * ```tsx * const { data, isLoading } = usePlatformApisQuery({ - * id: 'some-id', - * selection: { fields: { id: true, name: true } }, + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, * }); * ``` */ export function usePlatformApisQuery< - S extends PlatformApisSelect, + S extends PlatformApiSelect, TData = { - platformApis: InferSelectResult | null; + platformApis: ConnectionResult>; }, >( params: { - id: string; selection: { fields: S; - } & HookStrictSelect, PlatformApisSelect>; + } & Omit, 'fields'> & + HookStrictSelect, PlatformApiSelect>; } & Omit< UseQueryOptions< { - platformApis: InferSelectResult | null; + platformApis: ConnectionResult>; }, Error, TData @@ -50,22 +69,17 @@ export function usePlatformApisQuery< ): UseQueryResult; export function usePlatformApisQuery( params: { - id: string; - selection: SelectionConfig; + selection: ListSelectionConfig; } & Omit, 'queryKey' | 'queryFn'> ) { - const args = buildSelectionArgs(params.selection); + const args = buildListSelectionArgs( + params.selection + ); const { selection: _selection, ...queryOptions } = params ?? {}; void _selection; return useQuery({ - queryKey: platformApisKeys.detail(params.id), - queryFn: () => - getClient() - .platformApis.findOne({ - id: params.id, - select: args.select, - }) - .unwrap(), + queryKey: platformApiKeys.list(args), + queryFn: () => getClient().platformApi.findMany(args).unwrap(), ...queryOptions, }); } @@ -75,64 +89,57 @@ export function usePlatformApisQuery( * @example * ```ts * const data = await fetchPlatformApisQuery({ - * id: 'some-id', - * selection: { fields: { id: true } }, + * selection: { + * fields: { id: true }, + * first: 10, + * }, * }); * ``` */ -export async function fetchPlatformApisQuery(params: { - id: string; +export async function fetchPlatformApisQuery(params: { selection: { fields: S; - } & HookStrictSelect, PlatformApisSelect>; + } & Omit, 'fields'> & + HookStrictSelect, PlatformApiSelect>; }): Promise<{ - platformApis: InferSelectResult | null; + platformApis: ConnectionResult>; }>; export async function fetchPlatformApisQuery(params: { - id: string; - selection: SelectionConfig; -}): Promise { - const args = buildSelectionArgs(params.selection); - return getClient() - .platformApis.findOne({ - id: params.id, - select: args.select, - }) - .unwrap(); + selection: ListSelectionConfig; +}) { + const args = buildListSelectionArgs( + params.selection + ); + return getClient().platformApi.findMany(args).unwrap(); } /** * API surfaces exposed by this scope; publication makes a surface bindable from other scopes * * @example * ```ts - * await prefetchPlatformApisQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * await prefetchPlatformApisQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); * ``` */ -export async function prefetchPlatformApisQuery( +export async function prefetchPlatformApisQuery( queryClient: QueryClient, params: { - id: string; selection: { fields: S; - } & HookStrictSelect, PlatformApisSelect>; + } & Omit, 'fields'> & + HookStrictSelect, PlatformApiSelect>; } ): Promise; export async function prefetchPlatformApisQuery( queryClient: QueryClient, params: { - id: string; - selection: SelectionConfig; + selection: ListSelectionConfig; } ): Promise { - const args = buildSelectionArgs(params.selection); + const args = buildListSelectionArgs( + params.selection + ); await queryClient.prefetchQuery({ - queryKey: platformApisKeys.detail(params.id), - queryFn: () => - getClient() - .platformApis.findOne({ - id: params.id, - select: args.select, - }) - .unwrap(), + queryKey: platformApiKeys.list(args), + queryFn: () => getClient().platformApi.findMany(args).unwrap(), }); } diff --git a/sdk/constructive-react/src/api/hooks/queries/usePlatformApisesQuery.ts b/sdk/constructive-react/src/api/hooks/queries/usePlatformApisesQuery.ts deleted file mode 100644 index 1151252632..0000000000 --- a/sdk/constructive-react/src/api/hooks/queries/usePlatformApisesQuery.ts +++ /dev/null @@ -1,145 +0,0 @@ -/** - * API surfaces exposed by this scope; publication makes a surface bindable from other scopes - * @generated by @constructive-io/graphql-codegen - * DO NOT EDIT - changes will be overwritten - */ - -import { useQuery } from '@tanstack/react-query'; -import type { UseQueryOptions, UseQueryResult, QueryClient } from '@tanstack/react-query'; -import { getClient } from '../client'; -import { buildListSelectionArgs } from '../selection'; -import type { ListSelectionConfig } from '../selection'; -import { platformApisKeys } from '../query-keys'; -import type { - PlatformApisSelect, - PlatformApisWithRelations, - PlatformApisFilter, - PlatformApisOrderBy, -} from '../../orm/input-types'; -import type { - FindManyArgs, - InferSelectResult, - ConnectionResult, - HookStrictSelect, -} from '../../orm/select-types'; -export type { - PlatformApisSelect, - PlatformApisWithRelations, - PlatformApisFilter, - PlatformApisOrderBy, -} from '../../orm/input-types'; -/** Query key factory - re-exported from query-keys.ts */ -export const platformApisesQueryKey = platformApisKeys.list; -/** - * API surfaces exposed by this scope; publication makes a surface bindable from other scopes - * - * @example - * ```tsx - * const { data, isLoading } = usePlatformApisesQuery({ - * selection: { - * fields: { id: true, name: true }, - * where: { name: { equalTo: "example" } }, - * orderBy: ['CREATED_AT_DESC'], - * first: 10, - * }, - * }); - * ``` - */ -export function usePlatformApisesQuery< - S extends PlatformApisSelect, - TData = { - platformApises: ConnectionResult>; - }, ->( - params: { - selection: { - fields: S; - } & Omit, 'fields'> & - HookStrictSelect, PlatformApisSelect>; - } & Omit< - UseQueryOptions< - { - platformApises: ConnectionResult>; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult; -export function usePlatformApisesQuery( - params: { - selection: ListSelectionConfig; - } & Omit, 'queryKey' | 'queryFn'> -) { - const args = buildListSelectionArgs( - params.selection - ); - const { selection: _selection, ...queryOptions } = params ?? {}; - void _selection; - return useQuery({ - queryKey: platformApisKeys.list(args), - queryFn: () => getClient().platformApis.findMany(args).unwrap(), - ...queryOptions, - }); -} -/** - * API surfaces exposed by this scope; publication makes a surface bindable from other scopes - * - * @example - * ```ts - * const data = await fetchPlatformApisesQuery({ - * selection: { - * fields: { id: true }, - * first: 10, - * }, - * }); - * ``` - */ -export async function fetchPlatformApisesQuery(params: { - selection: { - fields: S; - } & Omit, 'fields'> & - HookStrictSelect, PlatformApisSelect>; -}): Promise<{ - platformApises: ConnectionResult>; -}>; -export async function fetchPlatformApisesQuery(params: { - selection: ListSelectionConfig; -}) { - const args = buildListSelectionArgs( - params.selection - ); - return getClient().platformApis.findMany(args).unwrap(); -} -/** - * API surfaces exposed by this scope; publication makes a surface bindable from other scopes - * - * @example - * ```ts - * await prefetchPlatformApisesQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); - * ``` - */ -export async function prefetchPlatformApisesQuery( - queryClient: QueryClient, - params: { - selection: { - fields: S; - } & Omit, 'fields'> & - HookStrictSelect, PlatformApisSelect>; - } -): Promise; -export async function prefetchPlatformApisesQuery( - queryClient: QueryClient, - params: { - selection: ListSelectionConfig; - } -): Promise { - const args = buildListSelectionArgs( - params.selection - ); - await queryClient.prefetchQuery({ - queryKey: platformApisKeys.list(args), - queryFn: () => getClient().platformApis.findMany(args).unwrap(), - }); -} diff --git a/sdk/constructive-react/src/api/hooks/query-keys.ts b/sdk/constructive-react/src/api/hooks/query-keys.ts index 96f421966f..6bde25a189 100644 --- a/sdk/constructive-react/src/api/hooks/query-keys.ts +++ b/sdk/constructive-react/src/api/hooks/query-keys.ts @@ -19,6 +19,15 @@ // Entity Query Keys // ============================================================================ +export const apiKeys = { + /** All api queries */ all: ['api'] as const, + /** List query keys */ lists: () => [...apiKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...apiKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...apiKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...apiKeys.details(), id] as const, +} as const; export const apiSchemaKeys = { /** All apiSchema queries */ all: ['apischema'] as const, /** List query keys */ lists: () => [...apiSchemaKeys.all, 'list'] as const, @@ -37,15 +46,6 @@ export const apiSettingKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...apiSettingKeys.details(), id] as const, } as const; -export const apisKeys = { - /** All apis queries */ all: ['apis'] as const, - /** List query keys */ lists: () => [...apisKeys.all, 'list'] as const, - /** List query key with variables */ list: (variables?: object) => - [...apisKeys.lists(), variables] as const, - /** Detail query keys */ details: () => [...apisKeys.all, 'detail'] as const, - /** Detail query key for specific item */ detail: (id: string | number) => - [...apisKeys.details(), id] as const, -} as const; export const astMigrationKeys = { /** All astMigration queries */ all: ['astmigration'] as const, /** List query keys */ lists: () => [...astMigrationKeys.all, 'list'] as const, @@ -308,6 +308,15 @@ export const partitionKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...partitionKeys.details(), id] as const, } as const; +export const platformApiKeys = { + /** All platformApi queries */ all: ['platformapi'] as const, + /** List query keys */ lists: () => [...platformApiKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...platformApiKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...platformApiKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...platformApiKeys.details(), id] as const, +} as const; export const platformApiSchemaKeys = { /** All platformApiSchema queries */ all: ['platformapischema'] as const, /** List query keys */ lists: () => [...platformApiSchemaKeys.all, 'list'] as const, @@ -326,15 +335,6 @@ export const platformApiSettingKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...platformApiSettingKeys.details(), id] as const, } as const; -export const platformApisKeys = { - /** All platformApis queries */ all: ['platformapis'] as const, - /** List query keys */ lists: () => [...platformApisKeys.all, 'list'] as const, - /** List query key with variables */ list: (variables?: object) => - [...platformApisKeys.lists(), variables] as const, - /** Detail query keys */ details: () => [...platformApisKeys.all, 'detail'] as const, - /** Detail query key for specific item */ detail: (id: string | number) => - [...platformApisKeys.details(), id] as const, -} as const; export const platformCorsSettingKeys = { /** All platformCorsSetting queries */ all: ['platformcorssetting'] as const, /** List query keys */ lists: () => [...platformCorsSettingKeys.all, 'list'] as const, @@ -783,9 +783,9 @@ export const customQueryKeys = { * ``` */ export const queryKeys = { + api: apiKeys, apiSchema: apiSchemaKeys, apiSetting: apiSettingKeys, - apis: apisKeys, astMigration: astMigrationKeys, checkConstraint: checkConstraintKeys, compositeType: compositeTypeKeys, @@ -815,9 +815,9 @@ export const queryKeys = { nodeTypeRegistry: nodeTypeRegistryKeys, page: pageKeys, partition: partitionKeys, + platformApi: platformApiKeys, platformApiSchema: platformApiSchemaKeys, platformApiSetting: platformApiSettingKeys, - platformApis: platformApisKeys, platformCorsSetting: platformCorsSettingKeys, platformDomain: platformDomainKeys, platformDomainEvent: platformDomainEventKeys, diff --git a/sdk/constructive-react/src/api/orm/README.md b/sdk/constructive-react/src/api/orm/README.md index 485932a4b7..327d694398 100644 --- a/sdk/constructive-react/src/api/orm/README.md +++ b/sdk/constructive-react/src/api/orm/README.md @@ -21,9 +21,9 @@ const db = createClient({ | Model | Operations | |-------|------------| +| `api` | findMany, findOne, create, update, delete | | `apiSchema` | findMany, findOne, create, update, delete | | `apiSetting` | findMany, findOne, create, update, delete | -| `apis` | findMany, findOne, create, update, delete | | `astMigration` | findMany, findOne, create, update, delete | | `checkConstraint` | findMany, findOne, create, update, delete | | `compositeType` | findMany, findOne, create, update, delete | @@ -53,9 +53,9 @@ const db = createClient({ | `nodeTypeRegistry` | findMany, findOne, create, update, delete | | `page` | findMany, findOne, create, update, delete | | `partition` | findMany, findOne, create, update, delete | +| `platformApi` | findMany, findOne, create, update, delete | | `platformApiSchema` | findMany, findOne, create, update, delete | | `platformApiSetting` | findMany, findOne, create, update, delete | -| `platformApis` | findMany, findOne, create, update, delete | | `platformCorsSetting` | findMany, findOne, create, update, delete | | `platformDomain` | findMany, findOne, create, update, delete | | `platformDomainEvent` | findMany, findOne, create, update, delete | @@ -104,6 +104,44 @@ const db = createClient({ ## Table Operations +### `db.api` + +CRUD operations for Api records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `anonRole` | String | Yes | +| `config` | JSON | Yes | +| `createdAt` | Datetime | No | +| `databaseId` | UUID | Yes | +| `dbname` | String | Yes | +| `id` | UUID | No | +| `isPublished` | Boolean | Yes | +| `name` | String | Yes | +| `roleName` | String | Yes | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all api records +const items = await db.api.findMany({ select: { anonRole: true, config: true, createdAt: true, databaseId: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.api.findOne({ id: '', select: { anonRole: true, config: true, createdAt: true, databaseId: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }).execute(); + +// Create +const created = await db.api.create({ data: { anonRole: '', config: '', databaseId: '', dbname: '', isPublished: '', name: '', roleName: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.api.update({ where: { id: '' }, data: { anonRole: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.api.delete({ where: { id: '' } }).execute(); +``` + ### `db.apiSchema` CRUD operations for ApiSchema records. @@ -185,44 +223,6 @@ const updated = await db.apiSetting.update({ where: { id: '' }, data: { ap const deleted = await db.apiSetting.delete({ where: { id: '' } }).execute(); ``` -### `db.apis` - -CRUD operations for Apis records. - -**Fields:** - -| Field | Type | Editable | -|-------|------|----------| -| `anonRole` | String | Yes | -| `config` | JSON | Yes | -| `createdAt` | Datetime | No | -| `databaseId` | UUID | Yes | -| `dbname` | String | Yes | -| `id` | UUID | No | -| `isPublished` | Boolean | Yes | -| `name` | String | Yes | -| `roleName` | String | Yes | -| `updatedAt` | Datetime | No | - -**Operations:** - -```typescript -// List all apis records -const items = await db.apis.findMany({ select: { anonRole: true, config: true, createdAt: true, databaseId: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }).execute(); - -// Get one by id -const item = await db.apis.findOne({ id: '', select: { anonRole: true, config: true, createdAt: true, databaseId: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }).execute(); - -// Create -const created = await db.apis.create({ data: { anonRole: '', config: '', databaseId: '', dbname: '', isPublished: '', name: '', roleName: '' }, select: { id: true } }).execute(); - -// Update -const updated = await db.apis.update({ where: { id: '' }, data: { anonRole: '' }, select: { id: true } }).execute(); - -// Delete -const deleted = await db.apis.delete({ where: { id: '' } }).execute(); -``` - ### `db.astMigration` CRUD operations for AstMigration records. @@ -1394,6 +1394,43 @@ const updated = await db.partition.update({ where: { id: '' }, data: { dat const deleted = await db.partition.delete({ where: { id: '' } }).execute(); ``` +### `db.platformApi` + +CRUD operations for PlatformApi records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `anonRole` | String | Yes | +| `config` | JSON | Yes | +| `createdAt` | Datetime | No | +| `dbname` | String | Yes | +| `id` | UUID | No | +| `isPublished` | Boolean | Yes | +| `name` | String | Yes | +| `roleName` | String | Yes | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all platformApi records +const items = await db.platformApi.findMany({ select: { anonRole: true, config: true, createdAt: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.platformApi.findOne({ id: '', select: { anonRole: true, config: true, createdAt: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }).execute(); + +// Create +const created = await db.platformApi.create({ data: { anonRole: '', config: '', dbname: '', isPublished: '', name: '', roleName: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.platformApi.update({ where: { id: '' }, data: { anonRole: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.platformApi.delete({ where: { id: '' } }).execute(); +``` + ### `db.platformApiSchema` CRUD operations for PlatformApiSchema records. @@ -1473,43 +1510,6 @@ const updated = await db.platformApiSetting.update({ where: { id: '' }, da const deleted = await db.platformApiSetting.delete({ where: { id: '' } }).execute(); ``` -### `db.platformApis` - -CRUD operations for PlatformApis records. - -**Fields:** - -| Field | Type | Editable | -|-------|------|----------| -| `anonRole` | String | Yes | -| `config` | JSON | Yes | -| `createdAt` | Datetime | No | -| `dbname` | String | Yes | -| `id` | UUID | No | -| `isPublished` | Boolean | Yes | -| `name` | String | Yes | -| `roleName` | String | Yes | -| `updatedAt` | Datetime | No | - -**Operations:** - -```typescript -// List all platformApis records -const items = await db.platformApis.findMany({ select: { anonRole: true, config: true, createdAt: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }).execute(); - -// Get one by id -const item = await db.platformApis.findOne({ id: '', select: { anonRole: true, config: true, createdAt: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }).execute(); - -// Create -const created = await db.platformApis.create({ data: { anonRole: '', config: '', dbname: '', isPublished: '', name: '', roleName: '' }, select: { id: true } }).execute(); - -// Update -const updated = await db.platformApis.update({ where: { id: '' }, data: { anonRole: '' }, select: { id: true } }).execute(); - -// Delete -const deleted = await db.platformApis.delete({ where: { id: '' } }).execute(); -``` - ### `db.platformCorsSetting` CRUD operations for PlatformCorsSetting records. diff --git a/sdk/constructive-react/src/api/orm/index.ts b/sdk/constructive-react/src/api/orm/index.ts index 98c5108b79..a030658a98 100644 --- a/sdk/constructive-react/src/api/orm/index.ts +++ b/sdk/constructive-react/src/api/orm/index.ts @@ -5,9 +5,9 @@ */ import { OrmClient } from './client'; import type { OrmClientConfig } from './client'; +import { ApiModel } from './models/api'; import { ApiSchemaModel } from './models/apiSchema'; import { ApiSettingModel } from './models/apiSetting'; -import { ApisModel } from './models/apis'; import { AstMigrationModel } from './models/astMigration'; import { CheckConstraintModel } from './models/checkConstraint'; import { CompositeTypeModel } from './models/compositeType'; @@ -37,9 +37,9 @@ import { ManagedDomainModel } from './models/managedDomain'; import { NodeTypeRegistryModel } from './models/nodeTypeRegistry'; import { PageModel } from './models/page'; import { PartitionModel } from './models/partition'; +import { PlatformApiModel } from './models/platformApi'; import { PlatformApiSchemaModel } from './models/platformApiSchema'; import { PlatformApiSettingModel } from './models/platformApiSetting'; -import { PlatformApisModel } from './models/platformApis'; import { PlatformCorsSettingModel } from './models/platformCorsSetting'; import { PlatformDomainModel } from './models/platformDomain'; import { PlatformDomainEventModel } from './models/platformDomainEvent'; @@ -120,9 +120,9 @@ export { createMutationOperations } from './mutation'; export function createClient(config: OrmClientConfig) { const client = new OrmClient(config); return { + api: new ApiModel(client), apiSchema: new ApiSchemaModel(client), apiSetting: new ApiSettingModel(client), - apis: new ApisModel(client), astMigration: new AstMigrationModel(client), checkConstraint: new CheckConstraintModel(client), compositeType: new CompositeTypeModel(client), @@ -152,9 +152,9 @@ export function createClient(config: OrmClientConfig) { nodeTypeRegistry: new NodeTypeRegistryModel(client), page: new PageModel(client), partition: new PartitionModel(client), + platformApi: new PlatformApiModel(client), platformApiSchema: new PlatformApiSchemaModel(client), platformApiSetting: new PlatformApiSettingModel(client), - platformApis: new PlatformApisModel(client), platformCorsSetting: new PlatformCorsSettingModel(client), platformDomain: new PlatformDomainModel(client), platformDomainEvent: new PlatformDomainEventModel(client), diff --git a/sdk/constructive-react/src/api/orm/input-types.ts b/sdk/constructive-react/src/api/orm/input-types.ts index 2347f17ca6..380adaea86 100644 --- a/sdk/constructive-react/src/api/orm/input-types.ts +++ b/sdk/constructive-react/src/api/orm/input-types.ts @@ -235,8 +235,28 @@ export type ApiExposureLevel = 'EXPOSABLE' | 'INTERNAL_ONLY' | 'NEVER_EXPOSE'; export type ObjectCategory = 'APP' | 'AUTH' | 'CORE' | 'MEMBERSHIPS' | 'MODULE' | 'PERMISSIONS'; // ============ Custom Scalar Types ============ export type ConstructiveInternalTypeImage = unknown; -/** Join table linking API surfaces to the metaschema schemas they expose */ +/** API surfaces exposed by this scope; publication makes a surface bindable from other scopes */ // ============ Entity Types ============ +export interface Api { + /** Anonymous role the API executes as */ + anonRole?: string | null; + /** Module-specific configuration for this API surface */ + config?: Record | null; + createdAt?: string | null; + /** Database that owns this resource (database-scoped isolation) */ + databaseId?: string | null; + /** Database this API surface serves */ + dbname?: string | null; + id: string; + /** Whether other scopes may see and route to this API surface */ + isPublished?: boolean | null; + /** Owner-local API surface name */ + name?: string | null; + /** Authenticated role the API executes as */ + roleName?: string | null; + updatedAt?: string | null; +} +/** Join table linking API surfaces to the metaschema schemas they expose */ export interface ApiSchema { /** API surface that exposes this schema */ apiId?: string | null; @@ -286,26 +306,6 @@ export interface ApiSetting { statementTimeoutMs?: string | null; updatedAt?: string | null; } -/** API surfaces exposed by this scope; publication makes a surface bindable from other scopes */ -export interface Apis { - /** Anonymous role the API executes as */ - anonRole?: string | null; - /** Module-specific configuration for this API surface */ - config?: Record | null; - createdAt?: string | null; - /** Database that owns this resource (database-scoped isolation) */ - databaseId?: string | null; - /** Database this API surface serves */ - dbname?: string | null; - id: string; - /** Whether other scopes may see and route to this API surface */ - isPublished?: boolean | null; - /** Owner-local API surface name */ - name?: string | null; - /** Authenticated role the API executes as */ - roleName?: string | null; - updatedAt?: string | null; -} export interface AstMigration { actionId?: string | null; actionName?: string | null; @@ -821,6 +821,24 @@ export interface Partition { tableId?: string | null; updatedAt?: string | null; } +/** API surfaces exposed by this scope; publication makes a surface bindable from other scopes */ +export interface PlatformApi { + /** Anonymous role the API executes as */ + anonRole?: string | null; + /** Module-specific configuration for this API surface */ + config?: Record | null; + createdAt?: string | null; + /** Database this API surface serves */ + dbname?: string | null; + id: string; + /** Whether other scopes may see and route to this API surface */ + isPublished?: boolean | null; + /** Owner-local API surface name */ + name?: string | null; + /** Authenticated role the API executes as */ + roleName?: string | null; + updatedAt?: string | null; +} /** Join table linking API surfaces to the metaschema schemas they expose */ export interface PlatformApiSchema { /** API surface that exposes this schema */ @@ -867,24 +885,6 @@ export interface PlatformApiSetting { statementTimeoutMs?: string | null; updatedAt?: string | null; } -/** API surfaces exposed by this scope; publication makes a surface bindable from other scopes */ -export interface PlatformApis { - /** Anonymous role the API executes as */ - anonRole?: string | null; - /** Module-specific configuration for this API surface */ - config?: Record | null; - createdAt?: string | null; - /** Database this API surface serves */ - dbname?: string | null; - id: string; - /** Whether other scopes may see and route to this API surface */ - isPublished?: boolean | null; - /** Owner-local API surface name */ - name?: string | null; - /** Authenticated role the API executes as */ - roleName?: string | null; - updatedAt?: string | null; -} /** Scope-wide and per-API CORS origin configuration; NULL api_id means scope-wide default */ export interface PlatformCorsSetting { /** Array of allowed CORS origins (e.g. https://example.com) */ @@ -1736,17 +1736,17 @@ export interface PageInfo { endCursor?: string | null; } // ============ Entity Relation Types ============ +export interface ApiRelations { + apiSetting?: ApiSetting | null; + apiSchemas?: ConnectionResult; + corsSettings?: ConnectionResult; +} export interface ApiSchemaRelations { - api?: Apis | null; + api?: Api | null; schema?: Schema | null; } export interface ApiSettingRelations { - api?: Apis | null; -} -export interface ApisRelations { - apiSettingByApiId?: ApiSetting | null; - apiSchemasByApiId?: ConnectionResult; - corsSettingsByApiId?: ConnectionResult; + api?: Api | null; } export interface AstMigrationRelations {} export interface CheckConstraintRelations { @@ -1758,7 +1758,7 @@ export interface CompositeTypeRelations { schema?: Schema | null; } export interface CorsSettingRelations { - api?: Apis | null; + api?: Api | null; } export interface DatabaseRelations { checkConstraints?: ConnectionResult; @@ -1896,20 +1896,20 @@ export interface PartitionRelations { partitionKey?: Field | null; table?: Table | null; } +export interface PlatformApiRelations { + platformApiSettingByApiId?: PlatformApiSetting | null; + platformCorsSettingByApiId?: PlatformCorsSetting | null; + platformApiSchemasByApiId?: ConnectionResult; +} export interface PlatformApiSchemaRelations { - api?: PlatformApis | null; + api?: PlatformApi | null; schema?: Schema | null; } export interface PlatformApiSettingRelations { - api?: PlatformApis | null; -} -export interface PlatformApisRelations { - platformApiSettingByApiId?: PlatformApiSetting | null; - platformCorsSettingByApiId?: PlatformCorsSetting | null; - platformApiSchemasByApiId?: ConnectionResult; + api?: PlatformApi | null; } export interface PlatformCorsSettingRelations { - api?: PlatformApis | null; + api?: PlatformApi | null; } export interface PlatformDomainRelations { platformDomainEventsByDomainId?: ConnectionResult; @@ -2139,9 +2139,9 @@ export interface WebauthnSettingRelations { userField?: Field | null; } // ============ Entity Types With Relations ============ +export type ApiWithRelations = Api & ApiRelations; export type ApiSchemaWithRelations = ApiSchema & ApiSchemaRelations; export type ApiSettingWithRelations = ApiSetting & ApiSettingRelations; -export type ApisWithRelations = Apis & ApisRelations; export type AstMigrationWithRelations = AstMigration & AstMigrationRelations; export type CheckConstraintWithRelations = CheckConstraint & CheckConstraintRelations; export type CompositeTypeWithRelations = CompositeType & CompositeTypeRelations; @@ -2173,9 +2173,9 @@ export type ManagedDomainWithRelations = ManagedDomain & ManagedDomainRelations; export type NodeTypeRegistryWithRelations = NodeTypeRegistry & NodeTypeRegistryRelations; export type PageWithRelations = Page & PageRelations; export type PartitionWithRelations = Partition & PartitionRelations; +export type PlatformApiWithRelations = PlatformApi & PlatformApiRelations; export type PlatformApiSchemaWithRelations = PlatformApiSchema & PlatformApiSchemaRelations; export type PlatformApiSettingWithRelations = PlatformApiSetting & PlatformApiSettingRelations; -export type PlatformApisWithRelations = PlatformApis & PlatformApisRelations; export type PlatformCorsSettingWithRelations = PlatformCorsSetting & PlatformCorsSettingRelations; export type PlatformDomainWithRelations = PlatformDomain & PlatformDomainRelations; export type PlatformDomainEventWithRelations = PlatformDomainEvent & PlatformDomainEventRelations; @@ -2230,6 +2230,33 @@ export type ViewRuleWithRelations = ViewRule & ViewRuleRelations; export type ViewTableWithRelations = ViewTable & ViewTableRelations; export type WebauthnSettingWithRelations = WebauthnSetting & WebauthnSettingRelations; // ============ Entity Select Types ============ +export type ApiSelect = { + anonRole?: boolean; + config?: boolean; + createdAt?: boolean; + databaseId?: boolean; + dbname?: boolean; + id?: boolean; + isPublished?: boolean; + name?: boolean; + roleName?: boolean; + updatedAt?: boolean; + apiSetting?: { + select: ApiSettingSelect; + }; + apiSchemas?: { + select: ApiSchemaSelect; + first?: number; + filter?: ApiSchemaFilter; + orderBy?: ApiSchemaOrderBy[]; + }; + corsSettings?: { + select: CorsSettingSelect; + first?: number; + filter?: CorsSettingFilter; + orderBy?: CorsSettingOrderBy[]; + }; +}; export type ApiSchemaSelect = { apiId?: boolean; createdAt?: boolean; @@ -2238,7 +2265,7 @@ export type ApiSchemaSelect = { schemaId?: boolean; updatedAt?: boolean; api?: { - select: ApisSelect; + select: ApiSelect; }; schema?: { select: SchemaSelect; @@ -2265,34 +2292,7 @@ export type ApiSettingSelect = { statementTimeoutMs?: boolean; updatedAt?: boolean; api?: { - select: ApisSelect; - }; -}; -export type ApisSelect = { - anonRole?: boolean; - config?: boolean; - createdAt?: boolean; - databaseId?: boolean; - dbname?: boolean; - id?: boolean; - isPublished?: boolean; - name?: boolean; - roleName?: boolean; - updatedAt?: boolean; - apiSettingByApiId?: { - select: ApiSettingSelect; - }; - apiSchemasByApiId?: { - select: ApiSchemaSelect; - first?: number; - filter?: ApiSchemaFilter; - orderBy?: ApiSchemaOrderBy[]; - }; - corsSettingsByApiId?: { - select: CorsSettingSelect; - first?: number; - filter?: CorsSettingFilter; - orderBy?: CorsSettingOrderBy[]; + select: ApiSelect; }; }; export type AstMigrationSelect = { @@ -2358,7 +2358,7 @@ export type CorsSettingSelect = { id?: boolean; updatedAt?: boolean; api?: { - select: ApisSelect; + select: ApiSelect; }; }; export type DatabaseSelect = { @@ -3135,6 +3135,29 @@ export type PartitionSelect = { select: TableSelect; }; }; +export type PlatformApiSelect = { + anonRole?: boolean; + config?: boolean; + createdAt?: boolean; + dbname?: boolean; + id?: boolean; + isPublished?: boolean; + name?: boolean; + roleName?: boolean; + updatedAt?: boolean; + platformApiSettingByApiId?: { + select: PlatformApiSettingSelect; + }; + platformCorsSettingByApiId?: { + select: PlatformCorsSettingSelect; + }; + platformApiSchemasByApiId?: { + select: PlatformApiSchemaSelect; + first?: number; + filter?: PlatformApiSchemaFilter; + orderBy?: PlatformApiSchemaOrderBy[]; + }; +}; export type PlatformApiSchemaSelect = { apiId?: boolean; createdAt?: boolean; @@ -3142,7 +3165,7 @@ export type PlatformApiSchemaSelect = { schemaId?: boolean; updatedAt?: boolean; api?: { - select: PlatformApisSelect; + select: PlatformApiSelect; }; schema?: { select: SchemaSelect; @@ -3168,30 +3191,7 @@ export type PlatformApiSettingSelect = { statementTimeoutMs?: boolean; updatedAt?: boolean; api?: { - select: PlatformApisSelect; - }; -}; -export type PlatformApisSelect = { - anonRole?: boolean; - config?: boolean; - createdAt?: boolean; - dbname?: boolean; - id?: boolean; - isPublished?: boolean; - name?: boolean; - roleName?: boolean; - updatedAt?: boolean; - platformApiSettingByApiId?: { - select: PlatformApiSettingSelect; - }; - platformCorsSettingByApiId?: { - select: PlatformCorsSettingSelect; - }; - platformApiSchemasByApiId?: { - select: PlatformApiSchemaSelect; - first?: number; - filter?: PlatformApiSchemaFilter; - orderBy?: PlatformApiSchemaOrderBy[]; + select: PlatformApiSelect; }; }; export type PlatformCorsSettingSelect = { @@ -3201,7 +3201,7 @@ export type PlatformCorsSettingSelect = { id?: boolean; updatedAt?: boolean; api?: { - select: PlatformApisSelect; + select: PlatformApiSelect; }; }; export type PlatformDomainSelect = { @@ -4365,11 +4365,51 @@ export type WebauthnSettingSelect = { }; }; // ============ Table Filter Types ============ +export interface ApiFilter { + /** Checks for all expressions in this list. */ + and?: ApiFilter[]; + /** Filter by the object’s `anonRole` field. */ + anonRole?: StringFilter; + /** Filter by the object’s `apiSchemas` relation. */ + apiSchemas?: ApiToManyApiSchemaFilter; + /** `apiSchemas` exist. */ + apiSchemasExist?: boolean; + /** Filter by the object’s `apiSetting` relation. */ + apiSetting?: ApiSettingFilter; + /** A related `apiSetting` exists. */ + apiSettingExists?: boolean; + /** Filter by the object’s `config` field. */ + config?: JSONFilter; + /** Filter by the object’s `corsSettings` relation. */ + corsSettings?: ApiToManyCorsSettingFilter; + /** `corsSettings` exist. */ + corsSettingsExist?: boolean; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `dbname` field. */ + dbname?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isPublished` field. */ + isPublished?: BooleanFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: ApiFilter; + /** Checks for any expressions in this list. */ + or?: ApiFilter[]; + /** Filter by the object’s `roleName` field. */ + roleName?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} export interface ApiSchemaFilter { /** Checks for all expressions in this list. */ and?: ApiSchemaFilter[]; /** Filter by the object’s `api` relation. */ - api?: ApisFilter; + api?: ApiFilter; /** Filter by the object’s `apiId` field. */ apiId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ @@ -4393,7 +4433,7 @@ export interface ApiSettingFilter { /** Checks for all expressions in this list. */ and?: ApiSettingFilter[]; /** Filter by the object’s `api` relation. */ - api?: ApisFilter; + api?: ApiFilter; /** Filter by the object’s `apiId` field. */ apiId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ @@ -4437,46 +4477,6 @@ export interface ApiSettingFilter { /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } -export interface ApisFilter { - /** Checks for all expressions in this list. */ - and?: ApisFilter[]; - /** Filter by the object’s `anonRole` field. */ - anonRole?: StringFilter; - /** Filter by the object’s `apiSchemasByApiId` relation. */ - apiSchemasByApiId?: ApisToManyApiSchemaFilter; - /** `apiSchemasByApiId` exist. */ - apiSchemasByApiIdExist?: boolean; - /** Filter by the object’s `apiSettingByApiId` relation. */ - apiSettingByApiId?: ApiSettingFilter; - /** A related `apiSettingByApiId` exists. */ - apiSettingByApiIdExists?: boolean; - /** Filter by the object’s `config` field. */ - config?: JSONFilter; - /** Filter by the object’s `corsSettingsByApiId` relation. */ - corsSettingsByApiId?: ApisToManyCorsSettingFilter; - /** `corsSettingsByApiId` exist. */ - corsSettingsByApiIdExist?: boolean; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `databaseId` field. */ - databaseId?: UUIDFilter; - /** Filter by the object’s `dbname` field. */ - dbname?: StringFilter; - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `isPublished` field. */ - isPublished?: BooleanFilter; - /** Filter by the object’s `name` field. */ - name?: StringFilter; - /** Negates the expression. */ - not?: ApisFilter; - /** Checks for any expressions in this list. */ - or?: ApisFilter[]; - /** Filter by the object’s `roleName` field. */ - roleName?: StringFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; -} export interface AstMigrationFilter { /** Filter by the object’s `actionId` field. */ actionId?: UUIDFilter; @@ -4589,7 +4589,7 @@ export interface CorsSettingFilter { /** Checks for all expressions in this list. */ and?: CorsSettingFilter[]; /** Filter by the object’s `api` relation. */ - api?: ApisFilter; + api?: ApiFilter; /** A related `api` exists. */ apiExists?: boolean; /** Filter by the object’s `apiId` field. */ @@ -5727,11 +5727,49 @@ export interface PartitionFilter { /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } +export interface PlatformApiFilter { + /** Checks for all expressions in this list. */ + and?: PlatformApiFilter[]; + /** Filter by the object’s `anonRole` field. */ + anonRole?: StringFilter; + /** Filter by the object’s `config` field. */ + config?: JSONFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `dbname` field. */ + dbname?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isPublished` field. */ + isPublished?: BooleanFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: PlatformApiFilter; + /** Checks for any expressions in this list. */ + or?: PlatformApiFilter[]; + /** Filter by the object’s `platformApiSchemasByApiId` relation. */ + platformApiSchemasByApiId?: PlatformApiToManyPlatformApiSchemaFilter; + /** `platformApiSchemasByApiId` exist. */ + platformApiSchemasByApiIdExist?: boolean; + /** Filter by the object’s `platformApiSettingByApiId` relation. */ + platformApiSettingByApiId?: PlatformApiSettingFilter; + /** A related `platformApiSettingByApiId` exists. */ + platformApiSettingByApiIdExists?: boolean; + /** Filter by the object’s `platformCorsSettingByApiId` relation. */ + platformCorsSettingByApiId?: PlatformCorsSettingFilter; + /** A related `platformCorsSettingByApiId` exists. */ + platformCorsSettingByApiIdExists?: boolean; + /** Filter by the object’s `roleName` field. */ + roleName?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} export interface PlatformApiSchemaFilter { /** Checks for all expressions in this list. */ and?: PlatformApiSchemaFilter[]; /** Filter by the object’s `api` relation. */ - api?: PlatformApisFilter; + api?: PlatformApiFilter; /** Filter by the object’s `apiId` field. */ apiId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ @@ -5753,7 +5791,7 @@ export interface PlatformApiSettingFilter { /** Checks for all expressions in this list. */ and?: PlatformApiSettingFilter[]; /** Filter by the object’s `api` relation. */ - api?: PlatformApisFilter; + api?: PlatformApiFilter; /** Filter by the object’s `apiId` field. */ apiId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ @@ -5795,51 +5833,13 @@ export interface PlatformApiSettingFilter { /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } -export interface PlatformApisFilter { - /** Checks for all expressions in this list. */ - and?: PlatformApisFilter[]; - /** Filter by the object’s `anonRole` field. */ - anonRole?: StringFilter; - /** Filter by the object’s `config` field. */ - config?: JSONFilter; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `dbname` field. */ - dbname?: StringFilter; - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `isPublished` field. */ - isPublished?: BooleanFilter; - /** Filter by the object’s `name` field. */ - name?: StringFilter; - /** Negates the expression. */ - not?: PlatformApisFilter; - /** Checks for any expressions in this list. */ - or?: PlatformApisFilter[]; - /** Filter by the object’s `platformApiSchemasByApiId` relation. */ - platformApiSchemasByApiId?: PlatformApisToManyPlatformApiSchemaFilter; - /** `platformApiSchemasByApiId` exist. */ - platformApiSchemasByApiIdExist?: boolean; - /** Filter by the object’s `platformApiSettingByApiId` relation. */ - platformApiSettingByApiId?: PlatformApiSettingFilter; - /** A related `platformApiSettingByApiId` exists. */ - platformApiSettingByApiIdExists?: boolean; - /** Filter by the object’s `platformCorsSettingByApiId` relation. */ - platformCorsSettingByApiId?: PlatformCorsSettingFilter; - /** A related `platformCorsSettingByApiId` exists. */ - platformCorsSettingByApiIdExists?: boolean; - /** Filter by the object’s `roleName` field. */ - roleName?: StringFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; -} export interface PlatformCorsSettingFilter { /** Filter by the object’s `allowedOrigins` field. */ allowedOrigins?: StringListFilter; /** Checks for all expressions in this list. */ and?: PlatformCorsSettingFilter[]; /** Filter by the object’s `api` relation. */ - api?: PlatformApisFilter; + api?: PlatformApiFilter; /** A related `api` exists. */ apiExists?: boolean; /** Filter by the object’s `apiId` field. */ @@ -7642,6 +7642,30 @@ export interface WebauthnSettingFilter { userFieldId?: UUIDFilter; } // ============ OrderBy Types ============ +export type ApiOrderBy = + | 'ANON_ROLE_ASC' + | 'ANON_ROLE_DESC' + | 'CONFIG_ASC' + | 'CONFIG_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'DBNAME_ASC' + | 'DBNAME_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IS_PUBLISHED_ASC' + | 'IS_PUBLISHED_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ROLE_NAME_ASC' + | 'ROLE_NAME_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; export type ApiSchemaOrderBy = | 'API_ID_ASC' | 'API_ID_DESC' @@ -7700,30 +7724,6 @@ export type ApiSettingOrderBy = | 'STATEMENT_TIMEOUT_MS_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; -export type ApisOrderBy = - | 'ANON_ROLE_ASC' - | 'ANON_ROLE_DESC' - | 'CONFIG_ASC' - | 'CONFIG_DESC' - | 'CREATED_AT_ASC' - | 'CREATED_AT_DESC' - | 'DATABASE_ID_ASC' - | 'DATABASE_ID_DESC' - | 'DBNAME_ASC' - | 'DBNAME_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'IS_PUBLISHED_ASC' - | 'IS_PUBLISHED_DESC' - | 'NAME_ASC' - | 'NAME_DESC' - | 'NATURAL' - | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC' - | 'ROLE_NAME_ASC' - | 'ROLE_NAME_DESC' - | 'UPDATED_AT_ASC' - | 'UPDATED_AT_DESC'; export type AstMigrationOrderBy = | 'ACTION_ID_ASC' | 'ACTION_ID_DESC' @@ -8556,6 +8556,28 @@ export type PartitionOrderBy = | 'TABLE_ID_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; +export type PlatformApiOrderBy = + | 'ANON_ROLE_ASC' + | 'ANON_ROLE_DESC' + | 'CONFIG_ASC' + | 'CONFIG_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'DBNAME_ASC' + | 'DBNAME_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IS_PUBLISHED_ASC' + | 'IS_PUBLISHED_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ROLE_NAME_ASC' + | 'ROLE_NAME_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; export type PlatformApiSchemaOrderBy = | 'API_ID_ASC' | 'API_ID_DESC' @@ -8610,28 +8632,6 @@ export type PlatformApiSettingOrderBy = | 'STATEMENT_TIMEOUT_MS_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; -export type PlatformApisOrderBy = - | 'ANON_ROLE_ASC' - | 'ANON_ROLE_DESC' - | 'CONFIG_ASC' - | 'CONFIG_DESC' - | 'CREATED_AT_ASC' - | 'CREATED_AT_DESC' - | 'DBNAME_ASC' - | 'DBNAME_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'IS_PUBLISHED_ASC' - | 'IS_PUBLISHED_DESC' - | 'NAME_ASC' - | 'NAME_DESC' - | 'NATURAL' - | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC' - | 'ROLE_NAME_ASC' - | 'ROLE_NAME_DESC' - | 'UPDATED_AT_ASC' - | 'UPDATED_AT_DESC'; export type PlatformCorsSettingOrderBy = | 'ALLOWED_ORIGINS_ASC' | 'ALLOWED_ORIGINS_DESC' @@ -9801,6 +9801,36 @@ export type WebauthnSettingOrderBy = | 'USER_FIELD_ID_ASC' | 'USER_FIELD_ID_DESC'; // ============ CRUD Input Types ============ +export interface CreateApiInput { + clientMutationId?: string; + api: { + anonRole?: string; + config?: Record; + databaseId: string; + dbname?: string; + isPublished?: boolean; + name: string; + roleName?: string; + }; +} +export interface ApiPatch { + anonRole?: string | null; + config?: Record | null; + databaseId?: string | null; + dbname?: string | null; + isPublished?: boolean | null; + name?: string | null; + roleName?: string | null; +} +export interface UpdateApiInput { + clientMutationId?: string; + id: string; + apiPatch: ApiPatch; +} +export interface DeleteApiInput { + clientMutationId?: string; + id: string; +} export interface CreateApiSchemaInput { clientMutationId?: string; apiSchema: { @@ -9871,36 +9901,6 @@ export interface DeleteApiSettingInput { clientMutationId?: string; id: string; } -export interface CreateApisInput { - clientMutationId?: string; - apis: { - anonRole?: string; - config?: Record; - databaseId: string; - dbname?: string; - isPublished?: boolean; - name: string; - roleName?: string; - }; -} -export interface ApisPatch { - anonRole?: string | null; - config?: Record | null; - databaseId?: string | null; - dbname?: string | null; - isPublished?: boolean | null; - name?: string | null; - roleName?: string | null; -} -export interface UpdateApisInput { - clientMutationId?: string; - id: string; - apisPatch: ApisPatch; -} -export interface DeleteApisInput { - clientMutationId?: string; - id: string; -} export interface CreateAstMigrationInput { clientMutationId?: string; astMigration: { @@ -10939,6 +10939,34 @@ export interface DeletePartitionInput { clientMutationId?: string; id: string; } +export interface CreatePlatformApiInput { + clientMutationId?: string; + platformApi: { + anonRole?: string; + config?: Record; + dbname?: string; + isPublished?: boolean; + name: string; + roleName?: string; + }; +} +export interface PlatformApiPatch { + anonRole?: string | null; + config?: Record | null; + dbname?: string | null; + isPublished?: boolean | null; + name?: string | null; + roleName?: string | null; +} +export interface UpdatePlatformApiInput { + clientMutationId?: string; + id: string; + platformApiPatch: PlatformApiPatch; +} +export interface DeletePlatformApiInput { + clientMutationId?: string; + id: string; +} export interface CreatePlatformApiSchemaInput { clientMutationId?: string; platformApiSchema: { @@ -11005,34 +11033,6 @@ export interface DeletePlatformApiSettingInput { clientMutationId?: string; id: string; } -export interface CreatePlatformApisInput { - clientMutationId?: string; - platformApis: { - anonRole?: string; - config?: Record; - dbname?: string; - isPublished?: boolean; - name: string; - roleName?: string; - }; -} -export interface PlatformApisPatch { - anonRole?: string | null; - config?: Record | null; - dbname?: string | null; - isPublished?: boolean | null; - name?: string | null; - roleName?: string | null; -} -export interface UpdatePlatformApisInput { - clientMutationId?: string; - id: string; - platformApisPatch: PlatformApisPatch; -} -export interface DeletePlatformApisInput { - clientMutationId?: string; - id: string; -} export interface CreatePlatformCorsSettingInput { clientMutationId?: string; platformCorsSetting: { @@ -12503,9 +12503,9 @@ export interface DeleteWebauthnSettingInput { } // ============ Connection Fields Map ============ export const connectionFieldsMap = { - Apis: { - apiSchemasByApiId: 'ApiSchema', - corsSettingsByApiId: 'CorsSetting', + Api: { + apiSchemas: 'ApiSchema', + corsSettings: 'CorsSetting', }, Database: { checkConstraints: 'CheckConstraint', @@ -12564,7 +12564,7 @@ export const connectionFieldsMap = { domainEvents: 'DomainEvent', domainVerifications: 'DomainVerification', }, - PlatformApis: { + PlatformApi: { platformApiSchemasByApiId: 'PlatformApiSchema', }, PlatformDomain: { @@ -12713,7 +12713,7 @@ export interface SitesProvisionStaticSiteInput { siteConfig?: Record; } /** A filter to be used against many `ApiSchema` object types. All fields are combined with a logical ‘and.’ */ -export interface ApisToManyApiSchemaFilter { +export interface ApiToManyApiSchemaFilter { /** Filters to entities where every related entity matches. */ every?: ApiSchemaFilter; /** Filters to entities where no related entity matches. */ @@ -12722,7 +12722,7 @@ export interface ApisToManyApiSchemaFilter { some?: ApiSchemaFilter; } /** A filter to be used against many `CorsSetting` object types. All fields are combined with a logical ‘and.’ */ -export interface ApisToManyCorsSettingFilter { +export interface ApiToManyCorsSettingFilter { /** Filters to entities where every related entity matches. */ every?: CorsSettingFilter; /** Filters to entities where no related entity matches. */ @@ -13161,7 +13161,7 @@ export interface ManagedDomainToManyDomainVerificationFilter { some?: DomainVerificationFilter; } /** A filter to be used against many `PlatformApiSchema` object types. All fields are combined with a logical ‘and.’ */ -export interface PlatformApisToManyPlatformApiSchemaFilter { +export interface PlatformApiToManyPlatformApiSchemaFilter { /** Filters to entities where every related entity matches. */ every?: PlatformApiSchemaFilter; /** Filters to entities where no related entity matches. */ @@ -13670,6 +13670,26 @@ export interface ViewToManyViewTableFilter { /** Filters to entities where at least one related entity matches. */ some?: ViewTableFilter; } +/** An input for mutations affecting `Api` */ +export interface ApiInput { + /** Anonymous role the API executes as */ + anonRole?: string; + /** Module-specific configuration for this API surface */ + config?: Record; + createdAt?: string; + /** Database that owns this resource (database-scoped isolation) */ + databaseId: string; + /** Database this API surface serves */ + dbname?: string; + id?: string; + /** Whether other scopes may see and route to this API surface */ + isPublished?: boolean; + /** Owner-local API surface name */ + name: string; + /** Authenticated role the API executes as */ + roleName?: string; + updatedAt?: string; +} /** An input for mutations affecting `ApiSchema` */ export interface ApiSchemaInput { /** API surface that exposes this schema */ @@ -13720,26 +13740,6 @@ export interface ApiSettingInput { statementTimeoutMs?: string; updatedAt?: string; } -/** An input for mutations affecting `Apis` */ -export interface ApisInput { - /** Anonymous role the API executes as */ - anonRole?: string; - /** Module-specific configuration for this API surface */ - config?: Record; - createdAt?: string; - /** Database that owns this resource (database-scoped isolation) */ - databaseId: string; - /** Database this API surface serves */ - dbname?: string; - id?: string; - /** Whether other scopes may see and route to this API surface */ - isPublished?: boolean; - /** Owner-local API surface name */ - name: string; - /** Authenticated role the API executes as */ - roleName?: string; - updatedAt?: string; -} /** An input for mutations affecting `CheckConstraint` */ export interface CheckConstraintInput { category?: ObjectCategory; @@ -14259,6 +14259,24 @@ export interface PartitionInput { tableId: string; updatedAt?: string; } +/** An input for mutations affecting `PlatformApi` */ +export interface PlatformApiInput { + /** Anonymous role the API executes as */ + anonRole?: string; + /** Module-specific configuration for this API surface */ + config?: Record; + createdAt?: string; + /** Database this API surface serves */ + dbname?: string; + id?: string; + /** Whether other scopes may see and route to this API surface */ + isPublished?: boolean; + /** Owner-local API surface name */ + name: string; + /** Authenticated role the API executes as */ + roleName?: string; + updatedAt?: string; +} /** An input for mutations affecting `PlatformApiSchema` */ export interface PlatformApiSchemaInput { /** API surface that exposes this schema */ @@ -14305,24 +14323,6 @@ export interface PlatformApiSettingInput { statementTimeoutMs?: string; updatedAt?: string; } -/** An input for mutations affecting `PlatformApis` */ -export interface PlatformApisInput { - /** Anonymous role the API executes as */ - anonRole?: string; - /** Module-specific configuration for this API surface */ - config?: Record; - createdAt?: string; - /** Database this API surface serves */ - dbname?: string; - id?: string; - /** Whether other scopes may see and route to this API surface */ - isPublished?: boolean; - /** Owner-local API surface name */ - name: string; - /** Authenticated role the API executes as */ - roleName?: string; - updatedAt?: string; -} /** An input for mutations affecting `PlatformCorsSetting` */ export interface PlatformCorsSettingInput { /** Array of allowed CORS origins (e.g. https://example.com) */ @@ -15166,7 +15166,7 @@ export interface ApiSchemaFilter { /** Checks for all expressions in this list. */ and?: ApiSchemaFilter[]; /** Filter by the object’s `api` relation. */ - api?: ApisFilter; + api?: ApiFilter; /** Filter by the object’s `apiId` field. */ apiId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ @@ -15193,7 +15193,7 @@ export interface CorsSettingFilter { /** Checks for all expressions in this list. */ and?: CorsSettingFilter[]; /** Filter by the object’s `api` relation. */ - api?: ApisFilter; + api?: ApiFilter; /** A related `api` exists. */ apiExists?: boolean; /** Filter by the object’s `apiId` field. */ @@ -16852,7 +16852,7 @@ export interface PlatformApiSchemaFilter { /** Checks for all expressions in this list. */ and?: PlatformApiSchemaFilter[]; /** Filter by the object’s `api` relation. */ - api?: PlatformApisFilter; + api?: PlatformApiFilter; /** Filter by the object’s `apiId` field. */ apiId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ @@ -17302,26 +17302,26 @@ export interface SiteThemeFilter { /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } -/** A filter to be used against `Apis` object types. All fields are combined with a logical ‘and.’ */ -export interface ApisFilter { +/** A filter to be used against `Api` object types. All fields are combined with a logical ‘and.’ */ +export interface ApiFilter { /** Checks for all expressions in this list. */ - and?: ApisFilter[]; + and?: ApiFilter[]; /** Filter by the object’s `anonRole` field. */ anonRole?: StringFilter; - /** Filter by the object’s `apiSchemasByApiId` relation. */ - apiSchemasByApiId?: ApisToManyApiSchemaFilter; - /** `apiSchemasByApiId` exist. */ - apiSchemasByApiIdExist?: boolean; - /** Filter by the object’s `apiSettingByApiId` relation. */ - apiSettingByApiId?: ApiSettingFilter; - /** A related `apiSettingByApiId` exists. */ - apiSettingByApiIdExists?: boolean; + /** Filter by the object’s `apiSchemas` relation. */ + apiSchemas?: ApiToManyApiSchemaFilter; + /** `apiSchemas` exist. */ + apiSchemasExist?: boolean; + /** Filter by the object’s `apiSetting` relation. */ + apiSetting?: ApiSettingFilter; + /** A related `apiSetting` exists. */ + apiSettingExists?: boolean; /** Filter by the object’s `config` field. */ config?: JSONFilter; - /** Filter by the object’s `corsSettingsByApiId` relation. */ - corsSettingsByApiId?: ApisToManyCorsSettingFilter; - /** `corsSettingsByApiId` exist. */ - corsSettingsByApiIdExist?: boolean; + /** Filter by the object’s `corsSettings` relation. */ + corsSettings?: ApiToManyCorsSettingFilter; + /** `corsSettings` exist. */ + corsSettingsExist?: boolean; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; /** Filter by the object’s `databaseId` field. */ @@ -17335,9 +17335,9 @@ export interface ApisFilter { /** Filter by the object’s `name` field. */ name?: StringFilter; /** Negates the expression. */ - not?: ApisFilter; + not?: ApiFilter; /** Checks for any expressions in this list. */ - or?: ApisFilter[]; + or?: ApiFilter[]; /** Filter by the object’s `roleName` field. */ roleName?: StringFilter; /** Filter by the object’s `updatedAt` field. */ @@ -17917,10 +17917,10 @@ export interface ManagedDomainFilter { /** Filter by the object’s `verifiedAt` field. */ verifiedAt?: DatetimeFilter; } -/** A filter to be used against `PlatformApis` object types. All fields are combined with a logical ‘and.’ */ -export interface PlatformApisFilter { +/** A filter to be used against `PlatformApi` object types. All fields are combined with a logical ‘and.’ */ +export interface PlatformApiFilter { /** Checks for all expressions in this list. */ - and?: PlatformApisFilter[]; + and?: PlatformApiFilter[]; /** Filter by the object’s `anonRole` field. */ anonRole?: StringFilter; /** Filter by the object’s `config` field. */ @@ -17936,11 +17936,11 @@ export interface PlatformApisFilter { /** Filter by the object’s `name` field. */ name?: StringFilter; /** Negates the expression. */ - not?: PlatformApisFilter; + not?: PlatformApiFilter; /** Checks for any expressions in this list. */ - or?: PlatformApisFilter[]; + or?: PlatformApiFilter[]; /** Filter by the object’s `platformApiSchemasByApiId` relation. */ - platformApiSchemasByApiId?: PlatformApisToManyPlatformApiSchemaFilter; + platformApiSchemasByApiId?: PlatformApiToManyPlatformApiSchemaFilter; /** `platformApiSchemasByApiId` exist. */ platformApiSchemasByApiIdExist?: boolean; /** Filter by the object’s `platformApiSettingByApiId` relation. */ @@ -18179,7 +18179,7 @@ export interface ApiSettingFilter { /** Checks for all expressions in this list. */ and?: ApiSettingFilter[]; /** Filter by the object’s `api` relation. */ - api?: ApisFilter; + api?: ApiFilter; /** Filter by the object’s `apiId` field. */ apiId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ @@ -18228,7 +18228,7 @@ export interface PlatformApiSettingFilter { /** Checks for all expressions in this list. */ and?: PlatformApiSettingFilter[]; /** Filter by the object’s `api` relation. */ - api?: PlatformApisFilter; + api?: PlatformApiFilter; /** Filter by the object’s `apiId` field. */ apiId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ @@ -18277,7 +18277,7 @@ export interface PlatformCorsSettingFilter { /** Checks for all expressions in this list. */ and?: PlatformCorsSettingFilter[]; /** Filter by the object’s `api` relation. */ - api?: PlatformApisFilter; + api?: PlatformApiFilter; /** A related `api` exists. */ apiExists?: boolean; /** Filter by the object’s `apiId` field. */ @@ -18627,6 +18627,51 @@ export type SitesProvisionStaticSitePayloadSelect = { select: PlatformRouteSelect; }; }; +export interface CreateApiPayload { + /** The `Api` that was created by this mutation. */ + api?: Api | null; + apiEdge?: ApiEdge | null; + clientMutationId?: string | null; +} +export type CreateApiPayloadSelect = { + api?: { + select: ApiSelect; + }; + apiEdge?: { + select: ApiEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface UpdateApiPayload { + /** The `Api` that was updated by this mutation. */ + api?: Api | null; + apiEdge?: ApiEdge | null; + clientMutationId?: string | null; +} +export type UpdateApiPayloadSelect = { + api?: { + select: ApiSelect; + }; + apiEdge?: { + select: ApiEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface DeleteApiPayload { + /** The `Api` that was deleted by this mutation. */ + api?: Api | null; + apiEdge?: ApiEdge | null; + clientMutationId?: string | null; +} +export type DeleteApiPayloadSelect = { + api?: { + select: ApiSelect; + }; + apiEdge?: { + select: ApiEdgeSelect; + }; + clientMutationId?: boolean; +}; export interface CreateApiSchemaPayload { /** The `ApiSchema` that was created by this mutation. */ apiSchema?: ApiSchema | null; @@ -18717,51 +18762,6 @@ export type DeleteApiSettingPayloadSelect = { }; clientMutationId?: boolean; }; -export interface CreateApisPayload { - /** The `Apis` that was created by this mutation. */ - apis?: Apis | null; - apisEdge?: ApisEdge | null; - clientMutationId?: string | null; -} -export type CreateApisPayloadSelect = { - apis?: { - select: ApisSelect; - }; - apisEdge?: { - select: ApisEdgeSelect; - }; - clientMutationId?: boolean; -}; -export interface UpdateApisPayload { - /** The `Apis` that was updated by this mutation. */ - apis?: Apis | null; - apisEdge?: ApisEdge | null; - clientMutationId?: string | null; -} -export type UpdateApisPayloadSelect = { - apis?: { - select: ApisSelect; - }; - apisEdge?: { - select: ApisEdgeSelect; - }; - clientMutationId?: boolean; -}; -export interface DeleteApisPayload { - /** The `Apis` that was deleted by this mutation. */ - apis?: Apis | null; - apisEdge?: ApisEdge | null; - clientMutationId?: string | null; -} -export type DeleteApisPayloadSelect = { - apis?: { - select: ApisSelect; - }; - apisEdge?: { - select: ApisEdgeSelect; - }; - clientMutationId?: boolean; -}; export interface CreateCheckConstraintPayload { /** The `CheckConstraint` that was created by this mutation. */ checkConstraint?: CheckConstraint | null; @@ -20022,6 +20022,51 @@ export type DeletePartitionPayloadSelect = { select: PartitionEdgeSelect; }; }; +export interface CreatePlatformApiPayload { + clientMutationId?: string | null; + /** The `PlatformApi` that was created by this mutation. */ + platformApi?: PlatformApi | null; + platformApiEdge?: PlatformApiEdge | null; +} +export type CreatePlatformApiPayloadSelect = { + clientMutationId?: boolean; + platformApi?: { + select: PlatformApiSelect; + }; + platformApiEdge?: { + select: PlatformApiEdgeSelect; + }; +}; +export interface UpdatePlatformApiPayload { + clientMutationId?: string | null; + /** The `PlatformApi` that was updated by this mutation. */ + platformApi?: PlatformApi | null; + platformApiEdge?: PlatformApiEdge | null; +} +export type UpdatePlatformApiPayloadSelect = { + clientMutationId?: boolean; + platformApi?: { + select: PlatformApiSelect; + }; + platformApiEdge?: { + select: PlatformApiEdgeSelect; + }; +}; +export interface DeletePlatformApiPayload { + clientMutationId?: string | null; + /** The `PlatformApi` that was deleted by this mutation. */ + platformApi?: PlatformApi | null; + platformApiEdge?: PlatformApiEdge | null; +} +export type DeletePlatformApiPayloadSelect = { + clientMutationId?: boolean; + platformApi?: { + select: PlatformApiSelect; + }; + platformApiEdge?: { + select: PlatformApiEdgeSelect; + }; +}; export interface CreatePlatformApiSchemaPayload { clientMutationId?: string | null; /** The `PlatformApiSchema` that was created by this mutation. */ @@ -20112,51 +20157,6 @@ export type DeletePlatformApiSettingPayloadSelect = { select: PlatformApiSettingEdgeSelect; }; }; -export interface CreatePlatformApisPayload { - clientMutationId?: string | null; - /** The `PlatformApis` that was created by this mutation. */ - platformApis?: PlatformApis | null; - platformApisEdge?: PlatformApisEdge | null; -} -export type CreatePlatformApisPayloadSelect = { - clientMutationId?: boolean; - platformApis?: { - select: PlatformApisSelect; - }; - platformApisEdge?: { - select: PlatformApisEdgeSelect; - }; -}; -export interface UpdatePlatformApisPayload { - clientMutationId?: string | null; - /** The `PlatformApis` that was updated by this mutation. */ - platformApis?: PlatformApis | null; - platformApisEdge?: PlatformApisEdge | null; -} -export type UpdatePlatformApisPayloadSelect = { - clientMutationId?: boolean; - platformApis?: { - select: PlatformApisSelect; - }; - platformApisEdge?: { - select: PlatformApisEdgeSelect; - }; -}; -export interface DeletePlatformApisPayload { - clientMutationId?: string | null; - /** The `PlatformApis` that was deleted by this mutation. */ - platformApis?: PlatformApis | null; - platformApisEdge?: PlatformApisEdge | null; -} -export type DeletePlatformApisPayloadSelect = { - clientMutationId?: boolean; - platformApis?: { - select: PlatformApisSelect; - }; - platformApisEdge?: { - select: PlatformApisEdgeSelect; - }; -}; export interface CreatePlatformCorsSettingPayload { clientMutationId?: string | null; /** The `PlatformCorsSetting` that was created by this mutation. */ @@ -22262,6 +22262,18 @@ export type DatabaseProvisionModuleSelect = { subdomain?: boolean; updatedAt?: boolean; }; +/** A `Api` edge in the connection. */ +export interface ApiEdge { + cursor?: string | null; + /** The `Api` at the end of the edge. */ + node?: Api | null; +} +export type ApiEdgeSelect = { + cursor?: boolean; + node?: { + select: ApiSelect; + }; +}; /** A `ApiSchema` edge in the connection. */ export interface ApiSchemaEdge { cursor?: string | null; @@ -22286,18 +22298,6 @@ export type ApiSettingEdgeSelect = { select: ApiSettingSelect; }; }; -/** A `Apis` edge in the connection. */ -export interface ApisEdge { - cursor?: string | null; - /** The `Apis` at the end of the edge. */ - node?: Apis | null; -} -export type ApisEdgeSelect = { - cursor?: boolean; - node?: { - select: ApisSelect; - }; -}; /** A `CheckConstraint` edge in the connection. */ export interface CheckConstraintEdge { cursor?: string | null; @@ -22622,6 +22622,18 @@ export type PartitionEdgeSelect = { select: PartitionSelect; }; }; +/** A `PlatformApi` edge in the connection. */ +export interface PlatformApiEdge { + cursor?: string | null; + /** The `PlatformApi` at the end of the edge. */ + node?: PlatformApi | null; +} +export type PlatformApiEdgeSelect = { + cursor?: boolean; + node?: { + select: PlatformApiSelect; + }; +}; /** A `PlatformApiSchema` edge in the connection. */ export interface PlatformApiSchemaEdge { cursor?: string | null; @@ -22646,18 +22658,6 @@ export type PlatformApiSettingEdgeSelect = { select: PlatformApiSettingSelect; }; }; -/** A `PlatformApis` edge in the connection. */ -export interface PlatformApisEdge { - cursor?: string | null; - /** The `PlatformApis` at the end of the edge. */ - node?: PlatformApis | null; -} -export type PlatformApisEdgeSelect = { - cursor?: boolean; - node?: { - select: PlatformApisSelect; - }; -}; /** A `PlatformCorsSetting` edge in the connection. */ export interface PlatformCorsSettingEdge { cursor?: string | null; diff --git a/sdk/constructive-sdk/src/api/orm/models/apis.ts b/sdk/constructive-react/src/api/orm/models/api.ts similarity index 60% rename from sdk/constructive-sdk/src/api/orm/models/apis.ts rename to sdk/constructive-react/src/api/orm/models/api.ts index a62444db0f..4d60695731 100644 --- a/sdk/constructive-sdk/src/api/orm/models/apis.ts +++ b/sdk/constructive-react/src/api/orm/models/api.ts @@ -1,5 +1,5 @@ /** - * Apis model for ORM client + * Api model for ORM client * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -24,28 +24,28 @@ import type { StrictSelect, } from '../select-types'; import type { - Apis, - ApisWithRelations, - ApisSelect, - ApisFilter, - ApisOrderBy, - CreateApisInput, - UpdateApisInput, - ApisPatch, + Api, + ApiWithRelations, + ApiSelect, + ApiFilter, + ApiOrderBy, + CreateApiInput, + UpdateApiInput, + ApiPatch, } from '../input-types'; import { connectionFieldsMap } from '../input-types'; -export class ApisModel { +export class ApiModel { constructor(private client: OrmClient) {} - findMany( - args: FindManyArgs & { + findMany( + args: FindManyArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - apises: ConnectionResult>; + apis: ConnectionResult>; }> { const { document, variables } = buildFindManyDocument( - 'Apis', - 'apises', + 'Api', + 'apis', args.select, { where: args?.where, @@ -56,65 +56,65 @@ export class ApisModel { before: args?.before, offset: args?.offset, }, - 'ApisFilter', - 'ApisOrderBy', + 'ApiFilter', + 'ApiOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'Apis', - fieldName: 'apises', + operationName: 'Api', + fieldName: 'apis', document, variables, }); } - findFirst( - args: FindFirstArgs & { + findFirst( + args: FindFirstArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - apis: InferSelectResult | null; + api: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( - 'Apis', - 'apises', + 'Api', + 'apis', args.select, { where: args?.where, orderBy: args?.orderBy as string[] | undefined, }, - 'ApisFilter', - 'ApisOrderBy', + 'ApiFilter', + 'ApiOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'Apis', - fieldName: 'apis', + operationName: 'Api', + fieldName: 'api', document, variables, transform: (data: { - apises?: { - nodes?: InferSelectResult[]; + apis?: { + nodes?: InferSelectResult[]; }; }) => ({ - apis: data.apises?.nodes?.[0] ?? null, + api: data.apis?.nodes?.[0] ?? null, }), }); } - findOne( + findOne( args: { id: string; select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - apis: InferSelectResult | null; + api: InferSelectResult | null; }> { const { document, variables } = buildFindManyDocument( - 'Apis', - 'apises', + 'Api', + 'apis', args.select, { where: { @@ -124,91 +124,91 @@ export class ApisModel { }, first: 1, }, - 'ApisFilter', - 'ApisOrderBy', + 'ApiFilter', + 'ApiOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'Apis', - fieldName: 'apis', + operationName: 'Api', + fieldName: 'api', document, variables, transform: (data: { - apises?: { - nodes?: InferSelectResult[]; + apis?: { + nodes?: InferSelectResult[]; }; }) => ({ - apis: data.apises?.nodes?.[0] ?? null, + api: data.apis?.nodes?.[0] ?? null, }), }); } - create( - args: CreateArgs & { + create( + args: CreateArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - createApis: { - apis: InferSelectResult; + createApi: { + api: InferSelectResult; }; }> { const { document, variables } = buildCreateDocument( - 'Apis', - 'createApis', - 'apis', + 'Api', + 'createApi', + 'api', args.select, args.data, - 'CreateApisInput', + 'CreateApiInput', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'Apis', - fieldName: 'createApis', + operationName: 'Api', + fieldName: 'createApi', document, variables, }); } - update( + update( args: UpdateArgs< S, { id: string; }, - ApisPatch + ApiPatch > & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - updateApis: { - apis: InferSelectResult; + updateApi: { + api: InferSelectResult; }; }> { const { document, variables } = buildUpdateByPkDocument( - 'Apis', - 'updateApis', - 'apis', + 'Api', + 'updateApi', + 'api', args.select, args.where.id, args.data, - 'UpdateApisInput', + 'UpdateApiInput', 'id', - 'apisPatch', + 'apiPatch', connectionFieldsMap, undefined ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'Apis', - fieldName: 'updateApis', + operationName: 'Api', + fieldName: 'updateApi', document, variables, }); } - delete( + delete( args: DeleteArgs< { id: string; @@ -216,28 +216,28 @@ export class ApisModel { S > & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - deleteApis: { - apis: InferSelectResult; + deleteApi: { + api: InferSelectResult; }; }> { const { document, variables } = buildDeleteByPkDocument( - 'Apis', - 'deleteApis', - 'apis', + 'Api', + 'deleteApi', + 'api', { id: args.where.id, }, - 'DeleteApisInput', + 'DeleteApiInput', args.select, connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'Apis', - fieldName: 'deleteApis', + operationName: 'Api', + fieldName: 'deleteApi', document, variables, }); diff --git a/sdk/constructive-react/src/api/orm/models/index.ts b/sdk/constructive-react/src/api/orm/models/index.ts index a947c4f65f..3a52daef02 100644 --- a/sdk/constructive-react/src/api/orm/models/index.ts +++ b/sdk/constructive-react/src/api/orm/models/index.ts @@ -3,9 +3,9 @@ * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ +export { ApiModel } from './api'; export { ApiSchemaModel } from './apiSchema'; export { ApiSettingModel } from './apiSetting'; -export { ApisModel } from './apis'; export { AstMigrationModel } from './astMigration'; export { CheckConstraintModel } from './checkConstraint'; export { CompositeTypeModel } from './compositeType'; @@ -35,9 +35,9 @@ export { ManagedDomainModel } from './managedDomain'; export { NodeTypeRegistryModel } from './nodeTypeRegistry'; export { PageModel } from './page'; export { PartitionModel } from './partition'; +export { PlatformApiModel } from './platformApi'; export { PlatformApiSchemaModel } from './platformApiSchema'; export { PlatformApiSettingModel } from './platformApiSetting'; -export { PlatformApisModel } from './platformApis'; export { PlatformCorsSettingModel } from './platformCorsSetting'; export { PlatformDomainModel } from './platformDomain'; export { PlatformDomainEventModel } from './platformDomainEvent'; diff --git a/sdk/constructive-react/src/api/orm/models/platformApis.ts b/sdk/constructive-react/src/api/orm/models/platformApi.ts similarity index 54% rename from sdk/constructive-react/src/api/orm/models/platformApis.ts rename to sdk/constructive-react/src/api/orm/models/platformApi.ts index 43cd25c9d2..3eee59e6c8 100644 --- a/sdk/constructive-react/src/api/orm/models/platformApis.ts +++ b/sdk/constructive-react/src/api/orm/models/platformApi.ts @@ -1,5 +1,5 @@ /** - * PlatformApis model for ORM client + * PlatformApi model for ORM client * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -24,28 +24,28 @@ import type { StrictSelect, } from '../select-types'; import type { - PlatformApis, - PlatformApisWithRelations, - PlatformApisSelect, - PlatformApisFilter, - PlatformApisOrderBy, - CreatePlatformApisInput, - UpdatePlatformApisInput, - PlatformApisPatch, + PlatformApi, + PlatformApiWithRelations, + PlatformApiSelect, + PlatformApiFilter, + PlatformApiOrderBy, + CreatePlatformApiInput, + UpdatePlatformApiInput, + PlatformApiPatch, } from '../input-types'; import { connectionFieldsMap } from '../input-types'; -export class PlatformApisModel { +export class PlatformApiModel { constructor(private client: OrmClient) {} - findMany( - args: FindManyArgs & { + findMany( + args: FindManyArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - platformApises: ConnectionResult>; + platformApis: ConnectionResult>; }> { const { document, variables } = buildFindManyDocument( - 'PlatformApis', - 'platformApises', + 'PlatformApi', + 'platformApis', args.select, { where: args?.where, @@ -56,65 +56,65 @@ export class PlatformApisModel { before: args?.before, offset: args?.offset, }, - 'PlatformApisFilter', - 'PlatformApisOrderBy', + 'PlatformApiFilter', + 'PlatformApiOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'PlatformApis', - fieldName: 'platformApises', + operationName: 'PlatformApi', + fieldName: 'platformApis', document, variables, }); } - findFirst( - args: FindFirstArgs & { + findFirst( + args: FindFirstArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - platformApis: InferSelectResult | null; + platformApi: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( - 'PlatformApis', - 'platformApises', + 'PlatformApi', + 'platformApis', args.select, { where: args?.where, orderBy: args?.orderBy as string[] | undefined, }, - 'PlatformApisFilter', - 'PlatformApisOrderBy', + 'PlatformApiFilter', + 'PlatformApiOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'PlatformApis', - fieldName: 'platformApis', + operationName: 'PlatformApi', + fieldName: 'platformApi', document, variables, transform: (data: { - platformApises?: { - nodes?: InferSelectResult[]; + platformApis?: { + nodes?: InferSelectResult[]; }; }) => ({ - platformApis: data.platformApises?.nodes?.[0] ?? null, + platformApi: data.platformApis?.nodes?.[0] ?? null, }), }); } - findOne( + findOne( args: { id: string; select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - platformApis: InferSelectResult | null; + platformApi: InferSelectResult | null; }> { const { document, variables } = buildFindManyDocument( - 'PlatformApis', - 'platformApises', + 'PlatformApi', + 'platformApis', args.select, { where: { @@ -124,91 +124,91 @@ export class PlatformApisModel { }, first: 1, }, - 'PlatformApisFilter', - 'PlatformApisOrderBy', + 'PlatformApiFilter', + 'PlatformApiOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'PlatformApis', - fieldName: 'platformApis', + operationName: 'PlatformApi', + fieldName: 'platformApi', document, variables, transform: (data: { - platformApises?: { - nodes?: InferSelectResult[]; + platformApis?: { + nodes?: InferSelectResult[]; }; }) => ({ - platformApis: data.platformApises?.nodes?.[0] ?? null, + platformApi: data.platformApis?.nodes?.[0] ?? null, }), }); } - create( - args: CreateArgs & { + create( + args: CreateArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - createPlatformApis: { - platformApis: InferSelectResult; + createPlatformApi: { + platformApi: InferSelectResult; }; }> { const { document, variables } = buildCreateDocument( - 'PlatformApis', - 'createPlatformApis', - 'platformApis', + 'PlatformApi', + 'createPlatformApi', + 'platformApi', args.select, args.data, - 'CreatePlatformApisInput', + 'CreatePlatformApiInput', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'PlatformApis', - fieldName: 'createPlatformApis', + operationName: 'PlatformApi', + fieldName: 'createPlatformApi', document, variables, }); } - update( + update( args: UpdateArgs< S, { id: string; }, - PlatformApisPatch + PlatformApiPatch > & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - updatePlatformApis: { - platformApis: InferSelectResult; + updatePlatformApi: { + platformApi: InferSelectResult; }; }> { const { document, variables } = buildUpdateByPkDocument( - 'PlatformApis', - 'updatePlatformApis', - 'platformApis', + 'PlatformApi', + 'updatePlatformApi', + 'platformApi', args.select, args.where.id, args.data, - 'UpdatePlatformApisInput', + 'UpdatePlatformApiInput', 'id', - 'platformApisPatch', + 'platformApiPatch', connectionFieldsMap, undefined ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'PlatformApis', - fieldName: 'updatePlatformApis', + operationName: 'PlatformApi', + fieldName: 'updatePlatformApi', document, variables, }); } - delete( + delete( args: DeleteArgs< { id: string; @@ -216,28 +216,28 @@ export class PlatformApisModel { S > & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - deletePlatformApis: { - platformApis: InferSelectResult; + deletePlatformApi: { + platformApi: InferSelectResult; }; }> { const { document, variables } = buildDeleteByPkDocument( - 'PlatformApis', - 'deletePlatformApis', - 'platformApis', + 'PlatformApi', + 'deletePlatformApi', + 'platformApi', { id: args.where.id, }, - 'DeletePlatformApisInput', + 'DeletePlatformApiInput', args.select, connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'PlatformApis', - fieldName: 'deletePlatformApis', + operationName: 'PlatformApi', + fieldName: 'deletePlatformApi', document, variables, }); diff --git a/sdk/constructive-react/src/api/schema-types.ts b/sdk/constructive-react/src/api/schema-types.ts index 1bd400ad89..3936766169 100644 --- a/sdk/constructive-react/src/api/schema-types.ts +++ b/sdk/constructive-react/src/api/schema-types.ts @@ -5,9 +5,9 @@ */ import type { + Api, ApiSchema, ApiSetting, - Apis, AstMigration, CheckConstraint, CompositeType, @@ -37,9 +37,9 @@ import type { NodeTypeRegistry, Page, Partition, + PlatformApi, PlatformApiSchema, PlatformApiSetting, - PlatformApis, PlatformCorsSetting, PlatformDomain, PlatformDomainEvent, @@ -105,6 +105,31 @@ import type { } from './types'; export type ConstructiveInternalTypeImage = unknown; export type ApiExposureLevel = 'EXPOSABLE' | 'INTERNAL_ONLY' | 'NEVER_EXPOSE'; +/** Methods to use when ordering `Api`. */ +export type ApiOrderBy = + | 'ANON_ROLE_ASC' + | 'ANON_ROLE_DESC' + | 'CONFIG_ASC' + | 'CONFIG_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'DBNAME_ASC' + | 'DBNAME_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IS_PUBLISHED_ASC' + | 'IS_PUBLISHED_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ROLE_NAME_ASC' + | 'ROLE_NAME_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; /** Methods to use when ordering `ApiSchema`. */ export type ApiSchemaOrderBy = | 'API_ID_ASC' @@ -165,31 +190,6 @@ export type ApiSettingOrderBy = | 'STATEMENT_TIMEOUT_MS_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; -/** Methods to use when ordering `Apis`. */ -export type ApisOrderBy = - | 'ANON_ROLE_ASC' - | 'ANON_ROLE_DESC' - | 'CONFIG_ASC' - | 'CONFIG_DESC' - | 'CREATED_AT_ASC' - | 'CREATED_AT_DESC' - | 'DATABASE_ID_ASC' - | 'DATABASE_ID_DESC' - | 'DBNAME_ASC' - | 'DBNAME_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'IS_PUBLISHED_ASC' - | 'IS_PUBLISHED_DESC' - | 'NAME_ASC' - | 'NAME_DESC' - | 'NATURAL' - | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC' - | 'ROLE_NAME_ASC' - | 'ROLE_NAME_DESC' - | 'UPDATED_AT_ASC' - | 'UPDATED_AT_DESC'; /** Methods to use when ordering `AstMigration`. */ export type AstMigrationOrderBy = | 'ACTION_ID_ASC' @@ -1052,6 +1052,29 @@ export type PartitionOrderBy = | 'TABLE_ID_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; +/** Methods to use when ordering `PlatformApi`. */ +export type PlatformApiOrderBy = + | 'ANON_ROLE_ASC' + | 'ANON_ROLE_DESC' + | 'CONFIG_ASC' + | 'CONFIG_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'DBNAME_ASC' + | 'DBNAME_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IS_PUBLISHED_ASC' + | 'IS_PUBLISHED_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ROLE_NAME_ASC' + | 'ROLE_NAME_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; /** Methods to use when ordering `PlatformApiSchema`. */ export type PlatformApiSchemaOrderBy = | 'API_ID_ASC' @@ -1108,29 +1131,6 @@ export type PlatformApiSettingOrderBy = | 'STATEMENT_TIMEOUT_MS_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; -/** Methods to use when ordering `PlatformApis`. */ -export type PlatformApisOrderBy = - | 'ANON_ROLE_ASC' - | 'ANON_ROLE_DESC' - | 'CONFIG_ASC' - | 'CONFIG_DESC' - | 'CREATED_AT_ASC' - | 'CREATED_AT_DESC' - | 'DBNAME_ASC' - | 'DBNAME_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'IS_PUBLISHED_ASC' - | 'IS_PUBLISHED_DESC' - | 'NAME_ASC' - | 'NAME_DESC' - | 'NATURAL' - | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC' - | 'ROLE_NAME_ASC' - | 'ROLE_NAME_DESC' - | 'UPDATED_AT_ASC' - | 'UPDATED_AT_DESC'; /** Methods to use when ordering `PlatformCorsSetting`. */ export type PlatformCorsSettingOrderBy = | 'ALLOWED_ORIGINS_ASC' @@ -2373,12 +2373,93 @@ export interface ApiExposureLevelFilter { /** Not included in the specified list. */ notIn?: ApiExposureLevel[]; } +/** A filter to be used against `Api` object types. All fields are combined with a logical ‘and.’ */ +export interface ApiFilter { + /** Checks for all expressions in this list. */ + and?: ApiFilter[]; + /** Filter by the object’s `anonRole` field. */ + anonRole?: StringFilter; + /** Filter by the object’s `apiSchemas` relation. */ + apiSchemas?: ApiToManyApiSchemaFilter; + /** `apiSchemas` exist. */ + apiSchemasExist?: boolean; + /** Filter by the object’s `apiSetting` relation. */ + apiSetting?: ApiSettingFilter; + /** A related `apiSetting` exists. */ + apiSettingExists?: boolean; + /** Filter by the object’s `config` field. */ + config?: JSONFilter; + /** Filter by the object’s `corsSettings` relation. */ + corsSettings?: ApiToManyCorsSettingFilter; + /** `corsSettings` exist. */ + corsSettingsExist?: boolean; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `dbname` field. */ + dbname?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isPublished` field. */ + isPublished?: BooleanFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: ApiFilter; + /** Checks for any expressions in this list. */ + or?: ApiFilter[]; + /** Filter by the object’s `roleName` field. */ + roleName?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +/** An input for mutations affecting `Api` */ +export interface ApiInput { + /** Anonymous role the API executes as */ + anonRole?: string; + /** Module-specific configuration for this API surface */ + config?: unknown; + createdAt?: string; + /** Database that owns this resource (database-scoped isolation) */ + databaseId: string; + /** Database this API surface serves */ + dbname?: string; + id?: string; + /** Whether other scopes may see and route to this API surface */ + isPublished?: boolean; + /** Owner-local API surface name */ + name: string; + /** Authenticated role the API executes as */ + roleName?: string; + updatedAt?: string; +} +/** Represents an update to a `Api`. Fields that are set will be updated. */ +export interface ApiPatch { + /** Anonymous role the API executes as */ + anonRole?: string; + /** Module-specific configuration for this API surface */ + config?: unknown; + createdAt?: string; + /** Database that owns this resource (database-scoped isolation) */ + databaseId?: string; + /** Database this API surface serves */ + dbname?: string; + id?: string; + /** Whether other scopes may see and route to this API surface */ + isPublished?: boolean; + /** Owner-local API surface name */ + name?: string; + /** Authenticated role the API executes as */ + roleName?: string; + updatedAt?: string; +} /** A filter to be used against `ApiSchema` object types. All fields are combined with a logical ‘and.’ */ export interface ApiSchemaFilter { /** Checks for all expressions in this list. */ and?: ApiSchemaFilter[]; /** Filter by the object’s `api` relation. */ - api?: ApisFilter; + api?: ApiFilter; /** Filter by the object’s `apiId` field. */ apiId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ @@ -2427,7 +2508,7 @@ export interface ApiSettingFilter { /** Checks for all expressions in this list. */ and?: ApiSettingFilter[]; /** Filter by the object’s `api` relation. */ - api?: ApisFilter; + api?: ApiFilter; /** Filter by the object’s `apiId` field. */ apiId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ @@ -2547,89 +2628,8 @@ export interface ApiSettingPatch { statementTimeoutMs?: string; updatedAt?: string; } -/** A filter to be used against `Apis` object types. All fields are combined with a logical ‘and.’ */ -export interface ApisFilter { - /** Checks for all expressions in this list. */ - and?: ApisFilter[]; - /** Filter by the object’s `anonRole` field. */ - anonRole?: StringFilter; - /** Filter by the object’s `apiSchemasByApiId` relation. */ - apiSchemasByApiId?: ApisToManyApiSchemaFilter; - /** `apiSchemasByApiId` exist. */ - apiSchemasByApiIdExist?: boolean; - /** Filter by the object’s `apiSettingByApiId` relation. */ - apiSettingByApiId?: ApiSettingFilter; - /** A related `apiSettingByApiId` exists. */ - apiSettingByApiIdExists?: boolean; - /** Filter by the object’s `config` field. */ - config?: JSONFilter; - /** Filter by the object’s `corsSettingsByApiId` relation. */ - corsSettingsByApiId?: ApisToManyCorsSettingFilter; - /** `corsSettingsByApiId` exist. */ - corsSettingsByApiIdExist?: boolean; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `databaseId` field. */ - databaseId?: UUIDFilter; - /** Filter by the object’s `dbname` field. */ - dbname?: StringFilter; - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `isPublished` field. */ - isPublished?: BooleanFilter; - /** Filter by the object’s `name` field. */ - name?: StringFilter; - /** Negates the expression. */ - not?: ApisFilter; - /** Checks for any expressions in this list. */ - or?: ApisFilter[]; - /** Filter by the object’s `roleName` field. */ - roleName?: StringFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; -} -/** An input for mutations affecting `Apis` */ -export interface ApisInput { - /** Anonymous role the API executes as */ - anonRole?: string; - /** Module-specific configuration for this API surface */ - config?: unknown; - createdAt?: string; - /** Database that owns this resource (database-scoped isolation) */ - databaseId: string; - /** Database this API surface serves */ - dbname?: string; - id?: string; - /** Whether other scopes may see and route to this API surface */ - isPublished?: boolean; - /** Owner-local API surface name */ - name: string; - /** Authenticated role the API executes as */ - roleName?: string; - updatedAt?: string; -} -/** Represents an update to a `Apis`. Fields that are set will be updated. */ -export interface ApisPatch { - /** Anonymous role the API executes as */ - anonRole?: string; - /** Module-specific configuration for this API surface */ - config?: unknown; - createdAt?: string; - /** Database that owns this resource (database-scoped isolation) */ - databaseId?: string; - /** Database this API surface serves */ - dbname?: string; - id?: string; - /** Whether other scopes may see and route to this API surface */ - isPublished?: boolean; - /** Owner-local API surface name */ - name?: string; - /** Authenticated role the API executes as */ - roleName?: string; - updatedAt?: string; -} /** A filter to be used against many `ApiSchema` object types. All fields are combined with a logical ‘and.’ */ -export interface ApisToManyApiSchemaFilter { +export interface ApiToManyApiSchemaFilter { /** Filters to entities where every related entity matches. */ every?: ApiSchemaFilter; /** Filters to entities where no related entity matches. */ @@ -2638,7 +2638,7 @@ export interface ApisToManyApiSchemaFilter { some?: ApiSchemaFilter; } /** A filter to be used against many `CorsSetting` object types. All fields are combined with a logical ‘and.’ */ -export interface ApisToManyCorsSettingFilter { +export interface ApiToManyCorsSettingFilter { /** Filters to entities where every related entity matches. */ every?: CorsSettingFilter; /** Filters to entities where no related entity matches. */ @@ -2871,7 +2871,7 @@ export interface CorsSettingFilter { /** Checks for all expressions in this list. */ and?: CorsSettingFilter[]; /** Filter by the object’s `api` relation. */ - api?: ApisFilter; + api?: ApiFilter; /** A related `api` exists. */ apiExists?: boolean; /** Filter by the object’s `apiId` field. */ @@ -2913,6 +2913,11 @@ export interface CorsSettingPatch { id?: string; updatedAt?: string; } +export interface CreateApiInput { + /** The `Api` to be created by this mutation. */ + api: ApiInput; + clientMutationId?: string; +} export interface CreateApiSchemaInput { /** The `ApiSchema` to be created by this mutation. */ apiSchema: ApiSchemaInput; @@ -2923,11 +2928,6 @@ export interface CreateApiSettingInput { apiSetting: ApiSettingInput; clientMutationId?: string; } -export interface CreateApisInput { - /** The `Apis` to be created by this mutation. */ - apis: ApisInput; - clientMutationId?: string; -} export interface CreateCheckConstraintInput { /** The `CheckConstraint` to be created by this mutation. */ checkConstraint: CheckConstraintInput; @@ -3068,6 +3068,11 @@ export interface CreatePartitionInput { /** The `Partition` to be created by this mutation. */ partition: PartitionInput; } +export interface CreatePlatformApiInput { + clientMutationId?: string; + /** The `PlatformApi` to be created by this mutation. */ + platformApi: PlatformApiInput; +} export interface CreatePlatformApiSchemaInput { clientMutationId?: string; /** The `PlatformApiSchema` to be created by this mutation. */ @@ -3078,11 +3083,6 @@ export interface CreatePlatformApiSettingInput { /** The `PlatformApiSetting` to be created by this mutation. */ platformApiSetting: PlatformApiSettingInput; } -export interface CreatePlatformApisInput { - clientMutationId?: string; - /** The `PlatformApis` to be created by this mutation. */ - platformApis: PlatformApisInput; -} export interface CreatePlatformCorsSettingInput { clientMutationId?: string; /** The `PlatformCorsSetting` to be created by this mutation. */ @@ -4041,15 +4041,15 @@ export interface DefaultPrivilegePatch { privilege?: string; schemaId?: string; } -export interface DeleteApiSchemaInput { +export interface DeleteApiInput { clientMutationId?: string; id: string; } -export interface DeleteApiSettingInput { +export interface DeleteApiSchemaInput { clientMutationId?: string; id: string; } -export interface DeleteApisInput { +export interface DeleteApiSettingInput { clientMutationId?: string; id: string; } @@ -4166,15 +4166,15 @@ export interface DeletePartitionInput { clientMutationId?: string; id: string; } -export interface DeletePlatformApiSchemaInput { +export interface DeletePlatformApiInput { clientMutationId?: string; id: string; } -export interface DeletePlatformApiSettingInput { +export interface DeletePlatformApiSchemaInput { clientMutationId?: string; id: string; } -export interface DeletePlatformApisInput { +export interface DeletePlatformApiSettingInput { clientMutationId?: string; id: string; } @@ -6152,12 +6152,87 @@ export interface PartitionPatch { tableId?: string; updatedAt?: string; } +/** A filter to be used against `PlatformApi` object types. All fields are combined with a logical ‘and.’ */ +export interface PlatformApiFilter { + /** Checks for all expressions in this list. */ + and?: PlatformApiFilter[]; + /** Filter by the object’s `anonRole` field. */ + anonRole?: StringFilter; + /** Filter by the object’s `config` field. */ + config?: JSONFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `dbname` field. */ + dbname?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isPublished` field. */ + isPublished?: BooleanFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: PlatformApiFilter; + /** Checks for any expressions in this list. */ + or?: PlatformApiFilter[]; + /** Filter by the object’s `platformApiSchemasByApiId` relation. */ + platformApiSchemasByApiId?: PlatformApiToManyPlatformApiSchemaFilter; + /** `platformApiSchemasByApiId` exist. */ + platformApiSchemasByApiIdExist?: boolean; + /** Filter by the object’s `platformApiSettingByApiId` relation. */ + platformApiSettingByApiId?: PlatformApiSettingFilter; + /** A related `platformApiSettingByApiId` exists. */ + platformApiSettingByApiIdExists?: boolean; + /** Filter by the object’s `platformCorsSettingByApiId` relation. */ + platformCorsSettingByApiId?: PlatformCorsSettingFilter; + /** A related `platformCorsSettingByApiId` exists. */ + platformCorsSettingByApiIdExists?: boolean; + /** Filter by the object’s `roleName` field. */ + roleName?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} +/** An input for mutations affecting `PlatformApi` */ +export interface PlatformApiInput { + /** Anonymous role the API executes as */ + anonRole?: string; + /** Module-specific configuration for this API surface */ + config?: unknown; + createdAt?: string; + /** Database this API surface serves */ + dbname?: string; + id?: string; + /** Whether other scopes may see and route to this API surface */ + isPublished?: boolean; + /** Owner-local API surface name */ + name: string; + /** Authenticated role the API executes as */ + roleName?: string; + updatedAt?: string; +} +/** Represents an update to a `PlatformApi`. Fields that are set will be updated. */ +export interface PlatformApiPatch { + /** Anonymous role the API executes as */ + anonRole?: string; + /** Module-specific configuration for this API surface */ + config?: unknown; + createdAt?: string; + /** Database this API surface serves */ + dbname?: string; + id?: string; + /** Whether other scopes may see and route to this API surface */ + isPublished?: boolean; + /** Owner-local API surface name */ + name?: string; + /** Authenticated role the API executes as */ + roleName?: string; + updatedAt?: string; +} /** A filter to be used against `PlatformApiSchema` object types. All fields are combined with a logical ‘and.’ */ export interface PlatformApiSchemaFilter { /** Checks for all expressions in this list. */ and?: PlatformApiSchemaFilter[]; /** Filter by the object’s `api` relation. */ - api?: PlatformApisFilter; + api?: PlatformApiFilter; /** Filter by the object’s `apiId` field. */ apiId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ @@ -6200,7 +6275,7 @@ export interface PlatformApiSettingFilter { /** Checks for all expressions in this list. */ and?: PlatformApiSettingFilter[]; /** Filter by the object’s `api` relation. */ - api?: PlatformApisFilter; + api?: PlatformApiFilter; /** Filter by the object’s `apiId` field. */ apiId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ @@ -6314,83 +6389,8 @@ export interface PlatformApiSettingPatch { statementTimeoutMs?: string; updatedAt?: string; } -/** A filter to be used against `PlatformApis` object types. All fields are combined with a logical ‘and.’ */ -export interface PlatformApisFilter { - /** Checks for all expressions in this list. */ - and?: PlatformApisFilter[]; - /** Filter by the object’s `anonRole` field. */ - anonRole?: StringFilter; - /** Filter by the object’s `config` field. */ - config?: JSONFilter; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `dbname` field. */ - dbname?: StringFilter; - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `isPublished` field. */ - isPublished?: BooleanFilter; - /** Filter by the object’s `name` field. */ - name?: StringFilter; - /** Negates the expression. */ - not?: PlatformApisFilter; - /** Checks for any expressions in this list. */ - or?: PlatformApisFilter[]; - /** Filter by the object’s `platformApiSchemasByApiId` relation. */ - platformApiSchemasByApiId?: PlatformApisToManyPlatformApiSchemaFilter; - /** `platformApiSchemasByApiId` exist. */ - platformApiSchemasByApiIdExist?: boolean; - /** Filter by the object’s `platformApiSettingByApiId` relation. */ - platformApiSettingByApiId?: PlatformApiSettingFilter; - /** A related `platformApiSettingByApiId` exists. */ - platformApiSettingByApiIdExists?: boolean; - /** Filter by the object’s `platformCorsSettingByApiId` relation. */ - platformCorsSettingByApiId?: PlatformCorsSettingFilter; - /** A related `platformCorsSettingByApiId` exists. */ - platformCorsSettingByApiIdExists?: boolean; - /** Filter by the object’s `roleName` field. */ - roleName?: StringFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; -} -/** An input for mutations affecting `PlatformApis` */ -export interface PlatformApisInput { - /** Anonymous role the API executes as */ - anonRole?: string; - /** Module-specific configuration for this API surface */ - config?: unknown; - createdAt?: string; - /** Database this API surface serves */ - dbname?: string; - id?: string; - /** Whether other scopes may see and route to this API surface */ - isPublished?: boolean; - /** Owner-local API surface name */ - name: string; - /** Authenticated role the API executes as */ - roleName?: string; - updatedAt?: string; -} -/** Represents an update to a `PlatformApis`. Fields that are set will be updated. */ -export interface PlatformApisPatch { - /** Anonymous role the API executes as */ - anonRole?: string; - /** Module-specific configuration for this API surface */ - config?: unknown; - createdAt?: string; - /** Database this API surface serves */ - dbname?: string; - id?: string; - /** Whether other scopes may see and route to this API surface */ - isPublished?: boolean; - /** Owner-local API surface name */ - name?: string; - /** Authenticated role the API executes as */ - roleName?: string; - updatedAt?: string; -} /** A filter to be used against many `PlatformApiSchema` object types. All fields are combined with a logical ‘and.’ */ -export interface PlatformApisToManyPlatformApiSchemaFilter { +export interface PlatformApiToManyPlatformApiSchemaFilter { /** Filters to entities where every related entity matches. */ every?: PlatformApiSchemaFilter; /** Filters to entities where no related entity matches. */ @@ -6405,7 +6405,7 @@ export interface PlatformCorsSettingFilter { /** Checks for all expressions in this list. */ and?: PlatformCorsSettingFilter[]; /** Filter by the object’s `api` relation. */ - api?: PlatformApisFilter; + api?: PlatformApiFilter; /** A related `api` exists. */ apiExists?: boolean; /** Filter by the object’s `apiId` field. */ @@ -9944,6 +9944,12 @@ export interface UniqueConstraintToManyUniqueConstraintBehaviorFilter { /** Filters to entities where at least one related entity matches. */ some?: UniqueConstraintBehaviorFilter; } +export interface UpdateApiInput { + /** An object where the defined keys will be set on the `Api` being updated. */ + apiPatch: ApiPatch; + clientMutationId?: string; + id: string; +} export interface UpdateApiSchemaInput { /** An object where the defined keys will be set on the `ApiSchema` being updated. */ apiSchemaPatch: ApiSchemaPatch; @@ -9956,12 +9962,6 @@ export interface UpdateApiSettingInput { clientMutationId?: string; id: string; } -export interface UpdateApisInput { - /** An object where the defined keys will be set on the `Apis` being updated. */ - apisPatch: ApisPatch; - clientMutationId?: string; - id: string; -} export interface UpdateCheckConstraintInput { /** An object where the defined keys will be set on the `CheckConstraint` being updated. */ checkConstraintPatch: CheckConstraintPatch; @@ -10131,6 +10131,12 @@ export interface UpdatePartitionInput { /** An object where the defined keys will be set on the `Partition` being updated. */ partitionPatch: PartitionPatch; } +export interface UpdatePlatformApiInput { + clientMutationId?: string; + id: string; + /** An object where the defined keys will be set on the `PlatformApi` being updated. */ + platformApiPatch: PlatformApiPatch; +} export interface UpdatePlatformApiSchemaInput { clientMutationId?: string; id: string; @@ -10143,12 +10149,6 @@ export interface UpdatePlatformApiSettingInput { /** An object where the defined keys will be set on the `PlatformApiSetting` being updated. */ platformApiSettingPatch: PlatformApiSettingPatch; } -export interface UpdatePlatformApisInput { - clientMutationId?: string; - id: string; - /** An object where the defined keys will be set on the `PlatformApis` being updated. */ - platformApisPatch: PlatformApisPatch; -} export interface UpdatePlatformCorsSettingInput { clientMutationId?: string; id: string; @@ -10922,10 +10922,10 @@ export interface ApiSettingConnection { pageInfo: PageInfo; totalCount: number; } -/** A connection to a list of `Apis` values. */ -export interface ApisConnection { - edges: ApisEdge[]; - nodes: Apis[]; +/** A connection to a list of `Api` values. */ +export interface ApiConnection { + edges: ApiEdge[]; + nodes: Api[]; pageInfo: PageInfo; totalCount: number; } @@ -11146,10 +11146,10 @@ export interface PlatformApiSettingConnection { pageInfo: PageInfo; totalCount: number; } -/** A connection to a list of `PlatformApis` values. */ -export interface PlatformApisConnection { - edges: PlatformApisEdge[]; - nodes: PlatformApis[]; +/** A connection to a list of `PlatformApi` values. */ +export interface PlatformApiConnection { + edges: PlatformApiEdge[]; + nodes: PlatformApi[]; pageInfo: PageInfo; totalCount: number; } @@ -11507,6 +11507,12 @@ export interface CancelDatabaseTransferPayload { clientMutationId?: string | null; result?: boolean | null; } +export interface CreateApiPayload { + /** The `Api` that was created by this mutation. */ + api?: Api | null; + apiEdge?: ApiEdge | null; + clientMutationId?: string | null; +} export interface CreateApiSchemaPayload { /** The `ApiSchema` that was created by this mutation. */ apiSchema?: ApiSchema | null; @@ -11519,12 +11525,6 @@ export interface CreateApiSettingPayload { apiSettingEdge?: ApiSettingEdge | null; clientMutationId?: string | null; } -export interface CreateApisPayload { - /** The `Apis` that was created by this mutation. */ - apis?: Apis | null; - apisEdge?: ApisEdge | null; - clientMutationId?: string | null; -} export interface CreateCheckConstraintPayload { /** The `CheckConstraint` that was created by this mutation. */ checkConstraint?: CheckConstraint | null; @@ -11693,6 +11693,12 @@ export interface CreatePartitionPayload { partition?: Partition | null; partitionEdge?: PartitionEdge | null; } +export interface CreatePlatformApiPayload { + clientMutationId?: string | null; + /** The `PlatformApi` that was created by this mutation. */ + platformApi?: PlatformApi | null; + platformApiEdge?: PlatformApiEdge | null; +} export interface CreatePlatformApiSchemaPayload { clientMutationId?: string | null; /** The `PlatformApiSchema` that was created by this mutation. */ @@ -11705,12 +11711,6 @@ export interface CreatePlatformApiSettingPayload { platformApiSetting?: PlatformApiSetting | null; platformApiSettingEdge?: PlatformApiSettingEdge | null; } -export interface CreatePlatformApisPayload { - clientMutationId?: string | null; - /** The `PlatformApis` that was created by this mutation. */ - platformApis?: PlatformApis | null; - platformApisEdge?: PlatformApisEdge | null; -} export interface CreatePlatformCorsSettingPayload { clientMutationId?: string | null; /** The `PlatformCorsSetting` that was created by this mutation. */ @@ -11975,6 +11975,12 @@ export interface CreateWebauthnSettingPayload { webauthnSetting?: WebauthnSetting | null; webauthnSettingEdge?: WebauthnSettingEdge | null; } +export interface DeleteApiPayload { + /** The `Api` that was deleted by this mutation. */ + api?: Api | null; + apiEdge?: ApiEdge | null; + clientMutationId?: string | null; +} export interface DeleteApiSchemaPayload { /** The `ApiSchema` that was deleted by this mutation. */ apiSchema?: ApiSchema | null; @@ -11987,12 +11993,6 @@ export interface DeleteApiSettingPayload { apiSettingEdge?: ApiSettingEdge | null; clientMutationId?: string | null; } -export interface DeleteApisPayload { - /** The `Apis` that was deleted by this mutation. */ - apis?: Apis | null; - apisEdge?: ApisEdge | null; - clientMutationId?: string | null; -} export interface DeleteCheckConstraintPayload { /** The `CheckConstraint` that was deleted by this mutation. */ checkConstraint?: CheckConstraint | null; @@ -12161,6 +12161,12 @@ export interface DeletePartitionPayload { partition?: Partition | null; partitionEdge?: PartitionEdge | null; } +export interface DeletePlatformApiPayload { + clientMutationId?: string | null; + /** The `PlatformApi` that was deleted by this mutation. */ + platformApi?: PlatformApi | null; + platformApiEdge?: PlatformApiEdge | null; +} export interface DeletePlatformApiSchemaPayload { clientMutationId?: string | null; /** The `PlatformApiSchema` that was deleted by this mutation. */ @@ -12173,12 +12179,6 @@ export interface DeletePlatformApiSettingPayload { platformApiSetting?: PlatformApiSetting | null; platformApiSettingEdge?: PlatformApiSettingEdge | null; } -export interface DeletePlatformApisPayload { - clientMutationId?: string | null; - /** The `PlatformApis` that was deleted by this mutation. */ - platformApis?: PlatformApis | null; - platformApisEdge?: PlatformApisEdge | null; -} export interface DeletePlatformCorsSettingPayload { clientMutationId?: string | null; /** The `PlatformCorsSetting` that was deleted by this mutation. */ @@ -12486,6 +12486,12 @@ export interface SitesProvisionStaticSitePayload { clientMutationId?: string | null; result?: PlatformRoute | null; } +export interface UpdateApiPayload { + /** The `Api` that was updated by this mutation. */ + api?: Api | null; + apiEdge?: ApiEdge | null; + clientMutationId?: string | null; +} export interface UpdateApiSchemaPayload { /** The `ApiSchema` that was updated by this mutation. */ apiSchema?: ApiSchema | null; @@ -12498,12 +12504,6 @@ export interface UpdateApiSettingPayload { apiSettingEdge?: ApiSettingEdge | null; clientMutationId?: string | null; } -export interface UpdateApisPayload { - /** The `Apis` that was updated by this mutation. */ - apis?: Apis | null; - apisEdge?: ApisEdge | null; - clientMutationId?: string | null; -} export interface UpdateCheckConstraintPayload { /** The `CheckConstraint` that was updated by this mutation. */ checkConstraint?: CheckConstraint | null; @@ -12672,6 +12672,12 @@ export interface UpdatePartitionPayload { partition?: Partition | null; partitionEdge?: PartitionEdge | null; } +export interface UpdatePlatformApiPayload { + clientMutationId?: string | null; + /** The `PlatformApi` that was updated by this mutation. */ + platformApi?: PlatformApi | null; + platformApiEdge?: PlatformApiEdge | null; +} export interface UpdatePlatformApiSchemaPayload { clientMutationId?: string | null; /** The `PlatformApiSchema` that was updated by this mutation. */ @@ -12684,12 +12690,6 @@ export interface UpdatePlatformApiSettingPayload { platformApiSetting?: PlatformApiSetting | null; platformApiSettingEdge?: PlatformApiSettingEdge | null; } -export interface UpdatePlatformApisPayload { - clientMutationId?: string | null; - /** The `PlatformApis` that was updated by this mutation. */ - platformApis?: PlatformApis | null; - platformApisEdge?: PlatformApisEdge | null; -} export interface UpdatePlatformCorsSettingPayload { clientMutationId?: string | null; /** The `PlatformCorsSetting` that was updated by this mutation. */ @@ -13004,11 +13004,11 @@ export interface ApiSettingEdge { /** The `ApiSetting` at the end of the edge. */ node?: ApiSetting | null; } -/** A `Apis` edge in the connection. */ -export interface ApisEdge { +/** A `Api` edge in the connection. */ +export interface ApiEdge { cursor?: string | null; - /** The `Apis` at the end of the edge. */ - node?: Apis | null; + /** The `Api` at the end of the edge. */ + node?: Api | null; } /** A `AstMigration` edge in the connection. */ export interface AstMigrationEdge { @@ -13196,11 +13196,11 @@ export interface PlatformApiSettingEdge { /** The `PlatformApiSetting` at the end of the edge. */ node?: PlatformApiSetting | null; } -/** A `PlatformApis` edge in the connection. */ -export interface PlatformApisEdge { +/** A `PlatformApi` edge in the connection. */ +export interface PlatformApiEdge { cursor?: string | null; - /** The `PlatformApis` at the end of the edge. */ - node?: PlatformApis | null; + /** The `PlatformApi` at the end of the edge. */ + node?: PlatformApi | null; } /** A `PlatformCorsSetting` edge in the connection. */ export interface PlatformCorsSettingEdge { diff --git a/sdk/constructive-react/src/api/types.ts b/sdk/constructive-react/src/api/types.ts index 00bdabb02a..0da06eefa1 100644 --- a/sdk/constructive-react/src/api/types.ts +++ b/sdk/constructive-react/src/api/types.ts @@ -5,6 +5,18 @@ */ import type { ApiExposureLevel, ObjectCategory } from './schema-types'; export type ConstructiveInternalTypeImage = unknown; +export interface Api { + anonRole: string | null; + config: unknown | null; + createdAt: string | null; + databaseId: string | null; + dbname: string | null; + id: string | null; + isPublished: boolean | null; + name: string | null; + roleName: string | null; + updatedAt: string | null; +} export interface ApiSchema { apiId: string | null; createdAt: string | null; @@ -34,18 +46,6 @@ export interface ApiSetting { statementTimeoutMs: string | null; updatedAt: string | null; } -export interface Apis { - anonRole: string | null; - config: unknown | null; - createdAt: string | null; - databaseId: string | null; - dbname: string | null; - id: string | null; - isPublished: boolean | null; - name: string | null; - roleName: string | null; - updatedAt: string | null; -} export interface AstMigration { actionId: string | null; actionName: string | null; @@ -463,6 +463,17 @@ export interface Partition { tableId: string | null; updatedAt: string | null; } +export interface PlatformApi { + anonRole: string | null; + config: unknown | null; + createdAt: string | null; + dbname: string | null; + id: string | null; + isPublished: boolean | null; + name: string | null; + roleName: string | null; + updatedAt: string | null; +} export interface PlatformApiSchema { apiId: string | null; createdAt: string | null; @@ -490,17 +501,6 @@ export interface PlatformApiSetting { statementTimeoutMs: string | null; updatedAt: string | null; } -export interface PlatformApis { - anonRole: string | null; - config: unknown | null; - createdAt: string | null; - dbname: string | null; - id: string | null; - isPublished: boolean | null; - name: string | null; - roleName: string | null; - updatedAt: string | null; -} export interface PlatformCorsSetting { allowedOrigins: string[] | null; apiId: string | null; diff --git a/sdk/constructive-react/src/compute/README.md b/sdk/constructive-react/src/compute/README.md index 588bc458a8..e157ce8d33 100644 --- a/sdk/constructive-react/src/compute/README.md +++ b/sdk/constructive-react/src/compute/README.md @@ -10,7 +10,7 @@ - **Tables:** 69 - **Custom queries:** 1 -- **Custom mutations:** 28 +- **Custom mutations:** 37 **Generators:** ORM, React Query diff --git a/sdk/constructive-react/src/compute/hooks/README.md b/sdk/constructive-react/src/compute/hooks/README.md index b46fe2311e..caa4136971 100644 --- a/sdk/constructive-react/src/compute/hooks/README.md +++ b/sdk/constructive-react/src/compute/hooks/README.md @@ -354,12 +354,19 @@ function App() { | `useImportGraphJsonMutation` | Mutation | importGraphJson | | `useInfraInitEmptyRepoMutation` | Mutation | infraInitEmptyRepo | | `useInfraInsertNodeAtPathMutation` | Mutation | infraInsertNodeAtPath | +| `useInfraInsertNodesAtPathsMutation` | Mutation | infraInsertNodesAtPaths | +| `useInfraSetAndCommitMutation` | Mutation | infraSetAndCommit | | `useInfraSetDataAtPathMutation` | Mutation | infraSetDataAtPath | +| `useInfraSetManyAndCommitMutation` | Mutation | infraSetManyAndCommit | | `useInitEmptyRepoMutation` | Mutation | initEmptyRepo | | `useInsertNodeAtPathMutation` | Mutation | insertNodeAtPath | +| `useInsertNodesAtPathsMutation` | Mutation | insertNodesAtPaths | | `usePlatformInfraInitEmptyRepoMutation` | Mutation | platformInfraInitEmptyRepo | | `usePlatformInfraInsertNodeAtPathMutation` | Mutation | platformInfraInsertNodeAtPath | +| `usePlatformInfraInsertNodesAtPathsMutation` | Mutation | platformInfraInsertNodesAtPaths | +| `usePlatformInfraSetAndCommitMutation` | Mutation | platformInfraSetAndCommit | | `usePlatformInfraSetDataAtPathMutation` | Mutation | platformInfraSetDataAtPath | +| `usePlatformInfraSetManyAndCommitMutation` | Mutation | platformInfraSetManyAndCommit | | `usePlatformResourceInstallationsInstallMutation` | Mutation | platformResourceInstallationsInstall | | `usePlatformResourceInstallationsRollbackMutation` | Mutation | platformResourceInstallationsRollback | | `usePlatformResourceInstallationsUninstallMutation` | Mutation | platformResourceInstallationsUninstall | @@ -373,7 +380,9 @@ and lifecycle settings. | | `useResourceInstallationsUninstallMutation` | Mutation | resourceInstallationsUninstall | | `useResourceInstallationsUpgradeMutation` | Mutation | resourceInstallationsUpgrade | | `useSaveGraphMutation` | Mutation | saveGraph | +| `useSetAndCommitMutation` | Mutation | setAndCommit | | `useSetDataAtPathMutation` | Mutation | setDataAtPath | +| `useSetManyAndCommitMutation` | Mutation | setManyAndCommit | | `useStartExecutionMutation` | Mutation | startExecution | | `useValidateFunctionGraphMutation` | Mutation | validateFunctionGraph | @@ -447,20 +456,20 @@ create({ bucketId: '', databaseId: '', functionId: '', graphId ```typescript // List all functionDefinitions const { data, isLoading } = useFunctionDefinitionsQuery({ - selection: { fields: { accessChannels: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, databaseId: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }, + selection: { fields: { accessChannels: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, databaseId: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredModules: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }, }); // Get one functionDefinition const { data: item } = useFunctionDefinitionQuery({ id: '', - selection: { fields: { accessChannels: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, databaseId: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }, + selection: { fields: { accessChannels: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, databaseId: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredModules: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }, }); // Create a functionDefinition const { mutate: create } = useCreateFunctionDefinitionMutation({ selection: { fields: { id: true } }, }); -create({ accessChannels: '', category: '', concurrency: '', cpuLimitMillicores: '', cpuRequestMillicores: '', databaseId: '', description: '', fnCategory: '', functionColumns: '', graphId: '', icon: '', image: '', inputs: '', integrations: '', isPublished: '', maxAttempts: '', memoryLimitBytes: '', memoryRequestBytes: '', moduleTable: '', name: '', outputs: '', payloadArgs: '', priority: '', props: '', protected: '', publishedAt: '', queueName: '', requiredBuckets: '', requiredConfigs: '', requiredModels: '', requiredSecrets: '', resources: '', runtime: '', scaleMax: '', scaleMin: '', targetFunction: '', targetSchema: '', taskIdentifier: '', timeoutSeconds: '', volatile: '' }); +create({ accessChannels: '', category: '', concurrency: '', cpuLimitMillicores: '', cpuRequestMillicores: '', databaseId: '', description: '', fnCategory: '', functionColumns: '', graphId: '', icon: '', image: '', inputs: '', integrations: '', isPublished: '', maxAttempts: '', memoryLimitBytes: '', memoryRequestBytes: '', moduleTable: '', name: '', outputs: '', payloadArgs: '', priority: '', props: '', protected: '', publishedAt: '', queueName: '', requiredBuckets: '', requiredConfigs: '', requiredModels: '', requiredModules: '', requiredSecrets: '', resources: '', runtime: '', scaleMax: '', scaleMin: '', targetFunction: '', targetSchema: '', taskIdentifier: '', timeoutSeconds: '', volatile: '' }); ``` ### FunctionDeployment @@ -468,20 +477,20 @@ create({ accessChannels: '', category: '', concurrency: '', ```typescript // List all functionDeployments const { data, isLoading } = useFunctionDeploymentsQuery({ - selection: { fields: { annotations: true, concurrency: true, createdAt: true, databaseId: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }, + selection: { fields: { annotations: true, concurrency: true, createdAt: true, databaseId: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, realm: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }, }); // Get one functionDeployment const { data: item } = useFunctionDeploymentQuery({ id: '', - selection: { fields: { annotations: true, concurrency: true, createdAt: true, databaseId: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }, + selection: { fields: { annotations: true, concurrency: true, createdAt: true, databaseId: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, realm: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }, }); // Create a functionDeployment const { mutate: create } = useCreateFunctionDeploymentMutation({ selection: { fields: { id: true } }, }); -create({ annotations: '', concurrency: '', databaseId: '', errorCount: '', handlerName: '', image: '', imageVersion: '', labels: '', lastError: '', lastErrorAt: '', namespaceId: '', resources: '', revision: '', scaleMax: '', scaleMin: '', serviceName: '', serviceUrl: '', status: '', timeoutSeconds: '' }); +create({ annotations: '', concurrency: '', databaseId: '', errorCount: '', handlerName: '', image: '', imageVersion: '', labels: '', lastError: '', lastErrorAt: '', namespaceId: '', realm: '', resources: '', revision: '', scaleMax: '', scaleMin: '', serviceName: '', serviceUrl: '', status: '', timeoutSeconds: '' }); ``` ### FunctionDeploymentEvent @@ -960,20 +969,20 @@ create({ bucketId: '', functionId: '', graphId: '', key: '', - selection: { fields: { accessChannels: true, billable: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, system: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }, + selection: { fields: { accessChannels: true, billable: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredModules: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, system: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }, }); // Create a platformFunctionDefinition const { mutate: create } = useCreatePlatformFunctionDefinitionMutation({ selection: { fields: { id: true } }, }); -create({ accessChannels: '', billable: '', category: '', concurrency: '', cpuLimitMillicores: '', cpuRequestMillicores: '', description: '', fnCategory: '', functionColumns: '', graphId: '', icon: '', image: '', inputs: '', integrations: '', isPublished: '', maxAttempts: '', memoryLimitBytes: '', memoryRequestBytes: '', moduleTable: '', name: '', outputs: '', payloadArgs: '', priority: '', props: '', protected: '', publishedAt: '', queueName: '', requiredBuckets: '', requiredConfigs: '', requiredModels: '', requiredSecrets: '', resources: '', runtime: '', scaleMax: '', scaleMin: '', system: '', targetFunction: '', targetSchema: '', taskIdentifier: '', timeoutSeconds: '', volatile: '' }); +create({ accessChannels: '', billable: '', category: '', concurrency: '', cpuLimitMillicores: '', cpuRequestMillicores: '', description: '', fnCategory: '', functionColumns: '', graphId: '', icon: '', image: '', inputs: '', integrations: '', isPublished: '', maxAttempts: '', memoryLimitBytes: '', memoryRequestBytes: '', moduleTable: '', name: '', outputs: '', payloadArgs: '', priority: '', props: '', protected: '', publishedAt: '', queueName: '', requiredBuckets: '', requiredConfigs: '', requiredModels: '', requiredModules: '', requiredSecrets: '', resources: '', runtime: '', scaleMax: '', scaleMin: '', system: '', targetFunction: '', targetSchema: '', taskIdentifier: '', timeoutSeconds: '', volatile: '' }); ``` ### PlatformFunctionDeployment @@ -981,20 +990,20 @@ create({ accessChannels: '', billable: '', category: '' ```typescript // List all platformFunctionDeployments const { data, isLoading } = usePlatformFunctionDeploymentsQuery({ - selection: { fields: { annotations: true, concurrency: true, createdAt: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }, + selection: { fields: { annotations: true, concurrency: true, createdAt: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, realm: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }, }); // Get one platformFunctionDeployment const { data: item } = usePlatformFunctionDeploymentQuery({ id: '', - selection: { fields: { annotations: true, concurrency: true, createdAt: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }, + selection: { fields: { annotations: true, concurrency: true, createdAt: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, realm: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }, }); // Create a platformFunctionDeployment const { mutate: create } = useCreatePlatformFunctionDeploymentMutation({ selection: { fields: { id: true } }, }); -create({ annotations: '', concurrency: '', errorCount: '', handlerName: '', image: '', imageVersion: '', labels: '', lastError: '', lastErrorAt: '', namespaceId: '', resources: '', revision: '', scaleMax: '', scaleMin: '', serviceName: '', serviceUrl: '', status: '', timeoutSeconds: '' }); +create({ annotations: '', concurrency: '', errorCount: '', handlerName: '', image: '', imageVersion: '', labels: '', lastError: '', lastErrorAt: '', namespaceId: '', realm: '', resources: '', revision: '', scaleMax: '', scaleMin: '', serviceName: '', serviceUrl: '', status: '', timeoutSeconds: '' }); ``` ### PlatformFunctionDeploymentEvent @@ -1874,6 +1883,28 @@ infraInsertNodeAtPath |----------|------| | `input` | InfraInsertNodeAtPathInput (required) | +### `useInfraInsertNodesAtPathsMutation` + +infraInsertNodesAtPaths + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | InfraInsertNodesAtPathsInput (required) | + +### `useInfraSetAndCommitMutation` + +infraSetAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | InfraSetAndCommitInput (required) | + ### `useInfraSetDataAtPathMutation` infraSetDataAtPath @@ -1885,6 +1916,17 @@ infraSetDataAtPath |----------|------| | `input` | InfraSetDataAtPathInput (required) | +### `useInfraSetManyAndCommitMutation` + +infraSetManyAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | InfraSetManyAndCommitInput (required) | + ### `useInitEmptyRepoMutation` initEmptyRepo @@ -1907,6 +1949,17 @@ insertNodeAtPath |----------|------| | `input` | InsertNodeAtPathInput (required) | +### `useInsertNodesAtPathsMutation` + +insertNodesAtPaths + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | InsertNodesAtPathsInput (required) | + ### `usePlatformInfraInitEmptyRepoMutation` platformInfraInitEmptyRepo @@ -1929,6 +1982,28 @@ platformInfraInsertNodeAtPath |----------|------| | `input` | PlatformInfraInsertNodeAtPathInput (required) | +### `usePlatformInfraInsertNodesAtPathsMutation` + +platformInfraInsertNodesAtPaths + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | PlatformInfraInsertNodesAtPathsInput (required) | + +### `usePlatformInfraSetAndCommitMutation` + +platformInfraSetAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | PlatformInfraSetAndCommitInput (required) | + ### `usePlatformInfraSetDataAtPathMutation` platformInfraSetDataAtPath @@ -1940,6 +2015,17 @@ platformInfraSetDataAtPath |----------|------| | `input` | PlatformInfraSetDataAtPathInput (required) | +### `usePlatformInfraSetManyAndCommitMutation` + +platformInfraSetManyAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | PlatformInfraSetManyAndCommitInput (required) | + ### `usePlatformResourceInstallationsInstallMutation` platformResourceInstallationsInstall @@ -2053,6 +2139,17 @@ saveGraph |----------|------| | `input` | SaveGraphInput (required) | +### `useSetAndCommitMutation` + +setAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | SetAndCommitInput (required) | + ### `useSetDataAtPathMutation` setDataAtPath @@ -2064,6 +2161,17 @@ setDataAtPath |----------|------| | `input` | SetDataAtPathInput (required) | +### `useSetManyAndCommitMutation` + +setManyAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | SetManyAndCommitInput (required) | + ### `useStartExecutionMutation` startExecution diff --git a/sdk/constructive-react/src/compute/hooks/mutation-keys.ts b/sdk/constructive-react/src/compute/hooks/mutation-keys.ts index 0464eaef3e..9f6e3d0d61 100644 --- a/sdk/constructive-react/src/compute/hooks/mutation-keys.ts +++ b/sdk/constructive-react/src/compute/hooks/mutation-keys.ts @@ -775,10 +775,22 @@ export const customMutationKeys = { identifier ? (['mutation', 'infraInsertNodeAtPath', identifier] as const) : (['mutation', 'infraInsertNodeAtPath'] as const), + /** Mutation key for infraInsertNodesAtPaths */ infraInsertNodesAtPaths: (identifier?: string) => + identifier + ? (['mutation', 'infraInsertNodesAtPaths', identifier] as const) + : (['mutation', 'infraInsertNodesAtPaths'] as const), + /** Mutation key for infraSetAndCommit */ infraSetAndCommit: (identifier?: string) => + identifier + ? (['mutation', 'infraSetAndCommit', identifier] as const) + : (['mutation', 'infraSetAndCommit'] as const), /** Mutation key for infraSetDataAtPath */ infraSetDataAtPath: (identifier?: string) => identifier ? (['mutation', 'infraSetDataAtPath', identifier] as const) : (['mutation', 'infraSetDataAtPath'] as const), + /** Mutation key for infraSetManyAndCommit */ infraSetManyAndCommit: (identifier?: string) => + identifier + ? (['mutation', 'infraSetManyAndCommit', identifier] as const) + : (['mutation', 'infraSetManyAndCommit'] as const), /** Mutation key for initEmptyRepo */ initEmptyRepo: (identifier?: string) => identifier ? (['mutation', 'initEmptyRepo', identifier] as const) @@ -787,6 +799,10 @@ export const customMutationKeys = { identifier ? (['mutation', 'insertNodeAtPath', identifier] as const) : (['mutation', 'insertNodeAtPath'] as const), + /** Mutation key for insertNodesAtPaths */ insertNodesAtPaths: (identifier?: string) => + identifier + ? (['mutation', 'insertNodesAtPaths', identifier] as const) + : (['mutation', 'insertNodesAtPaths'] as const), /** Mutation key for platformInfraInitEmptyRepo */ platformInfraInitEmptyRepo: ( identifier?: string ) => @@ -799,12 +815,30 @@ export const customMutationKeys = { identifier ? (['mutation', 'platformInfraInsertNodeAtPath', identifier] as const) : (['mutation', 'platformInfraInsertNodeAtPath'] as const), + /** Mutation key for platformInfraInsertNodesAtPaths */ platformInfraInsertNodesAtPaths: ( + identifier?: string + ) => + identifier + ? (['mutation', 'platformInfraInsertNodesAtPaths', identifier] as const) + : (['mutation', 'platformInfraInsertNodesAtPaths'] as const), + /** Mutation key for platformInfraSetAndCommit */ platformInfraSetAndCommit: ( + identifier?: string + ) => + identifier + ? (['mutation', 'platformInfraSetAndCommit', identifier] as const) + : (['mutation', 'platformInfraSetAndCommit'] as const), /** Mutation key for platformInfraSetDataAtPath */ platformInfraSetDataAtPath: ( identifier?: string ) => identifier ? (['mutation', 'platformInfraSetDataAtPath', identifier] as const) : (['mutation', 'platformInfraSetDataAtPath'] as const), + /** Mutation key for platformInfraSetManyAndCommit */ platformInfraSetManyAndCommit: ( + identifier?: string + ) => + identifier + ? (['mutation', 'platformInfraSetManyAndCommit', identifier] as const) + : (['mutation', 'platformInfraSetManyAndCommit'] as const), /** Mutation key for platformResourceInstallationsInstall */ platformResourceInstallationsInstall: (identifier?: string) => identifier @@ -857,10 +891,18 @@ export const customMutationKeys = { identifier ? (['mutation', 'saveGraph', identifier] as const) : (['mutation', 'saveGraph'] as const), + /** Mutation key for setAndCommit */ setAndCommit: (identifier?: string) => + identifier + ? (['mutation', 'setAndCommit', identifier] as const) + : (['mutation', 'setAndCommit'] as const), /** Mutation key for setDataAtPath */ setDataAtPath: (identifier?: string) => identifier ? (['mutation', 'setDataAtPath', identifier] as const) : (['mutation', 'setDataAtPath'] as const), + /** Mutation key for setManyAndCommit */ setManyAndCommit: (identifier?: string) => + identifier + ? (['mutation', 'setManyAndCommit', identifier] as const) + : (['mutation', 'setManyAndCommit'] as const), /** Mutation key for startExecution */ startExecution: (identifier?: string) => identifier ? (['mutation', 'startExecution', identifier] as const) diff --git a/sdk/constructive-react/src/compute/hooks/mutations/index.ts b/sdk/constructive-react/src/compute/hooks/mutations/index.ts index e44b98ba84..b022e300ee 100644 --- a/sdk/constructive-react/src/compute/hooks/mutations/index.ts +++ b/sdk/constructive-react/src/compute/hooks/mutations/index.ts @@ -193,12 +193,19 @@ export * from './useImportDefinitionsMutation'; export * from './useImportGraphJsonMutation'; export * from './useInfraInitEmptyRepoMutation'; export * from './useInfraInsertNodeAtPathMutation'; +export * from './useInfraInsertNodesAtPathsMutation'; +export * from './useInfraSetAndCommitMutation'; export * from './useInfraSetDataAtPathMutation'; +export * from './useInfraSetManyAndCommitMutation'; export * from './useInitEmptyRepoMutation'; export * from './useInsertNodeAtPathMutation'; +export * from './useInsertNodesAtPathsMutation'; export * from './usePlatformInfraInitEmptyRepoMutation'; export * from './usePlatformInfraInsertNodeAtPathMutation'; +export * from './usePlatformInfraInsertNodesAtPathsMutation'; +export * from './usePlatformInfraSetAndCommitMutation'; export * from './usePlatformInfraSetDataAtPathMutation'; +export * from './usePlatformInfraSetManyAndCommitMutation'; export * from './usePlatformResourceInstallationsInstallMutation'; export * from './usePlatformResourceInstallationsRollbackMutation'; export * from './usePlatformResourceInstallationsUninstallMutation'; @@ -209,6 +216,8 @@ export * from './useResourceInstallationsRollbackMutation'; export * from './useResourceInstallationsUninstallMutation'; export * from './useResourceInstallationsUpgradeMutation'; export * from './useSaveGraphMutation'; +export * from './useSetAndCommitMutation'; export * from './useSetDataAtPathMutation'; +export * from './useSetManyAndCommitMutation'; export * from './useStartExecutionMutation'; export * from './useValidateFunctionGraphMutation'; diff --git a/sdk/constructive-react/src/modules/hooks/mutations/useProvisionFullTextSearchMutation.ts b/sdk/constructive-react/src/compute/hooks/mutations/useInfraInsertNodesAtPathsMutation.ts similarity index 51% rename from sdk/constructive-react/src/modules/hooks/mutations/useProvisionFullTextSearchMutation.ts rename to sdk/constructive-react/src/compute/hooks/mutations/useInfraInsertNodesAtPathsMutation.ts index 62ee82bcb1..f9b756d583 100644 --- a/sdk/constructive-react/src/modules/hooks/mutations/useProvisionFullTextSearchMutation.ts +++ b/sdk/constructive-react/src/compute/hooks/mutations/useInfraInsertNodesAtPathsMutation.ts @@ -1,5 +1,5 @@ /** - * Custom mutation hook for provisionFullTextSearch + * Custom mutation hook for infraInsertNodesAtPaths * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -10,48 +10,48 @@ import { getClient } from '../client'; import { buildSelectionArgs } from '../selection'; import type { SelectionConfig } from '../selection'; import { customMutationKeys } from '../mutation-keys'; -import type { ProvisionFullTextSearchVariables } from '../../orm/mutation'; +import type { InfraInsertNodesAtPathsVariables } from '../../orm/mutation'; import type { - ProvisionFullTextSearchPayloadSelect, - ProvisionFullTextSearchPayload, + InfraInsertNodesAtPathsPayloadSelect, + InfraInsertNodesAtPathsPayload, } from '../../orm/input-types'; import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; -export type { ProvisionFullTextSearchVariables } from '../../orm/mutation'; -export type { ProvisionFullTextSearchPayloadSelect } from '../../orm/input-types'; -export function useProvisionFullTextSearchMutation( +export type { InfraInsertNodesAtPathsVariables } from '../../orm/mutation'; +export type { InfraInsertNodesAtPathsPayloadSelect } from '../../orm/input-types'; +export function useInfraInsertNodesAtPathsMutation( params: { selection: { - fields: S & ProvisionFullTextSearchPayloadSelect; - } & HookStrictSelect, ProvisionFullTextSearchPayloadSelect>; + fields: S & InfraInsertNodesAtPathsPayloadSelect; + } & HookStrictSelect, InfraInsertNodesAtPathsPayloadSelect>; } & Omit< UseMutationOptions< { - provisionFullTextSearch: InferSelectResult | null; + infraInsertNodesAtPaths: InferSelectResult | null; }, Error, - ProvisionFullTextSearchVariables + InfraInsertNodesAtPathsVariables >, 'mutationFn' > ): UseMutationResult< { - provisionFullTextSearch: InferSelectResult | null; + infraInsertNodesAtPaths: InferSelectResult | null; }, Error, - ProvisionFullTextSearchVariables + InfraInsertNodesAtPathsVariables > { const args = buildSelectionArgs(params.selection); const { selection: _selection, ...mutationOptions } = params ?? {}; void _selection; return useMutation({ - mutationKey: customMutationKeys.provisionFullTextSearch(), - mutationFn: (variables: ProvisionFullTextSearchVariables) => + mutationKey: customMutationKeys.infraInsertNodesAtPaths(), + mutationFn: (variables: InfraInsertNodesAtPathsVariables) => getClient() - .mutation.provisionFullTextSearch(variables, { + .mutation.infraInsertNodesAtPaths(variables, { select: args.select, } as { select: S; - } & StrictSelect) + } & StrictSelect) .unwrap(), ...mutationOptions, }); diff --git a/sdk/constructive-react/src/modules/hooks/mutations/useProvisionRelationMutation.ts b/sdk/constructive-react/src/compute/hooks/mutations/useInfraSetAndCommitMutation.ts similarity index 54% rename from sdk/constructive-react/src/modules/hooks/mutations/useProvisionRelationMutation.ts rename to sdk/constructive-react/src/compute/hooks/mutations/useInfraSetAndCommitMutation.ts index bb8032dba0..46a2bad5c9 100644 --- a/sdk/constructive-react/src/modules/hooks/mutations/useProvisionRelationMutation.ts +++ b/sdk/constructive-react/src/compute/hooks/mutations/useInfraSetAndCommitMutation.ts @@ -1,5 +1,5 @@ /** - * Custom mutation hook for provisionRelation + * Custom mutation hook for infraSetAndCommit * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -10,48 +10,48 @@ import { getClient } from '../client'; import { buildSelectionArgs } from '../selection'; import type { SelectionConfig } from '../selection'; import { customMutationKeys } from '../mutation-keys'; -import type { ProvisionRelationVariables } from '../../orm/mutation'; +import type { InfraSetAndCommitVariables } from '../../orm/mutation'; import type { - ProvisionRelationPayloadSelect, - ProvisionRelationPayload, + InfraSetAndCommitPayloadSelect, + InfraSetAndCommitPayload, } from '../../orm/input-types'; import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; -export type { ProvisionRelationVariables } from '../../orm/mutation'; -export type { ProvisionRelationPayloadSelect } from '../../orm/input-types'; -export function useProvisionRelationMutation( +export type { InfraSetAndCommitVariables } from '../../orm/mutation'; +export type { InfraSetAndCommitPayloadSelect } from '../../orm/input-types'; +export function useInfraSetAndCommitMutation( params: { selection: { - fields: S & ProvisionRelationPayloadSelect; - } & HookStrictSelect, ProvisionRelationPayloadSelect>; + fields: S & InfraSetAndCommitPayloadSelect; + } & HookStrictSelect, InfraSetAndCommitPayloadSelect>; } & Omit< UseMutationOptions< { - provisionRelation: InferSelectResult | null; + infraSetAndCommit: InferSelectResult | null; }, Error, - ProvisionRelationVariables + InfraSetAndCommitVariables >, 'mutationFn' > ): UseMutationResult< { - provisionRelation: InferSelectResult | null; + infraSetAndCommit: InferSelectResult | null; }, Error, - ProvisionRelationVariables + InfraSetAndCommitVariables > { const args = buildSelectionArgs(params.selection); const { selection: _selection, ...mutationOptions } = params ?? {}; void _selection; return useMutation({ - mutationKey: customMutationKeys.provisionRelation(), - mutationFn: (variables: ProvisionRelationVariables) => + mutationKey: customMutationKeys.infraSetAndCommit(), + mutationFn: (variables: InfraSetAndCommitVariables) => getClient() - .mutation.provisionRelation(variables, { + .mutation.infraSetAndCommit(variables, { select: args.select, } as { select: S; - } & StrictSelect) + } & StrictSelect) .unwrap(), ...mutationOptions, }); diff --git a/sdk/constructive-react/src/compute/hooks/mutations/useInfraSetManyAndCommitMutation.ts b/sdk/constructive-react/src/compute/hooks/mutations/useInfraSetManyAndCommitMutation.ts new file mode 100644 index 0000000000..0f388c9cd3 --- /dev/null +++ b/sdk/constructive-react/src/compute/hooks/mutations/useInfraSetManyAndCommitMutation.ts @@ -0,0 +1,58 @@ +/** + * Custom mutation hook for infraSetManyAndCommit + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useMutation } from '@tanstack/react-query'; +import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { customMutationKeys } from '../mutation-keys'; +import type { InfraSetManyAndCommitVariables } from '../../orm/mutation'; +import type { + InfraSetManyAndCommitPayloadSelect, + InfraSetManyAndCommitPayload, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; +export type { InfraSetManyAndCommitVariables } from '../../orm/mutation'; +export type { InfraSetManyAndCommitPayloadSelect } from '../../orm/input-types'; +export function useInfraSetManyAndCommitMutation( + params: { + selection: { + fields: S & InfraSetManyAndCommitPayloadSelect; + } & HookStrictSelect, InfraSetManyAndCommitPayloadSelect>; + } & Omit< + UseMutationOptions< + { + infraSetManyAndCommit: InferSelectResult | null; + }, + Error, + InfraSetManyAndCommitVariables + >, + 'mutationFn' + > +): UseMutationResult< + { + infraSetManyAndCommit: InferSelectResult | null; + }, + Error, + InfraSetManyAndCommitVariables +> { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + return useMutation({ + mutationKey: customMutationKeys.infraSetManyAndCommit(), + mutationFn: (variables: InfraSetManyAndCommitVariables) => + getClient() + .mutation.infraSetManyAndCommit(variables, { + select: args.select, + } as { + select: S; + } & StrictSelect) + .unwrap(), + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/compute/hooks/mutations/useInsertNodesAtPathsMutation.ts b/sdk/constructive-react/src/compute/hooks/mutations/useInsertNodesAtPathsMutation.ts new file mode 100644 index 0000000000..70612f27eb --- /dev/null +++ b/sdk/constructive-react/src/compute/hooks/mutations/useInsertNodesAtPathsMutation.ts @@ -0,0 +1,58 @@ +/** + * Custom mutation hook for insertNodesAtPaths + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useMutation } from '@tanstack/react-query'; +import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { customMutationKeys } from '../mutation-keys'; +import type { InsertNodesAtPathsVariables } from '../../orm/mutation'; +import type { + InsertNodesAtPathsPayloadSelect, + InsertNodesAtPathsPayload, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; +export type { InsertNodesAtPathsVariables } from '../../orm/mutation'; +export type { InsertNodesAtPathsPayloadSelect } from '../../orm/input-types'; +export function useInsertNodesAtPathsMutation( + params: { + selection: { + fields: S & InsertNodesAtPathsPayloadSelect; + } & HookStrictSelect, InsertNodesAtPathsPayloadSelect>; + } & Omit< + UseMutationOptions< + { + insertNodesAtPaths: InferSelectResult | null; + }, + Error, + InsertNodesAtPathsVariables + >, + 'mutationFn' + > +): UseMutationResult< + { + insertNodesAtPaths: InferSelectResult | null; + }, + Error, + InsertNodesAtPathsVariables +> { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + return useMutation({ + mutationKey: customMutationKeys.insertNodesAtPaths(), + mutationFn: (variables: InsertNodesAtPathsVariables) => + getClient() + .mutation.insertNodesAtPaths(variables, { + select: args.select, + } as { + select: S; + } & StrictSelect) + .unwrap(), + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/compute/hooks/mutations/usePlatformInfraInsertNodesAtPathsMutation.ts b/sdk/constructive-react/src/compute/hooks/mutations/usePlatformInfraInsertNodesAtPathsMutation.ts new file mode 100644 index 0000000000..924154505d --- /dev/null +++ b/sdk/constructive-react/src/compute/hooks/mutations/usePlatformInfraInsertNodesAtPathsMutation.ts @@ -0,0 +1,66 @@ +/** + * Custom mutation hook for platformInfraInsertNodesAtPaths + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useMutation } from '@tanstack/react-query'; +import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { customMutationKeys } from '../mutation-keys'; +import type { PlatformInfraInsertNodesAtPathsVariables } from '../../orm/mutation'; +import type { + PlatformInfraInsertNodesAtPathsPayloadSelect, + PlatformInfraInsertNodesAtPathsPayload, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; +export type { PlatformInfraInsertNodesAtPathsVariables } from '../../orm/mutation'; +export type { PlatformInfraInsertNodesAtPathsPayloadSelect } from '../../orm/input-types'; +export function usePlatformInfraInsertNodesAtPathsMutation< + S extends PlatformInfraInsertNodesAtPathsPayloadSelect, +>( + params: { + selection: { + fields: S & PlatformInfraInsertNodesAtPathsPayloadSelect; + } & HookStrictSelect, PlatformInfraInsertNodesAtPathsPayloadSelect>; + } & Omit< + UseMutationOptions< + { + platformInfraInsertNodesAtPaths: InferSelectResult< + PlatformInfraInsertNodesAtPathsPayload, + S + > | null; + }, + Error, + PlatformInfraInsertNodesAtPathsVariables + >, + 'mutationFn' + > +): UseMutationResult< + { + platformInfraInsertNodesAtPaths: InferSelectResult< + PlatformInfraInsertNodesAtPathsPayload, + S + > | null; + }, + Error, + PlatformInfraInsertNodesAtPathsVariables +> { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + return useMutation({ + mutationKey: customMutationKeys.platformInfraInsertNodesAtPaths(), + mutationFn: (variables: PlatformInfraInsertNodesAtPathsVariables) => + getClient() + .mutation.platformInfraInsertNodesAtPaths(variables, { + select: args.select, + } as { + select: S; + } & StrictSelect) + .unwrap(), + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/mutations/useProvisionUniqueConstraintMutation.ts b/sdk/constructive-react/src/compute/hooks/mutations/usePlatformInfraSetAndCommitMutation.ts similarity index 51% rename from sdk/constructive-react/src/modules/hooks/mutations/useProvisionUniqueConstraintMutation.ts rename to sdk/constructive-react/src/compute/hooks/mutations/usePlatformInfraSetAndCommitMutation.ts index 7af850b840..9bac5e7fd6 100644 --- a/sdk/constructive-react/src/modules/hooks/mutations/useProvisionUniqueConstraintMutation.ts +++ b/sdk/constructive-react/src/compute/hooks/mutations/usePlatformInfraSetAndCommitMutation.ts @@ -1,5 +1,5 @@ /** - * Custom mutation hook for provisionUniqueConstraint + * Custom mutation hook for platformInfraSetAndCommit * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -10,50 +10,50 @@ import { getClient } from '../client'; import { buildSelectionArgs } from '../selection'; import type { SelectionConfig } from '../selection'; import { customMutationKeys } from '../mutation-keys'; -import type { ProvisionUniqueConstraintVariables } from '../../orm/mutation'; +import type { PlatformInfraSetAndCommitVariables } from '../../orm/mutation'; import type { - ProvisionUniqueConstraintPayloadSelect, - ProvisionUniqueConstraintPayload, + PlatformInfraSetAndCommitPayloadSelect, + PlatformInfraSetAndCommitPayload, } from '../../orm/input-types'; import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; -export type { ProvisionUniqueConstraintVariables } from '../../orm/mutation'; -export type { ProvisionUniqueConstraintPayloadSelect } from '../../orm/input-types'; -export function useProvisionUniqueConstraintMutation< - S extends ProvisionUniqueConstraintPayloadSelect, +export type { PlatformInfraSetAndCommitVariables } from '../../orm/mutation'; +export type { PlatformInfraSetAndCommitPayloadSelect } from '../../orm/input-types'; +export function usePlatformInfraSetAndCommitMutation< + S extends PlatformInfraSetAndCommitPayloadSelect, >( params: { selection: { - fields: S & ProvisionUniqueConstraintPayloadSelect; - } & HookStrictSelect, ProvisionUniqueConstraintPayloadSelect>; + fields: S & PlatformInfraSetAndCommitPayloadSelect; + } & HookStrictSelect, PlatformInfraSetAndCommitPayloadSelect>; } & Omit< UseMutationOptions< { - provisionUniqueConstraint: InferSelectResult | null; + platformInfraSetAndCommit: InferSelectResult | null; }, Error, - ProvisionUniqueConstraintVariables + PlatformInfraSetAndCommitVariables >, 'mutationFn' > ): UseMutationResult< { - provisionUniqueConstraint: InferSelectResult | null; + platformInfraSetAndCommit: InferSelectResult | null; }, Error, - ProvisionUniqueConstraintVariables + PlatformInfraSetAndCommitVariables > { const args = buildSelectionArgs(params.selection); const { selection: _selection, ...mutationOptions } = params ?? {}; void _selection; return useMutation({ - mutationKey: customMutationKeys.provisionUniqueConstraint(), - mutationFn: (variables: ProvisionUniqueConstraintVariables) => + mutationKey: customMutationKeys.platformInfraSetAndCommit(), + mutationFn: (variables: PlatformInfraSetAndCommitVariables) => getClient() - .mutation.provisionUniqueConstraint(variables, { + .mutation.platformInfraSetAndCommit(variables, { select: args.select, } as { select: S; - } & StrictSelect) + } & StrictSelect) .unwrap(), ...mutationOptions, }); diff --git a/sdk/constructive-react/src/compute/hooks/mutations/usePlatformInfraSetManyAndCommitMutation.ts b/sdk/constructive-react/src/compute/hooks/mutations/usePlatformInfraSetManyAndCommitMutation.ts new file mode 100644 index 0000000000..a6a7fcf2d0 --- /dev/null +++ b/sdk/constructive-react/src/compute/hooks/mutations/usePlatformInfraSetManyAndCommitMutation.ts @@ -0,0 +1,66 @@ +/** + * Custom mutation hook for platformInfraSetManyAndCommit + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useMutation } from '@tanstack/react-query'; +import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { customMutationKeys } from '../mutation-keys'; +import type { PlatformInfraSetManyAndCommitVariables } from '../../orm/mutation'; +import type { + PlatformInfraSetManyAndCommitPayloadSelect, + PlatformInfraSetManyAndCommitPayload, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; +export type { PlatformInfraSetManyAndCommitVariables } from '../../orm/mutation'; +export type { PlatformInfraSetManyAndCommitPayloadSelect } from '../../orm/input-types'; +export function usePlatformInfraSetManyAndCommitMutation< + S extends PlatformInfraSetManyAndCommitPayloadSelect, +>( + params: { + selection: { + fields: S & PlatformInfraSetManyAndCommitPayloadSelect; + } & HookStrictSelect, PlatformInfraSetManyAndCommitPayloadSelect>; + } & Omit< + UseMutationOptions< + { + platformInfraSetManyAndCommit: InferSelectResult< + PlatformInfraSetManyAndCommitPayload, + S + > | null; + }, + Error, + PlatformInfraSetManyAndCommitVariables + >, + 'mutationFn' + > +): UseMutationResult< + { + platformInfraSetManyAndCommit: InferSelectResult< + PlatformInfraSetManyAndCommitPayload, + S + > | null; + }, + Error, + PlatformInfraSetManyAndCommitVariables +> { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + return useMutation({ + mutationKey: customMutationKeys.platformInfraSetManyAndCommit(), + mutationFn: (variables: PlatformInfraSetManyAndCommitVariables) => + getClient() + .mutation.platformInfraSetManyAndCommit(variables, { + select: args.select, + } as { + select: S; + } & StrictSelect) + .unwrap(), + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/mutations/useProvisionTableMutation.ts b/sdk/constructive-react/src/compute/hooks/mutations/useSetAndCommitMutation.ts similarity index 51% rename from sdk/constructive-react/src/modules/hooks/mutations/useProvisionTableMutation.ts rename to sdk/constructive-react/src/compute/hooks/mutations/useSetAndCommitMutation.ts index 91f39cd892..efbed76921 100644 --- a/sdk/constructive-react/src/modules/hooks/mutations/useProvisionTableMutation.ts +++ b/sdk/constructive-react/src/compute/hooks/mutations/useSetAndCommitMutation.ts @@ -1,5 +1,5 @@ /** - * Custom mutation hook for provisionTable + * Custom mutation hook for setAndCommit * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -10,45 +10,45 @@ import { getClient } from '../client'; import { buildSelectionArgs } from '../selection'; import type { SelectionConfig } from '../selection'; import { customMutationKeys } from '../mutation-keys'; -import type { ProvisionTableVariables } from '../../orm/mutation'; -import type { ProvisionTablePayloadSelect, ProvisionTablePayload } from '../../orm/input-types'; +import type { SetAndCommitVariables } from '../../orm/mutation'; +import type { SetAndCommitPayloadSelect, SetAndCommitPayload } from '../../orm/input-types'; import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; -export type { ProvisionTableVariables } from '../../orm/mutation'; -export type { ProvisionTablePayloadSelect } from '../../orm/input-types'; -export function useProvisionTableMutation( +export type { SetAndCommitVariables } from '../../orm/mutation'; +export type { SetAndCommitPayloadSelect } from '../../orm/input-types'; +export function useSetAndCommitMutation( params: { selection: { - fields: S & ProvisionTablePayloadSelect; - } & HookStrictSelect, ProvisionTablePayloadSelect>; + fields: S & SetAndCommitPayloadSelect; + } & HookStrictSelect, SetAndCommitPayloadSelect>; } & Omit< UseMutationOptions< { - provisionTable: InferSelectResult | null; + setAndCommit: InferSelectResult | null; }, Error, - ProvisionTableVariables + SetAndCommitVariables >, 'mutationFn' > ): UseMutationResult< { - provisionTable: InferSelectResult | null; + setAndCommit: InferSelectResult | null; }, Error, - ProvisionTableVariables + SetAndCommitVariables > { const args = buildSelectionArgs(params.selection); const { selection: _selection, ...mutationOptions } = params ?? {}; void _selection; return useMutation({ - mutationKey: customMutationKeys.provisionTable(), - mutationFn: (variables: ProvisionTableVariables) => + mutationKey: customMutationKeys.setAndCommit(), + mutationFn: (variables: SetAndCommitVariables) => getClient() - .mutation.provisionTable(variables, { + .mutation.setAndCommit(variables, { select: args.select, } as { select: S; - } & StrictSelect) + } & StrictSelect) .unwrap(), ...mutationOptions, }); diff --git a/sdk/constructive-react/src/compute/hooks/mutations/useSetManyAndCommitMutation.ts b/sdk/constructive-react/src/compute/hooks/mutations/useSetManyAndCommitMutation.ts new file mode 100644 index 0000000000..91ead94fd0 --- /dev/null +++ b/sdk/constructive-react/src/compute/hooks/mutations/useSetManyAndCommitMutation.ts @@ -0,0 +1,55 @@ +/** + * Custom mutation hook for setManyAndCommit + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useMutation } from '@tanstack/react-query'; +import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { customMutationKeys } from '../mutation-keys'; +import type { SetManyAndCommitVariables } from '../../orm/mutation'; +import type { SetManyAndCommitPayloadSelect, SetManyAndCommitPayload } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; +export type { SetManyAndCommitVariables } from '../../orm/mutation'; +export type { SetManyAndCommitPayloadSelect } from '../../orm/input-types'; +export function useSetManyAndCommitMutation( + params: { + selection: { + fields: S & SetManyAndCommitPayloadSelect; + } & HookStrictSelect, SetManyAndCommitPayloadSelect>; + } & Omit< + UseMutationOptions< + { + setManyAndCommit: InferSelectResult | null; + }, + Error, + SetManyAndCommitVariables + >, + 'mutationFn' + > +): UseMutationResult< + { + setManyAndCommit: InferSelectResult | null; + }, + Error, + SetManyAndCommitVariables +> { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + return useMutation({ + mutationKey: customMutationKeys.setManyAndCommit(), + mutationFn: (variables: SetManyAndCommitVariables) => + getClient() + .mutation.setManyAndCommit(variables, { + select: args.select, + } as { + select: S; + } & StrictSelect) + .unwrap(), + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/compute/orm/README.md b/sdk/constructive-react/src/compute/orm/README.md index d1a03c4e98..78b236e1d8 100644 --- a/sdk/constructive-react/src/compute/orm/README.md +++ b/sdk/constructive-react/src/compute/orm/README.md @@ -245,6 +245,7 @@ CRUD operations for FunctionDefinition records. | `requiredBuckets` | String | Yes | | `requiredConfigs` | ResourceRequirement | Yes | | `requiredModels` | String | Yes | +| `requiredModules` | String | Yes | | `requiredSecrets` | ResourceRequirement | Yes | | `resources` | JSON | Yes | | `runtime` | String | Yes | @@ -261,13 +262,13 @@ CRUD operations for FunctionDefinition records. ```typescript // List all functionDefinition records -const items = await db.functionDefinition.findMany({ select: { accessChannels: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, databaseId: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }).execute(); +const items = await db.functionDefinition.findMany({ select: { accessChannels: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, databaseId: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredModules: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }).execute(); // Get one by id -const item = await db.functionDefinition.findOne({ id: '', select: { accessChannels: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, databaseId: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }).execute(); +const item = await db.functionDefinition.findOne({ id: '', select: { accessChannels: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, databaseId: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredModules: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }).execute(); // Create -const created = await db.functionDefinition.create({ data: { accessChannels: '', category: '', concurrency: '', cpuLimitMillicores: '', cpuRequestMillicores: '', databaseId: '', description: '', fnCategory: '', functionColumns: '', graphId: '', icon: '', image: '', inputs: '', integrations: '', isPublished: '', maxAttempts: '', memoryLimitBytes: '', memoryRequestBytes: '', moduleTable: '', name: '', outputs: '', payloadArgs: '', priority: '', props: '', protected: '', publishedAt: '', queueName: '', requiredBuckets: '', requiredConfigs: '', requiredModels: '', requiredSecrets: '', resources: '', runtime: '', scaleMax: '', scaleMin: '', targetFunction: '', targetSchema: '', taskIdentifier: '', timeoutSeconds: '', volatile: '' }, select: { id: true } }).execute(); +const created = await db.functionDefinition.create({ data: { accessChannels: '', category: '', concurrency: '', cpuLimitMillicores: '', cpuRequestMillicores: '', databaseId: '', description: '', fnCategory: '', functionColumns: '', graphId: '', icon: '', image: '', inputs: '', integrations: '', isPublished: '', maxAttempts: '', memoryLimitBytes: '', memoryRequestBytes: '', moduleTable: '', name: '', outputs: '', payloadArgs: '', priority: '', props: '', protected: '', publishedAt: '', queueName: '', requiredBuckets: '', requiredConfigs: '', requiredModels: '', requiredModules: '', requiredSecrets: '', resources: '', runtime: '', scaleMax: '', scaleMin: '', targetFunction: '', targetSchema: '', taskIdentifier: '', timeoutSeconds: '', volatile: '' }, select: { id: true } }).execute(); // Update const updated = await db.functionDefinition.update({ where: { id: '' }, data: { accessChannels: '' }, select: { id: true } }).execute(); @@ -297,6 +298,7 @@ CRUD operations for FunctionDeployment records. | `lastError` | String | Yes | | `lastErrorAt` | Datetime | Yes | | `namespaceId` | UUID | Yes | +| `realm` | String | Yes | | `resources` | JSON | Yes | | `revision` | Int | Yes | | `scaleMax` | Int | Yes | @@ -311,13 +313,13 @@ CRUD operations for FunctionDeployment records. ```typescript // List all functionDeployment records -const items = await db.functionDeployment.findMany({ select: { annotations: true, concurrency: true, createdAt: true, databaseId: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }).execute(); +const items = await db.functionDeployment.findMany({ select: { annotations: true, concurrency: true, createdAt: true, databaseId: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, realm: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.functionDeployment.findOne({ id: '', select: { annotations: true, concurrency: true, createdAt: true, databaseId: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }).execute(); +const item = await db.functionDeployment.findOne({ id: '', select: { annotations: true, concurrency: true, createdAt: true, databaseId: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, realm: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }).execute(); // Create -const created = await db.functionDeployment.create({ data: { annotations: '', concurrency: '', databaseId: '', errorCount: '', handlerName: '', image: '', imageVersion: '', labels: '', lastError: '', lastErrorAt: '', namespaceId: '', resources: '', revision: '', scaleMax: '', scaleMin: '', serviceName: '', serviceUrl: '', status: '', timeoutSeconds: '' }, select: { id: true } }).execute(); +const created = await db.functionDeployment.create({ data: { annotations: '', concurrency: '', databaseId: '', errorCount: '', handlerName: '', image: '', imageVersion: '', labels: '', lastError: '', lastErrorAt: '', namespaceId: '', realm: '', resources: '', revision: '', scaleMax: '', scaleMin: '', serviceName: '', serviceUrl: '', status: '', timeoutSeconds: '' }, select: { id: true } }).execute(); // Update const updated = await db.functionDeployment.update({ where: { id: '' }, data: { annotations: '' }, select: { id: true } }).execute(); @@ -1227,6 +1229,7 @@ CRUD operations for PlatformFunctionDefinition records. | `requiredBuckets` | String | Yes | | `requiredConfigs` | ResourceRequirement | Yes | | `requiredModels` | String | Yes | +| `requiredModules` | String | Yes | | `requiredSecrets` | ResourceRequirement | Yes | | `resources` | JSON | Yes | | `runtime` | String | Yes | @@ -1244,13 +1247,13 @@ CRUD operations for PlatformFunctionDefinition records. ```typescript // List all platformFunctionDefinition records -const items = await db.platformFunctionDefinition.findMany({ select: { accessChannels: true, billable: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, system: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }).execute(); +const items = await db.platformFunctionDefinition.findMany({ select: { accessChannels: true, billable: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredModules: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, system: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }).execute(); // Get one by id -const item = await db.platformFunctionDefinition.findOne({ id: '', select: { accessChannels: true, billable: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, system: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }).execute(); +const item = await db.platformFunctionDefinition.findOne({ id: '', select: { accessChannels: true, billable: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredModules: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, system: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }).execute(); // Create -const created = await db.platformFunctionDefinition.create({ data: { accessChannels: '', billable: '', category: '', concurrency: '', cpuLimitMillicores: '', cpuRequestMillicores: '', description: '', fnCategory: '', functionColumns: '', graphId: '', icon: '', image: '', inputs: '', integrations: '', isPublished: '', maxAttempts: '', memoryLimitBytes: '', memoryRequestBytes: '', moduleTable: '', name: '', outputs: '', payloadArgs: '', priority: '', props: '', protected: '', publishedAt: '', queueName: '', requiredBuckets: '', requiredConfigs: '', requiredModels: '', requiredSecrets: '', resources: '', runtime: '', scaleMax: '', scaleMin: '', system: '', targetFunction: '', targetSchema: '', taskIdentifier: '', timeoutSeconds: '', volatile: '' }, select: { id: true } }).execute(); +const created = await db.platformFunctionDefinition.create({ data: { accessChannels: '', billable: '', category: '', concurrency: '', cpuLimitMillicores: '', cpuRequestMillicores: '', description: '', fnCategory: '', functionColumns: '', graphId: '', icon: '', image: '', inputs: '', integrations: '', isPublished: '', maxAttempts: '', memoryLimitBytes: '', memoryRequestBytes: '', moduleTable: '', name: '', outputs: '', payloadArgs: '', priority: '', props: '', protected: '', publishedAt: '', queueName: '', requiredBuckets: '', requiredConfigs: '', requiredModels: '', requiredModules: '', requiredSecrets: '', resources: '', runtime: '', scaleMax: '', scaleMin: '', system: '', targetFunction: '', targetSchema: '', taskIdentifier: '', timeoutSeconds: '', volatile: '' }, select: { id: true } }).execute(); // Update const updated = await db.platformFunctionDefinition.update({ where: { id: '' }, data: { accessChannels: '' }, select: { id: true } }).execute(); @@ -1279,6 +1282,7 @@ CRUD operations for PlatformFunctionDeployment records. | `lastError` | String | Yes | | `lastErrorAt` | Datetime | Yes | | `namespaceId` | UUID | Yes | +| `realm` | String | Yes | | `resources` | JSON | Yes | | `revision` | Int | Yes | | `scaleMax` | Int | Yes | @@ -1293,13 +1297,13 @@ CRUD operations for PlatformFunctionDeployment records. ```typescript // List all platformFunctionDeployment records -const items = await db.platformFunctionDeployment.findMany({ select: { annotations: true, concurrency: true, createdAt: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }).execute(); +const items = await db.platformFunctionDeployment.findMany({ select: { annotations: true, concurrency: true, createdAt: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, realm: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.platformFunctionDeployment.findOne({ id: '', select: { annotations: true, concurrency: true, createdAt: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }).execute(); +const item = await db.platformFunctionDeployment.findOne({ id: '', select: { annotations: true, concurrency: true, createdAt: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, realm: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }).execute(); // Create -const created = await db.platformFunctionDeployment.create({ data: { annotations: '', concurrency: '', errorCount: '', handlerName: '', image: '', imageVersion: '', labels: '', lastError: '', lastErrorAt: '', namespaceId: '', resources: '', revision: '', scaleMax: '', scaleMin: '', serviceName: '', serviceUrl: '', status: '', timeoutSeconds: '' }, select: { id: true } }).execute(); +const created = await db.platformFunctionDeployment.create({ data: { annotations: '', concurrency: '', errorCount: '', handlerName: '', image: '', imageVersion: '', labels: '', lastError: '', lastErrorAt: '', namespaceId: '', realm: '', resources: '', revision: '', scaleMax: '', scaleMin: '', serviceName: '', serviceUrl: '', status: '', timeoutSeconds: '' }, select: { id: true } }).execute(); // Update const updated = await db.platformFunctionDeployment.update({ where: { id: '' }, data: { annotations: '' }, select: { id: true } }).execute(); @@ -3053,6 +3057,36 @@ infraInsertNodeAtPath const result = await db.mutation.infraInsertNodeAtPath({ input: '' }).execute(); ``` +### `db.mutation.infraInsertNodesAtPaths` + +infraInsertNodesAtPaths + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | InfraInsertNodesAtPathsInput (required) | + +```typescript +const result = await db.mutation.infraInsertNodesAtPaths({ input: '' }).execute(); +``` + +### `db.mutation.infraSetAndCommit` + +infraSetAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | InfraSetAndCommitInput (required) | + +```typescript +const result = await db.mutation.infraSetAndCommit({ input: '' }).execute(); +``` + ### `db.mutation.infraSetDataAtPath` infraSetDataAtPath @@ -3068,6 +3102,21 @@ infraSetDataAtPath const result = await db.mutation.infraSetDataAtPath({ input: { data: '', path: '', root: '', sId: '' } }).execute(); ``` +### `db.mutation.infraSetManyAndCommit` + +infraSetManyAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | InfraSetManyAndCommitInput (required) | + +```typescript +const result = await db.mutation.infraSetManyAndCommit({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }).execute(); +``` + ### `db.mutation.initEmptyRepo` initEmptyRepo @@ -3098,6 +3147,21 @@ insertNodeAtPath const result = await db.mutation.insertNodeAtPath({ input: '' }).execute(); ``` +### `db.mutation.insertNodesAtPaths` + +insertNodesAtPaths + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | InsertNodesAtPathsInput (required) | + +```typescript +const result = await db.mutation.insertNodesAtPaths({ input: '' }).execute(); +``` + ### `db.mutation.platformInfraInitEmptyRepo` platformInfraInitEmptyRepo @@ -3128,6 +3192,36 @@ platformInfraInsertNodeAtPath const result = await db.mutation.platformInfraInsertNodeAtPath({ input: '' }).execute(); ``` +### `db.mutation.platformInfraInsertNodesAtPaths` + +platformInfraInsertNodesAtPaths + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | PlatformInfraInsertNodesAtPathsInput (required) | + +```typescript +const result = await db.mutation.platformInfraInsertNodesAtPaths({ input: '' }).execute(); +``` + +### `db.mutation.platformInfraSetAndCommit` + +platformInfraSetAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | PlatformInfraSetAndCommitInput (required) | + +```typescript +const result = await db.mutation.platformInfraSetAndCommit({ input: '' }).execute(); +``` + ### `db.mutation.platformInfraSetDataAtPath` platformInfraSetDataAtPath @@ -3143,6 +3237,21 @@ platformInfraSetDataAtPath const result = await db.mutation.platformInfraSetDataAtPath({ input: { data: '', path: '', root: '', sId: '' } }).execute(); ``` +### `db.mutation.platformInfraSetManyAndCommit` + +platformInfraSetManyAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | PlatformInfraSetManyAndCommitInput (required) | + +```typescript +const result = await db.mutation.platformInfraSetManyAndCommit({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }).execute(); +``` + ### `db.mutation.platformResourceInstallationsInstall` platformResourceInstallationsInstall @@ -3296,6 +3405,21 @@ saveGraph const result = await db.mutation.saveGraph({ input: { graphId: '', message: '', rootHash: '' } }).execute(); ``` +### `db.mutation.setAndCommit` + +setAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | SetAndCommitInput (required) | + +```typescript +const result = await db.mutation.setAndCommit({ input: '' }).execute(); +``` + ### `db.mutation.setDataAtPath` setDataAtPath @@ -3311,6 +3435,21 @@ setDataAtPath const result = await db.mutation.setDataAtPath({ input: { data: '', path: '', root: '', sId: '' } }).execute(); ``` +### `db.mutation.setManyAndCommit` + +setManyAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | SetManyAndCommitInput (required) | + +```typescript +const result = await db.mutation.setManyAndCommit({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }).execute(); +``` + ### `db.mutation.startExecution` startExecution diff --git a/sdk/constructive-react/src/compute/orm/input-types.ts b/sdk/constructive-react/src/compute/orm/input-types.ts index a132305584..df0c4af565 100644 --- a/sdk/constructive-react/src/compute/orm/input-types.ts +++ b/sdk/constructive-react/src/compute/orm/input-types.ts @@ -296,7 +296,7 @@ export interface FunctionCapabilityBinding { } /** Function definitions — registered cloud functions with routing, queue, and retry configuration */ export interface FunctionDefinition { - /** Invocation channels this function may be exposed through (api, graph, cron, sync, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. */ + /** Invocation channels this function may be exposed through (api, graph, cron, sync, page, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. */ accessChannels?: string[] | null; /** Function task category (e.g. email, embed, chunk, custom) */ category?: string | null; @@ -352,12 +352,14 @@ export interface FunctionDefinition { publishedAt?: string | null; /** Job queue name for serialization (e.g. email, ai, default) */ queueName?: string | null; - /** Bucket keys this function needs (e.g. uploads, exports). Empty = no bucket requirements. */ + /** Bucket keys this function needs (e.g. uploads, exports). Tenant-agnostic: each key is resolved per invocation against the tenant's buckets by {tags, type}, or by an explicit capability binding row. Empty = no bucket requirements. */ requiredBuckets?: string[] | null; /** Embedded config requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. */ requiredConfigs?: ResourceRequirement[] | null; /** Inference model whitelist (e.g. gpt-4o, claude-3). Empty = no model requirements. */ requiredModels?: string[] | null; + /** Modules whose api surfaces this function calls, e.g. notifications_module. Suffix . to name which surface when a module's schemas are attached to several (permissions_module.admin), and @ to pin the registration when a module is registered at more than one scope (limits_module@org) — usually unnecessary, since resolution walks the execution's scope chain. A value that is not a module name is read as an api name. Resolved per invocation; empty = no api requirements. */ + requiredModules?: string[] | null; /** Embedded secret requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. */ requiredSecrets?: ResourceRequirement[] | null; /** Container resource requests and limits: {requests: {memory, cpu}, limits: {memory, cpu}} */ @@ -406,6 +408,8 @@ export interface FunctionDeployment { lastErrorAt?: string | null; /** Target namespace for this deployment (maps to a K8s namespace) */ namespaceId?: string | null; + /** Config/secret realm this deployment resolves required keys against. Per key, the realm-specific atom wins over the NULL-realm default. NULL = the default lane (or a runtime-query worker that fetches per-item realms on demand). */ + realm?: string | null; /** K8s resource spec override: {"requests":{"cpu":"100m","memory":"128Mi"},"limits":{...}} */ resources?: Record | null; /** Deployment revision number (incremented on each redeployment) */ @@ -911,7 +915,7 @@ export interface PlatformFunctionCapabilityBinding { } /** Function definitions — registered cloud functions with routing, queue, and retry configuration */ export interface PlatformFunctionDefinition { - /** Invocation channels this function may be exposed through (api, graph, cron, sync, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. */ + /** Invocation channels this function may be exposed through (api, graph, cron, sync, page, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. */ accessChannels?: string[] | null; /** Whether executions are metered through the invocation ledger and billing quota gate */ billable?: boolean | null; @@ -967,12 +971,14 @@ export interface PlatformFunctionDefinition { publishedAt?: string | null; /** Job queue name for serialization (e.g. email, ai, default) */ queueName?: string | null; - /** Bucket keys this function needs (e.g. uploads, exports). Empty = no bucket requirements. */ + /** Bucket keys this function needs (e.g. uploads, exports). Tenant-agnostic: each key is resolved per invocation against the tenant's buckets by {tags, type}, or by an explicit capability binding row. Empty = no bucket requirements. */ requiredBuckets?: string[] | null; /** Embedded config requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. */ requiredConfigs?: ResourceRequirement[] | null; /** Inference model whitelist (e.g. gpt-4o, claude-3). Empty = no model requirements. */ requiredModels?: string[] | null; + /** Modules whose api surfaces this function calls, e.g. notifications_module. Suffix . to name which surface when a module's schemas are attached to several (permissions_module.admin), and @ to pin the registration when a module is registered at more than one scope (limits_module@org) — usually unnecessary, since resolution walks the execution's scope chain. A value that is not a module name is read as an api name. Resolved per invocation; empty = no api requirements. */ + requiredModules?: string[] | null; /** Embedded secret requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. */ requiredSecrets?: ResourceRequirement[] | null; /** Container resource requests and limits: {requests: {memory, cpu}, limits: {memory, cpu}} */ @@ -1021,6 +1027,8 @@ export interface PlatformFunctionDeployment { lastErrorAt?: string | null; /** Target namespace for this deployment (maps to a K8s namespace) */ namespaceId?: string | null; + /** Config/secret realm this deployment resolves required keys against. Per key, the realm-specific atom wins over the NULL-realm default. NULL = the default lane (or a runtime-query worker that fetches per-item realms on demand). */ + realm?: string | null; /** K8s resource spec override: {"requests":{"cpu":"100m","memory":"128Mi"},"limits":{...}} */ resources?: Record | null; /** Deployment revision number (incremented on each redeployment) */ @@ -2284,6 +2292,7 @@ export type FunctionDefinitionSelect = { requiredBuckets?: boolean; requiredConfigs?: boolean; requiredModels?: boolean; + requiredModules?: boolean; requiredSecrets?: boolean; resources?: boolean; runtime?: boolean; @@ -2328,6 +2337,7 @@ export type FunctionDeploymentSelect = { lastError?: boolean; lastErrorAt?: boolean; namespaceId?: boolean; + realm?: boolean; resources?: boolean; revision?: boolean; scaleMax?: boolean; @@ -2697,6 +2707,7 @@ export type PlatformFunctionDefinitionSelect = { requiredBuckets?: boolean; requiredConfigs?: boolean; requiredModels?: boolean; + requiredModules?: boolean; requiredSecrets?: boolean; resources?: boolean; runtime?: boolean; @@ -2744,6 +2755,7 @@ export type PlatformFunctionDeploymentSelect = { lastError?: boolean; lastErrorAt?: boolean; namespaceId?: boolean; + realm?: boolean; resources?: boolean; revision?: boolean; scaleMax?: boolean; @@ -3639,6 +3651,8 @@ export interface FunctionDefinitionFilter { requiredBuckets?: StringListFilter; /** Filter by the object’s `requiredModels` field. */ requiredModels?: StringListFilter; + /** Filter by the object’s `requiredModules` field. */ + requiredModules?: StringListFilter; /** Filter by the object’s `resources` field. */ resources?: JSONFilter; /** Filter by the object’s `runtime` field. */ @@ -3699,6 +3713,8 @@ export interface FunctionDeploymentFilter { not?: FunctionDeploymentFilter; /** Checks for any expressions in this list. */ or?: FunctionDeploymentFilter[]; + /** Filter by the object’s `realm` field. */ + realm?: StringFilter; /** Filter by the object’s `resources` field. */ resources?: JSONFilter; /** Filter by the object’s `revision` field. */ @@ -4451,6 +4467,8 @@ export interface PlatformFunctionDefinitionFilter { requiredBuckets?: StringListFilter; /** Filter by the object’s `requiredModels` field. */ requiredModels?: StringListFilter; + /** Filter by the object’s `requiredModules` field. */ + requiredModules?: StringListFilter; /** Filter by the object’s `resources` field. */ resources?: JSONFilter; /** Filter by the object’s `runtime` field. */ @@ -4507,6 +4525,8 @@ export interface PlatformFunctionDeploymentFilter { not?: PlatformFunctionDeploymentFilter; /** Checks for any expressions in this list. */ or?: PlatformFunctionDeploymentFilter[]; + /** Filter by the object’s `realm` field. */ + realm?: StringFilter; /** Filter by the object’s `resources` field. */ resources?: JSONFilter; /** Filter by the object’s `revision` field. */ @@ -6048,6 +6068,8 @@ export type FunctionDefinitionOrderBy = | 'REQUIRED_CONFIGS_DESC' | 'REQUIRED_MODELS_ASC' | 'REQUIRED_MODELS_DESC' + | 'REQUIRED_MODULES_ASC' + | 'REQUIRED_MODULES_DESC' | 'REQUIRED_SECRETS_ASC' | 'REQUIRED_SECRETS_DESC' | 'RESOURCES_ASC' @@ -6100,6 +6122,8 @@ export type FunctionDeploymentOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' + | 'REALM_ASC' + | 'REALM_DESC' | 'RESOURCES_ASC' | 'RESOURCES_DESC' | 'REVISION_ASC' @@ -6712,6 +6736,8 @@ export type PlatformFunctionDefinitionOrderBy = | 'REQUIRED_CONFIGS_DESC' | 'REQUIRED_MODELS_ASC' | 'REQUIRED_MODELS_DESC' + | 'REQUIRED_MODULES_ASC' + | 'REQUIRED_MODULES_DESC' | 'REQUIRED_SECRETS_ASC' | 'REQUIRED_SECRETS_DESC' | 'RESOURCES_ASC' @@ -6764,6 +6790,8 @@ export type PlatformFunctionDeploymentOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' + | 'REALM_ASC' + | 'REALM_DESC' | 'RESOURCES_ASC' | 'RESOURCES_DESC' | 'REVISION_ASC' @@ -8036,6 +8064,7 @@ export interface CreateFunctionDefinitionInput { requiredBuckets?: string[]; requiredConfigs?: ResourceRequirementInput[]; requiredModels?: string[]; + requiredModules?: string[]; requiredSecrets?: ResourceRequirementInput[]; resources?: Record; runtime?: string; @@ -8074,6 +8103,7 @@ export interface FunctionDefinitionPatch { requiredBuckets?: string[] | null; requiredConfigs?: ResourceRequirementInput[] | null; requiredModels?: string[] | null; + requiredModules?: string[] | null; requiredSecrets?: ResourceRequirementInput[] | null; resources?: Record | null; runtime?: string | null; @@ -8107,6 +8137,7 @@ export interface CreateFunctionDeploymentInput { lastError?: string; lastErrorAt?: string; namespaceId: string; + realm?: string; resources?: Record; revision?: number; scaleMax?: number; @@ -8129,6 +8160,7 @@ export interface FunctionDeploymentPatch { lastError?: string | null; lastErrorAt?: string | null; namespaceId?: string | null; + realm?: string | null; resources?: Record | null; revision?: number | null; scaleMax?: number | null; @@ -8895,6 +8927,7 @@ export interface CreatePlatformFunctionDefinitionInput { requiredBuckets?: string[]; requiredConfigs?: ResourceRequirementInput[]; requiredModels?: string[]; + requiredModules?: string[]; requiredSecrets?: ResourceRequirementInput[]; resources?: Record; runtime?: string; @@ -8934,6 +8967,7 @@ export interface PlatformFunctionDefinitionPatch { requiredBuckets?: string[] | null; requiredConfigs?: ResourceRequirementInput[] | null; requiredModels?: string[] | null; + requiredModules?: string[] | null; requiredSecrets?: ResourceRequirementInput[] | null; resources?: Record | null; runtime?: string | null; @@ -8967,6 +9001,7 @@ export interface CreatePlatformFunctionDeploymentInput { lastError?: string; lastErrorAt?: string; namespaceId: string; + realm?: string; resources?: Record; revision?: number; scaleMax?: number; @@ -8988,6 +9023,7 @@ export interface PlatformFunctionDeploymentPatch { lastError?: string | null; lastErrorAt?: string | null; namespaceId?: string | null; + realm?: string | null; resources?: Record | null; revision?: number | null; scaleMax?: number | null; @@ -10613,6 +10649,26 @@ export interface InfraInsertNodeAtPathInput { root?: string; sId?: string; } +export interface InfraInsertNodesAtPathsInput { + clientMutationId?: string; + datas?: Record[]; + kidsList?: Record; + ktreeList?: Record; + paths?: Record; + root?: string; + sId?: string; +} +export interface InfraSetAndCommitInput { + clientMutationId?: string; + data?: Record; + kids?: string[]; + ktree?: string[]; + message?: string; + path?: string[]; + refname?: string; + sId?: string; + storeId?: string; +} export interface InfraSetDataAtPathInput { clientMutationId?: string; data?: Record; @@ -10620,6 +10676,14 @@ export interface InfraSetDataAtPathInput { root?: string; sId?: string; } +export interface InfraSetManyAndCommitInput { + clientMutationId?: string; + entries?: Record; + message?: string; + refname?: string; + sId?: string; + storeId?: string; +} export interface InitEmptyRepoInput { clientMutationId?: string; sId?: string; @@ -10634,6 +10698,15 @@ export interface InsertNodeAtPathInput { root?: string; sId?: string; } +export interface InsertNodesAtPathsInput { + clientMutationId?: string; + datas?: Record[]; + kidsList?: Record; + ktreeList?: Record; + paths?: Record; + root?: string; + sId?: string; +} export interface PlatformInfraInitEmptyRepoInput { clientMutationId?: string; sId?: string; @@ -10648,6 +10721,26 @@ export interface PlatformInfraInsertNodeAtPathInput { root?: string; sId?: string; } +export interface PlatformInfraInsertNodesAtPathsInput { + clientMutationId?: string; + datas?: Record[]; + kidsList?: Record; + ktreeList?: Record; + paths?: Record; + root?: string; + sId?: string; +} +export interface PlatformInfraSetAndCommitInput { + clientMutationId?: string; + data?: Record; + kids?: string[]; + ktree?: string[]; + message?: string; + path?: string[]; + refname?: string; + sId?: string; + storeId?: string; +} export interface PlatformInfraSetDataAtPathInput { clientMutationId?: string; data?: Record; @@ -10655,6 +10748,14 @@ export interface PlatformInfraSetDataAtPathInput { root?: string; sId?: string; } +export interface PlatformInfraSetManyAndCommitInput { + clientMutationId?: string; + entries?: Record; + message?: string; + refname?: string; + sId?: string; + storeId?: string; +} export interface PlatformResourceInstallationsInstallInput { clientMutationId?: string; definitionIds?: string[]; @@ -10714,6 +10815,17 @@ export interface SaveGraphInput { message?: string; rootHash?: string; } +export interface SetAndCommitInput { + clientMutationId?: string; + data?: Record; + kids?: string[]; + ktree?: string[]; + message?: string; + path?: string[]; + refname?: string; + sId?: string; + storeId?: string; +} export interface SetDataAtPathInput { clientMutationId?: string; data?: Record; @@ -10721,6 +10833,14 @@ export interface SetDataAtPathInput { root?: string; sId?: string; } +export interface SetManyAndCommitInput { + clientMutationId?: string; + entries?: Record; + message?: string; + refname?: string; + sId?: string; + storeId?: string; +} export interface StartExecutionInput { clientMutationId?: string; graphId?: string; @@ -11128,7 +11248,7 @@ export interface FunctionCapabilityBindingInput { } /** An input for mutations affecting `FunctionDefinition` */ export interface FunctionDefinitionInput { - /** Invocation channels this function may be exposed through (api, graph, cron, sync, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. */ + /** Invocation channels this function may be exposed through (api, graph, cron, sync, page, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. */ accessChannels?: string[]; /** Function task category (e.g. email, embed, chunk, custom) */ category: string; @@ -11176,12 +11296,14 @@ export interface FunctionDefinitionInput { publishedAt?: string; /** Job queue name for serialization (e.g. email, ai, default) */ queueName?: string; - /** Bucket keys this function needs (e.g. uploads, exports). Empty = no bucket requirements. */ + /** Bucket keys this function needs (e.g. uploads, exports). Tenant-agnostic: each key is resolved per invocation against the tenant's buckets by {tags, type}, or by an explicit capability binding row. Empty = no bucket requirements. */ requiredBuckets?: string[]; /** Embedded config requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. */ requiredConfigs?: ResourceRequirementInput[]; /** Inference model whitelist (e.g. gpt-4o, claude-3). Empty = no model requirements. */ requiredModels?: string[]; + /** Modules whose api surfaces this function calls, e.g. notifications_module. Suffix . to name which surface when a module's schemas are attached to several (permissions_module.admin), and @ to pin the registration when a module is registered at more than one scope (limits_module@org) — usually unnecessary, since resolution walks the execution's scope chain. A value that is not a module name is read as an api name. Resolved per invocation; empty = no api requirements. */ + requiredModules?: string[]; /** Embedded secret requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. */ requiredSecrets?: ResourceRequirementInput[]; /** Container resource requests and limits: {requests: {memory, cpu}, limits: {memory, cpu}} */ @@ -11234,6 +11356,8 @@ export interface FunctionDeploymentInput { lastErrorAt?: string; /** Target namespace for this deployment (maps to a K8s namespace) */ namespaceId: string; + /** Config/secret realm this deployment resolves required keys against. Per key, the realm-specific atom wins over the NULL-realm default. NULL = the default lane (or a runtime-query worker that fetches per-item realms on demand). */ + realm?: string; /** K8s resource spec override: {"requests":{"cpu":"100m","memory":"128Mi"},"limits":{...}} */ resources?: Record; /** Deployment revision number (incremented on each redeployment) */ @@ -11704,7 +11828,7 @@ export interface PlatformFunctionCapabilityBindingInput { } /** An input for mutations affecting `PlatformFunctionDefinition` */ export interface PlatformFunctionDefinitionInput { - /** Invocation channels this function may be exposed through (api, graph, cron, sync, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. */ + /** Invocation channels this function may be exposed through (api, graph, cron, sync, page, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. */ accessChannels?: string[]; /** Whether executions are metered through the invocation ledger and billing quota gate */ billable?: boolean; @@ -11752,12 +11876,14 @@ export interface PlatformFunctionDefinitionInput { publishedAt?: string; /** Job queue name for serialization (e.g. email, ai, default) */ queueName?: string; - /** Bucket keys this function needs (e.g. uploads, exports). Empty = no bucket requirements. */ + /** Bucket keys this function needs (e.g. uploads, exports). Tenant-agnostic: each key is resolved per invocation against the tenant's buckets by {tags, type}, or by an explicit capability binding row. Empty = no bucket requirements. */ requiredBuckets?: string[]; /** Embedded config requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. */ requiredConfigs?: ResourceRequirementInput[]; /** Inference model whitelist (e.g. gpt-4o, claude-3). Empty = no model requirements. */ requiredModels?: string[]; + /** Modules whose api surfaces this function calls, e.g. notifications_module. Suffix . to name which surface when a module's schemas are attached to several (permissions_module.admin), and @ to pin the registration when a module is registered at more than one scope (limits_module@org) — usually unnecessary, since resolution walks the execution's scope chain. A value that is not a module name is read as an api name. Resolved per invocation; empty = no api requirements. */ + requiredModules?: string[]; /** Embedded secret requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. */ requiredSecrets?: ResourceRequirementInput[]; /** Container resource requests and limits: {requests: {memory, cpu}, limits: {memory, cpu}} */ @@ -11804,6 +11930,8 @@ export interface PlatformFunctionDeploymentInput { lastErrorAt?: string; /** Target namespace for this deployment (maps to a K8s namespace) */ namespaceId: string; + /** Config/secret realm this deployment resolves required keys against. Per key, the realm-specific atom wins over the NULL-realm default. NULL = the default lane (or a runtime-query worker that fetches per-item realms on demand). */ + realm?: string; /** K8s resource spec override: {"requests":{"cpu":"100m","memory":"128Mi"},"limits":{...}} */ resources?: Record; /** Deployment revision number (incremented on each redeployment) */ @@ -12841,6 +12969,8 @@ export interface PlatformFunctionDefinitionFilter { requiredBuckets?: StringListFilter; /** Filter by the object’s `requiredModels` field. */ requiredModels?: StringListFilter; + /** Filter by the object’s `requiredModules` field. */ + requiredModules?: StringListFilter; /** Filter by the object’s `resources` field. */ resources?: JSONFilter; /** Filter by the object’s `runtime` field. */ @@ -12900,6 +13030,8 @@ export interface FunctionDeploymentFilter { not?: FunctionDeploymentFilter; /** Checks for any expressions in this list. */ or?: FunctionDeploymentFilter[]; + /** Filter by the object’s `realm` field. */ + realm?: StringFilter; /** Filter by the object’s `resources` field. */ resources?: JSONFilter; /** Filter by the object’s `revision` field. */ @@ -13282,6 +13414,8 @@ export interface PlatformFunctionDeploymentFilter { not?: PlatformFunctionDeploymentFilter; /** Checks for any expressions in this list. */ or?: PlatformFunctionDeploymentFilter[]; + /** Filter by the object’s `realm` field. */ + realm?: StringFilter; /** Filter by the object’s `resources` field. */ resources?: JSONFilter; /** Filter by the object’s `revision` field. */ @@ -13882,6 +14016,8 @@ export interface FunctionDefinitionFilter { requiredBuckets?: StringListFilter; /** Filter by the object’s `requiredModels` field. */ requiredModels?: StringListFilter; + /** Filter by the object’s `requiredModules` field. */ + requiredModules?: StringListFilter; /** Filter by the object’s `resources` field. */ resources?: JSONFilter; /** Filter by the object’s `runtime` field. */ @@ -14189,6 +14325,28 @@ export type InfraInsertNodeAtPathPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface InfraInsertNodesAtPathsPayload { + clientMutationId?: string | null; + result?: string | null; +} +export type InfraInsertNodesAtPathsPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; +export interface InfraSetAndCommitPayload { + clientMutationId?: string | null; + infraCommitEdge?: InfraCommitEdge | null; + result?: InfraCommit | null; +} +export type InfraSetAndCommitPayloadSelect = { + clientMutationId?: boolean; + infraCommitEdge?: { + select: InfraCommitEdgeSelect; + }; + result?: { + select: InfraCommitSelect; + }; +}; export interface InfraSetDataAtPathPayload { clientMutationId?: string | null; result?: string | null; @@ -14197,6 +14355,20 @@ export type InfraSetDataAtPathPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface InfraSetManyAndCommitPayload { + clientMutationId?: string | null; + infraCommitEdge?: InfraCommitEdge | null; + result?: InfraCommit | null; +} +export type InfraSetManyAndCommitPayloadSelect = { + clientMutationId?: boolean; + infraCommitEdge?: { + select: InfraCommitEdgeSelect; + }; + result?: { + select: InfraCommitSelect; + }; +}; export interface InitEmptyRepoPayload { clientMutationId?: string | null; } @@ -14211,6 +14383,14 @@ export type InsertNodeAtPathPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface InsertNodesAtPathsPayload { + clientMutationId?: string | null; + result?: string | null; +} +export type InsertNodesAtPathsPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; export interface PlatformInfraInitEmptyRepoPayload { clientMutationId?: string | null; } @@ -14225,6 +14405,28 @@ export type PlatformInfraInsertNodeAtPathPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface PlatformInfraInsertNodesAtPathsPayload { + clientMutationId?: string | null; + result?: string | null; +} +export type PlatformInfraInsertNodesAtPathsPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; +export interface PlatformInfraSetAndCommitPayload { + clientMutationId?: string | null; + platformInfraCommitEdge?: PlatformInfraCommitEdge | null; + result?: PlatformInfraCommit | null; +} +export type PlatformInfraSetAndCommitPayloadSelect = { + clientMutationId?: boolean; + platformInfraCommitEdge?: { + select: PlatformInfraCommitEdgeSelect; + }; + result?: { + select: PlatformInfraCommitSelect; + }; +}; export interface PlatformInfraSetDataAtPathPayload { clientMutationId?: string | null; result?: string | null; @@ -14233,6 +14435,20 @@ export type PlatformInfraSetDataAtPathPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface PlatformInfraSetManyAndCommitPayload { + clientMutationId?: string | null; + platformInfraCommitEdge?: PlatformInfraCommitEdge | null; + result?: PlatformInfraCommit | null; +} +export type PlatformInfraSetManyAndCommitPayloadSelect = { + clientMutationId?: boolean; + platformInfraCommitEdge?: { + select: PlatformInfraCommitEdgeSelect; + }; + result?: { + select: PlatformInfraCommitSelect; + }; +}; export interface PlatformResourceInstallationsInstallPayload { clientMutationId?: string | null; result?: string | null; @@ -14315,6 +14531,20 @@ export type SaveGraphPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface SetAndCommitPayload { + clientMutationId?: string | null; + functionGraphCommitEdge?: FunctionGraphCommitEdge | null; + result?: FunctionGraphCommit | null; +} +export type SetAndCommitPayloadSelect = { + clientMutationId?: boolean; + functionGraphCommitEdge?: { + select: FunctionGraphCommitEdgeSelect; + }; + result?: { + select: FunctionGraphCommitSelect; + }; +}; export interface SetDataAtPathPayload { clientMutationId?: string | null; result?: string | null; @@ -14323,6 +14553,20 @@ export type SetDataAtPathPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface SetManyAndCommitPayload { + clientMutationId?: string | null; + functionGraphCommitEdge?: FunctionGraphCommitEdge | null; + result?: FunctionGraphCommit | null; +} +export type SetManyAndCommitPayloadSelect = { + clientMutationId?: boolean; + functionGraphCommitEdge?: { + select: FunctionGraphCommitEdgeSelect; + }; + result?: { + select: FunctionGraphCommitSelect; + }; +}; export interface StartExecutionPayload { clientMutationId?: string | null; result?: string | null; @@ -16852,6 +17096,42 @@ export type DeleteWebhookEventPayloadSelect = { select: WebhookEventEdgeSelect; }; }; +/** A `InfraCommit` edge in the connection. */ +export interface InfraCommitEdge { + cursor?: string | null; + /** The `InfraCommit` at the end of the edge. */ + node?: InfraCommit | null; +} +export type InfraCommitEdgeSelect = { + cursor?: boolean; + node?: { + select: InfraCommitSelect; + }; +}; +/** A `PlatformInfraCommit` edge in the connection. */ +export interface PlatformInfraCommitEdge { + cursor?: string | null; + /** The `PlatformInfraCommit` at the end of the edge. */ + node?: PlatformInfraCommit | null; +} +export type PlatformInfraCommitEdgeSelect = { + cursor?: boolean; + node?: { + select: PlatformInfraCommitSelect; + }; +}; +/** A `FunctionGraphCommit` edge in the connection. */ +export interface FunctionGraphCommitEdge { + cursor?: string | null; + /** The `FunctionGraphCommit` at the end of the edge. */ + node?: FunctionGraphCommit | null; +} +export type FunctionGraphCommitEdgeSelect = { + cursor?: boolean; + node?: { + select: FunctionGraphCommitSelect; + }; +}; /** A `DbPreset` edge in the connection. */ export interface DbPresetEdge { cursor?: string | null; @@ -16936,18 +17216,6 @@ export type FunctionExecutionLogEdgeSelect = { select: FunctionExecutionLogSelect; }; }; -/** A `FunctionGraphCommit` edge in the connection. */ -export interface FunctionGraphCommitEdge { - cursor?: string | null; - /** The `FunctionGraphCommit` at the end of the edge. */ - node?: FunctionGraphCommit | null; -} -export type FunctionGraphCommitEdgeSelect = { - cursor?: boolean; - node?: { - select: FunctionGraphCommitSelect; - }; -}; /** A `FunctionGraph` edge in the connection. */ export interface FunctionGraphEdge { cursor?: string | null; @@ -17056,18 +17324,6 @@ export type FunctionInvocationEdgeSelect = { select: FunctionInvocationSelect; }; }; -/** A `InfraCommit` edge in the connection. */ -export interface InfraCommitEdge { - cursor?: string | null; - /** The `InfraCommit` at the end of the edge. */ - node?: InfraCommit | null; -} -export type InfraCommitEdgeSelect = { - cursor?: boolean; - node?: { - select: InfraCommitSelect; - }; -}; /** A `InfraObject` edge in the connection. */ export interface InfraObjectEdge { cursor?: string | null; @@ -17236,18 +17492,6 @@ export type PlatformFunctionInvocationEdgeSelect = { select: PlatformFunctionInvocationSelect; }; }; -/** A `PlatformInfraCommit` edge in the connection. */ -export interface PlatformInfraCommitEdge { - cursor?: string | null; - /** The `PlatformInfraCommit` at the end of the edge. */ - node?: PlatformInfraCommit | null; -} -export type PlatformInfraCommitEdgeSelect = { - cursor?: boolean; - node?: { - select: PlatformInfraCommitSelect; - }; -}; /** A `PlatformInfraObject` edge in the connection. */ export interface PlatformInfraObjectEdge { cursor?: string | null; diff --git a/sdk/constructive-react/src/compute/orm/mutation/index.ts b/sdk/constructive-react/src/compute/orm/mutation/index.ts index c5bc975047..948d1e8903 100644 --- a/sdk/constructive-react/src/compute/orm/mutation/index.ts +++ b/sdk/constructive-react/src/compute/orm/mutation/index.ts @@ -16,12 +16,19 @@ import type { ImportGraphJsonInput, InfraInitEmptyRepoInput, InfraInsertNodeAtPathInput, + InfraInsertNodesAtPathsInput, + InfraSetAndCommitInput, InfraSetDataAtPathInput, + InfraSetManyAndCommitInput, InitEmptyRepoInput, InsertNodeAtPathInput, + InsertNodesAtPathsInput, PlatformInfraInitEmptyRepoInput, PlatformInfraInsertNodeAtPathInput, + PlatformInfraInsertNodesAtPathsInput, + PlatformInfraSetAndCommitInput, PlatformInfraSetDataAtPathInput, + PlatformInfraSetManyAndCommitInput, PlatformResourceInstallationsInstallInput, PlatformResourceInstallationsRollbackInput, PlatformResourceInstallationsUninstallInput, @@ -32,7 +39,9 @@ import type { ResourceInstallationsUninstallInput, ResourceInstallationsUpgradeInput, SaveGraphInput, + SetAndCommitInput, SetDataAtPathInput, + SetManyAndCommitInput, StartExecutionInput, ValidateFunctionGraphInput, AddEdgePayload, @@ -44,12 +53,19 @@ import type { ImportGraphJsonPayload, InfraInitEmptyRepoPayload, InfraInsertNodeAtPathPayload, + InfraInsertNodesAtPathsPayload, + InfraSetAndCommitPayload, InfraSetDataAtPathPayload, + InfraSetManyAndCommitPayload, InitEmptyRepoPayload, InsertNodeAtPathPayload, + InsertNodesAtPathsPayload, PlatformInfraInitEmptyRepoPayload, PlatformInfraInsertNodeAtPathPayload, + PlatformInfraInsertNodesAtPathsPayload, + PlatformInfraSetAndCommitPayload, PlatformInfraSetDataAtPathPayload, + PlatformInfraSetManyAndCommitPayload, PlatformResourceInstallationsInstallPayload, PlatformResourceInstallationsRollbackPayload, PlatformResourceInstallationsUninstallPayload, @@ -60,7 +76,9 @@ import type { ResourceInstallationsUninstallPayload, ResourceInstallationsUpgradePayload, SaveGraphPayload, + SetAndCommitPayload, SetDataAtPathPayload, + SetManyAndCommitPayload, StartExecutionPayload, ValidateFunctionGraphPayload, AddEdgePayloadSelect, @@ -72,12 +90,19 @@ import type { ImportGraphJsonPayloadSelect, InfraInitEmptyRepoPayloadSelect, InfraInsertNodeAtPathPayloadSelect, + InfraInsertNodesAtPathsPayloadSelect, + InfraSetAndCommitPayloadSelect, InfraSetDataAtPathPayloadSelect, + InfraSetManyAndCommitPayloadSelect, InitEmptyRepoPayloadSelect, InsertNodeAtPathPayloadSelect, + InsertNodesAtPathsPayloadSelect, PlatformInfraInitEmptyRepoPayloadSelect, PlatformInfraInsertNodeAtPathPayloadSelect, + PlatformInfraInsertNodesAtPathsPayloadSelect, + PlatformInfraSetAndCommitPayloadSelect, PlatformInfraSetDataAtPathPayloadSelect, + PlatformInfraSetManyAndCommitPayloadSelect, PlatformResourceInstallationsInstallPayloadSelect, PlatformResourceInstallationsRollbackPayloadSelect, PlatformResourceInstallationsUninstallPayloadSelect, @@ -88,7 +113,9 @@ import type { ResourceInstallationsUninstallPayloadSelect, ResourceInstallationsUpgradePayloadSelect, SaveGraphPayloadSelect, + SetAndCommitPayloadSelect, SetDataAtPathPayloadSelect, + SetManyAndCommitPayloadSelect, StartExecutionPayloadSelect, ValidateFunctionGraphPayloadSelect, } from '../input-types'; @@ -120,24 +147,45 @@ export interface InfraInitEmptyRepoVariables { export interface InfraInsertNodeAtPathVariables { input: InfraInsertNodeAtPathInput; } +export interface InfraInsertNodesAtPathsVariables { + input: InfraInsertNodesAtPathsInput; +} +export interface InfraSetAndCommitVariables { + input: InfraSetAndCommitInput; +} export interface InfraSetDataAtPathVariables { input: InfraSetDataAtPathInput; } +export interface InfraSetManyAndCommitVariables { + input: InfraSetManyAndCommitInput; +} export interface InitEmptyRepoVariables { input: InitEmptyRepoInput; } export interface InsertNodeAtPathVariables { input: InsertNodeAtPathInput; } +export interface InsertNodesAtPathsVariables { + input: InsertNodesAtPathsInput; +} export interface PlatformInfraInitEmptyRepoVariables { input: PlatformInfraInitEmptyRepoInput; } export interface PlatformInfraInsertNodeAtPathVariables { input: PlatformInfraInsertNodeAtPathInput; } +export interface PlatformInfraInsertNodesAtPathsVariables { + input: PlatformInfraInsertNodesAtPathsInput; +} +export interface PlatformInfraSetAndCommitVariables { + input: PlatformInfraSetAndCommitInput; +} export interface PlatformInfraSetDataAtPathVariables { input: PlatformInfraSetDataAtPathInput; } +export interface PlatformInfraSetManyAndCommitVariables { + input: PlatformInfraSetManyAndCommitInput; +} export interface PlatformResourceInstallationsInstallVariables { input: PlatformResourceInstallationsInstallInput; } @@ -175,9 +223,15 @@ export interface ResourceInstallationsUpgradeVariables { export interface SaveGraphVariables { input: SaveGraphInput; } +export interface SetAndCommitVariables { + input: SetAndCommitInput; +} export interface SetDataAtPathVariables { input: SetDataAtPathInput; } +export interface SetManyAndCommitVariables { + input: SetManyAndCommitInput; +} export interface StartExecutionVariables { input: StartExecutionInput; } @@ -447,6 +501,64 @@ export function createMutationOperations(client: OrmClient) { 'InfraInsertNodeAtPathPayload' ), }), + infraInsertNodesAtPaths: ( + args: InfraInsertNodesAtPathsVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + infraInsertNodesAtPaths: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'InfraInsertNodesAtPaths', + fieldName: 'infraInsertNodesAtPaths', + ...buildCustomDocument( + 'mutation', + 'InfraInsertNodesAtPaths', + 'infraInsertNodesAtPaths', + options.select, + args, + [ + { + name: 'input', + type: 'InfraInsertNodesAtPathsInput!', + }, + ], + connectionFieldsMap, + 'InfraInsertNodesAtPathsPayload' + ), + }), + infraSetAndCommit: ( + args: InfraSetAndCommitVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + infraSetAndCommit: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'InfraSetAndCommit', + fieldName: 'infraSetAndCommit', + ...buildCustomDocument( + 'mutation', + 'InfraSetAndCommit', + 'infraSetAndCommit', + options.select, + args, + [ + { + name: 'input', + type: 'InfraSetAndCommitInput!', + }, + ], + connectionFieldsMap, + 'InfraSetAndCommitPayload' + ), + }), infraSetDataAtPath: ( args: InfraSetDataAtPathVariables, options: { @@ -476,6 +588,35 @@ export function createMutationOperations(client: OrmClient) { 'InfraSetDataAtPathPayload' ), }), + infraSetManyAndCommit: ( + args: InfraSetManyAndCommitVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + infraSetManyAndCommit: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'InfraSetManyAndCommit', + fieldName: 'infraSetManyAndCommit', + ...buildCustomDocument( + 'mutation', + 'InfraSetManyAndCommit', + 'infraSetManyAndCommit', + options.select, + args, + [ + { + name: 'input', + type: 'InfraSetManyAndCommitInput!', + }, + ], + connectionFieldsMap, + 'InfraSetManyAndCommitPayload' + ), + }), initEmptyRepo: ( args: InitEmptyRepoVariables, options: { @@ -534,6 +675,35 @@ export function createMutationOperations(client: OrmClient) { 'InsertNodeAtPathPayload' ), }), + insertNodesAtPaths: ( + args: InsertNodesAtPathsVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + insertNodesAtPaths: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'InsertNodesAtPaths', + fieldName: 'insertNodesAtPaths', + ...buildCustomDocument( + 'mutation', + 'InsertNodesAtPaths', + 'insertNodesAtPaths', + options.select, + args, + [ + { + name: 'input', + type: 'InsertNodesAtPathsInput!', + }, + ], + connectionFieldsMap, + 'InsertNodesAtPathsPayload' + ), + }), platformInfraInitEmptyRepo: ( args: PlatformInfraInitEmptyRepoVariables, options: { @@ -595,6 +765,67 @@ export function createMutationOperations(client: OrmClient) { 'PlatformInfraInsertNodeAtPathPayload' ), }), + platformInfraInsertNodesAtPaths: ( + args: PlatformInfraInsertNodesAtPathsVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + platformInfraInsertNodesAtPaths: InferSelectResult< + PlatformInfraInsertNodesAtPathsPayload, + S + > | null; + }>({ + client, + operation: 'mutation', + operationName: 'PlatformInfraInsertNodesAtPaths', + fieldName: 'platformInfraInsertNodesAtPaths', + ...buildCustomDocument( + 'mutation', + 'PlatformInfraInsertNodesAtPaths', + 'platformInfraInsertNodesAtPaths', + options.select, + args, + [ + { + name: 'input', + type: 'PlatformInfraInsertNodesAtPathsInput!', + }, + ], + connectionFieldsMap, + 'PlatformInfraInsertNodesAtPathsPayload' + ), + }), + platformInfraSetAndCommit: ( + args: PlatformInfraSetAndCommitVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + platformInfraSetAndCommit: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'PlatformInfraSetAndCommit', + fieldName: 'platformInfraSetAndCommit', + ...buildCustomDocument( + 'mutation', + 'PlatformInfraSetAndCommit', + 'platformInfraSetAndCommit', + options.select, + args, + [ + { + name: 'input', + type: 'PlatformInfraSetAndCommitInput!', + }, + ], + connectionFieldsMap, + 'PlatformInfraSetAndCommitPayload' + ), + }), platformInfraSetDataAtPath: ( args: PlatformInfraSetDataAtPathVariables, options: { @@ -624,6 +855,38 @@ export function createMutationOperations(client: OrmClient) { 'PlatformInfraSetDataAtPathPayload' ), }), + platformInfraSetManyAndCommit: ( + args: PlatformInfraSetManyAndCommitVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + platformInfraSetManyAndCommit: InferSelectResult< + PlatformInfraSetManyAndCommitPayload, + S + > | null; + }>({ + client, + operation: 'mutation', + operationName: 'PlatformInfraSetManyAndCommit', + fieldName: 'platformInfraSetManyAndCommit', + ...buildCustomDocument( + 'mutation', + 'PlatformInfraSetManyAndCommit', + 'platformInfraSetManyAndCommit', + options.select, + args, + [ + { + name: 'input', + type: 'PlatformInfraSetManyAndCommitInput!', + }, + ], + connectionFieldsMap, + 'PlatformInfraSetManyAndCommitPayload' + ), + }), platformResourceInstallationsInstall: < S extends PlatformResourceInstallationsInstallPayloadSelect, >( @@ -946,6 +1209,35 @@ export function createMutationOperations(client: OrmClient) { 'SaveGraphPayload' ), }), + setAndCommit: ( + args: SetAndCommitVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + setAndCommit: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'SetAndCommit', + fieldName: 'setAndCommit', + ...buildCustomDocument( + 'mutation', + 'SetAndCommit', + 'setAndCommit', + options.select, + args, + [ + { + name: 'input', + type: 'SetAndCommitInput!', + }, + ], + connectionFieldsMap, + 'SetAndCommitPayload' + ), + }), setDataAtPath: ( args: SetDataAtPathVariables, options: { @@ -975,6 +1267,35 @@ export function createMutationOperations(client: OrmClient) { 'SetDataAtPathPayload' ), }), + setManyAndCommit: ( + args: SetManyAndCommitVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + setManyAndCommit: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'SetManyAndCommit', + fieldName: 'setManyAndCommit', + ...buildCustomDocument( + 'mutation', + 'SetManyAndCommit', + 'setManyAndCommit', + options.select, + args, + [ + { + name: 'input', + type: 'SetManyAndCommitInput!', + }, + ], + connectionFieldsMap, + 'SetManyAndCommitPayload' + ), + }), startExecution: ( args: StartExecutionVariables, options: { diff --git a/sdk/constructive-react/src/compute/schema-types.ts b/sdk/constructive-react/src/compute/schema-types.ts index 0bf71d7986..fc023b79ac 100644 --- a/sdk/constructive-react/src/compute/schema-types.ts +++ b/sdk/constructive-react/src/compute/schema-types.ts @@ -234,6 +234,8 @@ export type FunctionDefinitionOrderBy = | 'REQUIRED_CONFIGS_DESC' | 'REQUIRED_MODELS_ASC' | 'REQUIRED_MODELS_DESC' + | 'REQUIRED_MODULES_ASC' + | 'REQUIRED_MODULES_DESC' | 'REQUIRED_SECRETS_ASC' | 'REQUIRED_SECRETS_DESC' | 'RESOURCES_ASC' @@ -308,6 +310,8 @@ export type FunctionDeploymentOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' + | 'REALM_ASC' + | 'REALM_DESC' | 'RESOURCES_ASC' | 'RESOURCES_DESC' | 'REVISION_ASC' @@ -905,6 +909,8 @@ export type PlatformFunctionDefinitionOrderBy = | 'REQUIRED_CONFIGS_DESC' | 'REQUIRED_MODELS_ASC' | 'REQUIRED_MODELS_DESC' + | 'REQUIRED_MODULES_ASC' + | 'REQUIRED_MODULES_DESC' | 'REQUIRED_SECRETS_ASC' | 'REQUIRED_SECRETS_DESC' | 'RESOURCES_ASC' @@ -977,6 +983,8 @@ export type PlatformFunctionDeploymentOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' + | 'REALM_ASC' + | 'REALM_DESC' | 'RESOURCES_ASC' | 'RESOURCES_DESC' | 'REVISION_ASC' @@ -3139,6 +3147,8 @@ export interface FunctionDefinitionFilter { requiredBuckets?: StringListFilter; /** Filter by the object’s `requiredModels` field. */ requiredModels?: StringListFilter; + /** Filter by the object’s `requiredModules` field. */ + requiredModules?: StringListFilter; /** Filter by the object’s `resources` field. */ resources?: JSONFilter; /** Filter by the object’s `runtime` field. */ @@ -3166,7 +3176,7 @@ export interface FunctionDefinitionFilter { } /** An input for mutations affecting `FunctionDefinition` */ export interface FunctionDefinitionInput { - /** Invocation channels this function may be exposed through (api, graph, cron, sync, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. */ + /** Invocation channels this function may be exposed through (api, graph, cron, sync, page, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. */ accessChannels?: string[]; /** Function task category (e.g. email, embed, chunk, custom) */ category: string; @@ -3214,12 +3224,14 @@ export interface FunctionDefinitionInput { publishedAt?: string; /** Job queue name for serialization (e.g. email, ai, default) */ queueName?: string; - /** Bucket keys this function needs (e.g. uploads, exports). Empty = no bucket requirements. */ + /** Bucket keys this function needs (e.g. uploads, exports). Tenant-agnostic: each key is resolved per invocation against the tenant's buckets by {tags, type}, or by an explicit capability binding row. Empty = no bucket requirements. */ requiredBuckets?: string[]; /** Embedded config requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. */ requiredConfigs?: ResourceRequirementInput[]; /** Inference model whitelist (e.g. gpt-4o, claude-3). Empty = no model requirements. */ requiredModels?: string[]; + /** Modules whose api surfaces this function calls, e.g. notifications_module. Suffix . to name which surface when a module's schemas are attached to several (permissions_module.admin), and @ to pin the registration when a module is registered at more than one scope (limits_module@org) — usually unnecessary, since resolution walks the execution's scope chain. A value that is not a module name is read as an api name. Resolved per invocation; empty = no api requirements. */ + requiredModules?: string[]; /** Embedded secret requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. */ requiredSecrets?: ResourceRequirementInput[]; /** Container resource requests and limits: {requests: {memory, cpu}, limits: {memory, cpu}} */ @@ -3242,7 +3254,7 @@ export interface FunctionDefinitionInput { } /** Represents an update to a `FunctionDefinition`. Fields that are set will be updated. */ export interface FunctionDefinitionPatch { - /** Invocation channels this function may be exposed through (api, graph, cron, sync, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. */ + /** Invocation channels this function may be exposed through (api, graph, cron, sync, page, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. */ accessChannels?: string[]; /** Function task category (e.g. email, embed, chunk, custom) */ category?: string; @@ -3290,12 +3302,14 @@ export interface FunctionDefinitionPatch { publishedAt?: string; /** Job queue name for serialization (e.g. email, ai, default) */ queueName?: string; - /** Bucket keys this function needs (e.g. uploads, exports). Empty = no bucket requirements. */ + /** Bucket keys this function needs (e.g. uploads, exports). Tenant-agnostic: each key is resolved per invocation against the tenant's buckets by {tags, type}, or by an explicit capability binding row. Empty = no bucket requirements. */ requiredBuckets?: string[]; /** Embedded config requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. */ requiredConfigs?: ResourceRequirementInput[]; /** Inference model whitelist (e.g. gpt-4o, claude-3). Empty = no model requirements. */ requiredModels?: string[]; + /** Modules whose api surfaces this function calls, e.g. notifications_module. Suffix . to name which surface when a module's schemas are attached to several (permissions_module.admin), and @ to pin the registration when a module is registered at more than one scope (limits_module@org) — usually unnecessary, since resolution walks the execution's scope chain. A value that is not a module name is read as an api name. Resolved per invocation; empty = no api requirements. */ + requiredModules?: string[]; /** Embedded secret requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. */ requiredSecrets?: ResourceRequirementInput[]; /** Container resource requests and limits: {requests: {memory, cpu}, limits: {memory, cpu}} */ @@ -3442,6 +3456,8 @@ export interface FunctionDeploymentFilter { not?: FunctionDeploymentFilter; /** Checks for any expressions in this list. */ or?: FunctionDeploymentFilter[]; + /** Filter by the object’s `realm` field. */ + realm?: StringFilter; /** Filter by the object’s `resources` field. */ resources?: JSONFilter; /** Filter by the object’s `revision` field. */ @@ -3487,6 +3503,8 @@ export interface FunctionDeploymentInput { lastErrorAt?: string; /** Target namespace for this deployment (maps to a K8s namespace) */ namespaceId: string; + /** Config/secret realm this deployment resolves required keys against. Per key, the realm-specific atom wins over the NULL-realm default. NULL = the default lane (or a runtime-query worker that fetches per-item realms on demand). */ + realm?: string; /** K8s resource spec override: {"requests":{"cpu":"100m","memory":"128Mi"},"limits":{...}} */ resources?: unknown; /** Deployment revision number (incremented on each redeployment) */ @@ -3531,6 +3549,8 @@ export interface FunctionDeploymentPatch { lastErrorAt?: string; /** Target namespace for this deployment (maps to a K8s namespace) */ namespaceId?: string; + /** Config/secret realm this deployment resolves required keys against. Per key, the realm-specific atom wins over the NULL-realm default. NULL = the default lane (or a runtime-query worker that fetches per-item realms on demand). */ + realm?: string; /** K8s resource spec override: {"requests":{"cpu":"100m","memory":"128Mi"},"limits":{...}} */ resources?: unknown; /** Deployment revision number (incremented on each redeployment) */ @@ -4605,6 +4625,15 @@ export interface InfraInsertNodeAtPathInput { root?: string; sId?: string; } +export interface InfraInsertNodesAtPathsInput { + clientMutationId?: string; + datas?: unknown[]; + kidsList?: unknown; + ktreeList?: unknown; + paths?: unknown; + root?: string; + sId?: string; +} /** A filter to be used against `InfraObject` object types. All fields are combined with a logical ‘and.’ */ export interface InfraObjectFilter { /** Checks for all expressions in this list. */ @@ -4701,6 +4730,17 @@ export interface InfraRefPatch { /** Store this ref belongs to */ storeId?: string; } +export interface InfraSetAndCommitInput { + clientMutationId?: string; + data?: unknown; + kids?: string[]; + ktree?: string[]; + message?: string; + path?: string[]; + refname?: string; + sId?: string; + storeId?: string; +} export interface InfraSetDataAtPathInput { clientMutationId?: string; data?: unknown; @@ -4708,6 +4748,14 @@ export interface InfraSetDataAtPathInput { root?: string; sId?: string; } +export interface InfraSetManyAndCommitInput { + clientMutationId?: string; + entries?: unknown; + message?: string; + refname?: string; + sId?: string; + storeId?: string; +} /** A filter to be used against `InfraStore` object types. All fields are combined with a logical ‘and.’ */ export interface InfraStoreFilter { /** Checks for all expressions in this list. */ @@ -4767,6 +4815,15 @@ export interface InsertNodeAtPathInput { root?: string; sId?: string; } +export interface InsertNodesAtPathsInput { + clientMutationId?: string; + datas?: unknown[]; + kidsList?: unknown; + ktreeList?: unknown; + paths?: unknown; + root?: string; + sId?: string; +} /** A filter to be used against `IntegrationProvider` object types. All fields are combined with a logical ‘and.’ */ export interface IntegrationProviderFilter { /** Checks for all expressions in this list. */ @@ -5324,6 +5381,8 @@ export interface PlatformFunctionDefinitionFilter { requiredBuckets?: StringListFilter; /** Filter by the object’s `requiredModels` field. */ requiredModels?: StringListFilter; + /** Filter by the object’s `requiredModules` field. */ + requiredModules?: StringListFilter; /** Filter by the object’s `resources` field. */ resources?: JSONFilter; /** Filter by the object’s `runtime` field. */ @@ -5349,7 +5408,7 @@ export interface PlatformFunctionDefinitionFilter { } /** An input for mutations affecting `PlatformFunctionDefinition` */ export interface PlatformFunctionDefinitionInput { - /** Invocation channels this function may be exposed through (api, graph, cron, sync, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. */ + /** Invocation channels this function may be exposed through (api, graph, cron, sync, page, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. */ accessChannels?: string[]; /** Whether executions are metered through the invocation ledger and billing quota gate */ billable?: boolean; @@ -5397,12 +5456,14 @@ export interface PlatformFunctionDefinitionInput { publishedAt?: string; /** Job queue name for serialization (e.g. email, ai, default) */ queueName?: string; - /** Bucket keys this function needs (e.g. uploads, exports). Empty = no bucket requirements. */ + /** Bucket keys this function needs (e.g. uploads, exports). Tenant-agnostic: each key is resolved per invocation against the tenant's buckets by {tags, type}, or by an explicit capability binding row. Empty = no bucket requirements. */ requiredBuckets?: string[]; /** Embedded config requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. */ requiredConfigs?: ResourceRequirementInput[]; /** Inference model whitelist (e.g. gpt-4o, claude-3). Empty = no model requirements. */ requiredModels?: string[]; + /** Modules whose api surfaces this function calls, e.g. notifications_module. Suffix . to name which surface when a module's schemas are attached to several (permissions_module.admin), and @ to pin the registration when a module is registered at more than one scope (limits_module@org) — usually unnecessary, since resolution walks the execution's scope chain. A value that is not a module name is read as an api name. Resolved per invocation; empty = no api requirements. */ + requiredModules?: string[]; /** Embedded secret requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. */ requiredSecrets?: ResourceRequirementInput[]; /** Container resource requests and limits: {requests: {memory, cpu}, limits: {memory, cpu}} */ @@ -5427,7 +5488,7 @@ export interface PlatformFunctionDefinitionInput { } /** Represents an update to a `PlatformFunctionDefinition`. Fields that are set will be updated. */ export interface PlatformFunctionDefinitionPatch { - /** Invocation channels this function may be exposed through (api, graph, cron, sync, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. */ + /** Invocation channels this function may be exposed through (api, graph, cron, sync, page, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. */ accessChannels?: string[]; /** Whether executions are metered through the invocation ledger and billing quota gate */ billable?: boolean; @@ -5475,12 +5536,14 @@ export interface PlatformFunctionDefinitionPatch { publishedAt?: string; /** Job queue name for serialization (e.g. email, ai, default) */ queueName?: string; - /** Bucket keys this function needs (e.g. uploads, exports). Empty = no bucket requirements. */ + /** Bucket keys this function needs (e.g. uploads, exports). Tenant-agnostic: each key is resolved per invocation against the tenant's buckets by {tags, type}, or by an explicit capability binding row. Empty = no bucket requirements. */ requiredBuckets?: string[]; /** Embedded config requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. */ requiredConfigs?: ResourceRequirementInput[]; /** Inference model whitelist (e.g. gpt-4o, claude-3). Empty = no model requirements. */ requiredModels?: string[]; + /** Modules whose api surfaces this function calls, e.g. notifications_module. Suffix . to name which surface when a module's schemas are attached to several (permissions_module.admin), and @ to pin the registration when a module is registered at more than one scope (limits_module@org) — usually unnecessary, since resolution walks the execution's scope chain. A value that is not a module name is read as an api name. Resolved per invocation; empty = no api requirements. */ + requiredModules?: string[]; /** Embedded secret requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. */ requiredSecrets?: ResourceRequirementInput[]; /** Container resource requests and limits: {requests: {memory, cpu}, limits: {memory, cpu}} */ @@ -5621,6 +5684,8 @@ export interface PlatformFunctionDeploymentFilter { not?: PlatformFunctionDeploymentFilter; /** Checks for any expressions in this list. */ or?: PlatformFunctionDeploymentFilter[]; + /** Filter by the object’s `realm` field. */ + realm?: StringFilter; /** Filter by the object’s `resources` field. */ resources?: JSONFilter; /** Filter by the object’s `revision` field. */ @@ -5664,6 +5729,8 @@ export interface PlatformFunctionDeploymentInput { lastErrorAt?: string; /** Target namespace for this deployment (maps to a K8s namespace) */ namespaceId: string; + /** Config/secret realm this deployment resolves required keys against. Per key, the realm-specific atom wins over the NULL-realm default. NULL = the default lane (or a runtime-query worker that fetches per-item realms on demand). */ + realm?: string; /** K8s resource spec override: {"requests":{"cpu":"100m","memory":"128Mi"},"limits":{...}} */ resources?: unknown; /** Deployment revision number (incremented on each redeployment) */ @@ -5706,6 +5773,8 @@ export interface PlatformFunctionDeploymentPatch { lastErrorAt?: string; /** Target namespace for this deployment (maps to a K8s namespace) */ namespaceId?: string; + /** Config/secret realm this deployment resolves required keys against. Per key, the realm-specific atom wins over the NULL-realm default. NULL = the default lane (or a runtime-query worker that fetches per-item realms on demand). */ + realm?: string; /** K8s resource spec override: {"requests":{"cpu":"100m","memory":"128Mi"},"limits":{...}} */ resources?: unknown; /** Deployment revision number (incremented on each redeployment) */ @@ -6096,6 +6165,15 @@ export interface PlatformInfraInsertNodeAtPathInput { root?: string; sId?: string; } +export interface PlatformInfraInsertNodesAtPathsInput { + clientMutationId?: string; + datas?: unknown[]; + kidsList?: unknown; + ktreeList?: unknown; + paths?: unknown; + root?: string; + sId?: string; +} /** A filter to be used against `PlatformInfraObject` object types. All fields are combined with a logical ‘and.’ */ export interface PlatformInfraObjectFilter { /** Checks for all expressions in this list. */ @@ -6192,6 +6270,17 @@ export interface PlatformInfraRefPatch { /** Store this ref belongs to */ storeId?: string; } +export interface PlatformInfraSetAndCommitInput { + clientMutationId?: string; + data?: unknown; + kids?: string[]; + ktree?: string[]; + message?: string; + path?: string[]; + refname?: string; + sId?: string; + storeId?: string; +} export interface PlatformInfraSetDataAtPathInput { clientMutationId?: string; data?: unknown; @@ -6199,6 +6288,14 @@ export interface PlatformInfraSetDataAtPathInput { root?: string; sId?: string; } +export interface PlatformInfraSetManyAndCommitInput { + clientMutationId?: string; + entries?: unknown; + message?: string; + refname?: string; + sId?: string; + storeId?: string; +} /** A filter to be used against `PlatformInfraStore` object types. All fields are combined with a logical ‘and.’ */ export interface PlatformInfraStoreFilter { /** Checks for all expressions in this list. */ @@ -8449,6 +8546,17 @@ export interface SaveGraphInput { message?: string; rootHash?: string; } +export interface SetAndCommitInput { + clientMutationId?: string; + data?: unknown; + kids?: string[]; + ktree?: string[]; + message?: string; + path?: string[]; + refname?: string; + sId?: string; + storeId?: string; +} export interface SetDataAtPathInput { clientMutationId?: string; data?: unknown; @@ -8456,6 +8564,14 @@ export interface SetDataAtPathInput { root?: string; sId?: string; } +export interface SetManyAndCommitInput { + clientMutationId?: string; + entries?: unknown; + message?: string; + refname?: string; + sId?: string; + storeId?: string; +} export interface StartExecutionInput { clientMutationId?: string; graphId?: string; @@ -10286,10 +10402,24 @@ export interface InfraInsertNodeAtPathPayload { clientMutationId?: string | null; result?: string | null; } +export interface InfraInsertNodesAtPathsPayload { + clientMutationId?: string | null; + result?: string | null; +} +export interface InfraSetAndCommitPayload { + clientMutationId?: string | null; + infraCommitEdge?: InfraCommitEdge | null; + result?: InfraCommit | null; +} export interface InfraSetDataAtPathPayload { clientMutationId?: string | null; result?: string | null; } +export interface InfraSetManyAndCommitPayload { + clientMutationId?: string | null; + infraCommitEdge?: InfraCommitEdge | null; + result?: InfraCommit | null; +} export interface InitEmptyRepoPayload { clientMutationId?: string | null; } @@ -10297,6 +10427,10 @@ export interface InsertNodeAtPathPayload { clientMutationId?: string | null; result?: string | null; } +export interface InsertNodesAtPathsPayload { + clientMutationId?: string | null; + result?: string | null; +} export interface PlatformInfraInitEmptyRepoPayload { clientMutationId?: string | null; } @@ -10304,10 +10438,24 @@ export interface PlatformInfraInsertNodeAtPathPayload { clientMutationId?: string | null; result?: string | null; } +export interface PlatformInfraInsertNodesAtPathsPayload { + clientMutationId?: string | null; + result?: string | null; +} +export interface PlatformInfraSetAndCommitPayload { + clientMutationId?: string | null; + platformInfraCommitEdge?: PlatformInfraCommitEdge | null; + result?: PlatformInfraCommit | null; +} export interface PlatformInfraSetDataAtPathPayload { clientMutationId?: string | null; result?: string | null; } +export interface PlatformInfraSetManyAndCommitPayload { + clientMutationId?: string | null; + platformInfraCommitEdge?: PlatformInfraCommitEdge | null; + result?: PlatformInfraCommit | null; +} export interface PlatformResourceInstallationsInstallPayload { clientMutationId?: string | null; result?: string | null; @@ -10352,10 +10500,20 @@ export interface SaveGraphPayload { clientMutationId?: string | null; result?: string | null; } +export interface SetAndCommitPayload { + clientMutationId?: string | null; + functionGraphCommitEdge?: FunctionGraphCommitEdge | null; + result?: FunctionGraphCommit | null; +} export interface SetDataAtPathPayload { clientMutationId?: string | null; result?: string | null; } +export interface SetManyAndCommitPayload { + clientMutationId?: string | null; + functionGraphCommitEdge?: FunctionGraphCommitEdge | null; + result?: FunctionGraphCommit | null; +} export interface StartExecutionPayload { clientMutationId?: string | null; result?: string | null; diff --git a/sdk/constructive-react/src/compute/types.ts b/sdk/constructive-react/src/compute/types.ts index 808fcda5a5..b7aa7df09a 100644 --- a/sdk/constructive-react/src/compute/types.ts +++ b/sdk/constructive-react/src/compute/types.ts @@ -73,6 +73,7 @@ export interface FunctionDefinition { requiredBuckets: string[] | null; requiredConfigs: ResourceRequirement[] | null; requiredModels: string[] | null; + requiredModules: string[] | null; requiredSecrets: ResourceRequirement[] | null; resources: unknown | null; runtime: string | null; @@ -99,6 +100,7 @@ export interface FunctionDeployment { lastError: string | null; lastErrorAt: string | null; namespaceId: string | null; + realm: string | null; resources: unknown | null; revision: number | null; scaleMax: number | null; @@ -405,6 +407,7 @@ export interface PlatformFunctionDefinition { requiredBuckets: string[] | null; requiredConfigs: ResourceRequirement[] | null; requiredModels: string[] | null; + requiredModules: string[] | null; requiredSecrets: ResourceRequirement[] | null; resources: unknown | null; runtime: string | null; @@ -431,6 +434,7 @@ export interface PlatformFunctionDeployment { lastError: string | null; lastErrorAt: string | null; namespaceId: string | null; + realm: string | null; resources: unknown | null; revision: number | null; scaleMax: number | null; diff --git a/sdk/constructive-react/src/infra/README.md b/sdk/constructive-react/src/infra/README.md index efd2003c0c..fa9a9930f9 100644 --- a/sdk/constructive-react/src/infra/README.md +++ b/sdk/constructive-react/src/infra/README.md @@ -10,7 +10,7 @@ - **Tables:** 10 - **Custom queries:** 0 -- **Custom mutations:** 4 +- **Custom mutations:** 7 **Generators:** ORM, React Query diff --git a/sdk/constructive-react/src/infra/hooks/README.md b/sdk/constructive-react/src/infra/hooks/README.md index 6988f90f5b..ba67493188 100644 --- a/sdk/constructive-react/src/infra/hooks/README.md +++ b/sdk/constructive-react/src/infra/hooks/README.md @@ -81,7 +81,10 @@ function App() { | `useDeletePlatformNamespaceEventMutation` | Mutation | Namespace lifecycle events — audit log of creation, activation, deactivation, label changes | | `usePlatformInfraInitEmptyRepoMutation` | Mutation | platformInfraInitEmptyRepo | | `usePlatformInfraInsertNodeAtPathMutation` | Mutation | platformInfraInsertNodeAtPath | +| `usePlatformInfraInsertNodesAtPathsMutation` | Mutation | platformInfraInsertNodesAtPaths | +| `usePlatformInfraSetAndCommitMutation` | Mutation | platformInfraSetAndCommit | | `usePlatformInfraSetDataAtPathMutation` | Mutation | platformInfraSetDataAtPath | +| `usePlatformInfraSetManyAndCommitMutation` | Mutation | platformInfraSetManyAndCommit | | `useProvisionBucketMutation` | Mutation | Provision an S3 bucket for a logical bucket in the database. Reads the bucket config via RLS, then creates and configures the S3 bucket with the appropriate privacy policies, CORS rules, @@ -317,6 +320,28 @@ platformInfraInsertNodeAtPath |----------|------| | `input` | PlatformInfraInsertNodeAtPathInput (required) | +### `usePlatformInfraInsertNodesAtPathsMutation` + +platformInfraInsertNodesAtPaths + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | PlatformInfraInsertNodesAtPathsInput (required) | + +### `usePlatformInfraSetAndCommitMutation` + +platformInfraSetAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | PlatformInfraSetAndCommitInput (required) | + ### `usePlatformInfraSetDataAtPathMutation` platformInfraSetDataAtPath @@ -328,6 +353,17 @@ platformInfraSetDataAtPath |----------|------| | `input` | PlatformInfraSetDataAtPathInput (required) | +### `usePlatformInfraSetManyAndCommitMutation` + +platformInfraSetManyAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | PlatformInfraSetManyAndCommitInput (required) | + ### `useProvisionBucketMutation` Provision an S3 bucket for a logical bucket in the database. diff --git a/sdk/constructive-react/src/infra/hooks/mutation-keys.ts b/sdk/constructive-react/src/infra/hooks/mutation-keys.ts index 5f62de71e3..1c3537e9ef 100644 --- a/sdk/constructive-react/src/infra/hooks/mutation-keys.ts +++ b/sdk/constructive-react/src/infra/hooks/mutation-keys.ts @@ -130,12 +130,30 @@ export const customMutationKeys = { identifier ? (['mutation', 'platformInfraInsertNodeAtPath', identifier] as const) : (['mutation', 'platformInfraInsertNodeAtPath'] as const), + /** Mutation key for platformInfraInsertNodesAtPaths */ platformInfraInsertNodesAtPaths: ( + identifier?: string + ) => + identifier + ? (['mutation', 'platformInfraInsertNodesAtPaths', identifier] as const) + : (['mutation', 'platformInfraInsertNodesAtPaths'] as const), + /** Mutation key for platformInfraSetAndCommit */ platformInfraSetAndCommit: ( + identifier?: string + ) => + identifier + ? (['mutation', 'platformInfraSetAndCommit', identifier] as const) + : (['mutation', 'platformInfraSetAndCommit'] as const), /** Mutation key for platformInfraSetDataAtPath */ platformInfraSetDataAtPath: ( identifier?: string ) => identifier ? (['mutation', 'platformInfraSetDataAtPath', identifier] as const) : (['mutation', 'platformInfraSetDataAtPath'] as const), + /** Mutation key for platformInfraSetManyAndCommit */ platformInfraSetManyAndCommit: ( + identifier?: string + ) => + identifier + ? (['mutation', 'platformInfraSetManyAndCommit', identifier] as const) + : (['mutation', 'platformInfraSetManyAndCommit'] as const), /** Mutation key for provisionBucket */ provisionBucket: (identifier?: string) => identifier ? (['mutation', 'provisionBucket', identifier] as const) diff --git a/sdk/constructive-react/src/infra/hooks/mutations/index.ts b/sdk/constructive-react/src/infra/hooks/mutations/index.ts index 2b042b34a2..3da38ca143 100644 --- a/sdk/constructive-react/src/infra/hooks/mutations/index.ts +++ b/sdk/constructive-react/src/infra/hooks/mutations/index.ts @@ -33,5 +33,8 @@ export * from './useUpdatePlatformNamespaceEventMutation'; export * from './useDeletePlatformNamespaceEventMutation'; export * from './usePlatformInfraInitEmptyRepoMutation'; export * from './usePlatformInfraInsertNodeAtPathMutation'; +export * from './usePlatformInfraInsertNodesAtPathsMutation'; +export * from './usePlatformInfraSetAndCommitMutation'; export * from './usePlatformInfraSetDataAtPathMutation'; +export * from './usePlatformInfraSetManyAndCommitMutation'; export * from './useProvisionBucketMutation'; diff --git a/sdk/constructive-react/src/infra/hooks/mutations/usePlatformInfraInsertNodesAtPathsMutation.ts b/sdk/constructive-react/src/infra/hooks/mutations/usePlatformInfraInsertNodesAtPathsMutation.ts new file mode 100644 index 0000000000..924154505d --- /dev/null +++ b/sdk/constructive-react/src/infra/hooks/mutations/usePlatformInfraInsertNodesAtPathsMutation.ts @@ -0,0 +1,66 @@ +/** + * Custom mutation hook for platformInfraInsertNodesAtPaths + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useMutation } from '@tanstack/react-query'; +import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { customMutationKeys } from '../mutation-keys'; +import type { PlatformInfraInsertNodesAtPathsVariables } from '../../orm/mutation'; +import type { + PlatformInfraInsertNodesAtPathsPayloadSelect, + PlatformInfraInsertNodesAtPathsPayload, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; +export type { PlatformInfraInsertNodesAtPathsVariables } from '../../orm/mutation'; +export type { PlatformInfraInsertNodesAtPathsPayloadSelect } from '../../orm/input-types'; +export function usePlatformInfraInsertNodesAtPathsMutation< + S extends PlatformInfraInsertNodesAtPathsPayloadSelect, +>( + params: { + selection: { + fields: S & PlatformInfraInsertNodesAtPathsPayloadSelect; + } & HookStrictSelect, PlatformInfraInsertNodesAtPathsPayloadSelect>; + } & Omit< + UseMutationOptions< + { + platformInfraInsertNodesAtPaths: InferSelectResult< + PlatformInfraInsertNodesAtPathsPayload, + S + > | null; + }, + Error, + PlatformInfraInsertNodesAtPathsVariables + >, + 'mutationFn' + > +): UseMutationResult< + { + platformInfraInsertNodesAtPaths: InferSelectResult< + PlatformInfraInsertNodesAtPathsPayload, + S + > | null; + }, + Error, + PlatformInfraInsertNodesAtPathsVariables +> { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + return useMutation({ + mutationKey: customMutationKeys.platformInfraInsertNodesAtPaths(), + mutationFn: (variables: PlatformInfraInsertNodesAtPathsVariables) => + getClient() + .mutation.platformInfraInsertNodesAtPaths(variables, { + select: args.select, + } as { + select: S; + } & StrictSelect) + .unwrap(), + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/infra/hooks/mutations/usePlatformInfraSetAndCommitMutation.ts b/sdk/constructive-react/src/infra/hooks/mutations/usePlatformInfraSetAndCommitMutation.ts new file mode 100644 index 0000000000..9bac5e7fd6 --- /dev/null +++ b/sdk/constructive-react/src/infra/hooks/mutations/usePlatformInfraSetAndCommitMutation.ts @@ -0,0 +1,60 @@ +/** + * Custom mutation hook for platformInfraSetAndCommit + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useMutation } from '@tanstack/react-query'; +import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { customMutationKeys } from '../mutation-keys'; +import type { PlatformInfraSetAndCommitVariables } from '../../orm/mutation'; +import type { + PlatformInfraSetAndCommitPayloadSelect, + PlatformInfraSetAndCommitPayload, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; +export type { PlatformInfraSetAndCommitVariables } from '../../orm/mutation'; +export type { PlatformInfraSetAndCommitPayloadSelect } from '../../orm/input-types'; +export function usePlatformInfraSetAndCommitMutation< + S extends PlatformInfraSetAndCommitPayloadSelect, +>( + params: { + selection: { + fields: S & PlatformInfraSetAndCommitPayloadSelect; + } & HookStrictSelect, PlatformInfraSetAndCommitPayloadSelect>; + } & Omit< + UseMutationOptions< + { + platformInfraSetAndCommit: InferSelectResult | null; + }, + Error, + PlatformInfraSetAndCommitVariables + >, + 'mutationFn' + > +): UseMutationResult< + { + platformInfraSetAndCommit: InferSelectResult | null; + }, + Error, + PlatformInfraSetAndCommitVariables +> { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + return useMutation({ + mutationKey: customMutationKeys.platformInfraSetAndCommit(), + mutationFn: (variables: PlatformInfraSetAndCommitVariables) => + getClient() + .mutation.platformInfraSetAndCommit(variables, { + select: args.select, + } as { + select: S; + } & StrictSelect) + .unwrap(), + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/infra/hooks/mutations/usePlatformInfraSetManyAndCommitMutation.ts b/sdk/constructive-react/src/infra/hooks/mutations/usePlatformInfraSetManyAndCommitMutation.ts new file mode 100644 index 0000000000..a6a7fcf2d0 --- /dev/null +++ b/sdk/constructive-react/src/infra/hooks/mutations/usePlatformInfraSetManyAndCommitMutation.ts @@ -0,0 +1,66 @@ +/** + * Custom mutation hook for platformInfraSetManyAndCommit + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useMutation } from '@tanstack/react-query'; +import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { customMutationKeys } from '../mutation-keys'; +import type { PlatformInfraSetManyAndCommitVariables } from '../../orm/mutation'; +import type { + PlatformInfraSetManyAndCommitPayloadSelect, + PlatformInfraSetManyAndCommitPayload, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; +export type { PlatformInfraSetManyAndCommitVariables } from '../../orm/mutation'; +export type { PlatformInfraSetManyAndCommitPayloadSelect } from '../../orm/input-types'; +export function usePlatformInfraSetManyAndCommitMutation< + S extends PlatformInfraSetManyAndCommitPayloadSelect, +>( + params: { + selection: { + fields: S & PlatformInfraSetManyAndCommitPayloadSelect; + } & HookStrictSelect, PlatformInfraSetManyAndCommitPayloadSelect>; + } & Omit< + UseMutationOptions< + { + platformInfraSetManyAndCommit: InferSelectResult< + PlatformInfraSetManyAndCommitPayload, + S + > | null; + }, + Error, + PlatformInfraSetManyAndCommitVariables + >, + 'mutationFn' + > +): UseMutationResult< + { + platformInfraSetManyAndCommit: InferSelectResult< + PlatformInfraSetManyAndCommitPayload, + S + > | null; + }, + Error, + PlatformInfraSetManyAndCommitVariables +> { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + return useMutation({ + mutationKey: customMutationKeys.platformInfraSetManyAndCommit(), + mutationFn: (variables: PlatformInfraSetManyAndCommitVariables) => + getClient() + .mutation.platformInfraSetManyAndCommit(variables, { + select: args.select, + } as { + select: S; + } & StrictSelect) + .unwrap(), + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/infra/orm/README.md b/sdk/constructive-react/src/infra/orm/README.md index e303005e2f..e94077638d 100644 --- a/sdk/constructive-react/src/infra/orm/README.md +++ b/sdk/constructive-react/src/infra/orm/README.md @@ -424,6 +424,36 @@ platformInfraInsertNodeAtPath const result = await db.mutation.platformInfraInsertNodeAtPath({ input: '' }).execute(); ``` +### `db.mutation.platformInfraInsertNodesAtPaths` + +platformInfraInsertNodesAtPaths + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | PlatformInfraInsertNodesAtPathsInput (required) | + +```typescript +const result = await db.mutation.platformInfraInsertNodesAtPaths({ input: '' }).execute(); +``` + +### `db.mutation.platformInfraSetAndCommit` + +platformInfraSetAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | PlatformInfraSetAndCommitInput (required) | + +```typescript +const result = await db.mutation.platformInfraSetAndCommit({ input: '' }).execute(); +``` + ### `db.mutation.platformInfraSetDataAtPath` platformInfraSetDataAtPath @@ -439,6 +469,21 @@ platformInfraSetDataAtPath const result = await db.mutation.platformInfraSetDataAtPath({ input: { data: '', path: '', root: '', sId: '' } }).execute(); ``` +### `db.mutation.platformInfraSetManyAndCommit` + +platformInfraSetManyAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | PlatformInfraSetManyAndCommitInput (required) | + +```typescript +const result = await db.mutation.platformInfraSetManyAndCommit({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }).execute(); +``` + ### `db.mutation.provisionBucket` Provision an S3 bucket for a logical bucket in the database. diff --git a/sdk/constructive-react/src/infra/orm/input-types.ts b/sdk/constructive-react/src/infra/orm/input-types.ts index 23e81e113d..0c0a58a8a6 100644 --- a/sdk/constructive-react/src/infra/orm/input-types.ts +++ b/sdk/constructive-react/src/infra/orm/input-types.ts @@ -1268,6 +1268,26 @@ export interface PlatformInfraInsertNodeAtPathInput { root?: string; sId?: string; } +export interface PlatformInfraInsertNodesAtPathsInput { + clientMutationId?: string; + datas?: Record[]; + kidsList?: Record; + ktreeList?: Record; + paths?: Record; + root?: string; + sId?: string; +} +export interface PlatformInfraSetAndCommitInput { + clientMutationId?: string; + data?: Record; + kids?: string[]; + ktree?: string[]; + message?: string; + path?: string[]; + refname?: string; + sId?: string; + storeId?: string; +} export interface PlatformInfraSetDataAtPathInput { clientMutationId?: string; data?: Record; @@ -1275,6 +1295,14 @@ export interface PlatformInfraSetDataAtPathInput { root?: string; sId?: string; } +export interface PlatformInfraSetManyAndCommitInput { + clientMutationId?: string; + entries?: Record; + message?: string; + refname?: string; + sId?: string; + storeId?: string; +} export interface ProvisionBucketInput { /** The logical bucket key (e.g., "public", "private") */ bucketKey: string; @@ -1472,6 +1500,28 @@ export type PlatformInfraInsertNodeAtPathPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface PlatformInfraInsertNodesAtPathsPayload { + clientMutationId?: string | null; + result?: string | null; +} +export type PlatformInfraInsertNodesAtPathsPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; +export interface PlatformInfraSetAndCommitPayload { + clientMutationId?: string | null; + platformInfraCommitEdge?: PlatformInfraCommitEdge | null; + result?: PlatformInfraCommit | null; +} +export type PlatformInfraSetAndCommitPayloadSelect = { + clientMutationId?: boolean; + platformInfraCommitEdge?: { + select: PlatformInfraCommitEdgeSelect; + }; + result?: { + select: PlatformInfraCommitSelect; + }; +}; export interface PlatformInfraSetDataAtPathPayload { clientMutationId?: string | null; result?: string | null; @@ -1480,6 +1530,20 @@ export type PlatformInfraSetDataAtPathPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface PlatformInfraSetManyAndCommitPayload { + clientMutationId?: string | null; + platformInfraCommitEdge?: PlatformInfraCommitEdge | null; + result?: PlatformInfraCommit | null; +} +export type PlatformInfraSetManyAndCommitPayloadSelect = { + clientMutationId?: boolean; + platformInfraCommitEdge?: { + select: PlatformInfraCommitEdgeSelect; + }; + result?: { + select: PlatformInfraCommitSelect; + }; +}; export interface ProvisionBucketPayload { /** The access type applied */ accessType: string; @@ -1907,6 +1971,18 @@ export type DeletePlatformNamespaceEventPayloadSelect = { select: PlatformNamespaceEventEdgeSelect; }; }; +/** A `PlatformInfraCommit` edge in the connection. */ +export interface PlatformInfraCommitEdge { + cursor?: string | null; + /** The `PlatformInfraCommit` at the end of the edge. */ + node?: PlatformInfraCommit | null; +} +export type PlatformInfraCommitEdgeSelect = { + cursor?: boolean; + node?: { + select: PlatformInfraCommitSelect; + }; +}; /** A `DbPreset` edge in the connection. */ export interface DbPresetEdge { cursor?: string | null; @@ -1943,18 +2019,6 @@ export type NamespaceEventEdgeSelect = { select: NamespaceEventSelect; }; }; -/** A `PlatformInfraCommit` edge in the connection. */ -export interface PlatformInfraCommitEdge { - cursor?: string | null; - /** The `PlatformInfraCommit` at the end of the edge. */ - node?: PlatformInfraCommit | null; -} -export type PlatformInfraCommitEdgeSelect = { - cursor?: boolean; - node?: { - select: PlatformInfraCommitSelect; - }; -}; /** A `PlatformInfraObject` edge in the connection. */ export interface PlatformInfraObjectEdge { cursor?: string | null; diff --git a/sdk/constructive-react/src/infra/orm/mutation/index.ts b/sdk/constructive-react/src/infra/orm/mutation/index.ts index f266633531..04353e5b5c 100644 --- a/sdk/constructive-react/src/infra/orm/mutation/index.ts +++ b/sdk/constructive-react/src/infra/orm/mutation/index.ts @@ -9,15 +9,24 @@ import type { InferSelectResult, StrictSelect } from '../select-types'; import type { PlatformInfraInitEmptyRepoInput, PlatformInfraInsertNodeAtPathInput, + PlatformInfraInsertNodesAtPathsInput, + PlatformInfraSetAndCommitInput, PlatformInfraSetDataAtPathInput, + PlatformInfraSetManyAndCommitInput, ProvisionBucketInput, PlatformInfraInitEmptyRepoPayload, PlatformInfraInsertNodeAtPathPayload, + PlatformInfraInsertNodesAtPathsPayload, + PlatformInfraSetAndCommitPayload, PlatformInfraSetDataAtPathPayload, + PlatformInfraSetManyAndCommitPayload, ProvisionBucketPayload, PlatformInfraInitEmptyRepoPayloadSelect, PlatformInfraInsertNodeAtPathPayloadSelect, + PlatformInfraInsertNodesAtPathsPayloadSelect, + PlatformInfraSetAndCommitPayloadSelect, PlatformInfraSetDataAtPathPayloadSelect, + PlatformInfraSetManyAndCommitPayloadSelect, ProvisionBucketPayloadSelect, } from '../input-types'; import { connectionFieldsMap } from '../input-types'; @@ -27,9 +36,18 @@ export interface PlatformInfraInitEmptyRepoVariables { export interface PlatformInfraInsertNodeAtPathVariables { input: PlatformInfraInsertNodeAtPathInput; } +export interface PlatformInfraInsertNodesAtPathsVariables { + input: PlatformInfraInsertNodesAtPathsInput; +} +export interface PlatformInfraSetAndCommitVariables { + input: PlatformInfraSetAndCommitInput; +} export interface PlatformInfraSetDataAtPathVariables { input: PlatformInfraSetDataAtPathInput; } +export interface PlatformInfraSetManyAndCommitVariables { + input: PlatformInfraSetManyAndCommitInput; +} /** * Variables for provisionBucket * Provision an S3 bucket for a logical bucket in the database. @@ -103,6 +121,67 @@ export function createMutationOperations(client: OrmClient) { 'PlatformInfraInsertNodeAtPathPayload' ), }), + platformInfraInsertNodesAtPaths: ( + args: PlatformInfraInsertNodesAtPathsVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + platformInfraInsertNodesAtPaths: InferSelectResult< + PlatformInfraInsertNodesAtPathsPayload, + S + > | null; + }>({ + client, + operation: 'mutation', + operationName: 'PlatformInfraInsertNodesAtPaths', + fieldName: 'platformInfraInsertNodesAtPaths', + ...buildCustomDocument( + 'mutation', + 'PlatformInfraInsertNodesAtPaths', + 'platformInfraInsertNodesAtPaths', + options.select, + args, + [ + { + name: 'input', + type: 'PlatformInfraInsertNodesAtPathsInput!', + }, + ], + connectionFieldsMap, + 'PlatformInfraInsertNodesAtPathsPayload' + ), + }), + platformInfraSetAndCommit: ( + args: PlatformInfraSetAndCommitVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + platformInfraSetAndCommit: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'PlatformInfraSetAndCommit', + fieldName: 'platformInfraSetAndCommit', + ...buildCustomDocument( + 'mutation', + 'PlatformInfraSetAndCommit', + 'platformInfraSetAndCommit', + options.select, + args, + [ + { + name: 'input', + type: 'PlatformInfraSetAndCommitInput!', + }, + ], + connectionFieldsMap, + 'PlatformInfraSetAndCommitPayload' + ), + }), platformInfraSetDataAtPath: ( args: PlatformInfraSetDataAtPathVariables, options: { @@ -132,6 +211,38 @@ export function createMutationOperations(client: OrmClient) { 'PlatformInfraSetDataAtPathPayload' ), }), + platformInfraSetManyAndCommit: ( + args: PlatformInfraSetManyAndCommitVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + platformInfraSetManyAndCommit: InferSelectResult< + PlatformInfraSetManyAndCommitPayload, + S + > | null; + }>({ + client, + operation: 'mutation', + operationName: 'PlatformInfraSetManyAndCommit', + fieldName: 'platformInfraSetManyAndCommit', + ...buildCustomDocument( + 'mutation', + 'PlatformInfraSetManyAndCommit', + 'platformInfraSetManyAndCommit', + options.select, + args, + [ + { + name: 'input', + type: 'PlatformInfraSetManyAndCommitInput!', + }, + ], + connectionFieldsMap, + 'PlatformInfraSetManyAndCommitPayload' + ), + }), provisionBucket: ( args: ProvisionBucketVariables, options: { diff --git a/sdk/constructive-react/src/infra/schema-types.ts b/sdk/constructive-react/src/infra/schema-types.ts index a9b4f2dd24..157020e137 100644 --- a/sdk/constructive-react/src/infra/schema-types.ts +++ b/sdk/constructive-react/src/infra/schema-types.ts @@ -642,6 +642,15 @@ export interface PlatformInfraInsertNodeAtPathInput { root?: string; sId?: string; } +export interface PlatformInfraInsertNodesAtPathsInput { + clientMutationId?: string; + datas?: unknown[]; + kidsList?: unknown; + ktreeList?: unknown; + paths?: unknown; + root?: string; + sId?: string; +} /** A filter to be used against `PlatformInfraObject` object types. All fields are combined with a logical ‘and.’ */ export interface PlatformInfraObjectFilter { /** Checks for all expressions in this list. */ @@ -738,6 +747,17 @@ export interface PlatformInfraRefPatch { /** Store this ref belongs to */ storeId?: string; } +export interface PlatformInfraSetAndCommitInput { + clientMutationId?: string; + data?: unknown; + kids?: string[]; + ktree?: string[]; + message?: string; + path?: string[]; + refname?: string; + sId?: string; + storeId?: string; +} export interface PlatformInfraSetDataAtPathInput { clientMutationId?: string; data?: unknown; @@ -745,6 +765,14 @@ export interface PlatformInfraSetDataAtPathInput { root?: string; sId?: string; } +export interface PlatformInfraSetManyAndCommitInput { + clientMutationId?: string; + entries?: unknown; + message?: string; + refname?: string; + sId?: string; + storeId?: string; +} /** A filter to be used against `PlatformInfraStore` object types. All fields are combined with a logical ‘and.’ */ export interface PlatformInfraStoreFilter { /** Checks for all expressions in this list. */ @@ -1197,10 +1225,24 @@ export interface PlatformInfraInsertNodeAtPathPayload { clientMutationId?: string | null; result?: string | null; } +export interface PlatformInfraInsertNodesAtPathsPayload { + clientMutationId?: string | null; + result?: string | null; +} +export interface PlatformInfraSetAndCommitPayload { + clientMutationId?: string | null; + platformInfraCommitEdge?: PlatformInfraCommitEdge | null; + result?: PlatformInfraCommit | null; +} export interface PlatformInfraSetDataAtPathPayload { clientMutationId?: string | null; result?: string | null; } +export interface PlatformInfraSetManyAndCommitPayload { + clientMutationId?: string | null; + platformInfraCommitEdge?: PlatformInfraCommitEdge | null; + result?: PlatformInfraCommit | null; +} export interface ProvisionBucketPayload { /** The access type applied */ accessType: string; diff --git a/sdk/constructive-react/src/modules/README.md b/sdk/constructive-react/src/modules/README.md index df958f0479..0305f7b71c 100644 --- a/sdk/constructive-react/src/modules/README.md +++ b/sdk/constructive-react/src/modules/README.md @@ -8,9 +8,9 @@ ## Overview -- **Tables:** 76 -- **Custom queries:** 2 -- **Custom mutations:** 10 +- **Tables:** 78 +- **Custom queries:** 0 +- **Custom mutations:** 3 **Generators:** ORM, React Query diff --git a/sdk/constructive-react/src/modules/hooks/README.md b/sdk/constructive-react/src/modules/hooks/README.md index d9c19b58b1..fe100d36f4 100644 --- a/sdk/constructive-react/src/modules/hooks/README.md +++ b/sdk/constructive-react/src/modules/hooks/README.md @@ -467,6 +467,11 @@ function App() { | `useCreateRouteModuleMutation` | Mutation | Create a routeModule | | `useUpdateRouteModuleMutation` | Mutation | Update a routeModule | | `useDeleteRouteModuleMutation` | Mutation | Delete a routeModule | +| `useScopeTypesModulesQuery` | Query | List all scopeTypesModules | +| `useScopeTypesModuleQuery` | Query | Get one scopeTypesModule | +| `useCreateScopeTypesModuleMutation` | Mutation | Create a scopeTypesModule | +| `useUpdateScopeTypesModuleMutation` | Mutation | Update a scopeTypesModule | +| `useDeleteScopeTypesModuleMutation` | Mutation | Delete a scopeTypesModule | | `useSecureTableProvisionsQuery` | Query | Provisions security, fields, grants, and policies onto a table. Each row can independently: (1) create fields via nodes[] array (supporting multiple Data* modules per row), (2) grant privileges via grants[] array (supporting per-role privilege targeting), (3) create RLS policies via policies[] array (supporting multiple Authz* policies per row). Multiple rows can target the same table to compose different concerns. All three concerns are optional and independent. | | `useSecureTableProvisionQuery` | Query | Provisions security, fields, grants, and policies onto a table. Each row can independently: (1) create fields via nodes[] array (supporting multiple Data* modules per row), (2) grant privileges via grants[] array (supporting per-role privilege targeting), (3) create RLS policies via policies[] array (supporting multiple Authz* policies per row). Multiple rows can target the same table to compose different concerns. All three concerns are optional and independent. | | `useCreateSecureTableProvisionMutation` | Mutation | Provisions security, fields, grants, and policies onto a table. Each row can independently: (1) create fields via nodes[] array (supporting multiple Data* modules per row), (2) grant privileges via grants[] array (supporting per-role privilege targeting), (3) create RLS policies via policies[] array (supporting multiple Authz* policies per row). Multiple rows can target the same table to compose different concerns. All three concerns are optional and independent. | @@ -527,6 +532,11 @@ function App() { | `useCreateUserSettingsModuleMutation` | Mutation | Create a userSettingsModule | | `useUpdateUserSettingsModuleMutation` | Mutation | Update a userSettingsModule | | `useDeleteUserSettingsModuleMutation` | Mutation | Delete a userSettingsModule | +| `useUserSettingsSecurityModulesQuery` | Query | List all userSettingsSecurityModules | +| `useUserSettingsSecurityModuleQuery` | Query | Get one userSettingsSecurityModule | +| `useCreateUserSettingsSecurityModuleMutation` | Mutation | Create a userSettingsSecurityModule | +| `useUpdateUserSettingsSecurityModuleMutation` | Mutation | Update a userSettingsSecurityModule | +| `useDeleteUserSettingsSecurityModuleMutation` | Mutation | Delete a userSettingsSecurityModule | | `useUserStateModulesQuery` | Query | List all userStateModules | | `useUserStateModuleQuery` | Query | Get one userStateModule | | `useCreateUserStateModuleMutation` | Mutation | Create a userStateModule | @@ -552,21 +562,12 @@ function App() { | `useCreateWebhookModuleMutation` | Mutation | Create a webhookModule | | `useUpdateWebhookModuleMutation` | Mutation | Update a webhookModule | | `useDeleteWebhookModuleMutation` | Mutation | Delete a webhookModule | -| `useResolveBlueprintFieldQuery` | Query | Resolves a field_name within a given table_id to a field_id. Throws if no match is found. Used by construct_blueprint to translate user-authored field names (e.g. "location") into field UUIDs for downstream provisioning procedures. table_id must already be resolved (via resolve_blueprint_table) before calling this. | -| `useResolveBlueprintTableQuery` | Query | Resolves a table_name (with optional schema_name) to a table_id. Resolution order: (1) if schema_name provided, exact lookup via metaschema_public.schema.name + metaschema_public.table; (2) check local table_map (tables created in current blueprint); (3) search metaschema_public.table by name across all schemas; (4) if multiple matches, throw ambiguous error asking for schema_name; (5) if no match, throw not-found error. | | `useConstructBlueprintMutation` | Mutation | Executes a blueprint definition by delegating to provision_* procedures. Creates a blueprint_construction record to track the attempt. Eight phases: (0) entity_type_provision for each membership_type entry — provisions entity tables, membership modules, and security. When a prefix already exists (e.g., 'org'), the entry extends the existing entity type instead of creating a new one; if a storage[] key is present, it provisions entity-scoped storage for that type. (0.5) scope-based storage: each storage[] entry has an optional scope ('app' or 'org' only). App-scoped storage seeds buckets at migration time. Org-scoped storage resolves the org membership type, creates org_buckets/org_files with owner_id, and seeds buckets per-entity via an AFTER INSERT trigger on the users table. When function_module is installed, a private functions bucket is auto-injected into org-scoped or entity-scoped storage entries. (1) provision_table() for each table with nodes[], fields[], policies[], and grants (table-level indexes/fts/unique_constraints/check_constraints are deferred). After provisioning, optional smart_tags (jsonb object) on the table entry are applied via metaschema.append_table_smart_tags(), and optional smart_tags on individual field entries are applied via metaschema.append_field_smart_tags(). (2) provision_relation() for each relation, (3) provision_index() for top-level + deferred indexes, (4) provision_full_text_search() for top-level + deferred FTS, (5) provision_unique_constraint() for top-level + deferred unique constraints, (6) provision_check_constraint() for top-level + deferred check constraints, (7) seed achievements from definition.achievements[] — resolves events_module by entity_prefix and creates INSERT actions for levels, level_requirements, and achievement_rewards tables. Phase 0 entity tables are added to the table_map so subsequent phases can reference them by name. Table-level entries are deferred to phases 3-6 so they can reference columns created by relations in phase 2. Returns the construction record ID on success, NULL on failure. | | `useCopyTemplateToBlueprintMutation` | Mutation | Creates a new blueprint by copying a template definition. Checks visibility: owners can always copy their own templates, others require public visibility. Increments the template copy_count. Returns the new blueprint ID. | | `useProvisionBucketMutation` | Mutation | Provision an S3 bucket for a logical bucket in the database. Reads the bucket config via RLS, then creates and configures the S3 bucket with the appropriate privacy policies, CORS rules, and lifecycle settings. | -| `useProvisionCheckConstraintMutation` | Mutation | Creates a check constraint on a table from a $type + data blueprint definition. Supports: CheckOneOf (enum validation via = ANY(ARRAY[...])), CheckGreaterThan (single-column > value or cross-column), CheckLessThan (single-column < value or cross-column), CheckNotEqual (cross-column inequality). Builds AST expressions via ast_helpers and inserts into metaschema_public.check_constraint. Graceful: skips if a constraint with the same name already exists. | -| `useProvisionFullTextSearchMutation` | Mutation | 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. | -| `useProvisionIndexMutation` | Mutation | 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. | -| `useProvisionRelationMutation` | Mutation | 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). | -| `useProvisionSpatialRelationMutation` | Mutation | Idempotent provisioner for metaschema_public.spatial_relation. Inserts a row declaring a spatial predicate between two geometry/geography columns (owner and target). Called from construct_blueprint when a relation entry has $type=RelationSpatial. Graceful: re-running with the same (source_table_id, name) returns the existing id without modifying the row. Operator whitelist and st_dwithin ↔ param_name pairing are enforced by the spatial_relation table CHECKs. Both fields must already exist — this is a metadata-only insert. | -| `useProvisionTableMutation` | Mutation | Composable table provisioning: creates or finds a table, then creates fields (so Data* modules can reference them), applies N nodes (Data* modules), 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). | -| `useProvisionUniqueConstraintMutation` | Mutation | 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. | ## Table Hooks @@ -659,20 +660,20 @@ create({ apiName: '', balancesTableId: '', balancesTableName: '', - selection: { fields: { apiName: true, billingCustomersTableId: true, billingCustomersTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, databaseId: true, id: true, prefix: true, pricesTableId: true, privateApiName: true, privateSchemaId: true, processBillingEventFunction: true, productsTableId: true, provider: true, schemaId: true, subscriptionsTableId: true } }, + selection: { fields: { apiName: true, billingCustomersTableId: true, billingCustomersTableName: true, billingInvoicesTableId: true, billingInvoicesTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, billingRefundsTableId: true, billingRefundsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, databaseId: true, id: true, listPendingUsageSyncFunction: true, markUsageSyncedFunction: true, prefix: true, pricesTableId: true, privateApiName: true, privateSchemaId: true, processBillingEventFunction: true, productsTableId: true, provider: true, recordRefundFunction: true, schemaId: true, subscriptionsTableId: true, upsertInvoiceFunction: true } }, }); // Create a billingProviderModule const { mutate: create } = useCreateBillingProviderModuleMutation({ selection: { fields: { id: true } }, }); -create({ apiName: '', billingCustomersTableId: '', billingCustomersTableName: '', billingPricesTableId: '', billingPricesTableName: '', billingProductsTableId: '', billingProductsTableName: '', billingSubscriptionsTableId: '', billingSubscriptionsTableName: '', billingWebhookEventsTableId: '', billingWebhookEventsTableName: '', databaseId: '', prefix: '', pricesTableId: '', privateApiName: '', privateSchemaId: '', processBillingEventFunction: '', productsTableId: '', provider: '', schemaId: '', subscriptionsTableId: '' }); +create({ apiName: '', billingCustomersTableId: '', billingCustomersTableName: '', billingInvoicesTableId: '', billingInvoicesTableName: '', billingPricesTableId: '', billingPricesTableName: '', billingProductsTableId: '', billingProductsTableName: '', billingRefundsTableId: '', billingRefundsTableName: '', billingSubscriptionsTableId: '', billingSubscriptionsTableName: '', billingWebhookEventsTableId: '', billingWebhookEventsTableName: '', databaseId: '', listPendingUsageSyncFunction: '', markUsageSyncedFunction: '', prefix: '', pricesTableId: '', privateApiName: '', privateSchemaId: '', processBillingEventFunction: '', productsTableId: '', provider: '', recordRefundFunction: '', schemaId: '', subscriptionsTableId: '', upsertInvoiceFunction: '' }); ``` ### Blueprint @@ -743,20 +744,20 @@ create({ categories: '', complexity: '', copyCount: '', def ```typescript // List all catalogModules const { data, isLoading } = useCatalogModulesQuery({ - selection: { fields: { apiName: true, apisTableId: true, apisTableName: true, appsTableId: true, appsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultPermissions: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } }, + selection: { fields: { apiName: true, apisTableId: true, apisTableName: true, appsTableId: true, appsTableName: true, bindingsTableId: true, bindingsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultPermissions: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } }, }); // Get one catalogModule const { data: item } = useCatalogModuleQuery({ id: '', - selection: { fields: { apiName: true, apisTableId: true, apisTableName: true, appsTableId: true, appsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultPermissions: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } }, + selection: { fields: { apiName: true, apisTableId: true, apisTableName: true, appsTableId: true, appsTableName: true, bindingsTableId: true, bindingsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultPermissions: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } }, }); // Create a catalogModule const { mutate: create } = useCreateCatalogModuleMutation({ selection: { fields: { id: true } }, }); -create({ apiName: '', apisTableId: '', apisTableName: '', appsTableId: '', appsTableName: '', bucketsTableId: '', bucketsTableName: '', databaseId: '', defaultPermissions: '', domainsTableId: '', domainsTableName: '', entityTableId: '', functionsTableId: '', functionsTableName: '', namespacesTableId: '', namespacesTableName: '', policies: '', privateApiName: '', provisions: '', publicSchemaName: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourcesTableId: '', resourcesTableName: '', schemaId: '', scope: '', sitesAppLinksTableId: '', sitesAppLinksTableName: '', sitesDeepLinksTableId: '', sitesDeepLinksTableName: '', sitesErrorPagesTableId: '', sitesErrorPagesTableName: '', sitesTableId: '', sitesTableName: '', sitesWebConfigTableId: '', sitesWebConfigTableName: '' }); +create({ apiName: '', apisTableId: '', apisTableName: '', appsTableId: '', appsTableName: '', bindingsTableId: '', bindingsTableName: '', bucketsTableId: '', bucketsTableName: '', databaseId: '', defaultPermissions: '', domainsTableId: '', domainsTableName: '', entityTableId: '', functionsTableId: '', functionsTableName: '', namespacesTableId: '', namespacesTableName: '', policies: '', privateApiName: '', provisions: '', publicSchemaName: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourcesTableId: '', resourcesTableName: '', schemaId: '', scope: '', sitesAppLinksTableId: '', sitesAppLinksTableName: '', sitesDeepLinksTableId: '', sitesDeepLinksTableName: '', sitesErrorPagesTableId: '', sitesErrorPagesTableName: '', sitesTableId: '', sitesTableName: '', sitesWebConfigTableId: '', sitesWebConfigTableName: '' }); ``` ### ComputeLogModule @@ -1835,20 +1836,41 @@ create({ apiName: '', authenticate: '', authenticateStrict: '', - selection: { fields: { apiName: true, catalogModuleId: true, databaseId: true, defaultPermissions: true, domainModuleId: true, entityField: true, entityTableId: true, hostnameBindingsTableId: true, hostnameBindingsTableName: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, resolverFunctionName: true, routeBindingsTableId: true, routeBindingsTableName: true, routesTableId: true, routesTableName: true, schemaId: true, scope: true } }, + selection: { fields: { apiName: true, appLinksFunctionName: true, catalogModuleId: true, databaseId: true, deepLinkFunctionName: true, defaultPermissions: true, domainModuleId: true, entityField: true, entityTableId: true, hostnameBindingsTableId: true, hostnameBindingsTableName: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, resolverFunctionName: true, routeBindingsTableId: true, routeBindingsTableName: true, routesTableId: true, routesTableName: true, schemaId: true, scope: true } }, }); // Create a routeModule const { mutate: create } = useCreateRouteModuleMutation({ selection: { fields: { id: true } }, }); -create({ apiName: '', catalogModuleId: '', databaseId: '', defaultPermissions: '', domainModuleId: '', entityField: '', entityTableId: '', hostnameBindingsTableId: '', hostnameBindingsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', resolverFunctionName: '', routeBindingsTableId: '', routeBindingsTableName: '', routesTableId: '', routesTableName: '', schemaId: '', scope: '' }); +create({ apiName: '', appLinksFunctionName: '', catalogModuleId: '', databaseId: '', deepLinkFunctionName: '', defaultPermissions: '', domainModuleId: '', entityField: '', entityTableId: '', hostnameBindingsTableId: '', hostnameBindingsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', resolverFunctionName: '', routeBindingsTableId: '', routeBindingsTableName: '', routesTableId: '', routesTableName: '', schemaId: '', scope: '' }); +``` + +### ScopeTypesModule + +```typescript +// List all scopeTypesModules +const { data, isLoading } = useScopeTypesModulesQuery({ + selection: { fields: { databaseId: true, id: true, privateSchemaName: true, schemaId: true, scopeTypesTableId: true } }, +}); + +// Get one scopeTypesModule +const { data: item } = useScopeTypesModuleQuery({ + id: '', + selection: { fields: { databaseId: true, id: true, privateSchemaName: true, schemaId: true, scopeTypesTableId: true } }, +}); + +// Create a scopeTypesModule +const { mutate: create } = useCreateScopeTypesModuleMutation({ + selection: { fields: { id: true } }, +}); +create({ databaseId: '', privateSchemaName: '', schemaId: '', scopeTypesTableId: '' }); ``` ### SecureTableProvision @@ -2061,6 +2083,27 @@ const { mutate: create } = useCreateUserSettingsModuleMutation({ create({ apiName: '', databaseId: '', ownerTableId: '', schemaId: '', tableId: '', tableName: '' }); ``` +### UserSettingsSecurityModule + +```typescript +// List all userSettingsSecurityModules +const { data, isLoading } = useUserSettingsSecurityModulesQuery({ + selection: { fields: { apiName: true, databaseId: true, id: true, ownerTableId: true, schemaId: true, tableId: true, tableName: true } }, +}); + +// Get one userSettingsSecurityModule +const { data: item } = useUserSettingsSecurityModuleQuery({ + id: '', + selection: { fields: { apiName: true, databaseId: true, id: true, ownerTableId: true, schemaId: true, tableId: true, tableName: true } }, +}); + +// Create a userSettingsSecurityModule +const { mutate: create } = useCreateUserSettingsSecurityModuleMutation({ + selection: { fields: { id: true } }, +}); +create({ apiName: '', databaseId: '', ownerTableId: '', schemaId: '', tableId: '', tableName: '' }); +``` + ### UserStateModule ```typescript @@ -2168,34 +2211,6 @@ create({ apiName: '', databaseId: '', defaultPermissions: ' value or cross-column), CheckLessThan (single-column < value or cross-column), CheckNotEqual (cross-column inequality). Builds AST expressions via ast_helpers and inserts into metaschema_public.check_constraint. Graceful: skips if a constraint with the same name already exists. - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | ProvisionCheckConstraintInput (required) | - -### `useProvisionFullTextSearchMutation` - -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. - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | ProvisionFullTextSearchInput (required) | - -### `useProvisionIndexMutation` - -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. - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | ProvisionIndexInput (required) | - -### `useProvisionRelationMutation` - -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). - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | ProvisionRelationInput (required) | - -### `useProvisionSpatialRelationMutation` - -Idempotent provisioner for metaschema_public.spatial_relation. Inserts a row declaring a spatial predicate between two geometry/geography columns (owner and target). Called from construct_blueprint when a relation entry has $type=RelationSpatial. Graceful: re-running with the same (source_table_id, name) returns the existing id without modifying the row. Operator whitelist and st_dwithin ↔ param_name pairing are enforced by the spatial_relation table CHECKs. Both fields must already exist — this is a metadata-only insert. - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | ProvisionSpatialRelationInput (required) | - -### `useProvisionTableMutation` - -Composable table provisioning: creates or finds a table, then creates fields (so Data* modules can reference them), applies N nodes (Data* modules), 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). - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | ProvisionTableInput (required) | - -### `useProvisionUniqueConstraintMutation` - -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. - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | ProvisionUniqueConstraintInput (required) | - --- Built by the [Constructive](https://constructive.io) team. diff --git a/sdk/constructive-react/src/modules/hooks/index.ts b/sdk/constructive-react/src/modules/hooks/index.ts index a13c0bdc09..828afb99dc 100644 --- a/sdk/constructive-react/src/modules/hooks/index.ts +++ b/sdk/constructive-react/src/modules/hooks/index.ts @@ -2,7 +2,7 @@ * GraphQL SDK * @generated by @constructive-io/graphql-codegen * - * Tables: AgentModule, ApiSurfaceModule, AppModule, BillingModule, BillingProviderModule, Blueprint, BlueprintConstruction, BlueprintTemplate, CatalogModule, ComputeLogModule, ConfigSecretsUserModule, ConnectedAccountsModule, CryptoAddressesModule, CryptoAuthModule, DatabaseProvisionModule, DatabaseSettingsModule, DbPoolConfig, DbPool, DbPresetModule, DbUsageModule, DefaultIdsModule, DenormalizedTableField, DevicesModule, DomainModule, EmailsModule, EntityTypeProvision, EventsModule, FunctionDeploymentModule, FunctionInvocationModule, FunctionModule, GraphExecutionModule, GraphModule, HierarchyModule, HttpRouteModule, I18NModule, IdentityProvidersModule, InferenceLogModule, InfraConfigModule, InfraSecretsModule, IntegrationProvidersModule, InternalSecretsModule, InvitesModule, LimitsModule, MembershipTypesModule, MembershipsModule, MerkleStoreModule, NamespaceModule, NotificationsModule, PagesModule, PermissionsModule, PhoneNumbersModule, PlansModule, PrincipalAuthModule, ProfilesModule, RateLimitMetersModule, RateLimitsModule, RealtimeModule, RelationProvision, ResourceModule, RlsModule, RouteModule, SecureTableProvision, SessionSecretsModule, SessionsModule, SiteSurfaceModule, StorageLogModule, StorageModule, TransferLogModule, UserAuthModule, UserCredentialsModule, UserSettingsModule, UserStateModule, UsersModule, WebauthnAuthModule, WebauthnCredentialsModule, WebhookModule + * Tables: AgentModule, ApiSurfaceModule, AppModule, BillingModule, BillingProviderModule, Blueprint, BlueprintConstruction, BlueprintTemplate, CatalogModule, ComputeLogModule, ConfigSecretsUserModule, ConnectedAccountsModule, CryptoAddressesModule, CryptoAuthModule, DatabaseProvisionModule, DatabaseSettingsModule, DbPoolConfig, DbPool, DbPresetModule, DbUsageModule, DefaultIdsModule, DenormalizedTableField, DevicesModule, DomainModule, EmailsModule, EntityTypeProvision, EventsModule, FunctionDeploymentModule, FunctionInvocationModule, FunctionModule, GraphExecutionModule, GraphModule, HierarchyModule, HttpRouteModule, I18NModule, IdentityProvidersModule, InferenceLogModule, InfraConfigModule, InfraSecretsModule, IntegrationProvidersModule, InternalSecretsModule, InvitesModule, LimitsModule, MembershipTypesModule, MembershipsModule, MerkleStoreModule, NamespaceModule, NotificationsModule, PagesModule, PermissionsModule, PhoneNumbersModule, PlansModule, PrincipalAuthModule, ProfilesModule, RateLimitMetersModule, RateLimitsModule, RealtimeModule, RelationProvision, ResourceModule, RlsModule, RouteModule, ScopeTypesModule, SecureTableProvision, SessionSecretsModule, SessionsModule, SiteSurfaceModule, StorageLogModule, StorageModule, TransferLogModule, UserAuthModule, UserCredentialsModule, UserSettingsModule, UserSettingsSecurityModule, UserStateModule, UsersModule, WebauthnAuthModule, WebauthnCredentialsModule, WebhookModule * * Usage: * diff --git a/sdk/constructive-react/src/modules/hooks/invalidation.ts b/sdk/constructive-react/src/modules/hooks/invalidation.ts index 4c3a195f3e..3a768e1d0c 100644 --- a/sdk/constructive-react/src/modules/hooks/invalidation.ts +++ b/sdk/constructive-react/src/modules/hooks/invalidation.ts @@ -76,6 +76,7 @@ import { resourceModuleKeys, rlsModuleKeys, routeModuleKeys, + scopeTypesModuleKeys, secureTableProvisionKeys, sessionSecretsModuleKeys, sessionsModuleKeys, @@ -86,6 +87,7 @@ import { userAuthModuleKeys, userCredentialsModuleKeys, userSettingsModuleKeys, + userSettingsSecurityModuleKeys, userStateModuleKeys, usersModuleKeys, webauthnAuthModuleKeys, @@ -1146,6 +1148,23 @@ export const invalidate = { queryKey: routeModuleKeys.detail(id), }), }, + /** Invalidate scopeTypesModule queries */ scopeTypesModule: { + /** Invalidate all scopeTypesModule queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: scopeTypesModuleKeys.all, + }), + /** Invalidate scopeTypesModule list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: scopeTypesModuleKeys.lists(), + }), + /** Invalidate a specific scopeTypesModule */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: scopeTypesModuleKeys.detail(id), + }), + }, /** Invalidate secureTableProvision queries */ secureTableProvision: { /** Invalidate all secureTableProvision queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ @@ -1316,6 +1335,23 @@ export const invalidate = { queryKey: userSettingsModuleKeys.detail(id), }), }, + /** Invalidate userSettingsSecurityModule queries */ userSettingsSecurityModule: { + /** Invalidate all userSettingsSecurityModule queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: userSettingsSecurityModuleKeys.all, + }), + /** Invalidate userSettingsSecurityModule list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: userSettingsSecurityModuleKeys.lists(), + }), + /** Invalidate a specific userSettingsSecurityModule */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: userSettingsSecurityModuleKeys.detail(id), + }), + }, /** Invalidate userStateModule queries */ userStateModule: { /** Invalidate all userStateModule queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ @@ -1890,6 +1926,14 @@ export const remove = { queryKey: routeModuleKeys.detail(id), }); }, + /** Remove scopeTypesModule from cache */ scopeTypesModule: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: scopeTypesModuleKeys.detail(id), + }); + }, /** Remove secureTableProvision from cache */ secureTableProvision: ( queryClient: QueryClient, id: string | number @@ -1970,6 +2014,14 @@ export const remove = { queryKey: userSettingsModuleKeys.detail(id), }); }, + /** Remove userSettingsSecurityModule from cache */ userSettingsSecurityModule: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: userSettingsSecurityModuleKeys.detail(id), + }); + }, /** Remove userStateModule from cache */ userStateModule: ( queryClient: QueryClient, id: string | number diff --git a/sdk/constructive-react/src/modules/hooks/mutation-keys.ts b/sdk/constructive-react/src/modules/hooks/mutation-keys.ts index 44e0c9e14f..3eeaf72f09 100644 --- a/sdk/constructive-react/src/modules/hooks/mutation-keys.ts +++ b/sdk/constructive-react/src/modules/hooks/mutation-keys.ts @@ -607,6 +607,15 @@ export const routeModuleMutationKeys = { /** Delete routeModule mutation key */ delete: (id: string | number) => ['mutation', 'routemodule', 'delete', id] as const, } as const; +export const scopeTypesModuleMutationKeys = { + /** All scopeTypesModule mutation keys */ all: ['mutation', 'scopetypesmodule'] as const, + /** Create scopeTypesModule mutation key */ create: () => + ['mutation', 'scopetypesmodule', 'create'] as const, + /** Update scopeTypesModule mutation key */ update: (id: string | number) => + ['mutation', 'scopetypesmodule', 'update', id] as const, + /** Delete scopeTypesModule mutation key */ delete: (id: string | number) => + ['mutation', 'scopetypesmodule', 'delete', id] as const, +} as const; export const secureTableProvisionMutationKeys = { /** All secureTableProvision mutation keys */ all: ['mutation', 'securetableprovision'] as const, /** Create secureTableProvision mutation key */ create: () => @@ -700,6 +709,18 @@ export const userSettingsModuleMutationKeys = { /** Delete userSettingsModule mutation key */ delete: (id: string | number) => ['mutation', 'usersettingsmodule', 'delete', id] as const, } as const; +export const userSettingsSecurityModuleMutationKeys = { + /** All userSettingsSecurityModule mutation keys */ all: [ + 'mutation', + 'usersettingssecuritymodule', + ] as const, + /** Create userSettingsSecurityModule mutation key */ create: () => + ['mutation', 'usersettingssecuritymodule', 'create'] as const, + /** Update userSettingsSecurityModule mutation key */ update: (id: string | number) => + ['mutation', 'usersettingssecuritymodule', 'update', id] as const, + /** Delete userSettingsSecurityModule mutation key */ delete: (id: string | number) => + ['mutation', 'usersettingssecuritymodule', 'delete', id] as const, +} as const; export const userStateModuleMutationKeys = { /** All userStateModule mutation keys */ all: ['mutation', 'userstatemodule'] as const, /** Create userStateModule mutation key */ create: () => @@ -766,40 +787,6 @@ export const customMutationKeys = { identifier ? (['mutation', 'provisionBucket', identifier] as const) : (['mutation', 'provisionBucket'] as const), - /** Mutation key for provisionCheckConstraint */ provisionCheckConstraint: ( - identifier?: string - ) => - identifier - ? (['mutation', 'provisionCheckConstraint', identifier] as const) - : (['mutation', 'provisionCheckConstraint'] as const), - /** Mutation key for provisionFullTextSearch */ provisionFullTextSearch: (identifier?: string) => - identifier - ? (['mutation', 'provisionFullTextSearch', identifier] as const) - : (['mutation', 'provisionFullTextSearch'] as const), - /** Mutation key for provisionIndex */ provisionIndex: (identifier?: string) => - identifier - ? (['mutation', 'provisionIndex', identifier] as const) - : (['mutation', 'provisionIndex'] as const), - /** Mutation key for provisionRelation */ provisionRelation: (identifier?: string) => - identifier - ? (['mutation', 'provisionRelation', identifier] as const) - : (['mutation', 'provisionRelation'] as const), - /** Mutation key for provisionSpatialRelation */ provisionSpatialRelation: ( - identifier?: string - ) => - identifier - ? (['mutation', 'provisionSpatialRelation', identifier] as const) - : (['mutation', 'provisionSpatialRelation'] as const), - /** Mutation key for provisionTable */ provisionTable: (identifier?: string) => - identifier - ? (['mutation', 'provisionTable', identifier] as const) - : (['mutation', 'provisionTable'] as const), - /** Mutation key for provisionUniqueConstraint */ provisionUniqueConstraint: ( - identifier?: string - ) => - identifier - ? (['mutation', 'provisionUniqueConstraint', identifier] as const) - : (['mutation', 'provisionUniqueConstraint'] as const), } as const; /** @@ -885,6 +872,7 @@ export const mutationKeys = { resourceModule: resourceModuleMutationKeys, rlsModule: rlsModuleMutationKeys, routeModule: routeModuleMutationKeys, + scopeTypesModule: scopeTypesModuleMutationKeys, secureTableProvision: secureTableProvisionMutationKeys, sessionSecretsModule: sessionSecretsModuleMutationKeys, sessionsModule: sessionsModuleMutationKeys, @@ -895,6 +883,7 @@ export const mutationKeys = { userAuthModule: userAuthModuleMutationKeys, userCredentialsModule: userCredentialsModuleMutationKeys, userSettingsModule: userSettingsModuleMutationKeys, + userSettingsSecurityModule: userSettingsSecurityModuleMutationKeys, userStateModule: userStateModuleMutationKeys, usersModule: usersModuleMutationKeys, webauthnAuthModule: webauthnAuthModuleMutationKeys, diff --git a/sdk/constructive-react/src/modules/hooks/mutations/index.ts b/sdk/constructive-react/src/modules/hooks/mutations/index.ts index afa01ead8e..53e30f9b14 100644 --- a/sdk/constructive-react/src/modules/hooks/mutations/index.ts +++ b/sdk/constructive-react/src/modules/hooks/mutations/index.ts @@ -186,6 +186,9 @@ export * from './useDeleteRlsModuleMutation'; export * from './useCreateRouteModuleMutation'; export * from './useUpdateRouteModuleMutation'; export * from './useDeleteRouteModuleMutation'; +export * from './useCreateScopeTypesModuleMutation'; +export * from './useUpdateScopeTypesModuleMutation'; +export * from './useDeleteScopeTypesModuleMutation'; export * from './useCreateSecureTableProvisionMutation'; export * from './useUpdateSecureTableProvisionMutation'; export * from './useDeleteSecureTableProvisionMutation'; @@ -216,6 +219,9 @@ export * from './useDeleteUserCredentialsModuleMutation'; export * from './useCreateUserSettingsModuleMutation'; export * from './useUpdateUserSettingsModuleMutation'; export * from './useDeleteUserSettingsModuleMutation'; +export * from './useCreateUserSettingsSecurityModuleMutation'; +export * from './useUpdateUserSettingsSecurityModuleMutation'; +export * from './useDeleteUserSettingsSecurityModuleMutation'; export * from './useCreateUserStateModuleMutation'; export * from './useUpdateUserStateModuleMutation'; export * from './useDeleteUserStateModuleMutation'; @@ -234,10 +240,3 @@ export * from './useDeleteWebhookModuleMutation'; export * from './useConstructBlueprintMutation'; export * from './useCopyTemplateToBlueprintMutation'; export * from './useProvisionBucketMutation'; -export * from './useProvisionCheckConstraintMutation'; -export * from './useProvisionFullTextSearchMutation'; -export * from './useProvisionIndexMutation'; -export * from './useProvisionRelationMutation'; -export * from './useProvisionSpatialRelationMutation'; -export * from './useProvisionTableMutation'; -export * from './useProvisionUniqueConstraintMutation'; diff --git a/sdk/constructive-react/src/modules/hooks/mutations/useCreateScopeTypesModuleMutation.ts b/sdk/constructive-react/src/modules/hooks/mutations/useCreateScopeTypesModuleMutation.ts new file mode 100644 index 0000000000..3dd632d3c7 --- /dev/null +++ b/sdk/constructive-react/src/modules/hooks/mutations/useCreateScopeTypesModuleMutation.ts @@ -0,0 +1,91 @@ +/** + * Create mutation hook for ScopeTypesModule + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useMutation, useQueryClient } from '@tanstack/react-query'; +import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { scopeTypesModuleKeys } from '../query-keys'; +import { scopeTypesModuleMutationKeys } from '../mutation-keys'; +import type { + ScopeTypesModuleSelect, + ScopeTypesModuleWithRelations, + CreateScopeTypesModuleInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + ScopeTypesModuleSelect, + ScopeTypesModuleWithRelations, + CreateScopeTypesModuleInput, +} from '../../orm/input-types'; +/** + * Mutation hook for creating a ScopeTypesModule + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateScopeTypesModuleMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateScopeTypesModuleMutation( + params: { + selection: { + fields: S & ScopeTypesModuleSelect; + } & HookStrictSelect, ScopeTypesModuleSelect>; + } & Omit< + UseMutationOptions< + { + createScopeTypesModule: { + scopeTypesModule: InferSelectResult; + }; + }, + Error, + CreateScopeTypesModuleInput['scopeTypesModule'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createScopeTypesModule: { + scopeTypesModule: InferSelectResult; + }; + }, + Error, + CreateScopeTypesModuleInput['scopeTypesModule'] +>; +export function useCreateScopeTypesModuleMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: scopeTypesModuleMutationKeys.create(), + mutationFn: (data: CreateScopeTypesModuleInput['scopeTypesModule']) => + getClient() + .scopeTypesModule.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: scopeTypesModuleKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/mutations/useCreateUserSettingsSecurityModuleMutation.ts b/sdk/constructive-react/src/modules/hooks/mutations/useCreateUserSettingsSecurityModuleMutation.ts new file mode 100644 index 0000000000..7214deae9f --- /dev/null +++ b/sdk/constructive-react/src/modules/hooks/mutations/useCreateUserSettingsSecurityModuleMutation.ts @@ -0,0 +1,97 @@ +/** + * Create mutation hook for UserSettingsSecurityModule + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useMutation, useQueryClient } from '@tanstack/react-query'; +import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { userSettingsSecurityModuleKeys } from '../query-keys'; +import { userSettingsSecurityModuleMutationKeys } from '../mutation-keys'; +import type { + UserSettingsSecurityModuleSelect, + UserSettingsSecurityModuleWithRelations, + CreateUserSettingsSecurityModuleInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + UserSettingsSecurityModuleSelect, + UserSettingsSecurityModuleWithRelations, + CreateUserSettingsSecurityModuleInput, +} from '../../orm/input-types'; +/** + * Mutation hook for creating a UserSettingsSecurityModule + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateUserSettingsSecurityModuleMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateUserSettingsSecurityModuleMutation< + S extends UserSettingsSecurityModuleSelect, +>( + params: { + selection: { + fields: S & UserSettingsSecurityModuleSelect; + } & HookStrictSelect, UserSettingsSecurityModuleSelect>; + } & Omit< + UseMutationOptions< + { + createUserSettingsSecurityModule: { + userSettingsSecurityModule: InferSelectResult; + }; + }, + Error, + CreateUserSettingsSecurityModuleInput['userSettingsSecurityModule'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createUserSettingsSecurityModule: { + userSettingsSecurityModule: InferSelectResult; + }; + }, + Error, + CreateUserSettingsSecurityModuleInput['userSettingsSecurityModule'] +>; +export function useCreateUserSettingsSecurityModuleMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + CreateUserSettingsSecurityModuleInput['userSettingsSecurityModule'] + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: userSettingsSecurityModuleMutationKeys.create(), + mutationFn: (data: CreateUserSettingsSecurityModuleInput['userSettingsSecurityModule']) => + getClient() + .userSettingsSecurityModule.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: userSettingsSecurityModuleKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/mutations/useDeleteScopeTypesModuleMutation.ts b/sdk/constructive-react/src/modules/hooks/mutations/useDeleteScopeTypesModuleMutation.ts new file mode 100644 index 0000000000..5191b35c59 --- /dev/null +++ b/sdk/constructive-react/src/modules/hooks/mutations/useDeleteScopeTypesModuleMutation.ts @@ -0,0 +1,98 @@ +/** + * Delete mutation hook for ScopeTypesModule + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useMutation, useQueryClient } from '@tanstack/react-query'; +import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { scopeTypesModuleKeys } from '../query-keys'; +import { scopeTypesModuleMutationKeys } from '../mutation-keys'; +import type { ScopeTypesModuleSelect, ScopeTypesModuleWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { ScopeTypesModuleSelect, ScopeTypesModuleWithRelations } from '../../orm/input-types'; +/** + * Mutation hook for deleting a ScopeTypesModule with typed selection + * + * @example + * ```tsx + * const { mutate, isPending } = useDeleteScopeTypesModuleMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeleteScopeTypesModuleMutation( + params: { + selection: { + fields: S & ScopeTypesModuleSelect; + } & HookStrictSelect, ScopeTypesModuleSelect>; + } & Omit< + UseMutationOptions< + { + deleteScopeTypesModule: { + scopeTypesModule: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deleteScopeTypesModule: { + scopeTypesModule: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeleteScopeTypesModuleMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: scopeTypesModuleMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .scopeTypesModule.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: scopeTypesModuleKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: scopeTypesModuleKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/mutations/useDeleteUserSettingsSecurityModuleMutation.ts b/sdk/constructive-react/src/modules/hooks/mutations/useDeleteUserSettingsSecurityModuleMutation.ts new file mode 100644 index 0000000000..e57f31108e --- /dev/null +++ b/sdk/constructive-react/src/modules/hooks/mutations/useDeleteUserSettingsSecurityModuleMutation.ts @@ -0,0 +1,106 @@ +/** + * Delete mutation hook for UserSettingsSecurityModule + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useMutation, useQueryClient } from '@tanstack/react-query'; +import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { userSettingsSecurityModuleKeys } from '../query-keys'; +import { userSettingsSecurityModuleMutationKeys } from '../mutation-keys'; +import type { + UserSettingsSecurityModuleSelect, + UserSettingsSecurityModuleWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + UserSettingsSecurityModuleSelect, + UserSettingsSecurityModuleWithRelations, +} from '../../orm/input-types'; +/** + * Mutation hook for deleting a UserSettingsSecurityModule with typed selection + * + * @example + * ```tsx + * const { mutate, isPending } = useDeleteUserSettingsSecurityModuleMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeleteUserSettingsSecurityModuleMutation< + S extends UserSettingsSecurityModuleSelect, +>( + params: { + selection: { + fields: S & UserSettingsSecurityModuleSelect; + } & HookStrictSelect, UserSettingsSecurityModuleSelect>; + } & Omit< + UseMutationOptions< + { + deleteUserSettingsSecurityModule: { + userSettingsSecurityModule: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deleteUserSettingsSecurityModule: { + userSettingsSecurityModule: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeleteUserSettingsSecurityModuleMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: userSettingsSecurityModuleMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .userSettingsSecurityModule.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: userSettingsSecurityModuleKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: userSettingsSecurityModuleKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/mutations/useProvisionCheckConstraintMutation.ts b/sdk/constructive-react/src/modules/hooks/mutations/useProvisionCheckConstraintMutation.ts deleted file mode 100644 index 2e18ad6276..0000000000 --- a/sdk/constructive-react/src/modules/hooks/mutations/useProvisionCheckConstraintMutation.ts +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Custom mutation hook for provisionCheckConstraint - * @generated by @constructive-io/graphql-codegen - * DO NOT EDIT - changes will be overwritten - */ - -import { useMutation } from '@tanstack/react-query'; -import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; -import { getClient } from '../client'; -import { buildSelectionArgs } from '../selection'; -import type { SelectionConfig } from '../selection'; -import { customMutationKeys } from '../mutation-keys'; -import type { ProvisionCheckConstraintVariables } from '../../orm/mutation'; -import type { - ProvisionCheckConstraintPayloadSelect, - ProvisionCheckConstraintPayload, -} from '../../orm/input-types'; -import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; -export type { ProvisionCheckConstraintVariables } from '../../orm/mutation'; -export type { ProvisionCheckConstraintPayloadSelect } from '../../orm/input-types'; -export function useProvisionCheckConstraintMutation< - S extends ProvisionCheckConstraintPayloadSelect, ->( - params: { - selection: { - fields: S & ProvisionCheckConstraintPayloadSelect; - } & HookStrictSelect, ProvisionCheckConstraintPayloadSelect>; - } & Omit< - UseMutationOptions< - { - provisionCheckConstraint: InferSelectResult | null; - }, - Error, - ProvisionCheckConstraintVariables - >, - 'mutationFn' - > -): UseMutationResult< - { - provisionCheckConstraint: InferSelectResult | null; - }, - Error, - ProvisionCheckConstraintVariables -> { - const args = buildSelectionArgs(params.selection); - const { selection: _selection, ...mutationOptions } = params ?? {}; - void _selection; - return useMutation({ - mutationKey: customMutationKeys.provisionCheckConstraint(), - mutationFn: (variables: ProvisionCheckConstraintVariables) => - getClient() - .mutation.provisionCheckConstraint(variables, { - select: args.select, - } as { - select: S; - } & StrictSelect) - .unwrap(), - ...mutationOptions, - }); -} diff --git a/sdk/constructive-react/src/modules/hooks/mutations/useProvisionSpatialRelationMutation.ts b/sdk/constructive-react/src/modules/hooks/mutations/useProvisionSpatialRelationMutation.ts deleted file mode 100644 index 5d09d35fdb..0000000000 --- a/sdk/constructive-react/src/modules/hooks/mutations/useProvisionSpatialRelationMutation.ts +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Custom mutation hook for provisionSpatialRelation - * @generated by @constructive-io/graphql-codegen - * DO NOT EDIT - changes will be overwritten - */ - -import { useMutation } from '@tanstack/react-query'; -import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; -import { getClient } from '../client'; -import { buildSelectionArgs } from '../selection'; -import type { SelectionConfig } from '../selection'; -import { customMutationKeys } from '../mutation-keys'; -import type { ProvisionSpatialRelationVariables } from '../../orm/mutation'; -import type { - ProvisionSpatialRelationPayloadSelect, - ProvisionSpatialRelationPayload, -} from '../../orm/input-types'; -import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; -export type { ProvisionSpatialRelationVariables } from '../../orm/mutation'; -export type { ProvisionSpatialRelationPayloadSelect } from '../../orm/input-types'; -export function useProvisionSpatialRelationMutation< - S extends ProvisionSpatialRelationPayloadSelect, ->( - params: { - selection: { - fields: S & ProvisionSpatialRelationPayloadSelect; - } & HookStrictSelect, ProvisionSpatialRelationPayloadSelect>; - } & Omit< - UseMutationOptions< - { - provisionSpatialRelation: InferSelectResult | null; - }, - Error, - ProvisionSpatialRelationVariables - >, - 'mutationFn' - > -): UseMutationResult< - { - provisionSpatialRelation: InferSelectResult | null; - }, - Error, - ProvisionSpatialRelationVariables -> { - const args = buildSelectionArgs(params.selection); - const { selection: _selection, ...mutationOptions } = params ?? {}; - void _selection; - return useMutation({ - mutationKey: customMutationKeys.provisionSpatialRelation(), - mutationFn: (variables: ProvisionSpatialRelationVariables) => - getClient() - .mutation.provisionSpatialRelation(variables, { - select: args.select, - } as { - select: S; - } & StrictSelect) - .unwrap(), - ...mutationOptions, - }); -} diff --git a/sdk/constructive-react/src/modules/hooks/mutations/useUpdateScopeTypesModuleMutation.ts b/sdk/constructive-react/src/modules/hooks/mutations/useUpdateScopeTypesModuleMutation.ts new file mode 100644 index 0000000000..0d9cef2f70 --- /dev/null +++ b/sdk/constructive-react/src/modules/hooks/mutations/useUpdateScopeTypesModuleMutation.ts @@ -0,0 +1,116 @@ +/** + * Update mutation hook for ScopeTypesModule + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useMutation, useQueryClient } from '@tanstack/react-query'; +import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { scopeTypesModuleKeys } from '../query-keys'; +import { scopeTypesModuleMutationKeys } from '../mutation-keys'; +import type { + ScopeTypesModuleSelect, + ScopeTypesModuleWithRelations, + ScopeTypesModulePatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + ScopeTypesModuleSelect, + ScopeTypesModuleWithRelations, + ScopeTypesModulePatch, +} from '../../orm/input-types'; +/** + * Mutation hook for updating a ScopeTypesModule + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdateScopeTypesModuleMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', scopeTypesModulePatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdateScopeTypesModuleMutation( + params: { + selection: { + fields: S & ScopeTypesModuleSelect; + } & HookStrictSelect, ScopeTypesModuleSelect>; + } & Omit< + UseMutationOptions< + { + updateScopeTypesModule: { + scopeTypesModule: InferSelectResult; + }; + }, + Error, + { + id: string; + scopeTypesModulePatch: ScopeTypesModulePatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updateScopeTypesModule: { + scopeTypesModule: InferSelectResult; + }; + }, + Error, + { + id: string; + scopeTypesModulePatch: ScopeTypesModulePatch; + } +>; +export function useUpdateScopeTypesModuleMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + scopeTypesModulePatch: ScopeTypesModulePatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: scopeTypesModuleMutationKeys.all, + mutationFn: ({ + id, + scopeTypesModulePatch, + }: { + id: string; + scopeTypesModulePatch: ScopeTypesModulePatch; + }) => + getClient() + .scopeTypesModule.update({ + where: { + id, + }, + data: scopeTypesModulePatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: scopeTypesModuleKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: scopeTypesModuleKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/mutations/useUpdateUserSettingsSecurityModuleMutation.ts b/sdk/constructive-react/src/modules/hooks/mutations/useUpdateUserSettingsSecurityModuleMutation.ts new file mode 100644 index 0000000000..28a09bbe4a --- /dev/null +++ b/sdk/constructive-react/src/modules/hooks/mutations/useUpdateUserSettingsSecurityModuleMutation.ts @@ -0,0 +1,118 @@ +/** + * Update mutation hook for UserSettingsSecurityModule + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useMutation, useQueryClient } from '@tanstack/react-query'; +import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { userSettingsSecurityModuleKeys } from '../query-keys'; +import { userSettingsSecurityModuleMutationKeys } from '../mutation-keys'; +import type { + UserSettingsSecurityModuleSelect, + UserSettingsSecurityModuleWithRelations, + UserSettingsSecurityModulePatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + UserSettingsSecurityModuleSelect, + UserSettingsSecurityModuleWithRelations, + UserSettingsSecurityModulePatch, +} from '../../orm/input-types'; +/** + * Mutation hook for updating a UserSettingsSecurityModule + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdateUserSettingsSecurityModuleMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', userSettingsSecurityModulePatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdateUserSettingsSecurityModuleMutation< + S extends UserSettingsSecurityModuleSelect, +>( + params: { + selection: { + fields: S & UserSettingsSecurityModuleSelect; + } & HookStrictSelect, UserSettingsSecurityModuleSelect>; + } & Omit< + UseMutationOptions< + { + updateUserSettingsSecurityModule: { + userSettingsSecurityModule: InferSelectResult; + }; + }, + Error, + { + id: string; + userSettingsSecurityModulePatch: UserSettingsSecurityModulePatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updateUserSettingsSecurityModule: { + userSettingsSecurityModule: InferSelectResult; + }; + }, + Error, + { + id: string; + userSettingsSecurityModulePatch: UserSettingsSecurityModulePatch; + } +>; +export function useUpdateUserSettingsSecurityModuleMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + userSettingsSecurityModulePatch: UserSettingsSecurityModulePatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: userSettingsSecurityModuleMutationKeys.all, + mutationFn: ({ + id, + userSettingsSecurityModulePatch, + }: { + id: string; + userSettingsSecurityModulePatch: UserSettingsSecurityModulePatch; + }) => + getClient() + .userSettingsSecurityModule.update({ + where: { + id, + }, + data: userSettingsSecurityModulePatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: userSettingsSecurityModuleKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: userSettingsSecurityModuleKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/queries/index.ts b/sdk/constructive-react/src/modules/hooks/queries/index.ts index a12257a67f..67d54f1635 100644 --- a/sdk/constructive-react/src/modules/hooks/queries/index.ts +++ b/sdk/constructive-react/src/modules/hooks/queries/index.ts @@ -125,6 +125,8 @@ export * from './useRlsModulesQuery'; export * from './useRlsModuleQuery'; export * from './useRouteModulesQuery'; export * from './useRouteModuleQuery'; +export * from './useScopeTypesModulesQuery'; +export * from './useScopeTypesModuleQuery'; export * from './useSecureTableProvisionsQuery'; export * from './useSecureTableProvisionQuery'; export * from './useSessionSecretsModulesQuery'; @@ -145,6 +147,8 @@ export * from './useUserCredentialsModulesQuery'; export * from './useUserCredentialsModuleQuery'; export * from './useUserSettingsModulesQuery'; export * from './useUserSettingsModuleQuery'; +export * from './useUserSettingsSecurityModulesQuery'; +export * from './useUserSettingsSecurityModuleQuery'; export * from './useUserStateModulesQuery'; export * from './useUserStateModuleQuery'; export * from './useUsersModulesQuery'; @@ -155,5 +159,3 @@ export * from './useWebauthnCredentialsModulesQuery'; export * from './useWebauthnCredentialsModuleQuery'; export * from './useWebhookModulesQuery'; export * from './useWebhookModuleQuery'; -export * from './useResolveBlueprintFieldQuery'; -export * from './useResolveBlueprintTableQuery'; diff --git a/sdk/constructive-react/src/modules/hooks/queries/useResolveBlueprintFieldQuery.ts b/sdk/constructive-react/src/modules/hooks/queries/useResolveBlueprintFieldQuery.ts deleted file mode 100644 index 3584b7d36a..0000000000 --- a/sdk/constructive-react/src/modules/hooks/queries/useResolveBlueprintFieldQuery.ts +++ /dev/null @@ -1,107 +0,0 @@ -/** - * Custom query hook for resolveBlueprintField - * @generated by @constructive-io/graphql-codegen - * DO NOT EDIT - changes will be overwritten - */ - -import { useQuery } from '@tanstack/react-query'; -import type { UseQueryOptions, UseQueryResult, QueryClient } from '@tanstack/react-query'; -import { getClient } from '../client'; -import { buildSelectionArgs } from '../selection'; -import type { SelectionConfig } from '../selection'; -import { customQueryKeys } from '../query-keys'; -import type { ResolveBlueprintFieldVariables } from '../../orm/query'; -export type { ResolveBlueprintFieldVariables } from '../../orm/query'; -/** Query key factory - re-exported from query-keys.ts */ -export const resolveBlueprintFieldQueryKey = customQueryKeys.resolveBlueprintField; -/** - * Resolves a field_name within a given table_id to a field_id. Throws if no match is found. Used by construct_blueprint to translate user-authored field names (e.g. "location") into field UUIDs for downstream provisioning procedures. table_id must already be resolved (via resolve_blueprint_table) before calling this. - * - * @example - * ```tsx - * const { data, isLoading } = useResolveBlueprintFieldQuery({ variables: { databaseId, fieldName, tableId } }); - * - * if (data?.resolveBlueprintField) { - * console.log(data.resolveBlueprintField); - * } - * ``` - */ -export function useResolveBlueprintFieldQuery< - TData = { - resolveBlueprintField: string | null; - }, ->( - params?: { - variables?: ResolveBlueprintFieldVariables; - } & Omit< - UseQueryOptions< - { - resolveBlueprintField: string | null; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult; -export function useResolveBlueprintFieldQuery< - TData = { - resolveBlueprintField: string | null; - }, ->( - params?: { - variables?: ResolveBlueprintFieldVariables; - } & Omit< - UseQueryOptions< - { - resolveBlueprintField: string | null; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult { - const variables = params?.variables ?? {}; - const { variables: _variables, ...queryOptions } = params ?? {}; - void _variables; - return useQuery({ - queryKey: resolveBlueprintFieldQueryKey(variables), - queryFn: () => getClient().query.resolveBlueprintField(variables).unwrap(), - ...queryOptions, - }); -} -/** - * Fetch resolveBlueprintField without React hooks - * - * @example - * ```ts - * const data = await fetchResolveBlueprintFieldQuery({ variables: { databaseId, fieldName, tableId } }); - * ``` - */ -export async function fetchResolveBlueprintFieldQuery(params?: { - variables?: ResolveBlueprintFieldVariables; -}) { - const variables = params?.variables ?? {}; - return getClient().query.resolveBlueprintField(variables).unwrap(); -} -/** - * Prefetch resolveBlueprintField for SSR or cache warming - * - * @example - * ```ts - * await prefetchResolveBlueprintFieldQuery(queryClient, { variables: { databaseId, fieldName, tableId } }); - * ``` - */ -export async function prefetchResolveBlueprintFieldQuery( - queryClient: QueryClient, - params?: { - variables?: ResolveBlueprintFieldVariables; - } -): Promise { - const variables = params?.variables ?? {}; - await queryClient.prefetchQuery({ - queryKey: resolveBlueprintFieldQueryKey(variables), - queryFn: () => getClient().query.resolveBlueprintField(variables).unwrap(), - }); -} diff --git a/sdk/constructive-react/src/modules/hooks/queries/useResolveBlueprintTableQuery.ts b/sdk/constructive-react/src/modules/hooks/queries/useResolveBlueprintTableQuery.ts deleted file mode 100644 index 906033d06c..0000000000 --- a/sdk/constructive-react/src/modules/hooks/queries/useResolveBlueprintTableQuery.ts +++ /dev/null @@ -1,107 +0,0 @@ -/** - * Custom query hook for resolveBlueprintTable - * @generated by @constructive-io/graphql-codegen - * DO NOT EDIT - changes will be overwritten - */ - -import { useQuery } from '@tanstack/react-query'; -import type { UseQueryOptions, UseQueryResult, QueryClient } from '@tanstack/react-query'; -import { getClient } from '../client'; -import { buildSelectionArgs } from '../selection'; -import type { SelectionConfig } from '../selection'; -import { customQueryKeys } from '../query-keys'; -import type { ResolveBlueprintTableVariables } from '../../orm/query'; -export type { ResolveBlueprintTableVariables } from '../../orm/query'; -/** Query key factory - re-exported from query-keys.ts */ -export const resolveBlueprintTableQueryKey = customQueryKeys.resolveBlueprintTable; -/** - * Resolves a table_name (with optional schema_name) to a table_id. Resolution order: (1) if schema_name provided, exact lookup via metaschema_public.schema.name + metaschema_public.table; (2) check local table_map (tables created in current blueprint); (3) search metaschema_public.table by name across all schemas; (4) if multiple matches, throw ambiguous error asking for schema_name; (5) if no match, throw not-found error. - * - * @example - * ```tsx - * const { data, isLoading } = useResolveBlueprintTableQuery({ variables: { databaseId, defaultSchemaId, schemaName, tableMap, tableName } }); - * - * if (data?.resolveBlueprintTable) { - * console.log(data.resolveBlueprintTable); - * } - * ``` - */ -export function useResolveBlueprintTableQuery< - TData = { - resolveBlueprintTable: string | null; - }, ->( - params?: { - variables?: ResolveBlueprintTableVariables; - } & Omit< - UseQueryOptions< - { - resolveBlueprintTable: string | null; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult; -export function useResolveBlueprintTableQuery< - TData = { - resolveBlueprintTable: string | null; - }, ->( - params?: { - variables?: ResolveBlueprintTableVariables; - } & Omit< - UseQueryOptions< - { - resolveBlueprintTable: string | null; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult { - const variables = params?.variables ?? {}; - const { variables: _variables, ...queryOptions } = params ?? {}; - void _variables; - return useQuery({ - queryKey: resolveBlueprintTableQueryKey(variables), - queryFn: () => getClient().query.resolveBlueprintTable(variables).unwrap(), - ...queryOptions, - }); -} -/** - * Fetch resolveBlueprintTable without React hooks - * - * @example - * ```ts - * const data = await fetchResolveBlueprintTableQuery({ variables: { databaseId, defaultSchemaId, schemaName, tableMap, tableName } }); - * ``` - */ -export async function fetchResolveBlueprintTableQuery(params?: { - variables?: ResolveBlueprintTableVariables; -}) { - const variables = params?.variables ?? {}; - return getClient().query.resolveBlueprintTable(variables).unwrap(); -} -/** - * Prefetch resolveBlueprintTable for SSR or cache warming - * - * @example - * ```ts - * await prefetchResolveBlueprintTableQuery(queryClient, { variables: { databaseId, defaultSchemaId, schemaName, tableMap, tableName } }); - * ``` - */ -export async function prefetchResolveBlueprintTableQuery( - queryClient: QueryClient, - params?: { - variables?: ResolveBlueprintTableVariables; - } -): Promise { - const variables = params?.variables ?? {}; - await queryClient.prefetchQuery({ - queryKey: resolveBlueprintTableQueryKey(variables), - queryFn: () => getClient().query.resolveBlueprintTable(variables).unwrap(), - }); -} diff --git a/sdk/constructive-react/src/modules/hooks/queries/useScopeTypesModuleQuery.ts b/sdk/constructive-react/src/modules/hooks/queries/useScopeTypesModuleQuery.ts new file mode 100644 index 0000000000..3f6cdcebc9 --- /dev/null +++ b/sdk/constructive-react/src/modules/hooks/queries/useScopeTypesModuleQuery.ts @@ -0,0 +1,138 @@ +/** + * Single item query hook for ScopeTypesModule + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useQuery } from '@tanstack/react-query'; +import type { UseQueryOptions, UseQueryResult, QueryClient } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { scopeTypesModuleKeys } from '../query-keys'; +import type { ScopeTypesModuleSelect, ScopeTypesModuleWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { ScopeTypesModuleSelect, ScopeTypesModuleWithRelations } from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const scopeTypesModuleQueryKey = scopeTypesModuleKeys.detail; +/** + * Query hook for fetching a single ScopeTypesModule + * + * @example + * ```tsx + * const { data, isLoading } = useScopeTypesModuleQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useScopeTypesModuleQuery< + S extends ScopeTypesModuleSelect, + TData = { + scopeTypesModule: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, ScopeTypesModuleSelect>; + } & Omit< + UseQueryOptions< + { + scopeTypesModule: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useScopeTypesModuleQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: scopeTypesModuleKeys.detail(params.id), + queryFn: () => + getClient() + .scopeTypesModule.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Fetch a single ScopeTypesModule without React hooks + * + * @example + * ```ts + * const data = await fetchScopeTypesModuleQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchScopeTypesModuleQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, ScopeTypesModuleSelect>; +}): Promise<{ + scopeTypesModule: InferSelectResult | null; +}>; +export async function fetchScopeTypesModuleQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .scopeTypesModule.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Prefetch a single ScopeTypesModule for SSR or cache warming + * + * @example + * ```ts + * await prefetchScopeTypesModuleQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchScopeTypesModuleQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, ScopeTypesModuleSelect>; + } +): Promise; +export async function prefetchScopeTypesModuleQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: scopeTypesModuleKeys.detail(params.id), + queryFn: () => + getClient() + .scopeTypesModule.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/queries/useScopeTypesModulesQuery.ts b/sdk/constructive-react/src/modules/hooks/queries/useScopeTypesModulesQuery.ts new file mode 100644 index 0000000000..e04a11e99a --- /dev/null +++ b/sdk/constructive-react/src/modules/hooks/queries/useScopeTypesModulesQuery.ts @@ -0,0 +1,163 @@ +/** + * List query hook for ScopeTypesModule + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useQuery } from '@tanstack/react-query'; +import type { UseQueryOptions, UseQueryResult, QueryClient } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildListSelectionArgs } from '../selection'; +import type { ListSelectionConfig } from '../selection'; +import { scopeTypesModuleKeys } from '../query-keys'; +import type { + ScopeTypesModuleSelect, + ScopeTypesModuleWithRelations, + ScopeTypesModuleFilter, + ScopeTypesModuleOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + ScopeTypesModuleSelect, + ScopeTypesModuleWithRelations, + ScopeTypesModuleFilter, + ScopeTypesModuleOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const scopeTypesModulesQueryKey = scopeTypesModuleKeys.list; +/** + * Query hook for fetching ScopeTypesModule list + * + * @example + * ```tsx + * const { data, isLoading } = useScopeTypesModulesQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useScopeTypesModulesQuery< + S extends ScopeTypesModuleSelect, + TData = { + scopeTypesModules: ConnectionResult>; + }, +>( + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, ScopeTypesModuleSelect>; + } & Omit< + UseQueryOptions< + { + scopeTypesModules: ConnectionResult>; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useScopeTypesModulesQuery( + params: { + selection: ListSelectionConfig< + ScopeTypesModuleSelect, + ScopeTypesModuleFilter, + ScopeTypesModuleOrderBy + >; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + ScopeTypesModuleSelect, + ScopeTypesModuleFilter, + ScopeTypesModuleOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: scopeTypesModuleKeys.list(args), + queryFn: () => getClient().scopeTypesModule.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Fetch ScopeTypesModule list without React hooks + * + * @example + * ```ts + * const data = await fetchScopeTypesModulesQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchScopeTypesModulesQuery(params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, ScopeTypesModuleSelect>; +}): Promise<{ + scopeTypesModules: ConnectionResult>; +}>; +export async function fetchScopeTypesModulesQuery(params: { + selection: ListSelectionConfig< + ScopeTypesModuleSelect, + ScopeTypesModuleFilter, + ScopeTypesModuleOrderBy + >; +}) { + const args = buildListSelectionArgs< + ScopeTypesModuleSelect, + ScopeTypesModuleFilter, + ScopeTypesModuleOrderBy + >(params.selection); + return getClient().scopeTypesModule.findMany(args).unwrap(); +} +/** + * Prefetch ScopeTypesModule list for SSR or cache warming + * + * @example + * ```ts + * await prefetchScopeTypesModulesQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchScopeTypesModulesQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, ScopeTypesModuleSelect>; + } +): Promise; +export async function prefetchScopeTypesModulesQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig< + ScopeTypesModuleSelect, + ScopeTypesModuleFilter, + ScopeTypesModuleOrderBy + >; + } +): Promise { + const args = buildListSelectionArgs< + ScopeTypesModuleSelect, + ScopeTypesModuleFilter, + ScopeTypesModuleOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: scopeTypesModuleKeys.list(args), + queryFn: () => getClient().scopeTypesModule.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/queries/useUserSettingsSecurityModuleQuery.ts b/sdk/constructive-react/src/modules/hooks/queries/useUserSettingsSecurityModuleQuery.ts new file mode 100644 index 0000000000..ae6ffc138e --- /dev/null +++ b/sdk/constructive-react/src/modules/hooks/queries/useUserSettingsSecurityModuleQuery.ts @@ -0,0 +1,154 @@ +/** + * Single item query hook for UserSettingsSecurityModule + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useQuery } from '@tanstack/react-query'; +import type { UseQueryOptions, UseQueryResult, QueryClient } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { userSettingsSecurityModuleKeys } from '../query-keys'; +import type { + UserSettingsSecurityModuleSelect, + UserSettingsSecurityModuleWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + UserSettingsSecurityModuleSelect, + UserSettingsSecurityModuleWithRelations, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const userSettingsSecurityModuleQueryKey = userSettingsSecurityModuleKeys.detail; +/** + * Query hook for fetching a single UserSettingsSecurityModule + * + * @example + * ```tsx + * const { data, isLoading } = useUserSettingsSecurityModuleQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useUserSettingsSecurityModuleQuery< + S extends UserSettingsSecurityModuleSelect, + TData = { + userSettingsSecurityModule: InferSelectResult< + UserSettingsSecurityModuleWithRelations, + S + > | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, UserSettingsSecurityModuleSelect>; + } & Omit< + UseQueryOptions< + { + userSettingsSecurityModule: InferSelectResult< + UserSettingsSecurityModuleWithRelations, + S + > | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useUserSettingsSecurityModuleQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: userSettingsSecurityModuleKeys.detail(params.id), + queryFn: () => + getClient() + .userSettingsSecurityModule.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Fetch a single UserSettingsSecurityModule without React hooks + * + * @example + * ```ts + * const data = await fetchUserSettingsSecurityModuleQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchUserSettingsSecurityModuleQuery< + S extends UserSettingsSecurityModuleSelect, +>(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, UserSettingsSecurityModuleSelect>; +}): Promise<{ + userSettingsSecurityModule: InferSelectResult | null; +}>; +export async function fetchUserSettingsSecurityModuleQuery(params: { + id: string; + selection: SelectionConfig; +}): Promise { + const args = buildSelectionArgs(params.selection); + return getClient() + .userSettingsSecurityModule.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Prefetch a single UserSettingsSecurityModule for SSR or cache warming + * + * @example + * ```ts + * await prefetchUserSettingsSecurityModuleQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchUserSettingsSecurityModuleQuery< + S extends UserSettingsSecurityModuleSelect, +>( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, UserSettingsSecurityModuleSelect>; + } +): Promise; +export async function prefetchUserSettingsSecurityModuleQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: userSettingsSecurityModuleKeys.detail(params.id), + queryFn: () => + getClient() + .userSettingsSecurityModule.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/queries/useUserSettingsSecurityModulesQuery.ts b/sdk/constructive-react/src/modules/hooks/queries/useUserSettingsSecurityModulesQuery.ts new file mode 100644 index 0000000000..03736ac8df --- /dev/null +++ b/sdk/constructive-react/src/modules/hooks/queries/useUserSettingsSecurityModulesQuery.ts @@ -0,0 +1,182 @@ +/** + * List query hook for UserSettingsSecurityModule + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useQuery } from '@tanstack/react-query'; +import type { UseQueryOptions, UseQueryResult, QueryClient } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildListSelectionArgs } from '../selection'; +import type { ListSelectionConfig } from '../selection'; +import { userSettingsSecurityModuleKeys } from '../query-keys'; +import type { + UserSettingsSecurityModuleSelect, + UserSettingsSecurityModuleWithRelations, + UserSettingsSecurityModuleFilter, + UserSettingsSecurityModuleOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + UserSettingsSecurityModuleSelect, + UserSettingsSecurityModuleWithRelations, + UserSettingsSecurityModuleFilter, + UserSettingsSecurityModuleOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const userSettingsSecurityModulesQueryKey = userSettingsSecurityModuleKeys.list; +/** + * Query hook for fetching UserSettingsSecurityModule list + * + * @example + * ```tsx + * const { data, isLoading } = useUserSettingsSecurityModulesQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useUserSettingsSecurityModulesQuery< + S extends UserSettingsSecurityModuleSelect, + TData = { + userSettingsSecurityModules: ConnectionResult< + InferSelectResult + >; + }, +>( + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, UserSettingsSecurityModuleSelect>; + } & Omit< + UseQueryOptions< + { + userSettingsSecurityModules: ConnectionResult< + InferSelectResult + >; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useUserSettingsSecurityModulesQuery( + params: { + selection: ListSelectionConfig< + UserSettingsSecurityModuleSelect, + UserSettingsSecurityModuleFilter, + UserSettingsSecurityModuleOrderBy + >; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + UserSettingsSecurityModuleSelect, + UserSettingsSecurityModuleFilter, + UserSettingsSecurityModuleOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: userSettingsSecurityModuleKeys.list(args), + queryFn: () => getClient().userSettingsSecurityModule.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Fetch UserSettingsSecurityModule list without React hooks + * + * @example + * ```ts + * const data = await fetchUserSettingsSecurityModulesQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchUserSettingsSecurityModulesQuery< + S extends UserSettingsSecurityModuleSelect, +>(params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, UserSettingsSecurityModuleSelect>; +}): Promise<{ + userSettingsSecurityModules: ConnectionResult< + InferSelectResult + >; +}>; +export async function fetchUserSettingsSecurityModulesQuery(params: { + selection: ListSelectionConfig< + UserSettingsSecurityModuleSelect, + UserSettingsSecurityModuleFilter, + UserSettingsSecurityModuleOrderBy + >; +}) { + const args = buildListSelectionArgs< + UserSettingsSecurityModuleSelect, + UserSettingsSecurityModuleFilter, + UserSettingsSecurityModuleOrderBy + >(params.selection); + return getClient().userSettingsSecurityModule.findMany(args).unwrap(); +} +/** + * Prefetch UserSettingsSecurityModule list for SSR or cache warming + * + * @example + * ```ts + * await prefetchUserSettingsSecurityModulesQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchUserSettingsSecurityModulesQuery< + S extends UserSettingsSecurityModuleSelect, +>( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, UserSettingsSecurityModuleSelect>; + } +): Promise; +export async function prefetchUserSettingsSecurityModulesQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig< + UserSettingsSecurityModuleSelect, + UserSettingsSecurityModuleFilter, + UserSettingsSecurityModuleOrderBy + >; + } +): Promise { + const args = buildListSelectionArgs< + UserSettingsSecurityModuleSelect, + UserSettingsSecurityModuleFilter, + UserSettingsSecurityModuleOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: userSettingsSecurityModuleKeys.list(args), + queryFn: () => getClient().userSettingsSecurityModule.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/query-keys.ts b/sdk/constructive-react/src/modules/hooks/query-keys.ts index 551484d6ec..2948302d9a 100644 --- a/sdk/constructive-react/src/modules/hooks/query-keys.ts +++ b/sdk/constructive-react/src/modules/hooks/query-keys.ts @@ -569,6 +569,15 @@ export const routeModuleKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...routeModuleKeys.details(), id] as const, } as const; +export const scopeTypesModuleKeys = { + /** All scopeTypesModule queries */ all: ['scopetypesmodule'] as const, + /** List query keys */ lists: () => [...scopeTypesModuleKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...scopeTypesModuleKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...scopeTypesModuleKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...scopeTypesModuleKeys.details(), id] as const, +} as const; export const secureTableProvisionKeys = { /** All secureTableProvision queries */ all: ['securetableprovision'] as const, /** List query keys */ lists: () => [...secureTableProvisionKeys.all, 'list'] as const, @@ -659,6 +668,16 @@ export const userSettingsModuleKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...userSettingsModuleKeys.details(), id] as const, } as const; +export const userSettingsSecurityModuleKeys = { + /** All userSettingsSecurityModule queries */ all: ['usersettingssecuritymodule'] as const, + /** List query keys */ lists: () => [...userSettingsSecurityModuleKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...userSettingsSecurityModuleKeys.lists(), variables] as const, + /** Detail query keys */ details: () => + [...userSettingsSecurityModuleKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...userSettingsSecurityModuleKeys.details(), id] as const, +} as const; export const userStateModuleKeys = { /** All userStateModule queries */ all: ['userstatemodule'] as const, /** List query keys */ lists: () => [...userStateModuleKeys.all, 'list'] as const, @@ -704,17 +723,6 @@ export const webhookModuleKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...webhookModuleKeys.details(), id] as const, } as const; - -// ============================================================================ -// Custom Query Keys -// ============================================================================ - -export const customQueryKeys = { - /** Query key for resolveBlueprintField */ resolveBlueprintField: (variables?: object) => - ['resolveBlueprintField', variables] as const, - /** Query key for resolveBlueprintTable */ resolveBlueprintTable: (variables?: object) => - ['resolveBlueprintTable', variables] as const, -} as const; /** // ============================================================================ @@ -799,6 +807,7 @@ export const queryKeys = { resourceModule: resourceModuleKeys, rlsModule: rlsModuleKeys, routeModule: routeModuleKeys, + scopeTypesModule: scopeTypesModuleKeys, secureTableProvision: secureTableProvisionKeys, sessionSecretsModule: sessionSecretsModuleKeys, sessionsModule: sessionsModuleKeys, @@ -809,12 +818,12 @@ export const queryKeys = { userAuthModule: userAuthModuleKeys, userCredentialsModule: userCredentialsModuleKeys, userSettingsModule: userSettingsModuleKeys, + userSettingsSecurityModule: userSettingsSecurityModuleKeys, userStateModule: userStateModuleKeys, usersModule: usersModuleKeys, webauthnAuthModule: webauthnAuthModuleKeys, webauthnCredentialsModule: webauthnCredentialsModuleKeys, webhookModule: webhookModuleKeys, - custom: customQueryKeys, } as const; /** Type representing all available query key scopes */ export type QueryKeyScope = keyof typeof queryKeys; diff --git a/sdk/constructive-react/src/modules/orm/README.md b/sdk/constructive-react/src/modules/orm/README.md index 7982fe489a..7348b2a287 100644 --- a/sdk/constructive-react/src/modules/orm/README.md +++ b/sdk/constructive-react/src/modules/orm/README.md @@ -82,6 +82,7 @@ const db = createClient({ | `resourceModule` | findMany, findOne, create, update, delete | | `rlsModule` | findMany, findOne, create, update, delete | | `routeModule` | findMany, findOne, create, update, delete | +| `scopeTypesModule` | findMany, findOne, create, update, delete | | `secureTableProvision` | findMany, findOne, create, update, delete | | `sessionSecretsModule` | findMany, findOne, create, update, delete | | `sessionsModule` | findMany, findOne, create, update, delete | @@ -92,6 +93,7 @@ const db = createClient({ | `userAuthModule` | findMany, findOne, create, update, delete | | `userCredentialsModule` | findMany, findOne, create, update, delete | | `userSettingsModule` | findMany, findOne, create, update, delete | +| `userSettingsSecurityModule` | findMany, findOne, create, update, delete | | `userStateModule` | findMany, findOne, create, update, delete | | `usersModule` | findMany, findOne, create, update, delete | | `webauthnAuthModule` | findMany, findOne, create, update, delete | @@ -329,16 +331,22 @@ CRUD operations for BillingProviderModule records. | `apiName` | String | Yes | | `billingCustomersTableId` | UUID | Yes | | `billingCustomersTableName` | String | Yes | +| `billingInvoicesTableId` | UUID | Yes | +| `billingInvoicesTableName` | String | Yes | | `billingPricesTableId` | UUID | Yes | | `billingPricesTableName` | String | Yes | | `billingProductsTableId` | UUID | Yes | | `billingProductsTableName` | String | Yes | +| `billingRefundsTableId` | UUID | Yes | +| `billingRefundsTableName` | String | Yes | | `billingSubscriptionsTableId` | UUID | Yes | | `billingSubscriptionsTableName` | String | Yes | | `billingWebhookEventsTableId` | UUID | Yes | | `billingWebhookEventsTableName` | String | Yes | | `databaseId` | UUID | Yes | | `id` | UUID | No | +| `listPendingUsageSyncFunction` | String | Yes | +| `markUsageSyncedFunction` | String | Yes | | `prefix` | String | Yes | | `pricesTableId` | UUID | Yes | | `privateApiName` | String | Yes | @@ -346,20 +354,22 @@ CRUD operations for BillingProviderModule records. | `processBillingEventFunction` | String | Yes | | `productsTableId` | UUID | Yes | | `provider` | String | Yes | +| `recordRefundFunction` | String | Yes | | `schemaId` | UUID | Yes | | `subscriptionsTableId` | UUID | Yes | +| `upsertInvoiceFunction` | String | Yes | **Operations:** ```typescript // List all billingProviderModule records -const items = await db.billingProviderModule.findMany({ select: { apiName: true, billingCustomersTableId: true, billingCustomersTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, databaseId: true, id: true, prefix: true, pricesTableId: true, privateApiName: true, privateSchemaId: true, processBillingEventFunction: true, productsTableId: true, provider: true, schemaId: true, subscriptionsTableId: true } }).execute(); +const items = await db.billingProviderModule.findMany({ select: { apiName: true, billingCustomersTableId: true, billingCustomersTableName: true, billingInvoicesTableId: true, billingInvoicesTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, billingRefundsTableId: true, billingRefundsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, databaseId: true, id: true, listPendingUsageSyncFunction: true, markUsageSyncedFunction: true, prefix: true, pricesTableId: true, privateApiName: true, privateSchemaId: true, processBillingEventFunction: true, productsTableId: true, provider: true, recordRefundFunction: true, schemaId: true, subscriptionsTableId: true, upsertInvoiceFunction: true } }).execute(); // Get one by id -const item = await db.billingProviderModule.findOne({ id: '', select: { apiName: true, billingCustomersTableId: true, billingCustomersTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, databaseId: true, id: true, prefix: true, pricesTableId: true, privateApiName: true, privateSchemaId: true, processBillingEventFunction: true, productsTableId: true, provider: true, schemaId: true, subscriptionsTableId: true } }).execute(); +const item = await db.billingProviderModule.findOne({ id: '', select: { apiName: true, billingCustomersTableId: true, billingCustomersTableName: true, billingInvoicesTableId: true, billingInvoicesTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, billingRefundsTableId: true, billingRefundsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, databaseId: true, id: true, listPendingUsageSyncFunction: true, markUsageSyncedFunction: true, prefix: true, pricesTableId: true, privateApiName: true, privateSchemaId: true, processBillingEventFunction: true, productsTableId: true, provider: true, recordRefundFunction: true, schemaId: true, subscriptionsTableId: true, upsertInvoiceFunction: true } }).execute(); // Create -const created = await db.billingProviderModule.create({ data: { apiName: '', billingCustomersTableId: '', billingCustomersTableName: '', billingPricesTableId: '', billingPricesTableName: '', billingProductsTableId: '', billingProductsTableName: '', billingSubscriptionsTableId: '', billingSubscriptionsTableName: '', billingWebhookEventsTableId: '', billingWebhookEventsTableName: '', databaseId: '', prefix: '', pricesTableId: '', privateApiName: '', privateSchemaId: '', processBillingEventFunction: '', productsTableId: '', provider: '', schemaId: '', subscriptionsTableId: '' }, select: { id: true } }).execute(); +const created = await db.billingProviderModule.create({ data: { apiName: '', billingCustomersTableId: '', billingCustomersTableName: '', billingInvoicesTableId: '', billingInvoicesTableName: '', billingPricesTableId: '', billingPricesTableName: '', billingProductsTableId: '', billingProductsTableName: '', billingRefundsTableId: '', billingRefundsTableName: '', billingSubscriptionsTableId: '', billingSubscriptionsTableName: '', billingWebhookEventsTableId: '', billingWebhookEventsTableName: '', databaseId: '', listPendingUsageSyncFunction: '', markUsageSyncedFunction: '', prefix: '', pricesTableId: '', privateApiName: '', privateSchemaId: '', processBillingEventFunction: '', productsTableId: '', provider: '', recordRefundFunction: '', schemaId: '', subscriptionsTableId: '', upsertInvoiceFunction: '' }, select: { id: true } }).execute(); // Update const updated = await db.billingProviderModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -508,6 +518,8 @@ CRUD operations for CatalogModule records. | `apisTableName` | String | Yes | | `appsTableId` | UUID | Yes | | `appsTableName` | String | Yes | +| `bindingsTableId` | UUID | Yes | +| `bindingsTableName` | String | Yes | | `bucketsTableId` | UUID | Yes | | `bucketsTableName` | String | Yes | | `databaseId` | UUID | Yes | @@ -547,13 +559,13 @@ CRUD operations for CatalogModule records. ```typescript // List all catalogModule records -const items = await db.catalogModule.findMany({ select: { apiName: true, apisTableId: true, apisTableName: true, appsTableId: true, appsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultPermissions: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } }).execute(); +const items = await db.catalogModule.findMany({ select: { apiName: true, apisTableId: true, apisTableName: true, appsTableId: true, appsTableName: true, bindingsTableId: true, bindingsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultPermissions: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } }).execute(); // Get one by id -const item = await db.catalogModule.findOne({ id: '', select: { apiName: true, apisTableId: true, apisTableName: true, appsTableId: true, appsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultPermissions: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } }).execute(); +const item = await db.catalogModule.findOne({ id: '', select: { apiName: true, apisTableId: true, apisTableName: true, appsTableId: true, appsTableName: true, bindingsTableId: true, bindingsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultPermissions: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } }).execute(); // Create -const created = await db.catalogModule.create({ data: { apiName: '', apisTableId: '', apisTableName: '', appsTableId: '', appsTableName: '', bucketsTableId: '', bucketsTableName: '', databaseId: '', defaultPermissions: '', domainsTableId: '', domainsTableName: '', entityTableId: '', functionsTableId: '', functionsTableName: '', namespacesTableId: '', namespacesTableName: '', policies: '', privateApiName: '', provisions: '', publicSchemaName: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourcesTableId: '', resourcesTableName: '', schemaId: '', scope: '', sitesAppLinksTableId: '', sitesAppLinksTableName: '', sitesDeepLinksTableId: '', sitesDeepLinksTableName: '', sitesErrorPagesTableId: '', sitesErrorPagesTableName: '', sitesTableId: '', sitesTableName: '', sitesWebConfigTableId: '', sitesWebConfigTableName: '' }, select: { id: true } }).execute(); +const created = await db.catalogModule.create({ data: { apiName: '', apisTableId: '', apisTableName: '', appsTableId: '', appsTableName: '', bindingsTableId: '', bindingsTableName: '', bucketsTableId: '', bucketsTableName: '', databaseId: '', defaultPermissions: '', domainsTableId: '', domainsTableName: '', entityTableId: '', functionsTableId: '', functionsTableName: '', namespacesTableId: '', namespacesTableName: '', policies: '', privateApiName: '', provisions: '', publicSchemaName: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourcesTableId: '', resourcesTableName: '', schemaId: '', scope: '', sitesAppLinksTableId: '', sitesAppLinksTableName: '', sitesDeepLinksTableId: '', sitesDeepLinksTableName: '', sitesErrorPagesTableId: '', sitesErrorPagesTableName: '', sitesTableId: '', sitesTableName: '', sitesWebConfigTableId: '', sitesWebConfigTableName: '' }, select: { id: true } }).execute(); // Update const updated = await db.catalogModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -2947,8 +2959,10 @@ CRUD operations for RouteModule records. | Field | Type | Editable | |-------|------|----------| | `apiName` | String | Yes | +| `appLinksFunctionName` | String | Yes | | `catalogModuleId` | UUID | Yes | | `databaseId` | UUID | Yes | +| `deepLinkFunctionName` | String | Yes | | `defaultPermissions` | String | Yes | | `domainModuleId` | UUID | Yes | | `entityField` | String | Yes | @@ -2975,13 +2989,13 @@ CRUD operations for RouteModule records. ```typescript // List all routeModule records -const items = await db.routeModule.findMany({ select: { apiName: true, catalogModuleId: true, databaseId: true, defaultPermissions: true, domainModuleId: true, entityField: true, entityTableId: true, hostnameBindingsTableId: true, hostnameBindingsTableName: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, resolverFunctionName: true, routeBindingsTableId: true, routeBindingsTableName: true, routesTableId: true, routesTableName: true, schemaId: true, scope: true } }).execute(); +const items = await db.routeModule.findMany({ select: { apiName: true, appLinksFunctionName: true, catalogModuleId: true, databaseId: true, deepLinkFunctionName: true, defaultPermissions: true, domainModuleId: true, entityField: true, entityTableId: true, hostnameBindingsTableId: true, hostnameBindingsTableName: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, resolverFunctionName: true, routeBindingsTableId: true, routeBindingsTableName: true, routesTableId: true, routesTableName: true, schemaId: true, scope: true } }).execute(); // Get one by id -const item = await db.routeModule.findOne({ id: '', select: { apiName: true, catalogModuleId: true, databaseId: true, defaultPermissions: true, domainModuleId: true, entityField: true, entityTableId: true, hostnameBindingsTableId: true, hostnameBindingsTableName: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, resolverFunctionName: true, routeBindingsTableId: true, routeBindingsTableName: true, routesTableId: true, routesTableName: true, schemaId: true, scope: true } }).execute(); +const item = await db.routeModule.findOne({ id: '', select: { apiName: true, appLinksFunctionName: true, catalogModuleId: true, databaseId: true, deepLinkFunctionName: true, defaultPermissions: true, domainModuleId: true, entityField: true, entityTableId: true, hostnameBindingsTableId: true, hostnameBindingsTableName: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, resolverFunctionName: true, routeBindingsTableId: true, routeBindingsTableName: true, routesTableId: true, routesTableName: true, schemaId: true, scope: true } }).execute(); // Create -const created = await db.routeModule.create({ data: { apiName: '', catalogModuleId: '', databaseId: '', defaultPermissions: '', domainModuleId: '', entityField: '', entityTableId: '', hostnameBindingsTableId: '', hostnameBindingsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', resolverFunctionName: '', routeBindingsTableId: '', routeBindingsTableName: '', routesTableId: '', routesTableName: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); +const created = await db.routeModule.create({ data: { apiName: '', appLinksFunctionName: '', catalogModuleId: '', databaseId: '', deepLinkFunctionName: '', defaultPermissions: '', domainModuleId: '', entityField: '', entityTableId: '', hostnameBindingsTableId: '', hostnameBindingsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', resolverFunctionName: '', routeBindingsTableId: '', routeBindingsTableName: '', routesTableId: '', routesTableName: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); // Update const updated = await db.routeModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -2990,6 +3004,39 @@ const updated = await db.routeModule.update({ where: { id: '' }, data: { a const deleted = await db.routeModule.delete({ where: { id: '' } }).execute(); ``` +### `db.scopeTypesModule` + +CRUD operations for ScopeTypesModule records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `databaseId` | UUID | Yes | +| `id` | UUID | No | +| `privateSchemaName` | String | Yes | +| `schemaId` | UUID | Yes | +| `scopeTypesTableId` | UUID | Yes | + +**Operations:** + +```typescript +// List all scopeTypesModule records +const items = await db.scopeTypesModule.findMany({ select: { databaseId: true, id: true, privateSchemaName: true, schemaId: true, scopeTypesTableId: true } }).execute(); + +// Get one by id +const item = await db.scopeTypesModule.findOne({ id: '', select: { databaseId: true, id: true, privateSchemaName: true, schemaId: true, scopeTypesTableId: true } }).execute(); + +// Create +const created = await db.scopeTypesModule.create({ data: { databaseId: '', privateSchemaName: '', schemaId: '', scopeTypesTableId: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.scopeTypesModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.scopeTypesModule.delete({ where: { id: '' } }).execute(); +``` + ### `db.secureTableProvision` CRUD operations for SecureTableProvision records. @@ -3453,6 +3500,41 @@ const updated = await db.userSettingsModule.update({ where: { id: '' }, da const deleted = await db.userSettingsModule.delete({ where: { id: '' } }).execute(); ``` +### `db.userSettingsSecurityModule` + +CRUD operations for UserSettingsSecurityModule records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `apiName` | String | Yes | +| `databaseId` | UUID | Yes | +| `id` | UUID | No | +| `ownerTableId` | UUID | Yes | +| `schemaId` | UUID | Yes | +| `tableId` | UUID | Yes | +| `tableName` | String | Yes | + +**Operations:** + +```typescript +// List all userSettingsSecurityModule records +const items = await db.userSettingsSecurityModule.findMany({ select: { apiName: true, databaseId: true, id: true, ownerTableId: true, schemaId: true, tableId: true, tableName: true } }).execute(); + +// Get one by id +const item = await db.userSettingsSecurityModule.findOne({ id: '', select: { apiName: true, databaseId: true, id: true, ownerTableId: true, schemaId: true, tableId: true, tableName: true } }).execute(); + +// Create +const created = await db.userSettingsSecurityModule.create({ data: { apiName: '', databaseId: '', ownerTableId: '', schemaId: '', tableId: '', tableName: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.userSettingsSecurityModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.userSettingsSecurityModule.delete({ where: { id: '' } }).execute(); +``` + ### `db.userStateModule` CRUD operations for UserStateModule records. @@ -3658,42 +3740,6 @@ const deleted = await db.webhookModule.delete({ where: { id: '' } }).execu ## Custom Operations -### `db.query.resolveBlueprintField` - -Resolves a field_name within a given table_id to a field_id. Throws if no match is found. Used by construct_blueprint to translate user-authored field names (e.g. "location") into field UUIDs for downstream provisioning procedures. table_id must already be resolved (via resolve_blueprint_table) before calling this. - -- **Type:** query -- **Arguments:** - - | Argument | Type | - |----------|------| - | `databaseId` | UUID | - | `fieldName` | String | - | `tableId` | UUID | - -```typescript -const result = await db.query.resolveBlueprintField({ databaseId: '', fieldName: '', tableId: '' }).execute(); -``` - -### `db.query.resolveBlueprintTable` - -Resolves a table_name (with optional schema_name) to a table_id. Resolution order: (1) if schema_name provided, exact lookup via metaschema_public.schema.name + metaschema_public.table; (2) check local table_map (tables created in current blueprint); (3) search metaschema_public.table by name across all schemas; (4) if multiple matches, throw ambiguous error asking for schema_name; (5) if no match, throw not-found error. - -- **Type:** query -- **Arguments:** - - | Argument | Type | - |----------|------| - | `databaseId` | UUID | - | `defaultSchemaId` | UUID | - | `schemaName` | String | - | `tableMap` | JSON | - | `tableName` | String | - -```typescript -const result = await db.query.resolveBlueprintTable({ databaseId: '', defaultSchemaId: '', schemaName: '', tableMap: '', tableName: '' }).execute(); -``` - ### `db.mutation.constructBlueprint` Executes a blueprint definition by delegating to provision_* procedures. Creates a blueprint_construction record to track the attempt. Eight phases: (0) entity_type_provision for each membership_type entry — provisions entity tables, membership modules, and security. When a prefix already exists (e.g., 'org'), the entry extends the existing entity type instead of creating a new one; if a storage[] key is present, it provisions entity-scoped storage for that type. (0.5) scope-based storage: each storage[] entry has an optional scope ('app' or 'org' only). App-scoped storage seeds buckets at migration time. Org-scoped storage resolves the org membership type, creates org_buckets/org_files with owner_id, and seeds buckets per-entity via an AFTER INSERT trigger on the users table. When function_module is installed, a private functions bucket is auto-injected into org-scoped or entity-scoped storage entries. (1) provision_table() for each table with nodes[], fields[], policies[], and grants (table-level indexes/fts/unique_constraints/check_constraints are deferred). After provisioning, optional smart_tags (jsonb object) on the table entry are applied via metaschema.append_table_smart_tags(), and optional smart_tags on individual field entries are applied via metaschema.append_field_smart_tags(). (2) provision_relation() for each relation, (3) provision_index() for top-level + deferred indexes, (4) provision_full_text_search() for top-level + deferred FTS, (5) provision_unique_constraint() for top-level + deferred unique constraints, (6) provision_check_constraint() for top-level + deferred check constraints, (7) seed achievements from definition.achievements[] — resolves events_module by entity_prefix and creates INSERT actions for levels, level_requirements, and achievement_rewards tables. Phase 0 entity tables are added to the table_map so subsequent phases can reference them by name. Table-level entries are deferred to phases 3-6 so they can reference columns created by relations in phase 2. Returns the construction record ID on success, NULL on failure. @@ -3742,111 +3788,6 @@ and lifecycle settings. const result = await db.mutation.provisionBucket({ input: { bucketKey: '', ownerId: '' } }).execute(); ``` -### `db.mutation.provisionCheckConstraint` - -Creates a check constraint on a table from a $type + data blueprint definition. Supports: CheckOneOf (enum validation via = ANY(ARRAY[...])), CheckGreaterThan (single-column > value or cross-column), CheckLessThan (single-column < value or cross-column), CheckNotEqual (cross-column inequality). Builds AST expressions via ast_helpers and inserts into metaschema_public.check_constraint. Graceful: skips if a constraint with the same name already exists. - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | ProvisionCheckConstraintInput (required) | - -```typescript -const result = await db.mutation.provisionCheckConstraint({ input: { databaseId: '', definition: '', tableId: '' } }).execute(); -``` - -### `db.mutation.provisionFullTextSearch` - -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. - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | ProvisionFullTextSearchInput (required) | - -```typescript -const result = await db.mutation.provisionFullTextSearch({ input: { databaseId: '', definition: '', tableId: '' } }).execute(); -``` - -### `db.mutation.provisionIndex` - -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. - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | ProvisionIndexInput (required) | - -```typescript -const result = await db.mutation.provisionIndex({ input: { databaseId: '', definition: '', tableId: '' } }).execute(); -``` - -### `db.mutation.provisionRelation` - -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). - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | ProvisionRelationInput (required) | - -```typescript -const result = await db.mutation.provisionRelation({ input: '' }).execute(); -``` - -### `db.mutation.provisionSpatialRelation` - -Idempotent provisioner for metaschema_public.spatial_relation. Inserts a row declaring a spatial predicate between two geometry/geography columns (owner and target). Called from construct_blueprint when a relation entry has $type=RelationSpatial. Graceful: re-running with the same (source_table_id, name) returns the existing id without modifying the row. Operator whitelist and st_dwithin ↔ param_name pairing are enforced by the spatial_relation table CHECKs. Both fields must already exist — this is a metadata-only insert. - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | ProvisionSpatialRelationInput (required) | - -```typescript -const result = await db.mutation.provisionSpatialRelation({ input: '' }).execute(); -``` - -### `db.mutation.provisionTable` - -Composable table provisioning: creates or finds a table, then creates fields (so Data* modules can reference them), applies N nodes (Data* modules), 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). - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | ProvisionTableInput (required) | - -```typescript -const result = await db.mutation.provisionTable({ input: '' }).execute(); -``` - -### `db.mutation.provisionUniqueConstraint` - -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. - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | ProvisionUniqueConstraintInput (required) | - -```typescript -const result = await db.mutation.provisionUniqueConstraint({ input: { databaseId: '', definition: '', tableId: '' } }).execute(); -``` - --- Built by the [Constructive](https://constructive.io) team. diff --git a/sdk/constructive-react/src/modules/orm/index.ts b/sdk/constructive-react/src/modules/orm/index.ts index 0951126688..6b46df1203 100644 --- a/sdk/constructive-react/src/modules/orm/index.ts +++ b/sdk/constructive-react/src/modules/orm/index.ts @@ -66,6 +66,7 @@ import { RelationProvisionModel } from './models/relationProvision'; import { ResourceModuleModel } from './models/resourceModule'; import { RlsModuleModel } from './models/rlsModule'; import { RouteModuleModel } from './models/routeModule'; +import { ScopeTypesModuleModel } from './models/scopeTypesModule'; import { SecureTableProvisionModel } from './models/secureTableProvision'; import { SessionSecretsModuleModel } from './models/sessionSecretsModule'; import { SessionsModuleModel } from './models/sessionsModule'; @@ -76,19 +77,18 @@ import { TransferLogModuleModel } from './models/transferLogModule'; import { UserAuthModuleModel } from './models/userAuthModule'; import { UserCredentialsModuleModel } from './models/userCredentialsModule'; import { UserSettingsModuleModel } from './models/userSettingsModule'; +import { UserSettingsSecurityModuleModel } from './models/userSettingsSecurityModule'; import { UserStateModuleModel } from './models/userStateModule'; import { UsersModuleModel } from './models/usersModule'; import { WebauthnAuthModuleModel } from './models/webauthnAuthModule'; import { WebauthnCredentialsModuleModel } from './models/webauthnCredentialsModule'; import { WebhookModuleModel } from './models/webhookModule'; -import { createQueryOperations } from './query'; import { createMutationOperations } from './mutation'; export type { OrmClientConfig, QueryResult, GraphQLError, GraphQLAdapter } from './client'; export { GraphQLRequestError, FetchAdapter } from './client'; export { QueryBuilder } from './query-builder'; export * from './select-types'; export * from './models'; -export { createQueryOperations } from './query'; export { createMutationOperations } from './mutation'; /** * Create an ORM client instance @@ -177,6 +177,7 @@ export function createClient(config: OrmClientConfig) { resourceModule: new ResourceModuleModel(client), rlsModule: new RlsModuleModel(client), routeModule: new RouteModuleModel(client), + scopeTypesModule: new ScopeTypesModuleModel(client), secureTableProvision: new SecureTableProvisionModel(client), sessionSecretsModule: new SessionSecretsModuleModel(client), sessionsModule: new SessionsModuleModel(client), @@ -187,12 +188,12 @@ export function createClient(config: OrmClientConfig) { userAuthModule: new UserAuthModuleModel(client), userCredentialsModule: new UserCredentialsModuleModel(client), userSettingsModule: new UserSettingsModuleModel(client), + userSettingsSecurityModule: new UserSettingsSecurityModuleModel(client), userStateModule: new UserStateModuleModel(client), usersModule: new UsersModuleModel(client), webauthnAuthModule: new WebauthnAuthModuleModel(client), webauthnCredentialsModule: new WebauthnCredentialsModuleModel(client), webhookModule: new WebhookModuleModel(client), - query: createQueryOperations(client), mutation: createMutationOperations(client), }; } diff --git a/sdk/constructive-react/src/modules/orm/input-types.ts b/sdk/constructive-react/src/modules/orm/input-types.ts index ed552e4810..611116f58f 100644 --- a/sdk/constructive-react/src/modules/orm/input-types.ts +++ b/sdk/constructive-react/src/modules/orm/input-types.ts @@ -349,16 +349,22 @@ export interface BillingProviderModule { apiName?: string | null; billingCustomersTableId?: string | null; billingCustomersTableName?: string | null; + billingInvoicesTableId?: string | null; + billingInvoicesTableName?: string | null; billingPricesTableId?: string | null; billingPricesTableName?: string | null; billingProductsTableId?: string | null; billingProductsTableName?: string | null; + billingRefundsTableId?: string | null; + billingRefundsTableName?: string | null; billingSubscriptionsTableId?: string | null; billingSubscriptionsTableName?: string | null; billingWebhookEventsTableId?: string | null; billingWebhookEventsTableName?: string | null; databaseId?: string | null; id: string; + listPendingUsageSyncFunction?: string | null; + markUsageSyncedFunction?: string | null; prefix?: string | null; pricesTableId?: string | null; privateApiName?: string | null; @@ -366,8 +372,10 @@ export interface BillingProviderModule { processBillingEventFunction?: string | null; productsTableId?: string | null; provider?: string | null; + recordRefundFunction?: string | null; schemaId?: string | null; subscriptionsTableId?: string | null; + upsertInvoiceFunction?: string | null; } /** An owned, editable blueprint scoped to a specific database. Created by copying from a blueprint_template via copy_template_to_blueprint() or built from scratch. The owner can customize the definition at any time. Execute it with construct_blueprint() which creates a separate blueprint_construction record to track the build. */ export interface Blueprint { @@ -470,6 +478,8 @@ export interface CatalogModule { apisTableName?: string | null; appsTableId?: string | null; appsTableName?: string | null; + bindingsTableId?: string | null; + bindingsTableName?: string | null; bucketsTableId?: string | null; bucketsTableName?: string | null; databaseId?: string | null; @@ -1019,7 +1029,7 @@ export interface EntityTypeProvision { tableName?: string | null; /** * Single jsonb object describing the full security setup to apply to the entity table. - * Uses the same vocabulary as metaschema_modules_public.provision_table() and blueprint tables[] + * Uses the same vocabulary as metaschema_modules_private.provision_table() and blueprint tables[] * entries, so an entity table is configured the same way an ordinary blueprint table is. * Defaults to NULL; when non-NULL, the five default policies are implicitly replaced by * table_provision.policies[] (is_visible becomes a no-op on this path). @@ -1937,8 +1947,10 @@ export interface RlsModule { } export interface RouteModule { apiName?: string | null; + appLinksFunctionName?: string | null; catalogModuleId?: string | null; databaseId?: string | null; + deepLinkFunctionName?: string | null; defaultPermissions?: string[] | null; domainModuleId?: string | null; entityField?: string | null; @@ -1961,6 +1973,13 @@ export interface RouteModule { schemaId?: string | null; scope?: string | null; } +export interface ScopeTypesModule { + databaseId?: string | null; + id: string; + privateSchemaName?: string | null; + schemaId?: string | null; + scopeTypesTableId?: string | null; +} /** Provisions security, fields, grants, and policies onto a table. Each row can independently: (1) create fields via nodes[] array (supporting multiple Data* modules per row), (2) grant privileges via grants[] array (supporting per-role privilege targeting), (3) create RLS policies via policies[] array (supporting multiple Authz* policies per row). Multiple rows can target the same table to compose different concerns. All three concerns are optional and independent. */ export interface SecureTableProvision { /** The database this provision belongs to. Required. */ @@ -2183,6 +2202,15 @@ export interface UserSettingsModule { tableId?: string | null; tableName?: string | null; } +export interface UserSettingsSecurityModule { + apiName?: string | null; + databaseId?: string | null; + id: string; + ownerTableId?: string | null; + schemaId?: string | null; + tableId?: string | null; + tableName?: string | null; +} export interface UserStateModule { databaseId?: string | null; entityField?: string | null; @@ -2395,6 +2423,7 @@ export interface RouteModuleRelations { catalogModule?: CatalogModule | null; domainModule?: DomainModule | null; } +export interface ScopeTypesModuleRelations {} export interface SecureTableProvisionRelations {} export interface SessionSecretsModuleRelations {} export interface SessionsModuleRelations {} @@ -2410,6 +2439,7 @@ export interface TransferLogModuleRelations {} export interface UserAuthModuleRelations {} export interface UserCredentialsModuleRelations {} export interface UserSettingsModuleRelations {} +export interface UserSettingsSecurityModuleRelations {} export interface UserStateModuleRelations {} export interface UsersModuleRelations {} export interface WebauthnAuthModuleRelations {} @@ -2498,6 +2528,7 @@ export type RelationProvisionWithRelations = RelationProvision & RelationProvisi export type ResourceModuleWithRelations = ResourceModule & ResourceModuleRelations; export type RlsModuleWithRelations = RlsModule & RlsModuleRelations; export type RouteModuleWithRelations = RouteModule & RouteModuleRelations; +export type ScopeTypesModuleWithRelations = ScopeTypesModule & ScopeTypesModuleRelations; export type SecureTableProvisionWithRelations = SecureTableProvision & SecureTableProvisionRelations; export type SessionSecretsModuleWithRelations = SessionSecretsModule & @@ -2511,6 +2542,8 @@ export type UserAuthModuleWithRelations = UserAuthModule & UserAuthModuleRelatio export type UserCredentialsModuleWithRelations = UserCredentialsModule & UserCredentialsModuleRelations; export type UserSettingsModuleWithRelations = UserSettingsModule & UserSettingsModuleRelations; +export type UserSettingsSecurityModuleWithRelations = UserSettingsSecurityModule & + UserSettingsSecurityModuleRelations; export type UserStateModuleWithRelations = UserStateModule & UserStateModuleRelations; export type UsersModuleWithRelations = UsersModule & UsersModuleRelations; export type WebauthnAuthModuleWithRelations = WebauthnAuthModule & WebauthnAuthModuleRelations; @@ -2642,16 +2675,22 @@ export type BillingProviderModuleSelect = { apiName?: boolean; billingCustomersTableId?: boolean; billingCustomersTableName?: boolean; + billingInvoicesTableId?: boolean; + billingInvoicesTableName?: boolean; billingPricesTableId?: boolean; billingPricesTableName?: boolean; billingProductsTableId?: boolean; billingProductsTableName?: boolean; + billingRefundsTableId?: boolean; + billingRefundsTableName?: boolean; billingSubscriptionsTableId?: boolean; billingSubscriptionsTableName?: boolean; billingWebhookEventsTableId?: boolean; billingWebhookEventsTableName?: boolean; databaseId?: boolean; id?: boolean; + listPendingUsageSyncFunction?: boolean; + markUsageSyncedFunction?: boolean; prefix?: boolean; pricesTableId?: boolean; privateApiName?: boolean; @@ -2659,8 +2698,10 @@ export type BillingProviderModuleSelect = { processBillingEventFunction?: boolean; productsTableId?: boolean; provider?: boolean; + recordRefundFunction?: boolean; schemaId?: boolean; subscriptionsTableId?: boolean; + upsertInvoiceFunction?: boolean; }; export type BlueprintSelect = { createdAt?: boolean; @@ -2744,6 +2785,8 @@ export type CatalogModuleSelect = { apisTableName?: boolean; appsTableId?: boolean; appsTableName?: boolean; + bindingsTableId?: boolean; + bindingsTableName?: boolean; bucketsTableId?: boolean; bucketsTableName?: boolean; databaseId?: boolean; @@ -3990,8 +4033,10 @@ export type RlsModuleSelect = { }; export type RouteModuleSelect = { apiName?: boolean; + appLinksFunctionName?: boolean; catalogModuleId?: boolean; databaseId?: boolean; + deepLinkFunctionName?: boolean; defaultPermissions?: boolean; domainModuleId?: boolean; entityField?: boolean; @@ -4020,6 +4065,13 @@ export type RouteModuleSelect = { select: DomainModuleSelect; }; }; +export type ScopeTypesModuleSelect = { + databaseId?: boolean; + id?: boolean; + privateSchemaName?: boolean; + schemaId?: boolean; + scopeTypesTableId?: boolean; +}; export type SecureTableProvisionSelect = { databaseId?: boolean; fields?: boolean; @@ -4238,6 +4290,15 @@ export type UserSettingsModuleSelect = { tableId?: boolean; tableName?: boolean; }; +export type UserSettingsSecurityModuleSelect = { + apiName?: boolean; + databaseId?: boolean; + id?: boolean; + ownerTableId?: boolean; + schemaId?: boolean; + tableId?: boolean; + tableName?: boolean; +}; export type UserStateModuleSelect = { databaseId?: boolean; entityField?: boolean; @@ -4585,6 +4646,10 @@ export interface BillingProviderModuleFilter { billingCustomersTableId?: UUIDFilter; /** Filter by the object’s `billingCustomersTableName` field. */ billingCustomersTableName?: StringFilter; + /** Filter by the object’s `billingInvoicesTableId` field. */ + billingInvoicesTableId?: UUIDFilter; + /** Filter by the object’s `billingInvoicesTableName` field. */ + billingInvoicesTableName?: StringFilter; /** Filter by the object’s `billingPricesTableId` field. */ billingPricesTableId?: UUIDFilter; /** Filter by the object’s `billingPricesTableName` field. */ @@ -4593,6 +4658,10 @@ export interface BillingProviderModuleFilter { billingProductsTableId?: UUIDFilter; /** Filter by the object’s `billingProductsTableName` field. */ billingProductsTableName?: StringFilter; + /** Filter by the object’s `billingRefundsTableId` field. */ + billingRefundsTableId?: UUIDFilter; + /** Filter by the object’s `billingRefundsTableName` field. */ + billingRefundsTableName?: StringFilter; /** Filter by the object’s `billingSubscriptionsTableId` field. */ billingSubscriptionsTableId?: UUIDFilter; /** Filter by the object’s `billingSubscriptionsTableName` field. */ @@ -4605,6 +4674,10 @@ export interface BillingProviderModuleFilter { databaseId?: UUIDFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; + /** Filter by the object’s `listPendingUsageSyncFunction` field. */ + listPendingUsageSyncFunction?: StringFilter; + /** Filter by the object’s `markUsageSyncedFunction` field. */ + markUsageSyncedFunction?: StringFilter; /** Negates the expression. */ not?: BillingProviderModuleFilter; /** Checks for any expressions in this list. */ @@ -4623,10 +4696,14 @@ export interface BillingProviderModuleFilter { productsTableId?: UUIDFilter; /** Filter by the object’s `provider` field. */ provider?: StringFilter; + /** Filter by the object’s `recordRefundFunction` field. */ + recordRefundFunction?: StringFilter; /** Filter by the object’s `schemaId` field. */ schemaId?: UUIDFilter; /** Filter by the object’s `subscriptionsTableId` field. */ subscriptionsTableId?: UUIDFilter; + /** Filter by the object’s `upsertInvoiceFunction` field. */ + upsertInvoiceFunction?: StringFilter; } export interface BlueprintFilter { /** Checks for all expressions in this list. */ @@ -4781,6 +4858,10 @@ export interface CatalogModuleFilter { appsTableId?: UUIDFilter; /** Filter by the object’s `appsTableName` field. */ appsTableName?: StringFilter; + /** Filter by the object’s `bindingsTableId` field. */ + bindingsTableId?: UUIDFilter; + /** Filter by the object’s `bindingsTableName` field. */ + bindingsTableName?: StringFilter; /** Filter by the object’s `bucketsTableId` field. */ bucketsTableId?: UUIDFilter; /** Filter by the object’s `bucketsTableName` field. */ @@ -7279,6 +7360,8 @@ export interface RouteModuleFilter { and?: RouteModuleFilter[]; /** Filter by the object’s `apiName` field. */ apiName?: StringFilter; + /** Filter by the object’s `appLinksFunctionName` field. */ + appLinksFunctionName?: StringFilter; /** Filter by the object’s `catalogModule` relation. */ catalogModule?: CatalogModuleFilter; /** A related `catalogModule` exists. */ @@ -7287,6 +7370,8 @@ export interface RouteModuleFilter { catalogModuleId?: UUIDFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; + /** Filter by the object’s `deepLinkFunctionName` field. */ + deepLinkFunctionName?: StringFilter; /** Filter by the object’s `defaultPermissions` field. */ defaultPermissions?: StringListFilter; /** Filter by the object’s `domainModule` relation. */ @@ -7338,6 +7423,24 @@ export interface RouteModuleFilter { /** Filter by the object’s `scope` field. */ scope?: StringFilter; } +export interface ScopeTypesModuleFilter { + /** Checks for all expressions in this list. */ + and?: ScopeTypesModuleFilter[]; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: ScopeTypesModuleFilter; + /** Checks for any expressions in this list. */ + or?: ScopeTypesModuleFilter[]; + /** Filter by the object’s `privateSchemaName` field. */ + privateSchemaName?: StringFilter; + /** Filter by the object’s `schemaId` field. */ + schemaId?: UUIDFilter; + /** Filter by the object’s `scopeTypesTableId` field. */ + scopeTypesTableId?: UUIDFilter; +} export interface SecureTableProvisionFilter { /** Checks for all expressions in this list. */ and?: SecureTableProvisionFilter[]; @@ -7796,6 +7899,28 @@ export interface UserSettingsModuleFilter { /** Filter by the object’s `tableName` field. */ tableName?: StringFilter; } +export interface UserSettingsSecurityModuleFilter { + /** Checks for all expressions in this list. */ + and?: UserSettingsSecurityModuleFilter[]; + /** Filter by the object’s `apiName` field. */ + apiName?: StringFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: UserSettingsSecurityModuleFilter; + /** Checks for any expressions in this list. */ + or?: UserSettingsSecurityModuleFilter[]; + /** Filter by the object’s `ownerTableId` field. */ + ownerTableId?: UUIDFilter; + /** Filter by the object’s `schemaId` field. */ + schemaId?: UUIDFilter; + /** Filter by the object’s `tableId` field. */ + tableId?: UUIDFilter; + /** Filter by the object’s `tableName` field. */ + tableName?: StringFilter; +} export interface UserStateModuleFilter { /** Checks for all expressions in this list. */ and?: UserStateModuleFilter[]; @@ -8214,6 +8339,10 @@ export type BillingProviderModuleOrderBy = | 'BILLING_CUSTOMERS_TABLE_ID_DESC' | 'BILLING_CUSTOMERS_TABLE_NAME_ASC' | 'BILLING_CUSTOMERS_TABLE_NAME_DESC' + | 'BILLING_INVOICES_TABLE_ID_ASC' + | 'BILLING_INVOICES_TABLE_ID_DESC' + | 'BILLING_INVOICES_TABLE_NAME_ASC' + | 'BILLING_INVOICES_TABLE_NAME_DESC' | 'BILLING_PRICES_TABLE_ID_ASC' | 'BILLING_PRICES_TABLE_ID_DESC' | 'BILLING_PRICES_TABLE_NAME_ASC' @@ -8222,6 +8351,10 @@ export type BillingProviderModuleOrderBy = | 'BILLING_PRODUCTS_TABLE_ID_DESC' | 'BILLING_PRODUCTS_TABLE_NAME_ASC' | 'BILLING_PRODUCTS_TABLE_NAME_DESC' + | 'BILLING_REFUNDS_TABLE_ID_ASC' + | 'BILLING_REFUNDS_TABLE_ID_DESC' + | 'BILLING_REFUNDS_TABLE_NAME_ASC' + | 'BILLING_REFUNDS_TABLE_NAME_DESC' | 'BILLING_SUBSCRIPTIONS_TABLE_ID_ASC' | 'BILLING_SUBSCRIPTIONS_TABLE_ID_DESC' | 'BILLING_SUBSCRIPTIONS_TABLE_NAME_ASC' @@ -8234,6 +8367,10 @@ export type BillingProviderModuleOrderBy = | 'DATABASE_ID_DESC' | 'ID_ASC' | 'ID_DESC' + | 'LIST_PENDING_USAGE_SYNC_FUNCTION_ASC' + | 'LIST_PENDING_USAGE_SYNC_FUNCTION_DESC' + | 'MARK_USAGE_SYNCED_FUNCTION_ASC' + | 'MARK_USAGE_SYNCED_FUNCTION_DESC' | 'NATURAL' | 'PREFIX_ASC' | 'PREFIX_DESC' @@ -8251,10 +8388,14 @@ export type BillingProviderModuleOrderBy = | 'PRODUCTS_TABLE_ID_DESC' | 'PROVIDER_ASC' | 'PROVIDER_DESC' + | 'RECORD_REFUND_FUNCTION_ASC' + | 'RECORD_REFUND_FUNCTION_DESC' | 'SCHEMA_ID_ASC' | 'SCHEMA_ID_DESC' | 'SUBSCRIPTIONS_TABLE_ID_ASC' - | 'SUBSCRIPTIONS_TABLE_ID_DESC'; + | 'SUBSCRIPTIONS_TABLE_ID_DESC' + | 'UPSERT_INVOICE_FUNCTION_ASC' + | 'UPSERT_INVOICE_FUNCTION_DESC'; export type BlueprintOrderBy = | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' @@ -8364,6 +8505,10 @@ export type CatalogModuleOrderBy = | 'APPS_TABLE_ID_DESC' | 'APPS_TABLE_NAME_ASC' | 'APPS_TABLE_NAME_DESC' + | 'BINDINGS_TABLE_ID_ASC' + | 'BINDINGS_TABLE_ID_DESC' + | 'BINDINGS_TABLE_NAME_ASC' + | 'BINDINGS_TABLE_NAME_DESC' | 'BUCKETS_TABLE_ID_ASC' | 'BUCKETS_TABLE_ID_DESC' | 'BUCKETS_TABLE_NAME_ASC' @@ -10538,10 +10683,14 @@ export type RlsModuleOrderBy = export type RouteModuleOrderBy = | 'API_NAME_ASC' | 'API_NAME_DESC' + | 'APP_LINKS_FUNCTION_NAME_ASC' + | 'APP_LINKS_FUNCTION_NAME_DESC' | 'CATALOG_MODULE_ID_ASC' | 'CATALOG_MODULE_ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' + | 'DEEP_LINK_FUNCTION_NAME_ASC' + | 'DEEP_LINK_FUNCTION_NAME_DESC' | 'DEFAULT_PERMISSIONS_ASC' | 'DEFAULT_PERMISSIONS_DESC' | 'DOMAIN_MODULE_ID_ASC' @@ -10587,6 +10736,20 @@ export type RouteModuleOrderBy = | 'SCHEMA_ID_DESC' | 'SCOPE_ASC' | 'SCOPE_DESC'; +export type ScopeTypesModuleOrderBy = + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'PRIVATE_SCHEMA_NAME_ASC' + | 'PRIVATE_SCHEMA_NAME_DESC' + | 'SCHEMA_ID_ASC' + | 'SCHEMA_ID_DESC' + | 'SCOPE_TYPES_TABLE_ID_ASC' + | 'SCOPE_TYPES_TABLE_ID_DESC'; export type SecureTableProvisionOrderBy = | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' @@ -10993,6 +11156,24 @@ export type UserSettingsModuleOrderBy = | 'TABLE_ID_DESC' | 'TABLE_NAME_ASC' | 'TABLE_NAME_DESC'; +export type UserSettingsSecurityModuleOrderBy = + | 'API_NAME_ASC' + | 'API_NAME_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NATURAL' + | 'OWNER_TABLE_ID_ASC' + | 'OWNER_TABLE_ID_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'SCHEMA_ID_ASC' + | 'SCHEMA_ID_DESC' + | 'TABLE_ID_ASC' + | 'TABLE_ID_DESC' + | 'TABLE_NAME_ASC' + | 'TABLE_NAME_DESC'; export type UserStateModuleOrderBy = | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' @@ -11414,15 +11595,21 @@ export interface CreateBillingProviderModuleInput { apiName?: string; billingCustomersTableId?: string; billingCustomersTableName?: string; + billingInvoicesTableId?: string; + billingInvoicesTableName?: string; billingPricesTableId?: string; billingPricesTableName?: string; billingProductsTableId?: string; billingProductsTableName?: string; + billingRefundsTableId?: string; + billingRefundsTableName?: string; billingSubscriptionsTableId?: string; billingSubscriptionsTableName?: string; billingWebhookEventsTableId?: string; billingWebhookEventsTableName?: string; databaseId: string; + listPendingUsageSyncFunction?: string; + markUsageSyncedFunction?: string; prefix?: string; pricesTableId?: string; privateApiName?: string; @@ -11430,23 +11617,31 @@ export interface CreateBillingProviderModuleInput { processBillingEventFunction?: string; productsTableId?: string; provider?: string; + recordRefundFunction?: string; schemaId?: string; subscriptionsTableId?: string; + upsertInvoiceFunction?: string; }; } export interface BillingProviderModulePatch { apiName?: string | null; billingCustomersTableId?: string | null; billingCustomersTableName?: string | null; + billingInvoicesTableId?: string | null; + billingInvoicesTableName?: string | null; billingPricesTableId?: string | null; billingPricesTableName?: string | null; billingProductsTableId?: string | null; billingProductsTableName?: string | null; + billingRefundsTableId?: string | null; + billingRefundsTableName?: string | null; billingSubscriptionsTableId?: string | null; billingSubscriptionsTableName?: string | null; billingWebhookEventsTableId?: string | null; billingWebhookEventsTableName?: string | null; databaseId?: string | null; + listPendingUsageSyncFunction?: string | null; + markUsageSyncedFunction?: string | null; prefix?: string | null; pricesTableId?: string | null; privateApiName?: string | null; @@ -11454,8 +11649,10 @@ export interface BillingProviderModulePatch { processBillingEventFunction?: string | null; productsTableId?: string | null; provider?: string | null; + recordRefundFunction?: string | null; schemaId?: string | null; subscriptionsTableId?: string | null; + upsertInvoiceFunction?: string | null; } export interface UpdateBillingProviderModuleInput { clientMutationId?: string; @@ -11590,6 +11787,8 @@ export interface CreateCatalogModuleInput { apisTableName?: string; appsTableId?: string; appsTableName?: string; + bindingsTableId?: string; + bindingsTableName?: string; bucketsTableId?: string; bucketsTableName?: string; databaseId: string; @@ -11631,6 +11830,8 @@ export interface CatalogModulePatch { apisTableName?: string | null; appsTableId?: string | null; appsTableName?: string | null; + bindingsTableId?: string | null; + bindingsTableName?: string | null; bucketsTableId?: string | null; bucketsTableName?: string | null; databaseId?: string | null; @@ -14264,8 +14465,10 @@ export interface CreateRouteModuleInput { clientMutationId?: string; routeModule: { apiName?: string; + appLinksFunctionName?: string; catalogModuleId?: string; databaseId: string; + deepLinkFunctionName?: string; defaultPermissions?: string[]; domainModuleId?: string; entityField?: string; @@ -14290,8 +14493,10 @@ export interface CreateRouteModuleInput { } export interface RouteModulePatch { apiName?: string | null; + appLinksFunctionName?: string | null; catalogModuleId?: string | null; databaseId?: string | null; + deepLinkFunctionName?: string | null; defaultPermissions?: string[] | null; domainModuleId?: string | null; entityField?: string | null; @@ -14322,6 +14527,30 @@ export interface DeleteRouteModuleInput { clientMutationId?: string; id: string; } +export interface CreateScopeTypesModuleInput { + clientMutationId?: string; + scopeTypesModule: { + databaseId: string; + privateSchemaName?: string; + schemaId?: string; + scopeTypesTableId?: string; + }; +} +export interface ScopeTypesModulePatch { + databaseId?: string | null; + privateSchemaName?: string | null; + schemaId?: string | null; + scopeTypesTableId?: string | null; +} +export interface UpdateScopeTypesModuleInput { + clientMutationId?: string; + id: string; + scopeTypesModulePatch: ScopeTypesModulePatch; +} +export interface DeleteScopeTypesModuleInput { + clientMutationId?: string; + id: string; +} export interface CreateSecureTableProvisionInput { clientMutationId?: string; secureTableProvision: { @@ -14828,6 +15057,34 @@ export interface DeleteUserSettingsModuleInput { clientMutationId?: string; id: string; } +export interface CreateUserSettingsSecurityModuleInput { + clientMutationId?: string; + userSettingsSecurityModule: { + apiName?: string; + databaseId: string; + ownerTableId?: string; + schemaId?: string; + tableId?: string; + tableName?: string; + }; +} +export interface UserSettingsSecurityModulePatch { + apiName?: string | null; + databaseId?: string | null; + ownerTableId?: string | null; + schemaId?: string | null; + tableId?: string | null; + tableName?: string | null; +} +export interface UpdateUserSettingsSecurityModuleInput { + clientMutationId?: string; + id: string; + userSettingsSecurityModulePatch: UserSettingsSecurityModulePatch; +} +export interface DeleteUserSettingsSecurityModuleInput { + clientMutationId?: string; + id: string; +} export interface CreateUserStateModuleInput { clientMutationId?: string; userStateModule: { @@ -15101,79 +15358,6 @@ export interface ProvisionBucketInput { */ ownerId?: string; } -export interface ProvisionCheckConstraintInput { - clientMutationId?: string; - databaseId?: string; - definition?: Record; - tableId?: string; -} -export interface ProvisionFullTextSearchInput { - clientMutationId?: string; - databaseId?: string; - definition?: Record; - tableId?: string; -} -export interface ProvisionIndexInput { - clientMutationId?: string; - databaseId?: string; - definition?: Record; - tableId?: string; -} -export interface ProvisionRelationInput { - apiRequired?: boolean; - clientMutationId?: string; - createIndex?: boolean; - databaseId?: string; - deleteAction?: string; - exposeInApi?: boolean; - fieldName?: string; - grants?: Record; - isRequired?: boolean; - junctionSchemaId?: string; - junctionTableId?: string; - junctionTableName?: string; - nodes?: Record; - policies?: Record; - relationType?: string; - sourceFieldName?: string; - sourceTableId?: string; - targetFieldName?: string; - targetTableId?: string; - useCompositeKey?: boolean; -} -export interface ProvisionSpatialRelationInput { - clientMutationId?: string; - databaseId?: string; - name?: string; - operator?: string; - paramName?: string; - sourceFieldId?: string; - sourceTableId?: string; - targetFieldId?: string; - targetTableId?: string; -} -export interface ProvisionTableInput { - clientMutationId?: string; - databaseId?: string; - description?: string; - fields?: Record; - fullTextSearches?: Record; - grants?: Record; - indexes?: Record; - nodes?: Record; - policies?: Record; - schemaId?: string; - tableId?: string; - tableName?: string; - uniqueConstraints?: Record; - useRls?: boolean; -} -export interface ProvisionUniqueConstraintInput { - clientMutationId?: string; - databaseId?: string; - definition?: Record; - tableId?: string; -} /** A filter to be used against many `BlueprintConstruction` object types. All fields are combined with a logical ‘and.’ */ export interface BlueprintToManyBlueprintConstructionFilter { /** Filters to entities where every related entity matches. */ @@ -15586,16 +15770,22 @@ export interface BillingProviderModuleInput { apiName?: string; billingCustomersTableId?: string; billingCustomersTableName?: string; + billingInvoicesTableId?: string; + billingInvoicesTableName?: string; billingPricesTableId?: string; billingPricesTableName?: string; billingProductsTableId?: string; billingProductsTableName?: string; + billingRefundsTableId?: string; + billingRefundsTableName?: string; billingSubscriptionsTableId?: string; billingSubscriptionsTableName?: string; billingWebhookEventsTableId?: string; billingWebhookEventsTableName?: string; databaseId: string; id?: string; + listPendingUsageSyncFunction?: string; + markUsageSyncedFunction?: string; prefix?: string; pricesTableId?: string; privateApiName?: string; @@ -15603,8 +15793,10 @@ export interface BillingProviderModuleInput { processBillingEventFunction?: string; productsTableId?: string; provider?: string; + recordRefundFunction?: string; schemaId?: string; subscriptionsTableId?: string; + upsertInvoiceFunction?: string; } /** An input for mutations affecting `Blueprint` */ export interface BlueprintInput { @@ -15708,6 +15900,8 @@ export interface CatalogModuleInput { apisTableName?: string; appsTableId?: string; appsTableName?: string; + bindingsTableId?: string; + bindingsTableName?: string; bucketsTableId?: string; bucketsTableName?: string; databaseId: string; @@ -16280,7 +16474,7 @@ export interface EntityTypeProvisionInput { tableName?: string; /** * Single jsonb object describing the full security setup to apply to the entity table. - * Uses the same vocabulary as metaschema_modules_public.provision_table() and blueprint tables[] + * Uses the same vocabulary as metaschema_modules_private.provision_table() and blueprint tables[] * entries, so an entity table is configured the same way an ordinary blueprint table is. * Defaults to NULL; when non-NULL, the five default policies are implicitly replaced by * table_provision.policies[] (is_visible becomes a no-op on this path). @@ -17201,8 +17395,10 @@ export interface RlsModuleInput { /** An input for mutations affecting `RouteModule` */ export interface RouteModuleInput { apiName?: string; + appLinksFunctionName?: string; catalogModuleId?: string; databaseId: string; + deepLinkFunctionName?: string; defaultPermissions?: string[]; domainModuleId?: string; entityField?: string; @@ -17225,6 +17421,14 @@ export interface RouteModuleInput { schemaId?: string; scope: string; } +/** An input for mutations affecting `ScopeTypesModule` */ +export interface ScopeTypesModuleInput { + databaseId: string; + id?: string; + privateSchemaName?: string; + schemaId?: string; + scopeTypesTableId?: string; +} /** An input for mutations affecting `SecureTableProvision` */ export interface SecureTableProvisionInput { /** The database this provision belongs to. Required. */ @@ -17450,6 +17654,16 @@ export interface UserSettingsModuleInput { tableId?: string; tableName?: string; } +/** An input for mutations affecting `UserSettingsSecurityModule` */ +export interface UserSettingsSecurityModuleInput { + apiName?: string; + databaseId: string; + id?: string; + ownerTableId?: string; + schemaId?: string; + tableId?: string; + tableName?: string; +} /** An input for mutations affecting `UserStateModule` */ export interface UserStateModuleInput { databaseId: string; @@ -17845,6 +18059,8 @@ export interface RouteModuleFilter { and?: RouteModuleFilter[]; /** Filter by the object’s `apiName` field. */ apiName?: StringFilter; + /** Filter by the object’s `appLinksFunctionName` field. */ + appLinksFunctionName?: StringFilter; /** Filter by the object’s `catalogModule` relation. */ catalogModule?: CatalogModuleFilter; /** A related `catalogModule` exists. */ @@ -17853,6 +18069,8 @@ export interface RouteModuleFilter { catalogModuleId?: UUIDFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; + /** Filter by the object’s `deepLinkFunctionName` field. */ + deepLinkFunctionName?: StringFilter; /** Filter by the object’s `defaultPermissions` field. */ defaultPermissions?: StringListFilter; /** Filter by the object’s `domainModule` relation. */ @@ -18725,6 +18943,10 @@ export interface CatalogModuleFilter { appsTableId?: UUIDFilter; /** Filter by the object’s `appsTableName` field. */ appsTableName?: StringFilter; + /** Filter by the object’s `bindingsTableId` field. */ + bindingsTableId?: UUIDFilter; + /** Filter by the object’s `bindingsTableName` field. */ + bindingsTableName?: StringFilter; /** Filter by the object’s `bucketsTableId` field. */ bucketsTableId?: UUIDFilter; /** Filter by the object’s `bucketsTableName` field. */ @@ -19279,62 +19501,6 @@ export type ProvisionBucketPayloadSelect = { provider?: boolean; success?: boolean; }; -export interface ProvisionCheckConstraintPayload { - clientMutationId?: string | null; -} -export type ProvisionCheckConstraintPayloadSelect = { - clientMutationId?: boolean; -}; -export interface ProvisionFullTextSearchPayload { - clientMutationId?: string | null; - result?: string | null; -} -export type ProvisionFullTextSearchPayloadSelect = { - clientMutationId?: boolean; - result?: boolean; -}; -export interface ProvisionIndexPayload { - clientMutationId?: string | null; - result?: string | null; -} -export type ProvisionIndexPayloadSelect = { - clientMutationId?: boolean; - result?: boolean; -}; -export interface ProvisionRelationPayload { - clientMutationId?: string | null; - result?: ProvisionRelationRecord[] | null; -} -export type ProvisionRelationPayloadSelect = { - clientMutationId?: boolean; - result?: { - select: ProvisionRelationRecordSelect; - }; -}; -export interface ProvisionSpatialRelationPayload { - clientMutationId?: string | null; - result?: string | null; -} -export type ProvisionSpatialRelationPayloadSelect = { - clientMutationId?: boolean; - result?: boolean; -}; -export interface ProvisionTablePayload { - clientMutationId?: string | null; - result?: ProvisionTableRecord[] | null; -} -export type ProvisionTablePayloadSelect = { - clientMutationId?: boolean; - result?: { - select: ProvisionTableRecordSelect; - }; -}; -export interface ProvisionUniqueConstraintPayload { - clientMutationId?: string | null; -} -export type ProvisionUniqueConstraintPayloadSelect = { - clientMutationId?: boolean; -}; export interface CreateAgentModulePayload { /** The `AgentModule` that was created by this mutation. */ agentModule?: AgentModule | null; @@ -22080,6 +22246,51 @@ export type DeleteRouteModulePayloadSelect = { select: RouteModuleEdgeSelect; }; }; +export interface CreateScopeTypesModulePayload { + clientMutationId?: string | null; + /** The `ScopeTypesModule` that was created by this mutation. */ + scopeTypesModule?: ScopeTypesModule | null; + scopeTypesModuleEdge?: ScopeTypesModuleEdge | null; +} +export type CreateScopeTypesModulePayloadSelect = { + clientMutationId?: boolean; + scopeTypesModule?: { + select: ScopeTypesModuleSelect; + }; + scopeTypesModuleEdge?: { + select: ScopeTypesModuleEdgeSelect; + }; +}; +export interface UpdateScopeTypesModulePayload { + clientMutationId?: string | null; + /** The `ScopeTypesModule` that was updated by this mutation. */ + scopeTypesModule?: ScopeTypesModule | null; + scopeTypesModuleEdge?: ScopeTypesModuleEdge | null; +} +export type UpdateScopeTypesModulePayloadSelect = { + clientMutationId?: boolean; + scopeTypesModule?: { + select: ScopeTypesModuleSelect; + }; + scopeTypesModuleEdge?: { + select: ScopeTypesModuleEdgeSelect; + }; +}; +export interface DeleteScopeTypesModulePayload { + clientMutationId?: string | null; + /** The `ScopeTypesModule` that was deleted by this mutation. */ + scopeTypesModule?: ScopeTypesModule | null; + scopeTypesModuleEdge?: ScopeTypesModuleEdge | null; +} +export type DeleteScopeTypesModulePayloadSelect = { + clientMutationId?: boolean; + scopeTypesModule?: { + select: ScopeTypesModuleSelect; + }; + scopeTypesModuleEdge?: { + select: ScopeTypesModuleEdgeSelect; + }; +}; export interface CreateSecureTableProvisionPayload { clientMutationId?: string | null; /** The `SecureTableProvision` that was created by this mutation. */ @@ -22530,6 +22741,51 @@ export type DeleteUserSettingsModulePayloadSelect = { select: UserSettingsModuleEdgeSelect; }; }; +export interface CreateUserSettingsSecurityModulePayload { + clientMutationId?: string | null; + /** The `UserSettingsSecurityModule` that was created by this mutation. */ + userSettingsSecurityModule?: UserSettingsSecurityModule | null; + userSettingsSecurityModuleEdge?: UserSettingsSecurityModuleEdge | null; +} +export type CreateUserSettingsSecurityModulePayloadSelect = { + clientMutationId?: boolean; + userSettingsSecurityModule?: { + select: UserSettingsSecurityModuleSelect; + }; + userSettingsSecurityModuleEdge?: { + select: UserSettingsSecurityModuleEdgeSelect; + }; +}; +export interface UpdateUserSettingsSecurityModulePayload { + clientMutationId?: string | null; + /** The `UserSettingsSecurityModule` that was updated by this mutation. */ + userSettingsSecurityModule?: UserSettingsSecurityModule | null; + userSettingsSecurityModuleEdge?: UserSettingsSecurityModuleEdge | null; +} +export type UpdateUserSettingsSecurityModulePayloadSelect = { + clientMutationId?: boolean; + userSettingsSecurityModule?: { + select: UserSettingsSecurityModuleSelect; + }; + userSettingsSecurityModuleEdge?: { + select: UserSettingsSecurityModuleEdgeSelect; + }; +}; +export interface DeleteUserSettingsSecurityModulePayload { + clientMutationId?: string | null; + /** The `UserSettingsSecurityModule` that was deleted by this mutation. */ + userSettingsSecurityModule?: UserSettingsSecurityModule | null; + userSettingsSecurityModuleEdge?: UserSettingsSecurityModuleEdge | null; +} +export type DeleteUserSettingsSecurityModulePayloadSelect = { + clientMutationId?: boolean; + userSettingsSecurityModule?: { + select: UserSettingsSecurityModuleSelect; + }; + userSettingsSecurityModuleEdge?: { + select: UserSettingsSecurityModuleEdgeSelect; + }; +}; export interface CreateUserStateModulePayload { clientMutationId?: string | null; /** The `UserStateModule` that was created by this mutation. */ @@ -22755,26 +23011,6 @@ export type DeleteWebhookModulePayloadSelect = { select: WebhookModuleEdgeSelect; }; }; -export interface ProvisionRelationRecord { - outFieldId?: string | null; - outJunctionTableId?: string | null; - outSourceFieldId?: string | null; - outTargetFieldId?: string | null; -} -export type ProvisionRelationRecordSelect = { - outFieldId?: boolean; - outJunctionTableId?: boolean; - outSourceFieldId?: boolean; - outTargetFieldId?: boolean; -}; -export interface ProvisionTableRecord { - outFields?: string[] | null; - outTableId?: string | null; -} -export type ProvisionTableRecordSelect = { - outFields?: boolean; - outTableId?: boolean; -}; /** A `AgentModule` edge in the connection. */ export interface AgentModuleEdge { cursor?: string | null; @@ -23507,6 +23743,18 @@ export type RouteModuleEdgeSelect = { select: RouteModuleSelect; }; }; +/** A `ScopeTypesModule` edge in the connection. */ +export interface ScopeTypesModuleEdge { + cursor?: string | null; + /** The `ScopeTypesModule` at the end of the edge. */ + node?: ScopeTypesModule | null; +} +export type ScopeTypesModuleEdgeSelect = { + cursor?: boolean; + node?: { + select: ScopeTypesModuleSelect; + }; +}; /** A `SecureTableProvision` edge in the connection. */ export interface SecureTableProvisionEdge { cursor?: string | null; @@ -23627,6 +23875,18 @@ export type UserSettingsModuleEdgeSelect = { select: UserSettingsModuleSelect; }; }; +/** A `UserSettingsSecurityModule` edge in the connection. */ +export interface UserSettingsSecurityModuleEdge { + cursor?: string | null; + /** The `UserSettingsSecurityModule` at the end of the edge. */ + node?: UserSettingsSecurityModule | null; +} +export type UserSettingsSecurityModuleEdgeSelect = { + cursor?: boolean; + node?: { + select: UserSettingsSecurityModuleSelect; + }; +}; /** A `UserStateModule` edge in the connection. */ export interface UserStateModuleEdge { cursor?: string | null; diff --git a/sdk/constructive-react/src/modules/orm/models/index.ts b/sdk/constructive-react/src/modules/orm/models/index.ts index 55e18104c1..7dcf593d78 100644 --- a/sdk/constructive-react/src/modules/orm/models/index.ts +++ b/sdk/constructive-react/src/modules/orm/models/index.ts @@ -64,6 +64,7 @@ export { RelationProvisionModel } from './relationProvision'; export { ResourceModuleModel } from './resourceModule'; export { RlsModuleModel } from './rlsModule'; export { RouteModuleModel } from './routeModule'; +export { ScopeTypesModuleModel } from './scopeTypesModule'; export { SecureTableProvisionModel } from './secureTableProvision'; export { SessionSecretsModuleModel } from './sessionSecretsModule'; export { SessionsModuleModel } from './sessionsModule'; @@ -74,6 +75,7 @@ export { TransferLogModuleModel } from './transferLogModule'; export { UserAuthModuleModel } from './userAuthModule'; export { UserCredentialsModuleModel } from './userCredentialsModule'; export { UserSettingsModuleModel } from './userSettingsModule'; +export { UserSettingsSecurityModuleModel } from './userSettingsSecurityModule'; export { UserStateModuleModel } from './userStateModule'; export { UsersModuleModel } from './usersModule'; export { WebauthnAuthModuleModel } from './webauthnAuthModule'; diff --git a/sdk/constructive-react/src/modules/orm/models/scopeTypesModule.ts b/sdk/constructive-react/src/modules/orm/models/scopeTypesModule.ts new file mode 100644 index 0000000000..1cbd281d05 --- /dev/null +++ b/sdk/constructive-react/src/modules/orm/models/scopeTypesModule.ts @@ -0,0 +1,245 @@ +/** + * ScopeTypesModule model for ORM client + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { OrmClient } from '../client'; +import { + QueryBuilder, + buildFindManyDocument, + buildFindFirstDocument, + buildFindOneDocument, + buildCreateDocument, + buildUpdateByPkDocument, + buildDeleteByPkDocument, +} from '../query-builder'; +import type { + ConnectionResult, + FindManyArgs, + FindFirstArgs, + CreateArgs, + UpdateArgs, + DeleteArgs, + InferSelectResult, + StrictSelect, +} from '../select-types'; +import type { + ScopeTypesModule, + ScopeTypesModuleWithRelations, + ScopeTypesModuleSelect, + ScopeTypesModuleFilter, + ScopeTypesModuleOrderBy, + CreateScopeTypesModuleInput, + UpdateScopeTypesModuleInput, + ScopeTypesModulePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class ScopeTypesModuleModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + scopeTypesModules: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'ScopeTypesModule', + 'scopeTypesModules', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + first: args?.first, + last: args?.last, + after: args?.after, + before: args?.before, + offset: args?.offset, + }, + 'ScopeTypesModuleFilter', + 'ScopeTypesModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'ScopeTypesModule', + fieldName: 'scopeTypesModules', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + scopeTypesModule: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'ScopeTypesModule', + 'scopeTypesModules', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'ScopeTypesModuleFilter', + 'ScopeTypesModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'ScopeTypesModule', + fieldName: 'scopeTypesModule', + document, + variables, + transform: (data: { + scopeTypesModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + scopeTypesModule: data.scopeTypesModules?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + scopeTypesModule: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'ScopeTypesModule', + 'scopeTypesModules', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'ScopeTypesModuleFilter', + 'ScopeTypesModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'ScopeTypesModule', + fieldName: 'scopeTypesModule', + document, + variables, + transform: (data: { + scopeTypesModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + scopeTypesModule: data.scopeTypesModules?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createScopeTypesModule: { + scopeTypesModule: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'ScopeTypesModule', + 'createScopeTypesModule', + 'scopeTypesModule', + args.select, + args.data, + 'CreateScopeTypesModuleInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'ScopeTypesModule', + fieldName: 'createScopeTypesModule', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + ScopeTypesModulePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateScopeTypesModule: { + scopeTypesModule: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'ScopeTypesModule', + 'updateScopeTypesModule', + 'scopeTypesModule', + args.select, + args.where.id, + args.data, + 'UpdateScopeTypesModuleInput', + 'id', + 'scopeTypesModulePatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'ScopeTypesModule', + fieldName: 'updateScopeTypesModule', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteScopeTypesModule: { + scopeTypesModule: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'ScopeTypesModule', + 'deleteScopeTypesModule', + 'scopeTypesModule', + { + id: args.where.id, + }, + 'DeleteScopeTypesModuleInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'ScopeTypesModule', + fieldName: 'deleteScopeTypesModule', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/modules/orm/models/userSettingsSecurityModule.ts b/sdk/constructive-react/src/modules/orm/models/userSettingsSecurityModule.ts new file mode 100644 index 0000000000..13b7c87010 --- /dev/null +++ b/sdk/constructive-react/src/modules/orm/models/userSettingsSecurityModule.ts @@ -0,0 +1,253 @@ +/** + * UserSettingsSecurityModule model for ORM client + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { OrmClient } from '../client'; +import { + QueryBuilder, + buildFindManyDocument, + buildFindFirstDocument, + buildFindOneDocument, + buildCreateDocument, + buildUpdateByPkDocument, + buildDeleteByPkDocument, +} from '../query-builder'; +import type { + ConnectionResult, + FindManyArgs, + FindFirstArgs, + CreateArgs, + UpdateArgs, + DeleteArgs, + InferSelectResult, + StrictSelect, +} from '../select-types'; +import type { + UserSettingsSecurityModule, + UserSettingsSecurityModuleWithRelations, + UserSettingsSecurityModuleSelect, + UserSettingsSecurityModuleFilter, + UserSettingsSecurityModuleOrderBy, + CreateUserSettingsSecurityModuleInput, + UpdateUserSettingsSecurityModuleInput, + UserSettingsSecurityModulePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class UserSettingsSecurityModuleModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + userSettingsSecurityModules: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'UserSettingsSecurityModule', + 'userSettingsSecurityModules', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + first: args?.first, + last: args?.last, + after: args?.after, + before: args?.before, + offset: args?.offset, + }, + 'UserSettingsSecurityModuleFilter', + 'UserSettingsSecurityModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'UserSettingsSecurityModule', + fieldName: 'userSettingsSecurityModules', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + userSettingsSecurityModule: InferSelectResult< + UserSettingsSecurityModuleWithRelations, + S + > | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'UserSettingsSecurityModule', + 'userSettingsSecurityModules', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'UserSettingsSecurityModuleFilter', + 'UserSettingsSecurityModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'UserSettingsSecurityModule', + fieldName: 'userSettingsSecurityModule', + document, + variables, + transform: (data: { + userSettingsSecurityModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + userSettingsSecurityModule: data.userSettingsSecurityModules?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + userSettingsSecurityModule: InferSelectResult< + UserSettingsSecurityModuleWithRelations, + S + > | null; + }> { + const { document, variables } = buildFindManyDocument( + 'UserSettingsSecurityModule', + 'userSettingsSecurityModules', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'UserSettingsSecurityModuleFilter', + 'UserSettingsSecurityModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'UserSettingsSecurityModule', + fieldName: 'userSettingsSecurityModule', + document, + variables, + transform: (data: { + userSettingsSecurityModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + userSettingsSecurityModule: data.userSettingsSecurityModules?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createUserSettingsSecurityModule: { + userSettingsSecurityModule: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'UserSettingsSecurityModule', + 'createUserSettingsSecurityModule', + 'userSettingsSecurityModule', + args.select, + args.data, + 'CreateUserSettingsSecurityModuleInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'UserSettingsSecurityModule', + fieldName: 'createUserSettingsSecurityModule', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + UserSettingsSecurityModulePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateUserSettingsSecurityModule: { + userSettingsSecurityModule: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'UserSettingsSecurityModule', + 'updateUserSettingsSecurityModule', + 'userSettingsSecurityModule', + args.select, + args.where.id, + args.data, + 'UpdateUserSettingsSecurityModuleInput', + 'id', + 'userSettingsSecurityModulePatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'UserSettingsSecurityModule', + fieldName: 'updateUserSettingsSecurityModule', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteUserSettingsSecurityModule: { + userSettingsSecurityModule: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'UserSettingsSecurityModule', + 'deleteUserSettingsSecurityModule', + 'userSettingsSecurityModule', + { + id: args.where.id, + }, + 'DeleteUserSettingsSecurityModuleInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'UserSettingsSecurityModule', + fieldName: 'deleteUserSettingsSecurityModule', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/modules/orm/mutation/index.ts b/sdk/constructive-react/src/modules/orm/mutation/index.ts index 60041efadb..5450eca294 100644 --- a/sdk/constructive-react/src/modules/orm/mutation/index.ts +++ b/sdk/constructive-react/src/modules/orm/mutation/index.ts @@ -10,33 +10,12 @@ import type { ConstructBlueprintInput, CopyTemplateToBlueprintInput, ProvisionBucketInput, - ProvisionCheckConstraintInput, - ProvisionFullTextSearchInput, - ProvisionIndexInput, - ProvisionRelationInput, - ProvisionSpatialRelationInput, - ProvisionTableInput, - ProvisionUniqueConstraintInput, ConstructBlueprintPayload, CopyTemplateToBlueprintPayload, ProvisionBucketPayload, - ProvisionCheckConstraintPayload, - ProvisionFullTextSearchPayload, - ProvisionIndexPayload, - ProvisionRelationPayload, - ProvisionSpatialRelationPayload, - ProvisionTablePayload, - ProvisionUniqueConstraintPayload, ConstructBlueprintPayloadSelect, CopyTemplateToBlueprintPayloadSelect, ProvisionBucketPayloadSelect, - ProvisionCheckConstraintPayloadSelect, - ProvisionFullTextSearchPayloadSelect, - ProvisionIndexPayloadSelect, - ProvisionRelationPayloadSelect, - ProvisionSpatialRelationPayloadSelect, - ProvisionTablePayloadSelect, - ProvisionUniqueConstraintPayloadSelect, } from '../input-types'; import { connectionFieldsMap } from '../input-types'; /** @@ -63,55 +42,6 @@ and lifecycle settings. export interface ProvisionBucketVariables { input: ProvisionBucketInput; } -/** - * Variables for provisionCheckConstraint - * Creates a check constraint on a table from a $type + data blueprint definition. Supports: CheckOneOf (enum validation via = ANY(ARRAY[...])), CheckGreaterThan (single-column > value or cross-column), CheckLessThan (single-column < value or cross-column), CheckNotEqual (cross-column inequality). Builds AST expressions via ast_helpers and inserts into metaschema_public.check_constraint. Graceful: skips if a constraint with the same name already exists. - */ -export interface ProvisionCheckConstraintVariables { - input: ProvisionCheckConstraintInput; -} -/** - * Variables for provisionFullTextSearch - * 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. - */ -export interface ProvisionFullTextSearchVariables { - input: ProvisionFullTextSearchInput; -} -/** - * Variables for provisionIndex - * 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. - */ -export interface ProvisionIndexVariables { - input: ProvisionIndexInput; -} -/** - * Variables for provisionRelation - * 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). - */ -export interface ProvisionRelationVariables { - input: ProvisionRelationInput; -} -/** - * Variables for provisionSpatialRelation - * Idempotent provisioner for metaschema_public.spatial_relation. Inserts a row declaring a spatial predicate between two geometry/geography columns (owner and target). Called from construct_blueprint when a relation entry has $type=RelationSpatial. Graceful: re-running with the same (source_table_id, name) returns the existing id without modifying the row. Operator whitelist and st_dwithin ↔ param_name pairing are enforced by the spatial_relation table CHECKs. Both fields must already exist — this is a metadata-only insert. - */ -export interface ProvisionSpatialRelationVariables { - input: ProvisionSpatialRelationInput; -} -/** - * Variables for provisionTable - * Composable table provisioning: creates or finds a table, then creates fields (so Data* modules can reference them), applies N nodes (Data* modules), 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). - */ -export interface ProvisionTableVariables { - input: ProvisionTableInput; -} -/** - * Variables for provisionUniqueConstraint - * 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. - */ -export interface ProvisionUniqueConstraintVariables { - input: ProvisionUniqueConstraintInput; -} export function createMutationOperations(client: OrmClient) { return { constructBlueprint: ( @@ -201,208 +131,5 @@ export function createMutationOperations(client: OrmClient) { 'ProvisionBucketPayload' ), }), - provisionCheckConstraint: ( - args: ProvisionCheckConstraintVariables, - options: { - select: S; - } & StrictSelect - ) => - new QueryBuilder<{ - provisionCheckConstraint: InferSelectResult | null; - }>({ - client, - operation: 'mutation', - operationName: 'ProvisionCheckConstraint', - fieldName: 'provisionCheckConstraint', - ...buildCustomDocument( - 'mutation', - 'ProvisionCheckConstraint', - 'provisionCheckConstraint', - options.select, - args, - [ - { - name: 'input', - type: 'ProvisionCheckConstraintInput!', - }, - ], - connectionFieldsMap, - 'ProvisionCheckConstraintPayload' - ), - }), - provisionFullTextSearch: ( - args: ProvisionFullTextSearchVariables, - options: { - select: S; - } & StrictSelect - ) => - new QueryBuilder<{ - provisionFullTextSearch: InferSelectResult | null; - }>({ - client, - operation: 'mutation', - operationName: 'ProvisionFullTextSearch', - fieldName: 'provisionFullTextSearch', - ...buildCustomDocument( - 'mutation', - 'ProvisionFullTextSearch', - 'provisionFullTextSearch', - options.select, - args, - [ - { - name: 'input', - type: 'ProvisionFullTextSearchInput!', - }, - ], - connectionFieldsMap, - 'ProvisionFullTextSearchPayload' - ), - }), - provisionIndex: ( - args: ProvisionIndexVariables, - options: { - select: S; - } & StrictSelect - ) => - new QueryBuilder<{ - provisionIndex: InferSelectResult | null; - }>({ - client, - operation: 'mutation', - operationName: 'ProvisionIndex', - fieldName: 'provisionIndex', - ...buildCustomDocument( - 'mutation', - 'ProvisionIndex', - 'provisionIndex', - options.select, - args, - [ - { - name: 'input', - type: 'ProvisionIndexInput!', - }, - ], - connectionFieldsMap, - 'ProvisionIndexPayload' - ), - }), - provisionRelation: ( - args: ProvisionRelationVariables, - options: { - select: S; - } & StrictSelect - ) => - new QueryBuilder<{ - provisionRelation: InferSelectResult | null; - }>({ - client, - operation: 'mutation', - operationName: 'ProvisionRelation', - fieldName: 'provisionRelation', - ...buildCustomDocument( - 'mutation', - 'ProvisionRelation', - 'provisionRelation', - options.select, - args, - [ - { - name: 'input', - type: 'ProvisionRelationInput!', - }, - ], - connectionFieldsMap, - 'ProvisionRelationPayload' - ), - }), - provisionSpatialRelation: ( - args: ProvisionSpatialRelationVariables, - options: { - select: S; - } & StrictSelect - ) => - new QueryBuilder<{ - provisionSpatialRelation: InferSelectResult | null; - }>({ - client, - operation: 'mutation', - operationName: 'ProvisionSpatialRelation', - fieldName: 'provisionSpatialRelation', - ...buildCustomDocument( - 'mutation', - 'ProvisionSpatialRelation', - 'provisionSpatialRelation', - options.select, - args, - [ - { - name: 'input', - type: 'ProvisionSpatialRelationInput!', - }, - ], - connectionFieldsMap, - 'ProvisionSpatialRelationPayload' - ), - }), - provisionTable: ( - args: ProvisionTableVariables, - options: { - select: S; - } & StrictSelect - ) => - new QueryBuilder<{ - provisionTable: InferSelectResult | null; - }>({ - client, - operation: 'mutation', - operationName: 'ProvisionTable', - fieldName: 'provisionTable', - ...buildCustomDocument( - 'mutation', - 'ProvisionTable', - 'provisionTable', - options.select, - args, - [ - { - name: 'input', - type: 'ProvisionTableInput!', - }, - ], - connectionFieldsMap, - 'ProvisionTablePayload' - ), - }), - provisionUniqueConstraint: ( - args: ProvisionUniqueConstraintVariables, - options: { - select: S; - } & StrictSelect - ) => - new QueryBuilder<{ - provisionUniqueConstraint: InferSelectResult | null; - }>({ - client, - operation: 'mutation', - operationName: 'ProvisionUniqueConstraint', - fieldName: 'provisionUniqueConstraint', - ...buildCustomDocument( - 'mutation', - 'ProvisionUniqueConstraint', - 'provisionUniqueConstraint', - options.select, - args, - [ - { - name: 'input', - type: 'ProvisionUniqueConstraintInput!', - }, - ], - connectionFieldsMap, - 'ProvisionUniqueConstraintPayload' - ), - }), }; } diff --git a/sdk/constructive-react/src/modules/orm/query/index.ts b/sdk/constructive-react/src/modules/orm/query/index.ts deleted file mode 100644 index 70496d57ba..0000000000 --- a/sdk/constructive-react/src/modules/orm/query/index.ts +++ /dev/null @@ -1,115 +0,0 @@ -/** - * Custom query operations - * @generated by @constructive-io/graphql-codegen - * DO NOT EDIT - changes will be overwritten - */ -import { OrmClient } from '../client'; -import { QueryBuilder, buildCustomDocument } from '../query-builder'; -import type { InferSelectResult, StrictSelect } from '../select-types'; -import { connectionFieldsMap } from '../input-types'; -/** - * Variables for resolveBlueprintField - * Resolves a field_name within a given table_id to a field_id. Throws if no match is found. Used by construct_blueprint to translate user-authored field names (e.g. "location") into field UUIDs for downstream provisioning procedures. table_id must already be resolved (via resolve_blueprint_table) before calling this. - */ -export interface ResolveBlueprintFieldVariables { - databaseId?: string; - fieldName?: string; - tableId?: string; -} -/** - * Variables for resolveBlueprintTable - * Resolves a table_name (with optional schema_name) to a table_id. Resolution order: (1) if schema_name provided, exact lookup via metaschema_public.schema.name + metaschema_public.table; (2) check local table_map (tables created in current blueprint); (3) search metaschema_public.table by name across all schemas; (4) if multiple matches, throw ambiguous error asking for schema_name; (5) if no match, throw not-found error. - */ -export interface ResolveBlueprintTableVariables { - databaseId?: string; - defaultSchemaId?: string; - schemaName?: string; - tableMap?: unknown; - tableName?: string; -} -export function createQueryOperations(client: OrmClient) { - return { - resolveBlueprintField: ( - args: ResolveBlueprintFieldVariables, - options?: { - select?: Record; - } - ) => - new QueryBuilder<{ - resolveBlueprintField: string | null; - }>({ - client, - operation: 'query', - operationName: 'ResolveBlueprintField', - fieldName: 'resolveBlueprintField', - ...buildCustomDocument( - 'query', - 'ResolveBlueprintField', - 'resolveBlueprintField', - options?.select, - args, - [ - { - name: 'databaseId', - type: 'UUID', - }, - { - name: 'fieldName', - type: 'String', - }, - { - name: 'tableId', - type: 'UUID', - }, - ], - connectionFieldsMap, - undefined - ), - }), - resolveBlueprintTable: ( - args: ResolveBlueprintTableVariables, - options?: { - select?: Record; - } - ) => - new QueryBuilder<{ - resolveBlueprintTable: string | null; - }>({ - client, - operation: 'query', - operationName: 'ResolveBlueprintTable', - fieldName: 'resolveBlueprintTable', - ...buildCustomDocument( - 'query', - 'ResolveBlueprintTable', - 'resolveBlueprintTable', - options?.select, - args, - [ - { - name: 'databaseId', - type: 'UUID', - }, - { - name: 'defaultSchemaId', - type: 'UUID', - }, - { - name: 'schemaName', - type: 'String', - }, - { - name: 'tableMap', - type: 'JSON', - }, - { - name: 'tableName', - type: 'String', - }, - ], - connectionFieldsMap, - undefined - ), - }), - }; -} diff --git a/sdk/constructive-react/src/modules/schema-types.ts b/sdk/constructive-react/src/modules/schema-types.ts index 4332cbba3f..1354b768aa 100644 --- a/sdk/constructive-react/src/modules/schema-types.ts +++ b/sdk/constructive-react/src/modules/schema-types.ts @@ -66,6 +66,7 @@ import type { ResourceModule, RlsModule, RouteModule, + ScopeTypesModule, SecureTableProvision, SessionSecretsModule, SessionsModule, @@ -76,6 +77,7 @@ import type { UserAuthModule, UserCredentialsModule, UserSettingsModule, + UserSettingsSecurityModule, UserStateModule, UsersModule, WebauthnAuthModule, @@ -339,6 +341,10 @@ export type BillingProviderModuleOrderBy = | 'BILLING_CUSTOMERS_TABLE_ID_DESC' | 'BILLING_CUSTOMERS_TABLE_NAME_ASC' | 'BILLING_CUSTOMERS_TABLE_NAME_DESC' + | 'BILLING_INVOICES_TABLE_ID_ASC' + | 'BILLING_INVOICES_TABLE_ID_DESC' + | 'BILLING_INVOICES_TABLE_NAME_ASC' + | 'BILLING_INVOICES_TABLE_NAME_DESC' | 'BILLING_PRICES_TABLE_ID_ASC' | 'BILLING_PRICES_TABLE_ID_DESC' | 'BILLING_PRICES_TABLE_NAME_ASC' @@ -347,6 +353,10 @@ export type BillingProviderModuleOrderBy = | 'BILLING_PRODUCTS_TABLE_ID_DESC' | 'BILLING_PRODUCTS_TABLE_NAME_ASC' | 'BILLING_PRODUCTS_TABLE_NAME_DESC' + | 'BILLING_REFUNDS_TABLE_ID_ASC' + | 'BILLING_REFUNDS_TABLE_ID_DESC' + | 'BILLING_REFUNDS_TABLE_NAME_ASC' + | 'BILLING_REFUNDS_TABLE_NAME_DESC' | 'BILLING_SUBSCRIPTIONS_TABLE_ID_ASC' | 'BILLING_SUBSCRIPTIONS_TABLE_ID_DESC' | 'BILLING_SUBSCRIPTIONS_TABLE_NAME_ASC' @@ -359,6 +369,10 @@ export type BillingProviderModuleOrderBy = | 'DATABASE_ID_DESC' | 'ID_ASC' | 'ID_DESC' + | 'LIST_PENDING_USAGE_SYNC_FUNCTION_ASC' + | 'LIST_PENDING_USAGE_SYNC_FUNCTION_DESC' + | 'MARK_USAGE_SYNCED_FUNCTION_ASC' + | 'MARK_USAGE_SYNCED_FUNCTION_DESC' | 'NATURAL' | 'PREFIX_ASC' | 'PREFIX_DESC' @@ -376,10 +390,14 @@ export type BillingProviderModuleOrderBy = | 'PRODUCTS_TABLE_ID_DESC' | 'PROVIDER_ASC' | 'PROVIDER_DESC' + | 'RECORD_REFUND_FUNCTION_ASC' + | 'RECORD_REFUND_FUNCTION_DESC' | 'SCHEMA_ID_ASC' | 'SCHEMA_ID_DESC' | 'SUBSCRIPTIONS_TABLE_ID_ASC' - | 'SUBSCRIPTIONS_TABLE_ID_DESC'; + | 'SUBSCRIPTIONS_TABLE_ID_DESC' + | 'UPSERT_INVOICE_FUNCTION_ASC' + | 'UPSERT_INVOICE_FUNCTION_DESC'; /** Methods to use when ordering `BlueprintConstruction`. */ export type BlueprintConstructionOrderBy = | 'BLUEPRINT_ID_ASC' @@ -493,6 +511,10 @@ export type CatalogModuleOrderBy = | 'APPS_TABLE_ID_DESC' | 'APPS_TABLE_NAME_ASC' | 'APPS_TABLE_NAME_DESC' + | 'BINDINGS_TABLE_ID_ASC' + | 'BINDINGS_TABLE_ID_DESC' + | 'BINDINGS_TABLE_NAME_ASC' + | 'BINDINGS_TABLE_NAME_DESC' | 'BUCKETS_TABLE_ID_ASC' | 'BUCKETS_TABLE_ID_DESC' | 'BUCKETS_TABLE_NAME_ASC' @@ -2719,10 +2741,14 @@ export type RlsModuleOrderBy = export type RouteModuleOrderBy = | 'API_NAME_ASC' | 'API_NAME_DESC' + | 'APP_LINKS_FUNCTION_NAME_ASC' + | 'APP_LINKS_FUNCTION_NAME_DESC' | 'CATALOG_MODULE_ID_ASC' | 'CATALOG_MODULE_ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' + | 'DEEP_LINK_FUNCTION_NAME_ASC' + | 'DEEP_LINK_FUNCTION_NAME_DESC' | 'DEFAULT_PERMISSIONS_ASC' | 'DEFAULT_PERMISSIONS_DESC' | 'DOMAIN_MODULE_ID_ASC' @@ -2768,6 +2794,21 @@ export type RouteModuleOrderBy = | 'SCHEMA_ID_DESC' | 'SCOPE_ASC' | 'SCOPE_DESC'; +/** Methods to use when ordering `ScopeTypesModule`. */ +export type ScopeTypesModuleOrderBy = + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'PRIVATE_SCHEMA_NAME_ASC' + | 'PRIVATE_SCHEMA_NAME_DESC' + | 'SCHEMA_ID_ASC' + | 'SCHEMA_ID_DESC' + | 'SCOPE_TYPES_TABLE_ID_ASC' + | 'SCOPE_TYPES_TABLE_ID_DESC'; /** Methods to use when ordering `SecureTableProvision`. */ export type SecureTableProvisionOrderBy = | 'DATABASE_ID_ASC' @@ -3184,6 +3225,25 @@ export type UserSettingsModuleOrderBy = | 'TABLE_ID_DESC' | 'TABLE_NAME_ASC' | 'TABLE_NAME_DESC'; +/** Methods to use when ordering `UserSettingsSecurityModule`. */ +export type UserSettingsSecurityModuleOrderBy = + | 'API_NAME_ASC' + | 'API_NAME_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NATURAL' + | 'OWNER_TABLE_ID_ASC' + | 'OWNER_TABLE_ID_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'SCHEMA_ID_ASC' + | 'SCHEMA_ID_DESC' + | 'TABLE_ID_ASC' + | 'TABLE_ID_DESC' + | 'TABLE_NAME_ASC' + | 'TABLE_NAME_DESC'; /** Methods to use when ordering `UserStateModule`. */ export type UserStateModuleOrderBy = | 'DATABASE_ID_ASC' @@ -3837,6 +3897,10 @@ export interface BillingProviderModuleFilter { billingCustomersTableId?: UUIDFilter; /** Filter by the object’s `billingCustomersTableName` field. */ billingCustomersTableName?: StringFilter; + /** Filter by the object’s `billingInvoicesTableId` field. */ + billingInvoicesTableId?: UUIDFilter; + /** Filter by the object’s `billingInvoicesTableName` field. */ + billingInvoicesTableName?: StringFilter; /** Filter by the object’s `billingPricesTableId` field. */ billingPricesTableId?: UUIDFilter; /** Filter by the object’s `billingPricesTableName` field. */ @@ -3845,6 +3909,10 @@ export interface BillingProviderModuleFilter { billingProductsTableId?: UUIDFilter; /** Filter by the object’s `billingProductsTableName` field. */ billingProductsTableName?: StringFilter; + /** Filter by the object’s `billingRefundsTableId` field. */ + billingRefundsTableId?: UUIDFilter; + /** Filter by the object’s `billingRefundsTableName` field. */ + billingRefundsTableName?: StringFilter; /** Filter by the object’s `billingSubscriptionsTableId` field. */ billingSubscriptionsTableId?: UUIDFilter; /** Filter by the object’s `billingSubscriptionsTableName` field. */ @@ -3857,6 +3925,10 @@ export interface BillingProviderModuleFilter { databaseId?: UUIDFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; + /** Filter by the object’s `listPendingUsageSyncFunction` field. */ + listPendingUsageSyncFunction?: StringFilter; + /** Filter by the object’s `markUsageSyncedFunction` field. */ + markUsageSyncedFunction?: StringFilter; /** Negates the expression. */ not?: BillingProviderModuleFilter; /** Checks for any expressions in this list. */ @@ -3875,26 +3947,36 @@ export interface BillingProviderModuleFilter { productsTableId?: UUIDFilter; /** Filter by the object’s `provider` field. */ provider?: StringFilter; + /** Filter by the object’s `recordRefundFunction` field. */ + recordRefundFunction?: StringFilter; /** Filter by the object’s `schemaId` field. */ schemaId?: UUIDFilter; /** Filter by the object’s `subscriptionsTableId` field. */ subscriptionsTableId?: UUIDFilter; + /** Filter by the object’s `upsertInvoiceFunction` field. */ + upsertInvoiceFunction?: StringFilter; } /** An input for mutations affecting `BillingProviderModule` */ export interface BillingProviderModuleInput { apiName?: string; billingCustomersTableId?: string; billingCustomersTableName?: string; + billingInvoicesTableId?: string; + billingInvoicesTableName?: string; billingPricesTableId?: string; billingPricesTableName?: string; billingProductsTableId?: string; billingProductsTableName?: string; + billingRefundsTableId?: string; + billingRefundsTableName?: string; billingSubscriptionsTableId?: string; billingSubscriptionsTableName?: string; billingWebhookEventsTableId?: string; billingWebhookEventsTableName?: string; databaseId: string; id?: string; + listPendingUsageSyncFunction?: string; + markUsageSyncedFunction?: string; prefix?: string; pricesTableId?: string; privateApiName?: string; @@ -3902,24 +3984,32 @@ export interface BillingProviderModuleInput { processBillingEventFunction?: string; productsTableId?: string; provider?: string; + recordRefundFunction?: string; schemaId?: string; subscriptionsTableId?: string; + upsertInvoiceFunction?: string; } /** Represents an update to a `BillingProviderModule`. Fields that are set will be updated. */ export interface BillingProviderModulePatch { apiName?: string; billingCustomersTableId?: string; billingCustomersTableName?: string; + billingInvoicesTableId?: string; + billingInvoicesTableName?: string; billingPricesTableId?: string; billingPricesTableName?: string; billingProductsTableId?: string; billingProductsTableName?: string; + billingRefundsTableId?: string; + billingRefundsTableName?: string; billingSubscriptionsTableId?: string; billingSubscriptionsTableName?: string; billingWebhookEventsTableId?: string; billingWebhookEventsTableName?: string; databaseId?: string; id?: string; + listPendingUsageSyncFunction?: string; + markUsageSyncedFunction?: string; prefix?: string; pricesTableId?: string; privateApiName?: string; @@ -3927,8 +4017,10 @@ export interface BillingProviderModulePatch { processBillingEventFunction?: string; productsTableId?: string; provider?: string; + recordRefundFunction?: string; schemaId?: string; subscriptionsTableId?: string; + upsertInvoiceFunction?: string; } /** A filter to be used against `BlueprintConstruction` object types. All fields are combined with a logical ‘and.’ */ export interface BlueprintConstructionFilter { @@ -4304,6 +4396,10 @@ export interface CatalogModuleFilter { appsTableId?: UUIDFilter; /** Filter by the object’s `appsTableName` field. */ appsTableName?: StringFilter; + /** Filter by the object’s `bindingsTableId` field. */ + bindingsTableId?: UUIDFilter; + /** Filter by the object’s `bindingsTableName` field. */ + bindingsTableName?: StringFilter; /** Filter by the object’s `bucketsTableId` field. */ bucketsTableId?: UUIDFilter; /** Filter by the object’s `bucketsTableName` field. */ @@ -4396,6 +4492,8 @@ export interface CatalogModuleInput { apisTableName?: string; appsTableId?: string; appsTableName?: string; + bindingsTableId?: string; + bindingsTableName?: string; bucketsTableId?: string; bucketsTableName?: string; databaseId: string; @@ -4438,6 +4536,8 @@ export interface CatalogModulePatch { apisTableName?: string; appsTableId?: string; appsTableName?: string; + bindingsTableId?: string; + bindingsTableName?: string; bucketsTableId?: string; bucketsTableName?: string; databaseId?: string; @@ -5029,6 +5129,11 @@ export interface CreateRouteModuleInput { /** The `RouteModule` to be created by this mutation. */ routeModule: RouteModuleInput; } +export interface CreateScopeTypesModuleInput { + clientMutationId?: string; + /** The `ScopeTypesModule` to be created by this mutation. */ + scopeTypesModule: ScopeTypesModuleInput; +} export interface CreateSecureTableProvisionInput { clientMutationId?: string; /** The `SecureTableProvision` to be created by this mutation. */ @@ -5079,6 +5184,11 @@ export interface CreateUserSettingsModuleInput { /** The `UserSettingsModule` to be created by this mutation. */ userSettingsModule: UserSettingsModuleInput; } +export interface CreateUserSettingsSecurityModuleInput { + clientMutationId?: string; + /** The `UserSettingsSecurityModule` to be created by this mutation. */ + userSettingsSecurityModule: UserSettingsSecurityModuleInput; +} export interface CreateUserStateModuleInput { clientMutationId?: string; /** The `UserStateModule` to be created by this mutation. */ @@ -6076,6 +6186,10 @@ export interface DeleteRouteModuleInput { clientMutationId?: string; id: string; } +export interface DeleteScopeTypesModuleInput { + clientMutationId?: string; + id: string; +} export interface DeleteSecureTableProvisionInput { clientMutationId?: string; /** Unique identifier for this provision row. */ @@ -6117,6 +6231,10 @@ export interface DeleteUserSettingsModuleInput { clientMutationId?: string; id: string; } +export interface DeleteUserSettingsSecurityModuleInput { + clientMutationId?: string; + id: string; +} export interface DeleteUserStateModuleInput { clientMutationId?: string; id: string; @@ -6730,7 +6848,7 @@ export interface EntityTypeProvisionInput { tableName?: string; /** * Single jsonb object describing the full security setup to apply to the entity table. - * Uses the same vocabulary as metaschema_modules_public.provision_table() and blueprint tables[] + * Uses the same vocabulary as metaschema_modules_private.provision_table() and blueprint tables[] * entries, so an entity table is configured the same way an ordinary blueprint table is. * Defaults to NULL; when non-NULL, the five default policies are implicitly replaced by * table_provision.policies[] (is_visible becomes a no-op on this path). @@ -6982,7 +7100,7 @@ export interface EntityTypeProvisionPatch { tableName?: string; /** * Single jsonb object describing the full security setup to apply to the entity table. - * Uses the same vocabulary as metaschema_modules_public.provision_table() and blueprint tables[] + * Uses the same vocabulary as metaschema_modules_private.provision_table() and blueprint tables[] * entries, so an entity table is configured the same way an ordinary blueprint table is. * Defaults to NULL; when non-NULL, the five default policies are implicitly replaced by * table_provision.policies[] (is_visible becomes a no-op on this path). @@ -10022,79 +10140,6 @@ export interface ProvisionBucketInput { */ ownerId?: string; } -export interface ProvisionCheckConstraintInput { - clientMutationId?: string; - databaseId?: string; - definition?: unknown; - tableId?: string; -} -export interface ProvisionFullTextSearchInput { - clientMutationId?: string; - databaseId?: string; - definition?: unknown; - tableId?: string; -} -export interface ProvisionIndexInput { - clientMutationId?: string; - databaseId?: string; - definition?: unknown; - tableId?: string; -} -export interface ProvisionRelationInput { - apiRequired?: boolean; - clientMutationId?: string; - createIndex?: boolean; - databaseId?: string; - deleteAction?: string; - exposeInApi?: boolean; - fieldName?: string; - grants?: unknown; - isRequired?: boolean; - junctionSchemaId?: string; - junctionTableId?: string; - junctionTableName?: string; - nodes?: unknown; - policies?: unknown; - relationType?: string; - sourceFieldName?: string; - sourceTableId?: string; - targetFieldName?: string; - targetTableId?: string; - useCompositeKey?: boolean; -} -export interface ProvisionSpatialRelationInput { - clientMutationId?: string; - databaseId?: string; - name?: string; - operator?: string; - paramName?: string; - sourceFieldId?: string; - sourceTableId?: string; - targetFieldId?: string; - targetTableId?: string; -} -export interface ProvisionTableInput { - clientMutationId?: string; - databaseId?: string; - description?: string; - fields?: unknown; - fullTextSearches?: unknown; - grants?: unknown; - indexes?: unknown; - nodes?: unknown; - policies?: unknown; - schemaId?: string; - tableId?: string; - tableName?: string; - uniqueConstraints?: unknown; - useRls?: boolean; -} -export interface ProvisionUniqueConstraintInput { - clientMutationId?: string; - databaseId?: string; - definition?: unknown; - tableId?: string; -} /** A filter to be used against `RateLimitMetersModule` object types. All fields are combined with a logical ‘and.’ */ export interface RateLimitMetersModuleFilter { /** Checks for all expressions in this list. */ @@ -10858,6 +10903,8 @@ export interface RouteModuleFilter { and?: RouteModuleFilter[]; /** Filter by the object’s `apiName` field. */ apiName?: StringFilter; + /** Filter by the object’s `appLinksFunctionName` field. */ + appLinksFunctionName?: StringFilter; /** Filter by the object’s `catalogModule` relation. */ catalogModule?: CatalogModuleFilter; /** A related `catalogModule` exists. */ @@ -10866,6 +10913,8 @@ export interface RouteModuleFilter { catalogModuleId?: UUIDFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; + /** Filter by the object’s `deepLinkFunctionName` field. */ + deepLinkFunctionName?: StringFilter; /** Filter by the object’s `defaultPermissions` field. */ defaultPermissions?: StringListFilter; /** Filter by the object’s `domainModule` relation. */ @@ -10920,8 +10969,10 @@ export interface RouteModuleFilter { /** An input for mutations affecting `RouteModule` */ export interface RouteModuleInput { apiName?: string; + appLinksFunctionName?: string; catalogModuleId?: string; databaseId: string; + deepLinkFunctionName?: string; defaultPermissions?: string[]; domainModuleId?: string; entityField?: string; @@ -10947,8 +10998,10 @@ export interface RouteModuleInput { /** Represents an update to a `RouteModule`. Fields that are set will be updated. */ export interface RouteModulePatch { apiName?: string; + appLinksFunctionName?: string; catalogModuleId?: string; databaseId?: string; + deepLinkFunctionName?: string; defaultPermissions?: string[]; domainModuleId?: string; entityField?: string; @@ -10971,6 +11024,41 @@ export interface RouteModulePatch { schemaId?: string; scope?: string; } +/** A filter to be used against `ScopeTypesModule` object types. All fields are combined with a logical ‘and.’ */ +export interface ScopeTypesModuleFilter { + /** Checks for all expressions in this list. */ + and?: ScopeTypesModuleFilter[]; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: ScopeTypesModuleFilter; + /** Checks for any expressions in this list. */ + or?: ScopeTypesModuleFilter[]; + /** Filter by the object’s `privateSchemaName` field. */ + privateSchemaName?: StringFilter; + /** Filter by the object’s `schemaId` field. */ + schemaId?: UUIDFilter; + /** Filter by the object’s `scopeTypesTableId` field. */ + scopeTypesTableId?: UUIDFilter; +} +/** An input for mutations affecting `ScopeTypesModule` */ +export interface ScopeTypesModuleInput { + databaseId: string; + id?: string; + privateSchemaName?: string; + schemaId?: string; + scopeTypesTableId?: string; +} +/** Represents an update to a `ScopeTypesModule`. Fields that are set will be updated. */ +export interface ScopeTypesModulePatch { + databaseId?: string; + id?: string; + privateSchemaName?: string; + schemaId?: string; + scopeTypesTableId?: string; +} /** A filter to be used against `SecureTableProvision` object types. All fields are combined with a logical ‘and.’ */ export interface SecureTableProvisionFilter { /** Checks for all expressions in this list. */ @@ -12065,6 +12153,12 @@ export interface UpdateRouteModuleInput { /** An object where the defined keys will be set on the `RouteModule` being updated. */ routeModulePatch: RouteModulePatch; } +export interface UpdateScopeTypesModuleInput { + clientMutationId?: string; + id: string; + /** An object where the defined keys will be set on the `ScopeTypesModule` being updated. */ + scopeTypesModulePatch: ScopeTypesModulePatch; +} export interface UpdateSecureTableProvisionInput { clientMutationId?: string; /** Unique identifier for this provision row. */ @@ -12126,6 +12220,12 @@ export interface UpdateUserSettingsModuleInput { /** An object where the defined keys will be set on the `UserSettingsModule` being updated. */ userSettingsModulePatch: UserSettingsModulePatch; } +export interface UpdateUserSettingsSecurityModuleInput { + clientMutationId?: string; + id: string; + /** An object where the defined keys will be set on the `UserSettingsSecurityModule` being updated. */ + userSettingsSecurityModulePatch: UserSettingsSecurityModulePatch; +} export interface UpdateUserStateModuleInput { clientMutationId?: string; id: string; @@ -12369,6 +12469,49 @@ export interface UserSettingsModulePatch { tableId?: string; tableName?: string; } +/** A filter to be used against `UserSettingsSecurityModule` object types. All fields are combined with a logical ‘and.’ */ +export interface UserSettingsSecurityModuleFilter { + /** Checks for all expressions in this list. */ + and?: UserSettingsSecurityModuleFilter[]; + /** Filter by the object’s `apiName` field. */ + apiName?: StringFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: UserSettingsSecurityModuleFilter; + /** Checks for any expressions in this list. */ + or?: UserSettingsSecurityModuleFilter[]; + /** Filter by the object’s `ownerTableId` field. */ + ownerTableId?: UUIDFilter; + /** Filter by the object’s `schemaId` field. */ + schemaId?: UUIDFilter; + /** Filter by the object’s `tableId` field. */ + tableId?: UUIDFilter; + /** Filter by the object’s `tableName` field. */ + tableName?: StringFilter; +} +/** An input for mutations affecting `UserSettingsSecurityModule` */ +export interface UserSettingsSecurityModuleInput { + apiName?: string; + databaseId: string; + id?: string; + ownerTableId?: string; + schemaId?: string; + tableId?: string; + tableName?: string; +} +/** Represents an update to a `UserSettingsSecurityModule`. Fields that are set will be updated. */ +export interface UserSettingsSecurityModulePatch { + apiName?: string; + databaseId?: string; + id?: string; + ownerTableId?: string; + schemaId?: string; + tableId?: string; + tableName?: string; +} /** A filter to be used against `UserStateModule` object types. All fields are combined with a logical ‘and.’ */ export interface UserStateModuleFilter { /** Checks for all expressions in this list. */ @@ -13145,6 +13288,13 @@ export interface RouteModuleConnection { pageInfo: PageInfo; totalCount: number; } +/** A connection to a list of `ScopeTypesModule` values. */ +export interface ScopeTypesModuleConnection { + edges: ScopeTypesModuleEdge[]; + nodes: ScopeTypesModule[]; + pageInfo: PageInfo; + totalCount: number; +} /** A connection to a list of `SecureTableProvision` values. */ export interface SecureTableProvisionConnection { edges: SecureTableProvisionEdge[]; @@ -13215,6 +13365,13 @@ export interface UserSettingsModuleConnection { pageInfo: PageInfo; totalCount: number; } +/** A connection to a list of `UserSettingsSecurityModule` values. */ +export interface UserSettingsSecurityModuleConnection { + edges: UserSettingsSecurityModuleEdge[]; + nodes: UserSettingsSecurityModule[]; + pageInfo: PageInfo; + totalCount: number; +} /** A connection to a list of `UserStateModule` values. */ export interface UserStateModuleConnection { edges: UserStateModuleEdge[]; @@ -13624,6 +13781,12 @@ export interface CreateRouteModulePayload { routeModule?: RouteModule | null; routeModuleEdge?: RouteModuleEdge | null; } +export interface CreateScopeTypesModulePayload { + clientMutationId?: string | null; + /** The `ScopeTypesModule` that was created by this mutation. */ + scopeTypesModule?: ScopeTypesModule | null; + scopeTypesModuleEdge?: ScopeTypesModuleEdge | null; +} export interface CreateSecureTableProvisionPayload { clientMutationId?: string | null; /** The `SecureTableProvision` that was created by this mutation. */ @@ -13684,6 +13847,12 @@ export interface CreateUserSettingsModulePayload { userSettingsModule?: UserSettingsModule | null; userSettingsModuleEdge?: UserSettingsModuleEdge | null; } +export interface CreateUserSettingsSecurityModulePayload { + clientMutationId?: string | null; + /** The `UserSettingsSecurityModule` that was created by this mutation. */ + userSettingsSecurityModule?: UserSettingsSecurityModule | null; + userSettingsSecurityModuleEdge?: UserSettingsSecurityModuleEdge | null; +} export interface CreateUserStateModulePayload { clientMutationId?: string | null; /** The `UserStateModule` that was created by this mutation. */ @@ -14080,6 +14249,12 @@ export interface DeleteRouteModulePayload { routeModule?: RouteModule | null; routeModuleEdge?: RouteModuleEdge | null; } +export interface DeleteScopeTypesModulePayload { + clientMutationId?: string | null; + /** The `ScopeTypesModule` that was deleted by this mutation. */ + scopeTypesModule?: ScopeTypesModule | null; + scopeTypesModuleEdge?: ScopeTypesModuleEdge | null; +} export interface DeleteSecureTableProvisionPayload { clientMutationId?: string | null; /** The `SecureTableProvision` that was deleted by this mutation. */ @@ -14140,6 +14315,12 @@ export interface DeleteUserSettingsModulePayload { userSettingsModule?: UserSettingsModule | null; userSettingsModuleEdge?: UserSettingsModuleEdge | null; } +export interface DeleteUserSettingsSecurityModulePayload { + clientMutationId?: string | null; + /** The `UserSettingsSecurityModule` that was deleted by this mutation. */ + userSettingsSecurityModule?: UserSettingsSecurityModule | null; + userSettingsSecurityModuleEdge?: UserSettingsSecurityModuleEdge | null; +} export interface DeleteUserStateModulePayload { clientMutationId?: string | null; /** The `UserStateModule` that was deleted by this mutation. */ @@ -14184,32 +14365,6 @@ export interface ProvisionBucketPayload { /** Whether provisioning succeeded */ success: boolean; } -export interface ProvisionCheckConstraintPayload { - clientMutationId?: string | null; -} -export interface ProvisionFullTextSearchPayload { - clientMutationId?: string | null; - result?: string | null; -} -export interface ProvisionIndexPayload { - clientMutationId?: string | null; - result?: string | null; -} -export interface ProvisionRelationPayload { - clientMutationId?: string | null; - result?: ProvisionRelationRecord[] | null; -} -export interface ProvisionSpatialRelationPayload { - clientMutationId?: string | null; - result?: string | null; -} -export interface ProvisionTablePayload { - clientMutationId?: string | null; - result?: ProvisionTableRecord[] | null; -} -export interface ProvisionUniqueConstraintPayload { - clientMutationId?: string | null; -} export interface UpdateAgentModulePayload { /** The `AgentModule` that was updated by this mutation. */ agentModule?: AgentModule | null; @@ -14576,6 +14731,12 @@ export interface UpdateRouteModulePayload { routeModule?: RouteModule | null; routeModuleEdge?: RouteModuleEdge | null; } +export interface UpdateScopeTypesModulePayload { + clientMutationId?: string | null; + /** The `ScopeTypesModule` that was updated by this mutation. */ + scopeTypesModule?: ScopeTypesModule | null; + scopeTypesModuleEdge?: ScopeTypesModuleEdge | null; +} export interface UpdateSecureTableProvisionPayload { clientMutationId?: string | null; /** The `SecureTableProvision` that was updated by this mutation. */ @@ -14636,6 +14797,12 @@ export interface UpdateUserSettingsModulePayload { userSettingsModule?: UserSettingsModule | null; userSettingsModuleEdge?: UserSettingsModuleEdge | null; } +export interface UpdateUserSettingsSecurityModulePayload { + clientMutationId?: string | null; + /** The `UserSettingsSecurityModule` that was updated by this mutation. */ + userSettingsSecurityModule?: UserSettingsSecurityModule | null; + userSettingsSecurityModuleEdge?: UserSettingsSecurityModuleEdge | null; +} export interface UpdateUserStateModulePayload { clientMutationId?: string | null; /** The `UserStateModule` that was updated by this mutation. */ @@ -15070,6 +15237,12 @@ export interface RouteModuleEdge { /** The `RouteModule` at the end of the edge. */ node?: RouteModule | null; } +/** A `ScopeTypesModule` edge in the connection. */ +export interface ScopeTypesModuleEdge { + cursor?: string | null; + /** The `ScopeTypesModule` at the end of the edge. */ + node?: ScopeTypesModule | null; +} /** A `SecureTableProvision` edge in the connection. */ export interface SecureTableProvisionEdge { cursor?: string | null; @@ -15130,6 +15303,12 @@ export interface UserSettingsModuleEdge { /** The `UserSettingsModule` at the end of the edge. */ node?: UserSettingsModule | null; } +/** A `UserSettingsSecurityModule` edge in the connection. */ +export interface UserSettingsSecurityModuleEdge { + cursor?: string | null; + /** The `UserSettingsSecurityModule` at the end of the edge. */ + node?: UserSettingsSecurityModule | null; +} /** A `UserStateModule` edge in the connection. */ export interface UserStateModuleEdge { cursor?: string | null; @@ -15160,16 +15339,6 @@ export interface WebhookModuleEdge { /** The `WebhookModule` at the end of the edge. */ node?: WebhookModule | null; } -export interface ProvisionRelationRecord { - outFieldId?: string | null; - outJunctionTableId?: string | null; - outSourceFieldId?: string | null; - outTargetFieldId?: string | null; -} -export interface ProvisionTableRecord { - outFields?: string[] | null; - outTableId?: string | null; -} /** Table constraints */ export interface MetaConstraints { foreignKey: MetaForeignKeyConstraint[]; diff --git a/sdk/constructive-react/src/modules/types.ts b/sdk/constructive-react/src/modules/types.ts index 48928cdb88..5d7e29c53b 100644 --- a/sdk/constructive-react/src/modules/types.ts +++ b/sdk/constructive-react/src/modules/types.ts @@ -121,16 +121,22 @@ export interface BillingProviderModule { apiName: string | null; billingCustomersTableId: string | null; billingCustomersTableName: string | null; + billingInvoicesTableId: string | null; + billingInvoicesTableName: string | null; billingPricesTableId: string | null; billingPricesTableName: string | null; billingProductsTableId: string | null; billingProductsTableName: string | null; + billingRefundsTableId: string | null; + billingRefundsTableName: string | null; billingSubscriptionsTableId: string | null; billingSubscriptionsTableName: string | null; billingWebhookEventsTableId: string | null; billingWebhookEventsTableName: string | null; databaseId: string | null; id: string | null; + listPendingUsageSyncFunction: string | null; + markUsageSyncedFunction: string | null; prefix: string | null; pricesTableId: string | null; privateApiName: string | null; @@ -138,8 +144,10 @@ export interface BillingProviderModule { processBillingEventFunction: string | null; productsTableId: string | null; provider: string | null; + recordRefundFunction: string | null; schemaId: string | null; subscriptionsTableId: string | null; + upsertInvoiceFunction: string | null; } export interface Blueprint { createdAt: string | null; @@ -196,6 +204,8 @@ export interface CatalogModule { apisTableName: string | null; appsTableId: string | null; appsTableName: string | null; + bindingsTableId: string | null; + bindingsTableName: string | null; bucketsTableId: string | null; bucketsTableName: string | null; databaseId: string | null; @@ -1283,8 +1293,10 @@ export interface RlsModule { } export interface RouteModule { apiName: string | null; + appLinksFunctionName: string | null; catalogModuleId: string | null; databaseId: string | null; + deepLinkFunctionName: string | null; defaultPermissions: string[] | null; domainModuleId: string | null; entityField: string | null; @@ -1307,6 +1319,13 @@ export interface RouteModule { schemaId: string | null; scope: string | null; } +export interface ScopeTypesModule { + databaseId: string | null; + id: string | null; + privateSchemaName: string | null; + schemaId: string | null; + scopeTypesTableId: string | null; +} export interface SecureTableProvision { databaseId: string | null; fields: unknown[] | null; @@ -1510,6 +1529,15 @@ export interface UserSettingsModule { tableId: string | null; tableName: string | null; } +export interface UserSettingsSecurityModule { + apiName: string | null; + databaseId: string | null; + id: string | null; + ownerTableId: string | null; + schemaId: string | null; + tableId: string | null; + tableName: string | null; +} export interface UserStateModule { databaseId: string | null; entityField: string | null; diff --git a/sdk/constructive-react/src/objects/README.md b/sdk/constructive-react/src/objects/README.md index e83f78ee5e..98706faac9 100644 --- a/sdk/constructive-react/src/objects/README.md +++ b/sdk/constructive-react/src/objects/README.md @@ -10,7 +10,7 @@ - **Tables:** 5 - **Custom queries:** 0 -- **Custom mutations:** 4 +- **Custom mutations:** 7 **Generators:** ORM, React Query diff --git a/sdk/constructive-react/src/objects/hooks/README.md b/sdk/constructive-react/src/objects/hooks/README.md index a8cc8a0744..ed5348a544 100644 --- a/sdk/constructive-react/src/objects/hooks/README.md +++ b/sdk/constructive-react/src/objects/hooks/README.md @@ -56,11 +56,14 @@ function App() { | `useDeleteStoreMutation` | Mutation | Named stores — one per version-controlled tree (e.g. one graph, one definition set) | | `useInitEmptyRepoMutation` | Mutation | initEmptyRepo | | `useInsertNodeAtPathMutation` | Mutation | insertNodeAtPath | +| `useInsertNodesAtPathsMutation` | Mutation | insertNodesAtPaths | | `useProvisionBucketMutation` | Mutation | Provision an S3 bucket for a logical bucket in the database. Reads the bucket config via RLS, then creates and configures the S3 bucket with the appropriate privacy policies, CORS rules, and lifecycle settings. | +| `useSetAndCommitMutation` | Mutation | setAndCommit | | `useSetDataAtPathMutation` | Mutation | setDataAtPath | +| `useSetManyAndCommitMutation` | Mutation | setManyAndCommit | ## Table Hooks @@ -187,6 +190,17 @@ insertNodeAtPath |----------|------| | `input` | InsertNodeAtPathInput (required) | +### `useInsertNodesAtPathsMutation` + +insertNodesAtPaths + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | InsertNodesAtPathsInput (required) | + ### `useProvisionBucketMutation` Provision an S3 bucket for a logical bucket in the database. @@ -201,6 +215,17 @@ and lifecycle settings. |----------|------| | `input` | ProvisionBucketInput (required) | +### `useSetAndCommitMutation` + +setAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | SetAndCommitInput (required) | + ### `useSetDataAtPathMutation` setDataAtPath @@ -212,6 +237,17 @@ setDataAtPath |----------|------| | `input` | SetDataAtPathInput (required) | +### `useSetManyAndCommitMutation` + +setManyAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | SetManyAndCommitInput (required) | + --- Built by the [Constructive](https://constructive.io) team. diff --git a/sdk/constructive-react/src/objects/hooks/mutation-keys.ts b/sdk/constructive-react/src/objects/hooks/mutation-keys.ts index 5d6f35ef0d..5842fc3219 100644 --- a/sdk/constructive-react/src/objects/hooks/mutation-keys.ts +++ b/sdk/constructive-react/src/objects/hooks/mutation-keys.ts @@ -76,14 +76,26 @@ export const customMutationKeys = { identifier ? (['mutation', 'insertNodeAtPath', identifier] as const) : (['mutation', 'insertNodeAtPath'] as const), + /** Mutation key for insertNodesAtPaths */ insertNodesAtPaths: (identifier?: string) => + identifier + ? (['mutation', 'insertNodesAtPaths', identifier] as const) + : (['mutation', 'insertNodesAtPaths'] as const), /** Mutation key for provisionBucket */ provisionBucket: (identifier?: string) => identifier ? (['mutation', 'provisionBucket', identifier] as const) : (['mutation', 'provisionBucket'] as const), + /** Mutation key for setAndCommit */ setAndCommit: (identifier?: string) => + identifier + ? (['mutation', 'setAndCommit', identifier] as const) + : (['mutation', 'setAndCommit'] as const), /** Mutation key for setDataAtPath */ setDataAtPath: (identifier?: string) => identifier ? (['mutation', 'setDataAtPath', identifier] as const) : (['mutation', 'setDataAtPath'] as const), + /** Mutation key for setManyAndCommit */ setManyAndCommit: (identifier?: string) => + identifier + ? (['mutation', 'setManyAndCommit', identifier] as const) + : (['mutation', 'setManyAndCommit'] as const), } as const; /** diff --git a/sdk/constructive-react/src/objects/hooks/mutations/index.ts b/sdk/constructive-react/src/objects/hooks/mutations/index.ts index b1f8e735fc..6f5d50802d 100644 --- a/sdk/constructive-react/src/objects/hooks/mutations/index.ts +++ b/sdk/constructive-react/src/objects/hooks/mutations/index.ts @@ -18,5 +18,8 @@ export * from './useUpdateStoreMutation'; export * from './useDeleteStoreMutation'; export * from './useInitEmptyRepoMutation'; export * from './useInsertNodeAtPathMutation'; +export * from './useInsertNodesAtPathsMutation'; export * from './useProvisionBucketMutation'; +export * from './useSetAndCommitMutation'; export * from './useSetDataAtPathMutation'; +export * from './useSetManyAndCommitMutation'; diff --git a/sdk/constructive-react/src/objects/hooks/mutations/useInsertNodesAtPathsMutation.ts b/sdk/constructive-react/src/objects/hooks/mutations/useInsertNodesAtPathsMutation.ts new file mode 100644 index 0000000000..70612f27eb --- /dev/null +++ b/sdk/constructive-react/src/objects/hooks/mutations/useInsertNodesAtPathsMutation.ts @@ -0,0 +1,58 @@ +/** + * Custom mutation hook for insertNodesAtPaths + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useMutation } from '@tanstack/react-query'; +import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { customMutationKeys } from '../mutation-keys'; +import type { InsertNodesAtPathsVariables } from '../../orm/mutation'; +import type { + InsertNodesAtPathsPayloadSelect, + InsertNodesAtPathsPayload, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; +export type { InsertNodesAtPathsVariables } from '../../orm/mutation'; +export type { InsertNodesAtPathsPayloadSelect } from '../../orm/input-types'; +export function useInsertNodesAtPathsMutation( + params: { + selection: { + fields: S & InsertNodesAtPathsPayloadSelect; + } & HookStrictSelect, InsertNodesAtPathsPayloadSelect>; + } & Omit< + UseMutationOptions< + { + insertNodesAtPaths: InferSelectResult | null; + }, + Error, + InsertNodesAtPathsVariables + >, + 'mutationFn' + > +): UseMutationResult< + { + insertNodesAtPaths: InferSelectResult | null; + }, + Error, + InsertNodesAtPathsVariables +> { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + return useMutation({ + mutationKey: customMutationKeys.insertNodesAtPaths(), + mutationFn: (variables: InsertNodesAtPathsVariables) => + getClient() + .mutation.insertNodesAtPaths(variables, { + select: args.select, + } as { + select: S; + } & StrictSelect) + .unwrap(), + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/modules/hooks/mutations/useProvisionIndexMutation.ts b/sdk/constructive-react/src/objects/hooks/mutations/useSetAndCommitMutation.ts similarity index 51% rename from sdk/constructive-react/src/modules/hooks/mutations/useProvisionIndexMutation.ts rename to sdk/constructive-react/src/objects/hooks/mutations/useSetAndCommitMutation.ts index c195e16439..efbed76921 100644 --- a/sdk/constructive-react/src/modules/hooks/mutations/useProvisionIndexMutation.ts +++ b/sdk/constructive-react/src/objects/hooks/mutations/useSetAndCommitMutation.ts @@ -1,5 +1,5 @@ /** - * Custom mutation hook for provisionIndex + * Custom mutation hook for setAndCommit * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -10,45 +10,45 @@ import { getClient } from '../client'; import { buildSelectionArgs } from '../selection'; import type { SelectionConfig } from '../selection'; import { customMutationKeys } from '../mutation-keys'; -import type { ProvisionIndexVariables } from '../../orm/mutation'; -import type { ProvisionIndexPayloadSelect, ProvisionIndexPayload } from '../../orm/input-types'; +import type { SetAndCommitVariables } from '../../orm/mutation'; +import type { SetAndCommitPayloadSelect, SetAndCommitPayload } from '../../orm/input-types'; import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; -export type { ProvisionIndexVariables } from '../../orm/mutation'; -export type { ProvisionIndexPayloadSelect } from '../../orm/input-types'; -export function useProvisionIndexMutation( +export type { SetAndCommitVariables } from '../../orm/mutation'; +export type { SetAndCommitPayloadSelect } from '../../orm/input-types'; +export function useSetAndCommitMutation( params: { selection: { - fields: S & ProvisionIndexPayloadSelect; - } & HookStrictSelect, ProvisionIndexPayloadSelect>; + fields: S & SetAndCommitPayloadSelect; + } & HookStrictSelect, SetAndCommitPayloadSelect>; } & Omit< UseMutationOptions< { - provisionIndex: InferSelectResult | null; + setAndCommit: InferSelectResult | null; }, Error, - ProvisionIndexVariables + SetAndCommitVariables >, 'mutationFn' > ): UseMutationResult< { - provisionIndex: InferSelectResult | null; + setAndCommit: InferSelectResult | null; }, Error, - ProvisionIndexVariables + SetAndCommitVariables > { const args = buildSelectionArgs(params.selection); const { selection: _selection, ...mutationOptions } = params ?? {}; void _selection; return useMutation({ - mutationKey: customMutationKeys.provisionIndex(), - mutationFn: (variables: ProvisionIndexVariables) => + mutationKey: customMutationKeys.setAndCommit(), + mutationFn: (variables: SetAndCommitVariables) => getClient() - .mutation.provisionIndex(variables, { + .mutation.setAndCommit(variables, { select: args.select, } as { select: S; - } & StrictSelect) + } & StrictSelect) .unwrap(), ...mutationOptions, }); diff --git a/sdk/constructive-react/src/objects/hooks/mutations/useSetManyAndCommitMutation.ts b/sdk/constructive-react/src/objects/hooks/mutations/useSetManyAndCommitMutation.ts new file mode 100644 index 0000000000..91ead94fd0 --- /dev/null +++ b/sdk/constructive-react/src/objects/hooks/mutations/useSetManyAndCommitMutation.ts @@ -0,0 +1,55 @@ +/** + * Custom mutation hook for setManyAndCommit + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useMutation } from '@tanstack/react-query'; +import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { customMutationKeys } from '../mutation-keys'; +import type { SetManyAndCommitVariables } from '../../orm/mutation'; +import type { SetManyAndCommitPayloadSelect, SetManyAndCommitPayload } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; +export type { SetManyAndCommitVariables } from '../../orm/mutation'; +export type { SetManyAndCommitPayloadSelect } from '../../orm/input-types'; +export function useSetManyAndCommitMutation( + params: { + selection: { + fields: S & SetManyAndCommitPayloadSelect; + } & HookStrictSelect, SetManyAndCommitPayloadSelect>; + } & Omit< + UseMutationOptions< + { + setManyAndCommit: InferSelectResult | null; + }, + Error, + SetManyAndCommitVariables + >, + 'mutationFn' + > +): UseMutationResult< + { + setManyAndCommit: InferSelectResult | null; + }, + Error, + SetManyAndCommitVariables +> { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + return useMutation({ + mutationKey: customMutationKeys.setManyAndCommit(), + mutationFn: (variables: SetManyAndCommitVariables) => + getClient() + .mutation.setManyAndCommit(variables, { + select: args.select, + } as { + select: S; + } & StrictSelect) + .unwrap(), + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/objects/orm/README.md b/sdk/constructive-react/src/objects/orm/README.md index 2a09348ad0..e112c19ae0 100644 --- a/sdk/constructive-react/src/objects/orm/README.md +++ b/sdk/constructive-react/src/objects/orm/README.md @@ -228,6 +228,21 @@ insertNodeAtPath const result = await db.mutation.insertNodeAtPath({ input: '' }).execute(); ``` +### `db.mutation.insertNodesAtPaths` + +insertNodesAtPaths + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | InsertNodesAtPathsInput (required) | + +```typescript +const result = await db.mutation.insertNodesAtPaths({ input: '' }).execute(); +``` + ### `db.mutation.provisionBucket` Provision an S3 bucket for a logical bucket in the database. @@ -246,6 +261,21 @@ and lifecycle settings. const result = await db.mutation.provisionBucket({ input: { bucketKey: '', ownerId: '' } }).execute(); ``` +### `db.mutation.setAndCommit` + +setAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | SetAndCommitInput (required) | + +```typescript +const result = await db.mutation.setAndCommit({ input: '' }).execute(); +``` + ### `db.mutation.setDataAtPath` setDataAtPath @@ -261,6 +291,21 @@ setDataAtPath const result = await db.mutation.setDataAtPath({ input: { data: '', path: '', root: '', sId: '' } }).execute(); ``` +### `db.mutation.setManyAndCommit` + +setManyAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | SetManyAndCommitInput (required) | + +```typescript +const result = await db.mutation.setManyAndCommit({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }).execute(); +``` + --- Built by the [Constructive](https://constructive.io) team. diff --git a/sdk/constructive-react/src/objects/orm/input-types.ts b/sdk/constructive-react/src/objects/orm/input-types.ts index bab07456e0..1ca44bc9d7 100644 --- a/sdk/constructive-react/src/objects/orm/input-types.ts +++ b/sdk/constructive-react/src/objects/orm/input-types.ts @@ -665,6 +665,15 @@ export interface InsertNodeAtPathInput { root?: string; sId?: string; } +export interface InsertNodesAtPathsInput { + clientMutationId?: string; + datas?: Record[]; + kidsList?: Record; + ktreeList?: Record; + paths?: Record; + root?: string; + sId?: string; +} export interface ProvisionBucketInput { /** The logical bucket key (e.g., "public", "private") */ bucketKey: string; @@ -674,6 +683,17 @@ export interface ProvisionBucketInput { */ ownerId?: string; } +export interface SetAndCommitInput { + clientMutationId?: string; + data?: Record; + kids?: string[]; + ktree?: string[]; + message?: string; + path?: string[]; + refname?: string; + sId?: string; + storeId?: string; +} export interface SetDataAtPathInput { clientMutationId?: string; data?: Record; @@ -681,6 +701,14 @@ export interface SetDataAtPathInput { root?: string; sId?: string; } +export interface SetManyAndCommitInput { + clientMutationId?: string; + entries?: Record; + message?: string; + refname?: string; + sId?: string; + storeId?: string; +} /** An input for mutations affecting `Commit` */ export interface CommitInput { /** User who authored the changes */ @@ -758,6 +786,14 @@ export type InsertNodeAtPathPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface InsertNodesAtPathsPayload { + clientMutationId?: string | null; + result?: string | null; +} +export type InsertNodesAtPathsPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; export interface ProvisionBucketPayload { /** The access type applied */ accessType: string; @@ -780,6 +816,20 @@ export type ProvisionBucketPayloadSelect = { provider?: boolean; success?: boolean; }; +export interface SetAndCommitPayload { + clientMutationId?: string | null; + commitEdge?: CommitEdge | null; + result?: Commit | null; +} +export type SetAndCommitPayloadSelect = { + clientMutationId?: boolean; + commitEdge?: { + select: CommitEdgeSelect; + }; + result?: { + select: CommitSelect; + }; +}; export interface SetDataAtPathPayload { clientMutationId?: string | null; result?: string | null; @@ -788,6 +838,20 @@ export type SetDataAtPathPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface SetManyAndCommitPayload { + clientMutationId?: string | null; + commitEdge?: CommitEdge | null; + result?: Commit | null; +} +export type SetManyAndCommitPayloadSelect = { + clientMutationId?: boolean; + commitEdge?: { + select: CommitEdgeSelect; + }; + result?: { + select: CommitSelect; + }; +}; export interface CreateCommitPayload { clientMutationId?: string | null; /** The `Commit` that was created by this mutation. */ diff --git a/sdk/constructive-react/src/objects/orm/mutation/index.ts b/sdk/constructive-react/src/objects/orm/mutation/index.ts index a0c21cb2bd..7d08bdc42e 100644 --- a/sdk/constructive-react/src/objects/orm/mutation/index.ts +++ b/sdk/constructive-react/src/objects/orm/mutation/index.ts @@ -9,16 +9,25 @@ import type { InferSelectResult, StrictSelect } from '../select-types'; import type { InitEmptyRepoInput, InsertNodeAtPathInput, + InsertNodesAtPathsInput, ProvisionBucketInput, + SetAndCommitInput, SetDataAtPathInput, + SetManyAndCommitInput, InitEmptyRepoPayload, InsertNodeAtPathPayload, + InsertNodesAtPathsPayload, ProvisionBucketPayload, + SetAndCommitPayload, SetDataAtPathPayload, + SetManyAndCommitPayload, InitEmptyRepoPayloadSelect, InsertNodeAtPathPayloadSelect, + InsertNodesAtPathsPayloadSelect, ProvisionBucketPayloadSelect, + SetAndCommitPayloadSelect, SetDataAtPathPayloadSelect, + SetManyAndCommitPayloadSelect, } from '../input-types'; import { connectionFieldsMap } from '../input-types'; export interface InitEmptyRepoVariables { @@ -27,6 +36,9 @@ export interface InitEmptyRepoVariables { export interface InsertNodeAtPathVariables { input: InsertNodeAtPathInput; } +export interface InsertNodesAtPathsVariables { + input: InsertNodesAtPathsInput; +} /** * Variables for provisionBucket * Provision an S3 bucket for a logical bucket in the database. @@ -37,9 +49,15 @@ and lifecycle settings. export interface ProvisionBucketVariables { input: ProvisionBucketInput; } +export interface SetAndCommitVariables { + input: SetAndCommitInput; +} export interface SetDataAtPathVariables { input: SetDataAtPathInput; } +export interface SetManyAndCommitVariables { + input: SetManyAndCommitInput; +} export function createMutationOperations(client: OrmClient) { return { initEmptyRepo: ( @@ -100,6 +118,35 @@ export function createMutationOperations(client: OrmClient) { 'InsertNodeAtPathPayload' ), }), + insertNodesAtPaths: ( + args: InsertNodesAtPathsVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + insertNodesAtPaths: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'InsertNodesAtPaths', + fieldName: 'insertNodesAtPaths', + ...buildCustomDocument( + 'mutation', + 'InsertNodesAtPaths', + 'insertNodesAtPaths', + options.select, + args, + [ + { + name: 'input', + type: 'InsertNodesAtPathsInput!', + }, + ], + connectionFieldsMap, + 'InsertNodesAtPathsPayload' + ), + }), provisionBucket: ( args: ProvisionBucketVariables, options: { @@ -129,6 +176,35 @@ export function createMutationOperations(client: OrmClient) { 'ProvisionBucketPayload' ), }), + setAndCommit: ( + args: SetAndCommitVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + setAndCommit: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'SetAndCommit', + fieldName: 'setAndCommit', + ...buildCustomDocument( + 'mutation', + 'SetAndCommit', + 'setAndCommit', + options.select, + args, + [ + { + name: 'input', + type: 'SetAndCommitInput!', + }, + ], + connectionFieldsMap, + 'SetAndCommitPayload' + ), + }), setDataAtPath: ( args: SetDataAtPathVariables, options: { @@ -158,5 +234,34 @@ export function createMutationOperations(client: OrmClient) { 'SetDataAtPathPayload' ), }), + setManyAndCommit: ( + args: SetManyAndCommitVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + setManyAndCommit: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'SetManyAndCommit', + fieldName: 'setManyAndCommit', + ...buildCustomDocument( + 'mutation', + 'SetManyAndCommit', + 'setManyAndCommit', + options.select, + args, + [ + { + name: 'input', + type: 'SetManyAndCommitInput!', + }, + ], + connectionFieldsMap, + 'SetManyAndCommitPayload' + ), + }), }; } diff --git a/sdk/constructive-react/src/objects/schema-types.ts b/sdk/constructive-react/src/objects/schema-types.ts index 09a500c22e..6da9e09bff 100644 --- a/sdk/constructive-react/src/objects/schema-types.ts +++ b/sdk/constructive-react/src/objects/schema-types.ts @@ -227,6 +227,15 @@ export interface InsertNodeAtPathInput { root?: string; sId?: string; } +export interface InsertNodesAtPathsInput { + clientMutationId?: string; + datas?: unknown[]; + kidsList?: unknown; + ktreeList?: unknown; + paths?: unknown; + root?: string; + sId?: string; +} /** A filter to be used against `Object` object types. All fields are combined with a logical ‘and.’ */ export interface ObjectFilter { /** Checks for all expressions in this list. */ @@ -332,6 +341,17 @@ export interface RefPatch { /** Store this ref belongs to */ storeId?: string; } +export interface SetAndCommitInput { + clientMutationId?: string; + data?: unknown; + kids?: string[]; + ktree?: string[]; + message?: string; + path?: string[]; + refname?: string; + sId?: string; + storeId?: string; +} export interface SetDataAtPathInput { clientMutationId?: string; data?: unknown; @@ -339,6 +359,14 @@ export interface SetDataAtPathInput { root?: string; sId?: string; } +export interface SetManyAndCommitInput { + clientMutationId?: string; + entries?: unknown; + message?: string; + refname?: string; + sId?: string; + storeId?: string; +} /** A filter to be used against `Store` object types. All fields are combined with a logical ‘and.’ */ export interface StoreFilter { /** Checks for all expressions in this list. */ @@ -512,6 +540,10 @@ export interface InsertNodeAtPathPayload { clientMutationId?: string | null; result?: string | null; } +export interface InsertNodesAtPathsPayload { + clientMutationId?: string | null; + result?: string | null; +} export interface ProvisionBucketPayload { /** The access type applied */ accessType: string; @@ -526,10 +558,20 @@ export interface ProvisionBucketPayload { /** Whether provisioning succeeded */ success: boolean; } +export interface SetAndCommitPayload { + clientMutationId?: string | null; + commitEdge?: CommitEdge | null; + result?: Commit | null; +} export interface SetDataAtPathPayload { clientMutationId?: string | null; result?: string | null; } +export interface SetManyAndCommitPayload { + clientMutationId?: string | null; + commitEdge?: CommitEdge | null; + result?: Commit | null; +} export interface UpdateCommitPayload { clientMutationId?: string | null; /** The `Commit` that was updated by this mutation. */ diff --git a/sdk/constructive-sdk/schemas/api.graphql b/sdk/constructive-sdk/schemas/api.graphql index 1b2693f715..6f18367923 100644 --- a/sdk/constructive-sdk/schemas/api.graphql +++ b/sdk/constructive-sdk/schemas/api.graphql @@ -23,6 +23,122 @@ type AcceptDatabaseTransferPayload { result: Boolean } +""" +API surfaces exposed by this scope; publication makes a surface bindable from other scopes +""" +type Api { + """Anonymous role the API executes as""" + anonRole: String + + """Reads and enables pagination through a set of `ApiSchema`.""" + apiSchemas( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """Only read the first `n` values of the set.""" + first: Int + + """Only read the last `n` values of the set.""" + last: Int + + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int + + """The method to use when ordering `ApiSchema`.""" + orderBy: [ApiSchemaOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: ApiSchemaFilter + ): ApiSchemaConnection! + + """Reads a single `ApiSetting` that is related to this `Api`.""" + apiSetting: ApiSetting + + """Module-specific configuration for this API surface""" + config: JSON + + """Reads and enables pagination through a set of `CorsSetting`.""" + corsSettings( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """Only read the first `n` values of the set.""" + first: Int + + """Only read the last `n` values of the set.""" + last: Int + + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int + + """The method to use when ordering `CorsSetting`.""" + orderBy: [CorsSettingOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: CorsSettingFilter + ): CorsSettingConnection! + createdAt: Datetime + + """Database that owns this resource (database-scoped isolation)""" + databaseId: UUID! + + """Database this API surface serves""" + dbname: String + id: UUID! + + """Whether other scopes may see and route to this API surface""" + isPublished: Boolean! + + """Owner-local API surface name""" + name: String! + + """Authenticated role the API executes as""" + roleName: String + updatedAt: Datetime +} + +"""A connection to a list of `Api` values.""" +type ApiConnection { + """ + A list of edges which contains the `Api` and cursor to aid in pagination. + """ + edges: [ApiEdge]! + + """A list of `Api` objects.""" + nodes: [Api]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """The count of *all* `Api` you could get from the connection.""" + totalCount: Int! +} + +"""A `Api` edge in the connection.""" +type ApiEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `Api` at the end of the edge.""" + node: Api +} + enum ApiExposureLevel { EXPOSABLE INTERNAL_ONLY @@ -71,10 +187,153 @@ input ApiExposureLevelFilter { notIn: [ApiExposureLevel!] } +""" +A filter to be used against `Api` object types. All fields are combined with a logical ‘and.’ +""" +input ApiFilter { + """Checks for all expressions in this list.""" + and: [ApiFilter!] + + """Filter by the object’s `anonRole` field.""" + anonRole: StringFilter + + """Filter by the object’s `apiSchemas` relation.""" + apiSchemas: ApiToManyApiSchemaFilter + + """`apiSchemas` exist.""" + apiSchemasExist: Boolean + + """Filter by the object’s `apiSetting` relation.""" + apiSetting: ApiSettingFilter + + """A related `apiSetting` exists.""" + apiSettingExists: Boolean + + """Filter by the object’s `config` field.""" + config: JSONFilter + + """Filter by the object’s `corsSettings` relation.""" + corsSettings: ApiToManyCorsSettingFilter + + """`corsSettings` exist.""" + corsSettingsExist: Boolean + + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter + + """Filter by the object’s `databaseId` field.""" + databaseId: UUIDFilter + + """Filter by the object’s `dbname` field.""" + dbname: StringFilter + + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `isPublished` field.""" + isPublished: BooleanFilter + + """Filter by the object’s `name` field.""" + name: StringFilter + + """Negates the expression.""" + not: ApiFilter + + """Checks for any expressions in this list.""" + or: [ApiFilter!] + + """Filter by the object’s `roleName` field.""" + roleName: StringFilter + + """Filter by the object’s `updatedAt` field.""" + updatedAt: DatetimeFilter +} + +"""An input for mutations affecting `Api`""" +input ApiInput { + """Anonymous role the API executes as""" + anonRole: String + + """Module-specific configuration for this API surface""" + config: JSON + createdAt: Datetime + + """Database that owns this resource (database-scoped isolation)""" + databaseId: UUID! + + """Database this API surface serves""" + dbname: String + id: UUID + + """Whether other scopes may see and route to this API surface""" + isPublished: Boolean + + """Owner-local API surface name""" + name: String! + + """Authenticated role the API executes as""" + roleName: String + updatedAt: Datetime +} + +"""Methods to use when ordering `Api`.""" +enum ApiOrderBy { + ANON_ROLE_ASC + ANON_ROLE_DESC + CONFIG_ASC + CONFIG_DESC + CREATED_AT_ASC + CREATED_AT_DESC + DATABASE_ID_ASC + DATABASE_ID_DESC + DBNAME_ASC + DBNAME_DESC + ID_ASC + ID_DESC + IS_PUBLISHED_ASC + IS_PUBLISHED_DESC + NAME_ASC + NAME_DESC + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + ROLE_NAME_ASC + ROLE_NAME_DESC + UPDATED_AT_ASC + UPDATED_AT_DESC +} + +"""Represents an update to a `Api`. Fields that are set will be updated.""" +input ApiPatch { + """Anonymous role the API executes as""" + anonRole: String + + """Module-specific configuration for this API surface""" + config: JSON + createdAt: Datetime + + """Database that owns this resource (database-scoped isolation)""" + databaseId: UUID + + """Database this API surface serves""" + dbname: String + id: UUID + + """Whether other scopes may see and route to this API surface""" + isPublished: Boolean + + """Owner-local API surface name""" + name: String + + """Authenticated role the API executes as""" + roleName: String + updatedAt: Datetime +} + """Join table linking API surfaces to the metaschema schemas they expose""" type ApiSchema { - """Reads a single `Apis` that is related to this `ApiSchema`.""" - api: Apis + """Reads a single `Api` that is related to this `ApiSchema`.""" + api: Api """API surface that exposes this schema""" apiId: UUID! @@ -126,7 +385,7 @@ input ApiSchemaFilter { and: [ApiSchemaFilter!] """Filter by the object’s `api` relation.""" - api: ApisFilter + api: ApiFilter """Filter by the object’s `apiId` field.""" apiId: UUIDFilter @@ -211,8 +470,8 @@ input ApiSchemaPatch { Per-API feature flag overrides; NULL columns inherit from database_settings """ type ApiSetting { - """Reads a single `Apis` that is related to this `ApiSetting`.""" - api: Apis + """Reads a single `Api` that is related to this `ApiSetting`.""" + api: Api """API surface these settings override for""" apiId: UUID! @@ -328,7 +587,7 @@ input ApiSettingFilter { and: [ApiSettingFilter!] """Filter by the object’s `api` relation.""" - api: ApisFilter + api: ApiFilter """Filter by the object’s `apiId` field.""" apiId: UUIDFilter @@ -606,287 +865,28 @@ input ApiSettingPatch { } """ -API surfaces exposed by this scope; publication makes a surface bindable from other scopes +A filter to be used against many `ApiSchema` object types. All fields are combined with a logical ‘and.’ """ -type Apis { - """Anonymous role the API executes as""" - anonRole: String +input ApiToManyApiSchemaFilter { + """Filters to entities where every related entity matches.""" + every: ApiSchemaFilter - """Reads and enables pagination through a set of `ApiSchema`.""" - apiSchemasByApiId( - """Read all values in the set after (below) this cursor.""" - after: Cursor + """Filters to entities where no related entity matches.""" + none: ApiSchemaFilter - """Read all values in the set before (above) this cursor.""" - before: Cursor + """Filters to entities where at least one related entity matches.""" + some: ApiSchemaFilter +} - """Only read the first `n` values of the set.""" - first: Int +""" +A filter to be used against many `CorsSetting` object types. All fields are combined with a logical ‘and.’ +""" +input ApiToManyCorsSettingFilter { + """Filters to entities where every related entity matches.""" + every: CorsSettingFilter - """Only read the last `n` values of the set.""" - last: Int - - """ - Skip the first `n` values from our `after` cursor, an alternative to cursor - based pagination. May not be used with `last`. - """ - offset: Int - - """The method to use when ordering `ApiSchema`.""" - orderBy: [ApiSchemaOrderBy!] = [PRIMARY_KEY_ASC] - - """ - A filter to be used in determining which values should be returned by the collection. - """ - where: ApiSchemaFilter - ): ApiSchemaConnection! - - """Reads a single `ApiSetting` that is related to this `Apis`.""" - apiSettingByApiId: ApiSetting - - """Module-specific configuration for this API surface""" - config: JSON - - """Reads and enables pagination through a set of `CorsSetting`.""" - corsSettingsByApiId( - """Read all values in the set after (below) this cursor.""" - after: Cursor - - """Read all values in the set before (above) this cursor.""" - before: Cursor - - """Only read the first `n` values of the set.""" - first: Int - - """Only read the last `n` values of the set.""" - last: Int - - """ - Skip the first `n` values from our `after` cursor, an alternative to cursor - based pagination. May not be used with `last`. - """ - offset: Int - - """The method to use when ordering `CorsSetting`.""" - orderBy: [CorsSettingOrderBy!] = [PRIMARY_KEY_ASC] - - """ - A filter to be used in determining which values should be returned by the collection. - """ - where: CorsSettingFilter - ): CorsSettingConnection! - createdAt: Datetime - - """Database that owns this resource (database-scoped isolation)""" - databaseId: UUID! - - """Database this API surface serves""" - dbname: String - id: UUID! - - """Whether other scopes may see and route to this API surface""" - isPublished: Boolean! - - """Owner-local API surface name""" - name: String! - - """Authenticated role the API executes as""" - roleName: String - updatedAt: Datetime -} - -"""A connection to a list of `Apis` values.""" -type ApisConnection { - """ - A list of edges which contains the `Apis` and cursor to aid in pagination. - """ - edges: [ApisEdge]! - - """A list of `Apis` objects.""" - nodes: [Apis]! - - """Information to aid in pagination.""" - pageInfo: PageInfo! - - """The count of *all* `Apis` you could get from the connection.""" - totalCount: Int! -} - -"""A `Apis` edge in the connection.""" -type ApisEdge { - """A cursor for use in pagination.""" - cursor: Cursor - - """The `Apis` at the end of the edge.""" - node: Apis -} - -""" -A filter to be used against `Apis` object types. All fields are combined with a logical ‘and.’ -""" -input ApisFilter { - """Checks for all expressions in this list.""" - and: [ApisFilter!] - - """Filter by the object’s `anonRole` field.""" - anonRole: StringFilter - - """Filter by the object’s `apiSchemasByApiId` relation.""" - apiSchemasByApiId: ApisToManyApiSchemaFilter - - """`apiSchemasByApiId` exist.""" - apiSchemasByApiIdExist: Boolean - - """Filter by the object’s `apiSettingByApiId` relation.""" - apiSettingByApiId: ApiSettingFilter - - """A related `apiSettingByApiId` exists.""" - apiSettingByApiIdExists: Boolean - - """Filter by the object’s `config` field.""" - config: JSONFilter - - """Filter by the object’s `corsSettingsByApiId` relation.""" - corsSettingsByApiId: ApisToManyCorsSettingFilter - - """`corsSettingsByApiId` exist.""" - corsSettingsByApiIdExist: Boolean - - """Filter by the object’s `createdAt` field.""" - createdAt: DatetimeFilter - - """Filter by the object’s `databaseId` field.""" - databaseId: UUIDFilter - - """Filter by the object’s `dbname` field.""" - dbname: StringFilter - - """Filter by the object’s `id` field.""" - id: UUIDFilter - - """Filter by the object’s `isPublished` field.""" - isPublished: BooleanFilter - - """Filter by the object’s `name` field.""" - name: StringFilter - - """Negates the expression.""" - not: ApisFilter - - """Checks for any expressions in this list.""" - or: [ApisFilter!] - - """Filter by the object’s `roleName` field.""" - roleName: StringFilter - - """Filter by the object’s `updatedAt` field.""" - updatedAt: DatetimeFilter -} - -"""An input for mutations affecting `Apis`""" -input ApisInput { - """Anonymous role the API executes as""" - anonRole: String - - """Module-specific configuration for this API surface""" - config: JSON - createdAt: Datetime - - """Database that owns this resource (database-scoped isolation)""" - databaseId: UUID! - - """Database this API surface serves""" - dbname: String - id: UUID - - """Whether other scopes may see and route to this API surface""" - isPublished: Boolean - - """Owner-local API surface name""" - name: String! - - """Authenticated role the API executes as""" - roleName: String - updatedAt: Datetime -} - -"""Methods to use when ordering `Apis`.""" -enum ApisOrderBy { - ANON_ROLE_ASC - ANON_ROLE_DESC - CONFIG_ASC - CONFIG_DESC - CREATED_AT_ASC - CREATED_AT_DESC - DATABASE_ID_ASC - DATABASE_ID_DESC - DBNAME_ASC - DBNAME_DESC - ID_ASC - ID_DESC - IS_PUBLISHED_ASC - IS_PUBLISHED_DESC - NAME_ASC - NAME_DESC - NATURAL - PRIMARY_KEY_ASC - PRIMARY_KEY_DESC - ROLE_NAME_ASC - ROLE_NAME_DESC - UPDATED_AT_ASC - UPDATED_AT_DESC -} - -"""Represents an update to a `Apis`. Fields that are set will be updated.""" -input ApisPatch { - """Anonymous role the API executes as""" - anonRole: String - - """Module-specific configuration for this API surface""" - config: JSON - createdAt: Datetime - - """Database that owns this resource (database-scoped isolation)""" - databaseId: UUID - - """Database this API surface serves""" - dbname: String - id: UUID - - """Whether other scopes may see and route to this API surface""" - isPublished: Boolean - - """Owner-local API surface name""" - name: String - - """Authenticated role the API executes as""" - roleName: String - updatedAt: Datetime -} - -""" -A filter to be used against many `ApiSchema` object types. All fields are combined with a logical ‘and.’ -""" -input ApisToManyApiSchemaFilter { - """Filters to entities where every related entity matches.""" - every: ApiSchemaFilter - - """Filters to entities where no related entity matches.""" - none: ApiSchemaFilter - - """Filters to entities where at least one related entity matches.""" - some: ApiSchemaFilter -} - -""" -A filter to be used against many `CorsSetting` object types. All fields are combined with a logical ‘and.’ -""" -input ApisToManyCorsSettingFilter { - """Filters to entities where every related entity matches.""" - every: CorsSettingFilter - - """Filters to entities where no related entity matches.""" - none: CorsSettingFilter + """Filters to entities where no related entity matches.""" + none: CorsSettingFilter """Filters to entities where at least one related entity matches.""" some: CorsSettingFilter @@ -1568,8 +1568,8 @@ type CorsSetting { """Array of allowed CORS origins (e.g. https://example.com)""" allowedOrigins: [String]! - """Reads a single `Apis` that is related to this `CorsSetting`.""" - api: Apis + """Reads a single `Api` that is related to this `CorsSetting`.""" + api: Api """ Optional API surface for per-API override; NULL means scope-wide default @@ -1620,7 +1620,7 @@ input CorsSettingFilter { and: [CorsSettingFilter!] """Filter by the object’s `api` relation.""" - api: ApisFilter + api: ApiFilter """A related `api` exists.""" apiExists: Boolean @@ -1702,6 +1702,41 @@ input CorsSettingPatch { updatedAt: Datetime } +"""All input for the create `Api` mutation.""" +input CreateApiInput { + """The `Api` to be created by this mutation.""" + api: ApiInput! + + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String +} + +"""The output of our create `Api` mutation.""" +type CreateApiPayload { + """The `Api` that was created by this mutation.""" + api: Api + + """An edge for our `Api`. May be used by Relay 1.""" + apiEdge( + """The method to use when ordering `Api`.""" + orderBy: [ApiOrderBy!]! = [PRIMARY_KEY_ASC] + ): ApiEdge + + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + """All input for the create `ApiSchema` mutation.""" input CreateApiSchemaInput { """The `ApiSchema` to be created by this mutation.""" @@ -1772,10 +1807,10 @@ type CreateApiSettingPayload { query: Query } -"""All input for the create `Apis` mutation.""" -input CreateApisInput { - """The `Apis` to be created by this mutation.""" - apis: ApisInput! +"""All input for the create `CheckConstraint` mutation.""" +input CreateCheckConstraintInput { + """The `CheckConstraint` to be created by this mutation.""" + checkConstraint: CheckConstraintInput! """ An arbitrary string value with no semantic meaning. Will be included in the @@ -1784,51 +1819,16 @@ input CreateApisInput { clientMutationId: String } -"""The output of our create `Apis` mutation.""" -type CreateApisPayload { - """The `Apis` that was created by this mutation.""" - apis: Apis +"""The output of our create `CheckConstraint` mutation.""" +type CreateCheckConstraintPayload { + """The `CheckConstraint` that was created by this mutation.""" + checkConstraint: CheckConstraint - """An edge for our `Apis`. May be used by Relay 1.""" - apisEdge( - """The method to use when ordering `Apis`.""" - orderBy: [ApisOrderBy!]! = [PRIMARY_KEY_ASC] - ): ApisEdge - - """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query -} - -"""All input for the create `CheckConstraint` mutation.""" -input CreateCheckConstraintInput { - """The `CheckConstraint` to be created by this mutation.""" - checkConstraint: CheckConstraintInput! - - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String -} - -"""The output of our create `CheckConstraint` mutation.""" -type CreateCheckConstraintPayload { - """The `CheckConstraint` that was created by this mutation.""" - checkConstraint: CheckConstraint - - """An edge for our `CheckConstraint`. May be used by Relay 1.""" - checkConstraintEdge( - """The method to use when ordering `CheckConstraint`.""" - orderBy: [CheckConstraintOrderBy!]! = [PRIMARY_KEY_ASC] - ): CheckConstraintEdge + """An edge for our `CheckConstraint`. May be used by Relay 1.""" + checkConstraintEdge( + """The method to use when ordering `CheckConstraint`.""" + orderBy: [CheckConstraintOrderBy!]! = [PRIMARY_KEY_ASC] + ): CheckConstraintEdge """ The exact same `clientMutationId` that was provided in the mutation input, @@ -2789,6 +2789,41 @@ type CreatePartitionPayload { query: Query } +"""All input for the create `PlatformApi` mutation.""" +input CreatePlatformApiInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + + """The `PlatformApi` to be created by this mutation.""" + platformApi: PlatformApiInput! +} + +"""The output of our create `PlatformApi` mutation.""" +type CreatePlatformApiPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `PlatformApi` that was created by this mutation.""" + platformApi: PlatformApi + + """An edge for our `PlatformApi`. May be used by Relay 1.""" + platformApiEdge( + """The method to use when ordering `PlatformApi`.""" + orderBy: [PlatformApiOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlatformApiEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + """All input for the create `PlatformApiSchema` mutation.""" input CreatePlatformApiSchemaInput { """ @@ -2859,41 +2894,6 @@ type CreatePlatformApiSettingPayload { query: Query } -"""All input for the create `PlatformApis` mutation.""" -input CreatePlatformApisInput { - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - - """The `PlatformApis` to be created by this mutation.""" - platformApis: PlatformApisInput! -} - -"""The output of our create `PlatformApis` mutation.""" -type CreatePlatformApisPayload { - """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """The `PlatformApis` that was created by this mutation.""" - platformApis: PlatformApis - - """An edge for our `PlatformApis`. May be used by Relay 1.""" - platformApisEdge( - """The method to use when ordering `PlatformApis`.""" - orderBy: [PlatformApisOrderBy!]! = [PRIMARY_KEY_ASC] - ): PlatformApisEdge - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query -} - """All input for the create `PlatformCorsSetting` mutation.""" input CreatePlatformCorsSettingInput { """ @@ -7016,8 +7016,8 @@ input DefaultPrivilegePatch { schemaId: UUID } -"""All input for the `deleteApiSchema` mutation.""" -input DeleteApiSchemaInput { +"""All input for the `deleteApi` mutation.""" +input DeleteApiInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. @@ -7026,16 +7026,16 @@ input DeleteApiSchemaInput { id: UUID! } -"""The output of our delete `ApiSchema` mutation.""" -type DeleteApiSchemaPayload { - """The `ApiSchema` that was deleted by this mutation.""" - apiSchema: ApiSchema +"""The output of our delete `Api` mutation.""" +type DeleteApiPayload { + """The `Api` that was deleted by this mutation.""" + api: Api - """An edge for our `ApiSchema`. May be used by Relay 1.""" - apiSchemaEdge( - """The method to use when ordering `ApiSchema`.""" - orderBy: [ApiSchemaOrderBy!]! = [PRIMARY_KEY_ASC] - ): ApiSchemaEdge + """An edge for our `Api`. May be used by Relay 1.""" + apiEdge( + """The method to use when ordering `Api`.""" + orderBy: [ApiOrderBy!]! = [PRIMARY_KEY_ASC] + ): ApiEdge """ The exact same `clientMutationId` that was provided in the mutation input, @@ -7049,8 +7049,8 @@ type DeleteApiSchemaPayload { query: Query } -"""All input for the `deleteApiSetting` mutation.""" -input DeleteApiSettingInput { +"""All input for the `deleteApiSchema` mutation.""" +input DeleteApiSchemaInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. @@ -7059,16 +7059,16 @@ input DeleteApiSettingInput { id: UUID! } -"""The output of our delete `ApiSetting` mutation.""" -type DeleteApiSettingPayload { - """The `ApiSetting` that was deleted by this mutation.""" - apiSetting: ApiSetting +"""The output of our delete `ApiSchema` mutation.""" +type DeleteApiSchemaPayload { + """The `ApiSchema` that was deleted by this mutation.""" + apiSchema: ApiSchema - """An edge for our `ApiSetting`. May be used by Relay 1.""" - apiSettingEdge( - """The method to use when ordering `ApiSetting`.""" - orderBy: [ApiSettingOrderBy!]! = [PRIMARY_KEY_ASC] - ): ApiSettingEdge + """An edge for our `ApiSchema`. May be used by Relay 1.""" + apiSchemaEdge( + """The method to use when ordering `ApiSchema`.""" + orderBy: [ApiSchemaOrderBy!]! = [PRIMARY_KEY_ASC] + ): ApiSchemaEdge """ The exact same `clientMutationId` that was provided in the mutation input, @@ -7082,8 +7082,8 @@ type DeleteApiSettingPayload { query: Query } -"""All input for the `deleteApis` mutation.""" -input DeleteApisInput { +"""All input for the `deleteApiSetting` mutation.""" +input DeleteApiSettingInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. @@ -7092,16 +7092,16 @@ input DeleteApisInput { id: UUID! } -"""The output of our delete `Apis` mutation.""" -type DeleteApisPayload { - """The `Apis` that was deleted by this mutation.""" - apis: Apis +"""The output of our delete `ApiSetting` mutation.""" +type DeleteApiSettingPayload { + """The `ApiSetting` that was deleted by this mutation.""" + apiSetting: ApiSetting - """An edge for our `Apis`. May be used by Relay 1.""" - apisEdge( - """The method to use when ordering `Apis`.""" - orderBy: [ApisOrderBy!]! = [PRIMARY_KEY_ASC] - ): ApisEdge + """An edge for our `ApiSetting`. May be used by Relay 1.""" + apiSettingEdge( + """The method to use when ordering `ApiSetting`.""" + orderBy: [ApiSettingOrderBy!]! = [PRIMARY_KEY_ASC] + ): ApiSettingEdge """ The exact same `clientMutationId` that was provided in the mutation input, @@ -8043,8 +8043,8 @@ type DeletePartitionPayload { query: Query } -"""All input for the `deletePlatformApiSchema` mutation.""" -input DeletePlatformApiSchemaInput { +"""All input for the `deletePlatformApi` mutation.""" +input DeletePlatformApiInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. @@ -8053,22 +8053,22 @@ input DeletePlatformApiSchemaInput { id: UUID! } -"""The output of our delete `PlatformApiSchema` mutation.""" -type DeletePlatformApiSchemaPayload { +"""The output of our delete `PlatformApi` mutation.""" +type DeletePlatformApiPayload { """ The exact same `clientMutationId` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. """ clientMutationId: String - """The `PlatformApiSchema` that was deleted by this mutation.""" - platformApiSchema: PlatformApiSchema + """The `PlatformApi` that was deleted by this mutation.""" + platformApi: PlatformApi - """An edge for our `PlatformApiSchema`. May be used by Relay 1.""" - platformApiSchemaEdge( - """The method to use when ordering `PlatformApiSchema`.""" - orderBy: [PlatformApiSchemaOrderBy!]! = [PRIMARY_KEY_ASC] - ): PlatformApiSchemaEdge + """An edge for our `PlatformApi`. May be used by Relay 1.""" + platformApiEdge( + """The method to use when ordering `PlatformApi`.""" + orderBy: [PlatformApiOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlatformApiEdge """ Our root query field type. Allows us to run any query from our mutation payload. @@ -8076,8 +8076,8 @@ type DeletePlatformApiSchemaPayload { query: Query } -"""All input for the `deletePlatformApiSetting` mutation.""" -input DeletePlatformApiSettingInput { +"""All input for the `deletePlatformApiSchema` mutation.""" +input DeletePlatformApiSchemaInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. @@ -8086,22 +8086,22 @@ input DeletePlatformApiSettingInput { id: UUID! } -"""The output of our delete `PlatformApiSetting` mutation.""" -type DeletePlatformApiSettingPayload { +"""The output of our delete `PlatformApiSchema` mutation.""" +type DeletePlatformApiSchemaPayload { """ The exact same `clientMutationId` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. """ clientMutationId: String - """The `PlatformApiSetting` that was deleted by this mutation.""" - platformApiSetting: PlatformApiSetting + """The `PlatformApiSchema` that was deleted by this mutation.""" + platformApiSchema: PlatformApiSchema - """An edge for our `PlatformApiSetting`. May be used by Relay 1.""" - platformApiSettingEdge( - """The method to use when ordering `PlatformApiSetting`.""" - orderBy: [PlatformApiSettingOrderBy!]! = [PRIMARY_KEY_ASC] - ): PlatformApiSettingEdge + """An edge for our `PlatformApiSchema`. May be used by Relay 1.""" + platformApiSchemaEdge( + """The method to use when ordering `PlatformApiSchema`.""" + orderBy: [PlatformApiSchemaOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlatformApiSchemaEdge """ Our root query field type. Allows us to run any query from our mutation payload. @@ -8109,8 +8109,8 @@ type DeletePlatformApiSettingPayload { query: Query } -"""All input for the `deletePlatformApis` mutation.""" -input DeletePlatformApisInput { +"""All input for the `deletePlatformApiSetting` mutation.""" +input DeletePlatformApiSettingInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. @@ -8119,22 +8119,22 @@ input DeletePlatformApisInput { id: UUID! } -"""The output of our delete `PlatformApis` mutation.""" -type DeletePlatformApisPayload { +"""The output of our delete `PlatformApiSetting` mutation.""" +type DeletePlatformApiSettingPayload { """ The exact same `clientMutationId` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. """ clientMutationId: String - """The `PlatformApis` that was deleted by this mutation.""" - platformApis: PlatformApis + """The `PlatformApiSetting` that was deleted by this mutation.""" + platformApiSetting: PlatformApiSetting - """An edge for our `PlatformApis`. May be used by Relay 1.""" - platformApisEdge( - """The method to use when ordering `PlatformApis`.""" - orderBy: [PlatformApisOrderBy!]! = [PRIMARY_KEY_ASC] - ): PlatformApisEdge + """An edge for our `PlatformApiSetting`. May be used by Relay 1.""" + platformApiSettingEdge( + """The method to use when ordering `PlatformApiSetting`.""" + orderBy: [PlatformApiSettingOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlatformApiSettingEdge """ Our root query field type. Allows us to run any query from our mutation payload. @@ -14337,6 +14337,14 @@ type Mutation { input: CancelDatabaseTransferInput! ): CancelDatabaseTransferPayload + """Creates a single `Api`.""" + createApi( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateApiInput! + ): CreateApiPayload + """Creates a single `ApiSchema`.""" createApiSchema( """ @@ -14353,14 +14361,6 @@ type Mutation { input: CreateApiSettingInput! ): CreateApiSettingPayload - """Creates a single `Apis`.""" - createApis( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateApisInput! - ): CreateApisPayload - """Creates a single `CheckConstraint`.""" createCheckConstraint( """ @@ -14585,6 +14585,14 @@ type Mutation { input: CreatePartitionInput! ): CreatePartitionPayload + """Creates a single `PlatformApi`.""" + createPlatformApi( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreatePlatformApiInput! + ): CreatePlatformApiPayload + """Creates a single `PlatformApiSchema`.""" createPlatformApiSchema( """ @@ -14601,14 +14609,6 @@ type Mutation { input: CreatePlatformApiSettingInput! ): CreatePlatformApiSettingPayload - """Creates a single `PlatformApis`.""" - createPlatformApis( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreatePlatformApisInput! - ): CreatePlatformApisPayload - """Creates a single `PlatformCorsSetting`.""" createPlatformCorsSetting( """ @@ -14961,6 +14961,14 @@ type Mutation { input: CreateWebauthnSettingInput! ): CreateWebauthnSettingPayload + """Deletes a single `Api` using a unique key.""" + deleteApi( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteApiInput! + ): DeleteApiPayload + """Deletes a single `ApiSchema` using a unique key.""" deleteApiSchema( """ @@ -14977,14 +14985,6 @@ type Mutation { input: DeleteApiSettingInput! ): DeleteApiSettingPayload - """Deletes a single `Apis` using a unique key.""" - deleteApis( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteApisInput! - ): DeleteApisPayload - """Deletes a single `CheckConstraint` using a unique key.""" deleteCheckConstraint( """ @@ -15209,6 +15209,14 @@ type Mutation { input: DeletePartitionInput! ): DeletePartitionPayload + """Deletes a single `PlatformApi` using a unique key.""" + deletePlatformApi( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeletePlatformApiInput! + ): DeletePlatformApiPayload + """Deletes a single `PlatformApiSchema` using a unique key.""" deletePlatformApiSchema( """ @@ -15225,14 +15233,6 @@ type Mutation { input: DeletePlatformApiSettingInput! ): DeletePlatformApiSettingPayload - """Deletes a single `PlatformApis` using a unique key.""" - deletePlatformApis( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeletePlatformApisInput! - ): DeletePlatformApisPayload - """Deletes a single `PlatformCorsSetting` using a unique key.""" deletePlatformCorsSetting( """ @@ -15650,6 +15650,14 @@ type Mutation { input: SitesProvisionStaticSiteInput! ): SitesProvisionStaticSitePayload + """Updates a single `Api` using a unique key and a patch.""" + updateApi( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateApiInput! + ): UpdateApiPayload + """Updates a single `ApiSchema` using a unique key and a patch.""" updateApiSchema( """ @@ -15666,14 +15674,6 @@ type Mutation { input: UpdateApiSettingInput! ): UpdateApiSettingPayload - """Updates a single `Apis` using a unique key and a patch.""" - updateApis( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateApisInput! - ): UpdateApisPayload - """Updates a single `CheckConstraint` using a unique key and a patch.""" updateCheckConstraint( """ @@ -15902,6 +15902,14 @@ type Mutation { input: UpdatePartitionInput! ): UpdatePartitionPayload + """Updates a single `PlatformApi` using a unique key and a patch.""" + updatePlatformApi( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdatePlatformApiInput! + ): UpdatePlatformApiPayload + """Updates a single `PlatformApiSchema` using a unique key and a patch.""" updatePlatformApiSchema( """ @@ -15918,14 +15926,6 @@ type Mutation { input: UpdatePlatformApiSettingInput! ): UpdatePlatformApiSettingPayload - """Updates a single `PlatformApis` using a unique key and a patch.""" - updatePlatformApis( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdatePlatformApisInput! - ): UpdatePlatformApisPayload - """Updates a single `PlatformCorsSetting` using a unique key and a patch.""" updatePlatformCorsSetting( """ @@ -16875,38 +16875,263 @@ input PartitionPatch { updatedAt: Datetime } -"""Join table linking API surfaces to the metaschema schemas they expose""" -type PlatformApiSchema { - """ - Reads a single `PlatformApis` that is related to this `PlatformApiSchema`. - """ - api: PlatformApis +""" +API surfaces exposed by this scope; publication makes a surface bindable from other scopes +""" +type PlatformApi { + """Anonymous role the API executes as""" + anonRole: String - """API surface that exposes this schema""" - apiId: UUID! + """Module-specific configuration for this API surface""" + config: JSON createdAt: Datetime + + """Database this API surface serves""" + dbname: String id: UUID! - """Reads a single `Schema` that is related to this `PlatformApiSchema`.""" - schema: Schema + """Whether other scopes may see and route to this API surface""" + isPublished: Boolean! - """Metaschema schema exposed through the API surface""" - schemaId: UUID! - updatedAt: Datetime -} + """Owner-local API surface name""" + name: String! -"""A connection to a list of `PlatformApiSchema` values.""" -type PlatformApiSchemaConnection { - """ - A list of edges which contains the `PlatformApiSchema` and cursor to aid in pagination. - """ - edges: [PlatformApiSchemaEdge]! + """Reads and enables pagination through a set of `PlatformApiSchema`.""" + platformApiSchemasByApiId( + """Read all values in the set after (below) this cursor.""" + after: Cursor - """A list of `PlatformApiSchema` objects.""" - nodes: [PlatformApiSchema]! + """Read all values in the set before (above) this cursor.""" + before: Cursor - """Information to aid in pagination.""" - pageInfo: PageInfo! + """Only read the first `n` values of the set.""" + first: Int + + """Only read the last `n` values of the set.""" + last: Int + + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int + + """The method to use when ordering `PlatformApiSchema`.""" + orderBy: [PlatformApiSchemaOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: PlatformApiSchemaFilter + ): PlatformApiSchemaConnection! + + """ + Reads a single `PlatformApiSetting` that is related to this `PlatformApi`. + """ + platformApiSettingByApiId: PlatformApiSetting + + """ + Reads a single `PlatformCorsSetting` that is related to this `PlatformApi`. + """ + platformCorsSettingByApiId: PlatformCorsSetting + + """Authenticated role the API executes as""" + roleName: String + updatedAt: Datetime +} + +"""A connection to a list of `PlatformApi` values.""" +type PlatformApiConnection { + """ + A list of edges which contains the `PlatformApi` and cursor to aid in pagination. + """ + edges: [PlatformApiEdge]! + + """A list of `PlatformApi` objects.""" + nodes: [PlatformApi]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """The count of *all* `PlatformApi` you could get from the connection.""" + totalCount: Int! +} + +"""A `PlatformApi` edge in the connection.""" +type PlatformApiEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `PlatformApi` at the end of the edge.""" + node: PlatformApi +} + +""" +A filter to be used against `PlatformApi` object types. All fields are combined with a logical ‘and.’ +""" +input PlatformApiFilter { + """Checks for all expressions in this list.""" + and: [PlatformApiFilter!] + + """Filter by the object’s `anonRole` field.""" + anonRole: StringFilter + + """Filter by the object’s `config` field.""" + config: JSONFilter + + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter + + """Filter by the object’s `dbname` field.""" + dbname: StringFilter + + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `isPublished` field.""" + isPublished: BooleanFilter + + """Filter by the object’s `name` field.""" + name: StringFilter + + """Negates the expression.""" + not: PlatformApiFilter + + """Checks for any expressions in this list.""" + or: [PlatformApiFilter!] + + """Filter by the object’s `platformApiSchemasByApiId` relation.""" + platformApiSchemasByApiId: PlatformApiToManyPlatformApiSchemaFilter + + """`platformApiSchemasByApiId` exist.""" + platformApiSchemasByApiIdExist: Boolean + + """Filter by the object’s `platformApiSettingByApiId` relation.""" + platformApiSettingByApiId: PlatformApiSettingFilter + + """A related `platformApiSettingByApiId` exists.""" + platformApiSettingByApiIdExists: Boolean + + """Filter by the object’s `platformCorsSettingByApiId` relation.""" + platformCorsSettingByApiId: PlatformCorsSettingFilter + + """A related `platformCorsSettingByApiId` exists.""" + platformCorsSettingByApiIdExists: Boolean + + """Filter by the object’s `roleName` field.""" + roleName: StringFilter + + """Filter by the object’s `updatedAt` field.""" + updatedAt: DatetimeFilter +} + +"""An input for mutations affecting `PlatformApi`""" +input PlatformApiInput { + """Anonymous role the API executes as""" + anonRole: String + + """Module-specific configuration for this API surface""" + config: JSON + createdAt: Datetime + + """Database this API surface serves""" + dbname: String + id: UUID + + """Whether other scopes may see and route to this API surface""" + isPublished: Boolean + + """Owner-local API surface name""" + name: String! + + """Authenticated role the API executes as""" + roleName: String + updatedAt: Datetime +} + +"""Methods to use when ordering `PlatformApi`.""" +enum PlatformApiOrderBy { + ANON_ROLE_ASC + ANON_ROLE_DESC + CONFIG_ASC + CONFIG_DESC + CREATED_AT_ASC + CREATED_AT_DESC + DBNAME_ASC + DBNAME_DESC + ID_ASC + ID_DESC + IS_PUBLISHED_ASC + IS_PUBLISHED_DESC + NAME_ASC + NAME_DESC + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + ROLE_NAME_ASC + ROLE_NAME_DESC + UPDATED_AT_ASC + UPDATED_AT_DESC +} + +""" +Represents an update to a `PlatformApi`. Fields that are set will be updated. +""" +input PlatformApiPatch { + """Anonymous role the API executes as""" + anonRole: String + + """Module-specific configuration for this API surface""" + config: JSON + createdAt: Datetime + + """Database this API surface serves""" + dbname: String + id: UUID + + """Whether other scopes may see and route to this API surface""" + isPublished: Boolean + + """Owner-local API surface name""" + name: String + + """Authenticated role the API executes as""" + roleName: String + updatedAt: Datetime +} + +"""Join table linking API surfaces to the metaschema schemas they expose""" +type PlatformApiSchema { + """ + Reads a single `PlatformApi` that is related to this `PlatformApiSchema`. + """ + api: PlatformApi + + """API surface that exposes this schema""" + apiId: UUID! + createdAt: Datetime + id: UUID! + + """Reads a single `Schema` that is related to this `PlatformApiSchema`.""" + schema: Schema + + """Metaschema schema exposed through the API surface""" + schemaId: UUID! + updatedAt: Datetime +} + +"""A connection to a list of `PlatformApiSchema` values.""" +type PlatformApiSchemaConnection { + """ + A list of edges which contains the `PlatformApiSchema` and cursor to aid in pagination. + """ + edges: [PlatformApiSchemaEdge]! + + """A list of `PlatformApiSchema` objects.""" + nodes: [PlatformApiSchema]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! """ The count of *all* `PlatformApiSchema` you could get from the connection. @@ -16931,7 +17156,7 @@ input PlatformApiSchemaFilter { and: [PlatformApiSchemaFilter!] """Filter by the object’s `api` relation.""" - api: PlatformApisFilter + api: PlatformApiFilter """Filter by the object’s `apiId` field.""" apiId: UUIDFilter @@ -17006,9 +17231,9 @@ Per-API feature flag overrides; NULL columns inherit from database_settings """ type PlatformApiSetting { """ - Reads a single `PlatformApis` that is related to this `PlatformApiSetting`. + Reads a single `PlatformApi` that is related to this `PlatformApiSetting`. """ - api: PlatformApis + api: PlatformApi """API surface these settings override for""" apiId: UUID! @@ -17123,7 +17348,7 @@ input PlatformApiSettingFilter { and: [PlatformApiSettingFilter!] """Filter by the object’s `api` relation.""" - api: PlatformApisFilter + api: PlatformApiFilter """Filter by the object’s `apiId` field.""" apiId: UUIDFilter @@ -17240,384 +17465,159 @@ input PlatformApiSettingInput { """ Override: enable presigned URL upload flow (NULL = inherit from database_settings) """ - enablePresignedUploads: Boolean - - """ - Override: enable realtime subscriptions (NULL = inherit from database_settings) - """ - enableRealtime: Boolean - - """ - Override: enable unified search (NULL = inherit from database_settings) - """ - enableSearch: Boolean - id: UUID - - """ - Extensible JSON for additional per-API settings that do not have dedicated columns - """ - options: JSON - - """ - Override: GraphQL statement timeout in milliseconds (NULL = inherit from database_settings). Clamped by the plan cap at read time. - """ - statementTimeoutMs: BigInt - updatedAt: Datetime -} - -"""Methods to use when ordering `PlatformApiSetting`.""" -enum PlatformApiSettingOrderBy { - API_ID_ASC - API_ID_DESC - CREATED_AT_ASC - CREATED_AT_DESC - ENABLE_AGGREGATES_ASC - ENABLE_AGGREGATES_DESC - ENABLE_BULK_ASC - ENABLE_BULK_DESC - ENABLE_CONNECTION_FILTER_ASC - ENABLE_CONNECTION_FILTER_DESC - ENABLE_DIRECT_UPLOADS_ASC - ENABLE_DIRECT_UPLOADS_DESC - ENABLE_I18N_ASC - ENABLE_I18N_DESC - ENABLE_LLM_ASC - ENABLE_LLM_DESC - ENABLE_LTREE_ASC - ENABLE_LTREE_DESC - ENABLE_MANY_TO_MANY_ASC - ENABLE_MANY_TO_MANY_DESC - ENABLE_POSTGIS_ASC - ENABLE_POSTGIS_DESC - ENABLE_PRESIGNED_UPLOADS_ASC - ENABLE_PRESIGNED_UPLOADS_DESC - ENABLE_REALTIME_ASC - ENABLE_REALTIME_DESC - ENABLE_SEARCH_ASC - ENABLE_SEARCH_DESC - ID_ASC - ID_DESC - NATURAL - OPTIONS_ASC - OPTIONS_DESC - PRIMARY_KEY_ASC - PRIMARY_KEY_DESC - STATEMENT_TIMEOUT_MS_ASC - STATEMENT_TIMEOUT_MS_DESC - UPDATED_AT_ASC - UPDATED_AT_DESC -} - -""" -Represents an update to a `PlatformApiSetting`. Fields that are set will be updated. -""" -input PlatformApiSettingPatch { - """API surface these settings override for""" - apiId: UUID - createdAt: Datetime - - """ - Override: enable aggregate queries (NULL = inherit from database_settings) - """ - enableAggregates: Boolean - - """ - Override: enable bulk mutations (NULL = inherit from database_settings) - """ - enableBulk: Boolean - - """ - Override: enable connection filter (NULL = inherit from database_settings) - """ - enableConnectionFilter: Boolean - - """ - Override: enable direct (multipart) file uploads (NULL = inherit from database_settings) - """ - enableDirectUploads: Boolean - - """ - Override: enable internationalization plugin (NULL = inherit from database_settings) - """ - enableI18N: Boolean - - """ - Override: enable LLM/AI integration features (NULL = inherit from database_settings) - """ - enableLlm: Boolean - - """ - Override: enable ltree hierarchical data type (NULL = inherit from database_settings) - """ - enableLtree: Boolean - - """ - Override: enable many-to-many relationships (NULL = inherit from database_settings) - """ - enableManyToMany: Boolean - - """ - Override: enable PostGIS spatial types (NULL = inherit from database_settings) - """ - enablePostgis: Boolean - - """ - Override: enable presigned URL upload flow (NULL = inherit from database_settings) - """ - enablePresignedUploads: Boolean - - """ - Override: enable realtime subscriptions (NULL = inherit from database_settings) - """ - enableRealtime: Boolean - - """ - Override: enable unified search (NULL = inherit from database_settings) - """ - enableSearch: Boolean - id: UUID - - """ - Extensible JSON for additional per-API settings that do not have dedicated columns - """ - options: JSON - - """ - Override: GraphQL statement timeout in milliseconds (NULL = inherit from database_settings). Clamped by the plan cap at read time. - """ - statementTimeoutMs: BigInt - updatedAt: Datetime -} - -""" -API surfaces exposed by this scope; publication makes a surface bindable from other scopes -""" -type PlatformApis { - """Anonymous role the API executes as""" - anonRole: String - - """Module-specific configuration for this API surface""" - config: JSON - createdAt: Datetime - - """Database this API surface serves""" - dbname: String - id: UUID! - - """Whether other scopes may see and route to this API surface""" - isPublished: Boolean! - - """Owner-local API surface name""" - name: String! - - """Reads and enables pagination through a set of `PlatformApiSchema`.""" - platformApiSchemasByApiId( - """Read all values in the set after (below) this cursor.""" - after: Cursor - - """Read all values in the set before (above) this cursor.""" - before: Cursor - - """Only read the first `n` values of the set.""" - first: Int - - """Only read the last `n` values of the set.""" - last: Int - - """ - Skip the first `n` values from our `after` cursor, an alternative to cursor - based pagination. May not be used with `last`. - """ - offset: Int - - """The method to use when ordering `PlatformApiSchema`.""" - orderBy: [PlatformApiSchemaOrderBy!] = [PRIMARY_KEY_ASC] - - """ - A filter to be used in determining which values should be returned by the collection. - """ - where: PlatformApiSchemaFilter - ): PlatformApiSchemaConnection! - - """ - Reads a single `PlatformApiSetting` that is related to this `PlatformApis`. - """ - platformApiSettingByApiId: PlatformApiSetting - - """ - Reads a single `PlatformCorsSetting` that is related to this `PlatformApis`. - """ - platformCorsSettingByApiId: PlatformCorsSetting - - """Authenticated role the API executes as""" - roleName: String - updatedAt: Datetime -} - -"""A connection to a list of `PlatformApis` values.""" -type PlatformApisConnection { - """ - A list of edges which contains the `PlatformApis` and cursor to aid in pagination. - """ - edges: [PlatformApisEdge]! - - """A list of `PlatformApis` objects.""" - nodes: [PlatformApis]! - - """Information to aid in pagination.""" - pageInfo: PageInfo! - - """The count of *all* `PlatformApis` you could get from the connection.""" - totalCount: Int! -} - -"""A `PlatformApis` edge in the connection.""" -type PlatformApisEdge { - """A cursor for use in pagination.""" - cursor: Cursor - - """The `PlatformApis` at the end of the edge.""" - node: PlatformApis -} - -""" -A filter to be used against `PlatformApis` object types. All fields are combined with a logical ‘and.’ -""" -input PlatformApisFilter { - """Checks for all expressions in this list.""" - and: [PlatformApisFilter!] - - """Filter by the object’s `anonRole` field.""" - anonRole: StringFilter - - """Filter by the object’s `config` field.""" - config: JSONFilter - - """Filter by the object’s `createdAt` field.""" - createdAt: DatetimeFilter - - """Filter by the object’s `dbname` field.""" - dbname: StringFilter - - """Filter by the object’s `id` field.""" - id: UUIDFilter - - """Filter by the object’s `isPublished` field.""" - isPublished: BooleanFilter - - """Filter by the object’s `name` field.""" - name: StringFilter - - """Negates the expression.""" - not: PlatformApisFilter - - """Checks for any expressions in this list.""" - or: [PlatformApisFilter!] - - """Filter by the object’s `platformApiSchemasByApiId` relation.""" - platformApiSchemasByApiId: PlatformApisToManyPlatformApiSchemaFilter - - """`platformApiSchemasByApiId` exist.""" - platformApiSchemasByApiIdExist: Boolean - - """Filter by the object’s `platformApiSettingByApiId` relation.""" - platformApiSettingByApiId: PlatformApiSettingFilter - - """A related `platformApiSettingByApiId` exists.""" - platformApiSettingByApiIdExists: Boolean - - """Filter by the object’s `platformCorsSettingByApiId` relation.""" - platformCorsSettingByApiId: PlatformCorsSettingFilter - - """A related `platformCorsSettingByApiId` exists.""" - platformCorsSettingByApiIdExists: Boolean - - """Filter by the object’s `roleName` field.""" - roleName: StringFilter - - """Filter by the object’s `updatedAt` field.""" - updatedAt: DatetimeFilter -} - -"""An input for mutations affecting `PlatformApis`""" -input PlatformApisInput { - """Anonymous role the API executes as""" - anonRole: String - - """Module-specific configuration for this API surface""" - config: JSON - createdAt: Datetime + enablePresignedUploads: Boolean - """Database this API surface serves""" - dbname: String - id: UUID + """ + Override: enable realtime subscriptions (NULL = inherit from database_settings) + """ + enableRealtime: Boolean - """Whether other scopes may see and route to this API surface""" - isPublished: Boolean + """ + Override: enable unified search (NULL = inherit from database_settings) + """ + enableSearch: Boolean + id: UUID - """Owner-local API surface name""" - name: String! + """ + Extensible JSON for additional per-API settings that do not have dedicated columns + """ + options: JSON - """Authenticated role the API executes as""" - roleName: String + """ + Override: GraphQL statement timeout in milliseconds (NULL = inherit from database_settings). Clamped by the plan cap at read time. + """ + statementTimeoutMs: BigInt updatedAt: Datetime } -"""Methods to use when ordering `PlatformApis`.""" -enum PlatformApisOrderBy { - ANON_ROLE_ASC - ANON_ROLE_DESC - CONFIG_ASC - CONFIG_DESC +"""Methods to use when ordering `PlatformApiSetting`.""" +enum PlatformApiSettingOrderBy { + API_ID_ASC + API_ID_DESC CREATED_AT_ASC CREATED_AT_DESC - DBNAME_ASC - DBNAME_DESC + ENABLE_AGGREGATES_ASC + ENABLE_AGGREGATES_DESC + ENABLE_BULK_ASC + ENABLE_BULK_DESC + ENABLE_CONNECTION_FILTER_ASC + ENABLE_CONNECTION_FILTER_DESC + ENABLE_DIRECT_UPLOADS_ASC + ENABLE_DIRECT_UPLOADS_DESC + ENABLE_I18N_ASC + ENABLE_I18N_DESC + ENABLE_LLM_ASC + ENABLE_LLM_DESC + ENABLE_LTREE_ASC + ENABLE_LTREE_DESC + ENABLE_MANY_TO_MANY_ASC + ENABLE_MANY_TO_MANY_DESC + ENABLE_POSTGIS_ASC + ENABLE_POSTGIS_DESC + ENABLE_PRESIGNED_UPLOADS_ASC + ENABLE_PRESIGNED_UPLOADS_DESC + ENABLE_REALTIME_ASC + ENABLE_REALTIME_DESC + ENABLE_SEARCH_ASC + ENABLE_SEARCH_DESC ID_ASC ID_DESC - IS_PUBLISHED_ASC - IS_PUBLISHED_DESC - NAME_ASC - NAME_DESC NATURAL + OPTIONS_ASC + OPTIONS_DESC PRIMARY_KEY_ASC PRIMARY_KEY_DESC - ROLE_NAME_ASC - ROLE_NAME_DESC + STATEMENT_TIMEOUT_MS_ASC + STATEMENT_TIMEOUT_MS_DESC UPDATED_AT_ASC UPDATED_AT_DESC } """ -Represents an update to a `PlatformApis`. Fields that are set will be updated. +Represents an update to a `PlatformApiSetting`. Fields that are set will be updated. """ -input PlatformApisPatch { - """Anonymous role the API executes as""" - anonRole: String - - """Module-specific configuration for this API surface""" - config: JSON +input PlatformApiSettingPatch { + """API surface these settings override for""" + apiId: UUID createdAt: Datetime - """Database this API surface serves""" - dbname: String - id: UUID + """ + Override: enable aggregate queries (NULL = inherit from database_settings) + """ + enableAggregates: Boolean - """Whether other scopes may see and route to this API surface""" - isPublished: Boolean + """ + Override: enable bulk mutations (NULL = inherit from database_settings) + """ + enableBulk: Boolean - """Owner-local API surface name""" - name: String + """ + Override: enable connection filter (NULL = inherit from database_settings) + """ + enableConnectionFilter: Boolean - """Authenticated role the API executes as""" - roleName: String + """ + Override: enable direct (multipart) file uploads (NULL = inherit from database_settings) + """ + enableDirectUploads: Boolean + + """ + Override: enable internationalization plugin (NULL = inherit from database_settings) + """ + enableI18N: Boolean + + """ + Override: enable LLM/AI integration features (NULL = inherit from database_settings) + """ + enableLlm: Boolean + + """ + Override: enable ltree hierarchical data type (NULL = inherit from database_settings) + """ + enableLtree: Boolean + + """ + Override: enable many-to-many relationships (NULL = inherit from database_settings) + """ + enableManyToMany: Boolean + + """ + Override: enable PostGIS spatial types (NULL = inherit from database_settings) + """ + enablePostgis: Boolean + + """ + Override: enable presigned URL upload flow (NULL = inherit from database_settings) + """ + enablePresignedUploads: Boolean + + """ + Override: enable realtime subscriptions (NULL = inherit from database_settings) + """ + enableRealtime: Boolean + + """ + Override: enable unified search (NULL = inherit from database_settings) + """ + enableSearch: Boolean + id: UUID + + """ + Extensible JSON for additional per-API settings that do not have dedicated columns + """ + options: JSON + + """ + Override: GraphQL statement timeout in milliseconds (NULL = inherit from database_settings). Clamped by the plan cap at read time. + """ + statementTimeoutMs: BigInt updatedAt: Datetime } """ A filter to be used against many `PlatformApiSchema` object types. All fields are combined with a logical ‘and.’ """ -input PlatformApisToManyPlatformApiSchemaFilter { +input PlatformApiToManyPlatformApiSchemaFilter { """Filters to entities where every related entity matches.""" every: PlatformApiSchemaFilter @@ -17636,9 +17636,9 @@ type PlatformCorsSetting { allowedOrigins: [String]! """ - Reads a single `PlatformApis` that is related to this `PlatformCorsSetting`. + Reads a single `PlatformApi` that is related to this `PlatformCorsSetting`. """ - api: PlatformApis + api: PlatformApi """ Optional API surface for per-API override; NULL means scope-wide default @@ -17688,7 +17688,7 @@ input PlatformCorsSettingFilter { and: [PlatformCorsSettingFilter!] """Filter by the object’s `api` relation.""" - api: PlatformApisFilter + api: PlatformApiFilter """A related `api` exists.""" apiExists: Boolean @@ -21976,8 +21976,8 @@ type Query { where: ApiSettingFilter ): ApiSettingConnection - """Reads and enables pagination through a set of `Apis`.""" - apises( + """Reads and enables pagination through a set of `Api`.""" + apis( """Read all values in the set after (below) this cursor.""" after: Cursor @@ -21996,14 +21996,14 @@ type Query { """ offset: Int - """The method to use when ordering `Apis`.""" - orderBy: [ApisOrderBy!] = [PRIMARY_KEY_ASC] + """The method to use when ordering `Api`.""" + orderBy: [ApiOrderBy!] = [PRIMARY_KEY_ASC] """ A filter to be used in determining which values should be returned by the collection. """ - where: ApisFilter - ): ApisConnection + where: ApiFilter + ): ApiConnection applyRegistryDefaults(data: JSON, nodeType: String): JSON """Reads and enables pagination through a set of `AstMigration`.""" @@ -22907,8 +22907,8 @@ type Query { where: PlatformApiSettingFilter ): PlatformApiSettingConnection - """Reads and enables pagination through a set of `PlatformApis`.""" - platformApises( + """Reads and enables pagination through a set of `PlatformApi`.""" + platformApis( """Read all values in the set after (below) this cursor.""" after: Cursor @@ -22927,14 +22927,14 @@ type Query { """ offset: Int - """The method to use when ordering `PlatformApis`.""" - orderBy: [PlatformApisOrderBy!] = [PRIMARY_KEY_ASC] + """The method to use when ordering `PlatformApi`.""" + orderBy: [PlatformApiOrderBy!] = [PRIMARY_KEY_ASC] """ A filter to be used in determining which values should be returned by the collection. """ - where: PlatformApisFilter - ): PlatformApisConnection + where: PlatformApiFilter + ): PlatformApiConnection """Reads and enables pagination through a set of `PlatformCorsSetting`.""" platformCorsSettings( @@ -30902,6 +30902,44 @@ input UniqueConstraintToManyUniqueConstraintBehaviorFilter { some: UniqueConstraintBehaviorFilter } +"""All input for the `updateApi` mutation.""" +input UpdateApiInput { + """ + An object where the defined keys will be set on the `Api` being updated. + """ + apiPatch: ApiPatch! + + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + id: UUID! +} + +"""The output of our update `Api` mutation.""" +type UpdateApiPayload { + """The `Api` that was updated by this mutation.""" + api: Api + + """An edge for our `Api`. May be used by Relay 1.""" + apiEdge( + """The method to use when ordering `Api`.""" + orderBy: [ApiOrderBy!]! = [PRIMARY_KEY_ASC] + ): ApiEdge + + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + """All input for the `updateApiSchema` mutation.""" input UpdateApiSchemaInput { """ @@ -30978,44 +31016,6 @@ type UpdateApiSettingPayload { query: Query } -"""All input for the `updateApis` mutation.""" -input UpdateApisInput { - """ - An object where the defined keys will be set on the `Apis` being updated. - """ - apisPatch: ApisPatch! - - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - id: UUID! -} - -"""The output of our update `Apis` mutation.""" -type UpdateApisPayload { - """The `Apis` that was updated by this mutation.""" - apis: Apis - - """An edge for our `Apis`. May be used by Relay 1.""" - apisEdge( - """The method to use when ordering `Apis`.""" - orderBy: [ApisOrderBy!]! = [PRIMARY_KEY_ASC] - ): ApisEdge - - """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query -} - """All input for the `updateCheckConstraint` mutation.""" input UpdateCheckConstraintInput { """ @@ -32084,6 +32084,44 @@ type UpdatePartitionPayload { query: Query } +"""All input for the `updatePlatformApi` mutation.""" +input UpdatePlatformApiInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + id: UUID! + + """ + An object where the defined keys will be set on the `PlatformApi` being updated. + """ + platformApiPatch: PlatformApiPatch! +} + +"""The output of our update `PlatformApi` mutation.""" +type UpdatePlatformApiPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `PlatformApi` that was updated by this mutation.""" + platformApi: PlatformApi + + """An edge for our `PlatformApi`. May be used by Relay 1.""" + platformApiEdge( + """The method to use when ordering `PlatformApi`.""" + orderBy: [PlatformApiOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlatformApiEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + """All input for the `updatePlatformApiSchema` mutation.""" input UpdatePlatformApiSchemaInput { """ @@ -32160,44 +32198,6 @@ type UpdatePlatformApiSettingPayload { query: Query } -"""All input for the `updatePlatformApis` mutation.""" -input UpdatePlatformApisInput { - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - id: UUID! - - """ - An object where the defined keys will be set on the `PlatformApis` being updated. - """ - platformApisPatch: PlatformApisPatch! -} - -"""The output of our update `PlatformApis` mutation.""" -type UpdatePlatformApisPayload { - """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """The `PlatformApis` that was updated by this mutation.""" - platformApis: PlatformApis - - """An edge for our `PlatformApis`. May be used by Relay 1.""" - platformApisEdge( - """The method to use when ordering `PlatformApis`.""" - orderBy: [PlatformApisOrderBy!]! = [PRIMARY_KEY_ASC] - ): PlatformApisEdge - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query -} - """All input for the `updatePlatformCorsSetting` mutation.""" input UpdatePlatformCorsSettingInput { """ diff --git a/sdk/constructive-sdk/schemas/compute.graphql b/sdk/constructive-sdk/schemas/compute.graphql index 9b31ae0f4f..ba7356954f 100644 --- a/sdk/constructive-sdk/schemas/compute.graphql +++ b/sdk/constructive-sdk/schemas/compute.graphql @@ -5154,7 +5154,7 @@ Function definitions — registered cloud functions with routing, queue, and ret """ type FunctionDefinition { """ - Invocation channels this function may be exposed through (api, graph, cron, sync, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. + Invocation channels this function may be exposed through (api, graph, cron, sync, page, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. """ accessChannels: [String]! @@ -5335,7 +5335,7 @@ type FunctionDefinition { queueName: String! """ - Bucket keys this function needs (e.g. uploads, exports). Empty = no bucket requirements. + Bucket keys this function needs (e.g. uploads, exports). Tenant-agnostic: each key is resolved per invocation against the tenant's buckets by {tags, type}, or by an explicit capability binding row. Empty = no bucket requirements. """ requiredBuckets: [String]! @@ -5349,6 +5349,11 @@ type FunctionDefinition { """ requiredModels: [String]! + """ + Modules whose api surfaces this function calls, e.g. notifications_module. Suffix . to name which surface when a module's schemas are attached to several (permissions_module.admin), and @ to pin the registration when a module is registered at more than one scope (limits_module@org) — usually unnecessary, since resolution walks the execution's scope chain. A value that is not a module name is read as an api name. Resolved per invocation; empty = no api requirements. + """ + requiredModules: [String]! + """ Embedded secret requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. """ @@ -5572,6 +5577,9 @@ input FunctionDefinitionFilter { """Filter by the object’s `requiredModels` field.""" requiredModels: StringListFilter + """Filter by the object’s `requiredModules` field.""" + requiredModules: StringListFilter + """Filter by the object’s `resources` field.""" resources: JSONFilter @@ -5612,7 +5620,7 @@ input FunctionDefinitionFilter { """An input for mutations affecting `FunctionDefinition`""" input FunctionDefinitionInput { """ - Invocation channels this function may be exposed through (api, graph, cron, sync, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. + Invocation channels this function may be exposed through (api, graph, cron, sync, page, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. """ accessChannels: [String] @@ -5713,7 +5721,7 @@ input FunctionDefinitionInput { queueName: String """ - Bucket keys this function needs (e.g. uploads, exports). Empty = no bucket requirements. + Bucket keys this function needs (e.g. uploads, exports). Tenant-agnostic: each key is resolved per invocation against the tenant's buckets by {tags, type}, or by an explicit capability binding row. Empty = no bucket requirements. """ requiredBuckets: [String] @@ -5727,6 +5735,11 @@ input FunctionDefinitionInput { """ requiredModels: [String] + """ + Modules whose api surfaces this function calls, e.g. notifications_module. Suffix . to name which surface when a module's schemas are attached to several (permissions_module.admin), and @ to pin the registration when a module is registered at more than one scope (limits_module@org) — usually unnecessary, since resolution walks the execution's scope chain. A value that is not a module name is read as an api name. Resolved per invocation; empty = no api requirements. + """ + requiredModules: [String] + """ Embedded secret requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. """ @@ -5837,6 +5850,8 @@ enum FunctionDefinitionOrderBy { REQUIRED_CONFIGS_DESC REQUIRED_MODELS_ASC REQUIRED_MODELS_DESC + REQUIRED_MODULES_ASC + REQUIRED_MODULES_DESC REQUIRED_SECRETS_ASC REQUIRED_SECRETS_DESC RESOURCES_ASC @@ -5866,7 +5881,7 @@ Represents an update to a `FunctionDefinition`. Fields that are set will be upda """ input FunctionDefinitionPatch { """ - Invocation channels this function may be exposed through (api, graph, cron, sync, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. + Invocation channels this function may be exposed through (api, graph, cron, sync, page, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. """ accessChannels: [String] @@ -5967,7 +5982,7 @@ input FunctionDefinitionPatch { queueName: String """ - Bucket keys this function needs (e.g. uploads, exports). Empty = no bucket requirements. + Bucket keys this function needs (e.g. uploads, exports). Tenant-agnostic: each key is resolved per invocation against the tenant's buckets by {tags, type}, or by an explicit capability binding row. Empty = no bucket requirements. """ requiredBuckets: [String] @@ -5981,6 +5996,11 @@ input FunctionDefinitionPatch { """ requiredModels: [String] + """ + Modules whose api surfaces this function calls, e.g. notifications_module. Suffix . to name which surface when a module's schemas are attached to several (permissions_module.admin), and @ to pin the registration when a module is registered at more than one scope (limits_module@org) — usually unnecessary, since resolution walks the execution's scope chain. A value that is not a module name is read as an api name. Resolved per invocation; empty = no api requirements. + """ + requiredModules: [String] + """ Embedded secret requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. """ @@ -6112,6 +6132,11 @@ type FunctionDeployment { """Target namespace for this deployment (maps to a K8s namespace)""" namespaceId: UUID! + """ + Config/secret realm this deployment resolves required keys against. Per key, the realm-specific atom wins over the NULL-realm default. NULL = the default lane (or a runtime-query worker that fetches per-item realms on demand). + """ + realm: String + """ K8s resource spec override: {"requests":{"cpu":"100m","memory":"128Mi"},"limits":{...}} """ @@ -6413,6 +6438,9 @@ input FunctionDeploymentFilter { """Checks for any expressions in this list.""" or: [FunctionDeploymentFilter!] + """Filter by the object’s `realm` field.""" + realm: StringFilter + """Filter by the object’s `resources` field.""" resources: JSONFilter @@ -6482,6 +6510,11 @@ input FunctionDeploymentInput { """Target namespace for this deployment (maps to a K8s namespace)""" namespaceId: UUID! + """ + Config/secret realm this deployment resolves required keys against. Per key, the realm-specific atom wins over the NULL-realm default. NULL = the default lane (or a runtime-query worker that fetches per-item realms on demand). + """ + realm: String + """ K8s resource spec override: {"requests":{"cpu":"100m","memory":"128Mi"},"limits":{...}} """ @@ -6551,6 +6584,8 @@ enum FunctionDeploymentOrderBy { NATURAL PRIMARY_KEY_ASC PRIMARY_KEY_DESC + REALM_ASC + REALM_DESC RESOURCES_ASC RESOURCES_DESC REVISION_ASC @@ -6614,6 +6649,11 @@ input FunctionDeploymentPatch { """Target namespace for this deployment (maps to a K8s namespace)""" namespaceId: UUID + """ + Config/secret realm this deployment resolves required keys against. Per key, the realm-specific atom wins over the NULL-realm default. NULL = the default lane (or a runtime-query worker that fetches per-item realms on demand). + """ + realm: String + """ K8s resource spec override: {"requests":{"cpu":"100m","memory":"128Mi"},"limits":{...}} """ @@ -9719,6 +9759,36 @@ type InfraInsertNodeAtPathPayload { result: UUID } +"""All input for the `infraInsertNodesAtPaths` mutation.""" +input InfraInsertNodesAtPathsInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + datas: [JSON] + kidsList: JSON + ktreeList: JSON + paths: JSON + root: UUID + sId: UUID +} + +"""The output of our `infraInsertNodesAtPaths` mutation.""" +type InfraInsertNodesAtPathsPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + result: UUID +} + """ Content-addressed Merkle tree objects keyed by UUID v5 hash of data + children """ @@ -9991,6 +10061,44 @@ input InfraRefPatch { storeId: UUID } +"""All input for the `infraSetAndCommit` mutation.""" +input InfraSetAndCommitInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + data: JSON + kids: [UUID] + ktree: [String] + message: String + path: [String] + refname: String + sId: UUID + storeId: UUID +} + +"""The output of our `infraSetAndCommit` mutation.""" +type InfraSetAndCommitPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """An edge for our `InfraCommit`. May be used by Relay 1.""" + infraCommitEdge( + """The method to use when ordering `InfraCommit`.""" + orderBy: [InfraCommitOrderBy!]! = [PRIMARY_KEY_ASC] + ): InfraCommitEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + result: InfraCommit +} + """All input for the `infraSetDataAtPath` mutation.""" input InfraSetDataAtPathInput { """ @@ -10019,6 +10127,41 @@ type InfraSetDataAtPathPayload { result: UUID } +"""All input for the `infraSetManyAndCommit` mutation.""" +input InfraSetManyAndCommitInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + entries: JSON + message: String + refname: String + sId: UUID + storeId: UUID +} + +"""The output of our `infraSetManyAndCommit` mutation.""" +type InfraSetManyAndCommitPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """An edge for our `InfraCommit`. May be used by Relay 1.""" + infraCommitEdge( + """The method to use when ordering `InfraCommit`.""" + orderBy: [InfraCommitOrderBy!]! = [PRIMARY_KEY_ASC] + ): InfraCommitEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + result: InfraCommit +} + """ Named stores — one per version-controlled tree (e.g. one graph, one definition set) """ @@ -10204,6 +10347,36 @@ type InsertNodeAtPathPayload { result: UUID } +"""All input for the `insertNodesAtPaths` mutation.""" +input InsertNodesAtPathsInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + datas: [JSON] + kidsList: JSON + ktreeList: JSON + paths: JSON + root: UUID + sId: UUID +} + +"""The output of our `insertNodesAtPaths` mutation.""" +type InsertNodesAtPathsPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + result: UUID +} + """ A filter to be used against Int fields. All fields are combined with a logical ‘and.’ """ @@ -11908,12 +12081,30 @@ type Mutation { """ input: InfraInsertNodeAtPathInput! ): InfraInsertNodeAtPathPayload + infraInsertNodesAtPaths( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: InfraInsertNodesAtPathsInput! + ): InfraInsertNodesAtPathsPayload + infraSetAndCommit( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: InfraSetAndCommitInput! + ): InfraSetAndCommitPayload infraSetDataAtPath( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. """ input: InfraSetDataAtPathInput! ): InfraSetDataAtPathPayload + infraSetManyAndCommit( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: InfraSetManyAndCommitInput! + ): InfraSetManyAndCommitPayload initEmptyRepo( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. @@ -11926,6 +12117,12 @@ type Mutation { """ input: InsertNodeAtPathInput! ): InsertNodeAtPathPayload + insertNodesAtPaths( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: InsertNodesAtPathsInput! + ): InsertNodesAtPathsPayload platformInfraInitEmptyRepo( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. @@ -11938,12 +12135,30 @@ type Mutation { """ input: PlatformInfraInsertNodeAtPathInput! ): PlatformInfraInsertNodeAtPathPayload + platformInfraInsertNodesAtPaths( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: PlatformInfraInsertNodesAtPathsInput! + ): PlatformInfraInsertNodesAtPathsPayload + platformInfraSetAndCommit( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: PlatformInfraSetAndCommitInput! + ): PlatformInfraSetAndCommitPayload platformInfraSetDataAtPath( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. """ input: PlatformInfraSetDataAtPathInput! ): PlatformInfraSetDataAtPathPayload + platformInfraSetManyAndCommit( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: PlatformInfraSetManyAndCommitInput! + ): PlatformInfraSetManyAndCommitPayload platformResourceInstallationsInstall( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. @@ -12011,12 +12226,24 @@ type Mutation { """ input: SaveGraphInput! ): SaveGraphPayload + setAndCommit( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: SetAndCommitInput! + ): SetAndCommitPayload setDataAtPath( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. """ input: SetDataAtPathInput! ): SetDataAtPathPayload + setManyAndCommit( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: SetManyAndCommitInput! + ): SetManyAndCommitPayload startExecution( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. @@ -13624,7 +13851,7 @@ Function definitions — registered cloud functions with routing, queue, and ret """ type PlatformFunctionDefinition { """ - Invocation channels this function may be exposed through (api, graph, cron, sync, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. + Invocation channels this function may be exposed through (api, graph, cron, sync, page, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. """ accessChannels: [String]! @@ -13845,7 +14072,7 @@ type PlatformFunctionDefinition { queueName: String! """ - Bucket keys this function needs (e.g. uploads, exports). Empty = no bucket requirements. + Bucket keys this function needs (e.g. uploads, exports). Tenant-agnostic: each key is resolved per invocation against the tenant's buckets by {tags, type}, or by an explicit capability binding row. Empty = no bucket requirements. """ requiredBuckets: [String]! @@ -13859,6 +14086,11 @@ type PlatformFunctionDefinition { """ requiredModels: [String]! + """ + Modules whose api surfaces this function calls, e.g. notifications_module. Suffix . to name which surface when a module's schemas are attached to several (permissions_module.admin), and @ to pin the registration when a module is registered at more than one scope (limits_module@org) — usually unnecessary, since resolution walks the execution's scope chain. A value that is not a module name is read as an api name. Resolved per invocation; empty = no api requirements. + """ + requiredModules: [String]! + """ Embedded secret requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. """ @@ -14074,6 +14306,9 @@ input PlatformFunctionDefinitionFilter { """Filter by the object’s `requiredModels` field.""" requiredModels: StringListFilter + """Filter by the object’s `requiredModules` field.""" + requiredModules: StringListFilter + """Filter by the object’s `resources` field.""" resources: JSONFilter @@ -14111,7 +14346,7 @@ input PlatformFunctionDefinitionFilter { """An input for mutations affecting `PlatformFunctionDefinition`""" input PlatformFunctionDefinitionInput { """ - Invocation channels this function may be exposed through (api, graph, cron, sync, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. + Invocation channels this function may be exposed through (api, graph, cron, sync, page, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. """ accessChannels: [String] @@ -14214,7 +14449,7 @@ input PlatformFunctionDefinitionInput { queueName: String """ - Bucket keys this function needs (e.g. uploads, exports). Empty = no bucket requirements. + Bucket keys this function needs (e.g. uploads, exports). Tenant-agnostic: each key is resolved per invocation against the tenant's buckets by {tags, type}, or by an explicit capability binding row. Empty = no bucket requirements. """ requiredBuckets: [String] @@ -14228,6 +14463,11 @@ input PlatformFunctionDefinitionInput { """ requiredModels: [String] + """ + Modules whose api surfaces this function calls, e.g. notifications_module. Suffix . to name which surface when a module's schemas are attached to several (permissions_module.admin), and @ to pin the registration when a module is registered at more than one scope (limits_module@org) — usually unnecessary, since resolution walks the execution's scope chain. A value that is not a module name is read as an api name. Resolved per invocation; empty = no api requirements. + """ + requiredModules: [String] + """ Embedded secret requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. """ @@ -14343,6 +14583,8 @@ enum PlatformFunctionDefinitionOrderBy { REQUIRED_CONFIGS_DESC REQUIRED_MODELS_ASC REQUIRED_MODELS_DESC + REQUIRED_MODULES_ASC + REQUIRED_MODULES_DESC REQUIRED_SECRETS_ASC REQUIRED_SECRETS_DESC RESOURCES_ASC @@ -14374,7 +14616,7 @@ Represents an update to a `PlatformFunctionDefinition`. Fields that are set will """ input PlatformFunctionDefinitionPatch { """ - Invocation channels this function may be exposed through (api, graph, cron, sync, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. + Invocation channels this function may be exposed through (api, graph, cron, sync, page, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. """ accessChannels: [String] @@ -14477,7 +14719,7 @@ input PlatformFunctionDefinitionPatch { queueName: String """ - Bucket keys this function needs (e.g. uploads, exports). Empty = no bucket requirements. + Bucket keys this function needs (e.g. uploads, exports). Tenant-agnostic: each key is resolved per invocation against the tenant's buckets by {tags, type}, or by an explicit capability binding row. Empty = no bucket requirements. """ requiredBuckets: [String] @@ -14491,6 +14733,11 @@ input PlatformFunctionDefinitionPatch { """ requiredModels: [String] + """ + Modules whose api surfaces this function calls, e.g. notifications_module. Suffix . to name which surface when a module's schemas are attached to several (permissions_module.admin), and @ to pin the registration when a module is registered at more than one scope (limits_module@org) — usually unnecessary, since resolution walks the execution's scope chain. A value that is not a module name is read as an api name. Resolved per invocation; empty = no api requirements. + """ + requiredModules: [String] + """ Embedded secret requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. """ @@ -14624,6 +14871,11 @@ type PlatformFunctionDeployment { """Target namespace for this deployment (maps to a K8s namespace)""" namespaceId: UUID! + """ + Config/secret realm this deployment resolves required keys against. Per key, the realm-specific atom wins over the NULL-realm default. NULL = the default lane (or a runtime-query worker that fetches per-item realms on demand). + """ + realm: String + """ K8s resource spec override: {"requests":{"cpu":"100m","memory":"128Mi"},"limits":{...}} """ @@ -14908,6 +15160,9 @@ input PlatformFunctionDeploymentFilter { """Checks for any expressions in this list.""" or: [PlatformFunctionDeploymentFilter!] + """Filter by the object’s `realm` field.""" + realm: StringFilter + """Filter by the object’s `resources` field.""" resources: JSONFilter @@ -14974,6 +15229,11 @@ input PlatformFunctionDeploymentInput { """Target namespace for this deployment (maps to a K8s namespace)""" namespaceId: UUID! + """ + Config/secret realm this deployment resolves required keys against. Per key, the realm-specific atom wins over the NULL-realm default. NULL = the default lane (or a runtime-query worker that fetches per-item realms on demand). + """ + realm: String + """ K8s resource spec override: {"requests":{"cpu":"100m","memory":"128Mi"},"limits":{...}} """ @@ -15041,6 +15301,8 @@ enum PlatformFunctionDeploymentOrderBy { NATURAL PRIMARY_KEY_ASC PRIMARY_KEY_DESC + REALM_ASC + REALM_DESC RESOURCES_ASC RESOURCES_DESC REVISION_ASC @@ -15101,6 +15363,11 @@ input PlatformFunctionDeploymentPatch { """Target namespace for this deployment (maps to a K8s namespace)""" namespaceId: UUID + """ + Config/secret realm this deployment resolves required keys against. Per key, the realm-specific atom wins over the NULL-realm default. NULL = the default lane (or a runtime-query worker that fetches per-item realms on demand). + """ + realm: String + """ K8s resource spec override: {"requests":{"cpu":"100m","memory":"128Mi"},"limits":{...}} """ @@ -16222,6 +16489,36 @@ type PlatformInfraInsertNodeAtPathPayload { result: UUID } +"""All input for the `platformInfraInsertNodesAtPaths` mutation.""" +input PlatformInfraInsertNodesAtPathsInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + datas: [JSON] + kidsList: JSON + ktreeList: JSON + paths: JSON + root: UUID + sId: UUID +} + +"""The output of our `platformInfraInsertNodesAtPaths` mutation.""" +type PlatformInfraInsertNodesAtPathsPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + result: UUID +} + """ Content-addressed Merkle tree objects keyed by UUID v5 hash of data + children """ @@ -16498,6 +16795,44 @@ input PlatformInfraRefPatch { storeId: UUID } +"""All input for the `platformInfraSetAndCommit` mutation.""" +input PlatformInfraSetAndCommitInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + data: JSON + kids: [UUID] + ktree: [String] + message: String + path: [String] + refname: String + sId: UUID + storeId: UUID +} + +"""The output of our `platformInfraSetAndCommit` mutation.""" +type PlatformInfraSetAndCommitPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """An edge for our `PlatformInfraCommit`. May be used by Relay 1.""" + platformInfraCommitEdge( + """The method to use when ordering `PlatformInfraCommit`.""" + orderBy: [PlatformInfraCommitOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlatformInfraCommitEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + result: PlatformInfraCommit +} + """All input for the `platformInfraSetDataAtPath` mutation.""" input PlatformInfraSetDataAtPathInput { """ @@ -16526,6 +16861,41 @@ type PlatformInfraSetDataAtPathPayload { result: UUID } +"""All input for the `platformInfraSetManyAndCommit` mutation.""" +input PlatformInfraSetManyAndCommitInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + entries: JSON + message: String + refname: String + sId: UUID + storeId: UUID +} + +"""The output of our `platformInfraSetManyAndCommit` mutation.""" +type PlatformInfraSetManyAndCommitPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """An edge for our `PlatformInfraCommit`. May be used by Relay 1.""" + platformInfraCommitEdge( + """The method to use when ordering `PlatformInfraCommit`.""" + orderBy: [PlatformInfraCommitOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlatformInfraCommitEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + result: PlatformInfraCommit +} + """ Named stores — one per version-controlled tree (e.g. one graph, one definition set) """ @@ -25741,6 +26111,44 @@ type SaveGraphPayload { result: UUID } +"""All input for the `setAndCommit` mutation.""" +input SetAndCommitInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + data: JSON + kids: [UUID] + ktree: [String] + message: String + path: [String] + refname: String + sId: UUID + storeId: UUID +} + +"""The output of our `setAndCommit` mutation.""" +type SetAndCommitPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """An edge for our `FunctionGraphCommit`. May be used by Relay 1.""" + functionGraphCommitEdge( + """The method to use when ordering `FunctionGraphCommit`.""" + orderBy: [FunctionGraphCommitOrderBy!]! = [PRIMARY_KEY_ASC] + ): FunctionGraphCommitEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + result: FunctionGraphCommit +} + """All input for the `setDataAtPath` mutation.""" input SetDataAtPathInput { """ @@ -25769,6 +26177,41 @@ type SetDataAtPathPayload { result: UUID } +"""All input for the `setManyAndCommit` mutation.""" +input SetManyAndCommitInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + entries: JSON + message: String + refname: String + sId: UUID + storeId: UUID +} + +"""The output of our `setManyAndCommit` mutation.""" +type SetManyAndCommitPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """An edge for our `FunctionGraphCommit`. May be used by Relay 1.""" + functionGraphCommitEdge( + """The method to use when ordering `FunctionGraphCommit`.""" + orderBy: [FunctionGraphCommitOrderBy!]! = [PRIMARY_KEY_ASC] + ): FunctionGraphCommitEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + result: FunctionGraphCommit +} + """All input for the `startExecution` mutation.""" input StartExecutionInput { """ diff --git a/sdk/constructive-sdk/schemas/infra.graphql b/sdk/constructive-sdk/schemas/infra.graphql index eb908836ed..759ef1f764 100644 --- a/sdk/constructive-sdk/schemas/infra.graphql +++ b/sdk/constructive-sdk/schemas/infra.graphql @@ -1507,12 +1507,30 @@ type Mutation { """ input: PlatformInfraInsertNodeAtPathInput! ): PlatformInfraInsertNodeAtPathPayload + platformInfraInsertNodesAtPaths( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: PlatformInfraInsertNodesAtPathsInput! + ): PlatformInfraInsertNodesAtPathsPayload + platformInfraSetAndCommit( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: PlatformInfraSetAndCommitInput! + ): PlatformInfraSetAndCommitPayload platformInfraSetDataAtPath( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. """ input: PlatformInfraSetDataAtPathInput! ): PlatformInfraSetDataAtPathPayload + platformInfraSetManyAndCommit( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: PlatformInfraSetManyAndCommitInput! + ): PlatformInfraSetManyAndCommitPayload """ Provision an S3 bucket for a logical bucket in the database. @@ -2311,6 +2329,36 @@ type PlatformInfraInsertNodeAtPathPayload { result: UUID } +"""All input for the `platformInfraInsertNodesAtPaths` mutation.""" +input PlatformInfraInsertNodesAtPathsInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + datas: [JSON] + kidsList: JSON + ktreeList: JSON + paths: JSON + root: UUID + sId: UUID +} + +"""The output of our `platformInfraInsertNodesAtPaths` mutation.""" +type PlatformInfraInsertNodesAtPathsPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + result: UUID +} + """ Content-addressed Merkle tree objects keyed by UUID v5 hash of data + children """ @@ -2587,6 +2635,44 @@ input PlatformInfraRefPatch { storeId: UUID } +"""All input for the `platformInfraSetAndCommit` mutation.""" +input PlatformInfraSetAndCommitInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + data: JSON + kids: [UUID] + ktree: [String] + message: String + path: [String] + refname: String + sId: UUID + storeId: UUID +} + +"""The output of our `platformInfraSetAndCommit` mutation.""" +type PlatformInfraSetAndCommitPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """An edge for our `PlatformInfraCommit`. May be used by Relay 1.""" + platformInfraCommitEdge( + """The method to use when ordering `PlatformInfraCommit`.""" + orderBy: [PlatformInfraCommitOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlatformInfraCommitEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + result: PlatformInfraCommit +} + """All input for the `platformInfraSetDataAtPath` mutation.""" input PlatformInfraSetDataAtPathInput { """ @@ -2615,6 +2701,41 @@ type PlatformInfraSetDataAtPathPayload { result: UUID } +"""All input for the `platformInfraSetManyAndCommit` mutation.""" +input PlatformInfraSetManyAndCommitInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + entries: JSON + message: String + refname: String + sId: UUID + storeId: UUID +} + +"""The output of our `platformInfraSetManyAndCommit` mutation.""" +type PlatformInfraSetManyAndCommitPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """An edge for our `PlatformInfraCommit`. May be used by Relay 1.""" + platformInfraCommitEdge( + """The method to use when ordering `PlatformInfraCommit`.""" + orderBy: [PlatformInfraCommitOrderBy!]! = [PRIMARY_KEY_ASC] + ): PlatformInfraCommitEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + result: PlatformInfraCommit +} + """ Named stores — one per version-controlled tree (e.g. one graph, one definition set) """ diff --git a/sdk/constructive-sdk/schemas/modules.graphql b/sdk/constructive-sdk/schemas/modules.graphql index f2eb2bbb56..517c548de6 100644 --- a/sdk/constructive-sdk/schemas/modules.graphql +++ b/sdk/constructive-sdk/schemas/modules.graphql @@ -1161,16 +1161,22 @@ type BillingProviderModule { apiName: String billingCustomersTableId: UUID! billingCustomersTableName: String! + billingInvoicesTableId: UUID! + billingInvoicesTableName: String! billingPricesTableId: UUID! billingPricesTableName: String! billingProductsTableId: UUID! billingProductsTableName: String! + billingRefundsTableId: UUID! + billingRefundsTableName: String! billingSubscriptionsTableId: UUID! billingSubscriptionsTableName: String! billingWebhookEventsTableId: UUID! billingWebhookEventsTableName: String! databaseId: UUID! id: UUID! + listPendingUsageSyncFunction: String! + markUsageSyncedFunction: String! prefix: String pricesTableId: UUID privateApiName: String @@ -1178,8 +1184,10 @@ type BillingProviderModule { processBillingEventFunction: String! productsTableId: UUID provider: String! + recordRefundFunction: String! schemaId: UUID! subscriptionsTableId: UUID + upsertInvoiceFunction: String! } """A connection to a list of `BillingProviderModule` values.""" @@ -1226,6 +1234,12 @@ input BillingProviderModuleFilter { """Filter by the object’s `billingCustomersTableName` field.""" billingCustomersTableName: StringFilter + """Filter by the object’s `billingInvoicesTableId` field.""" + billingInvoicesTableId: UUIDFilter + + """Filter by the object’s `billingInvoicesTableName` field.""" + billingInvoicesTableName: StringFilter + """Filter by the object’s `billingPricesTableId` field.""" billingPricesTableId: UUIDFilter @@ -1238,6 +1252,12 @@ input BillingProviderModuleFilter { """Filter by the object’s `billingProductsTableName` field.""" billingProductsTableName: StringFilter + """Filter by the object’s `billingRefundsTableId` field.""" + billingRefundsTableId: UUIDFilter + + """Filter by the object’s `billingRefundsTableName` field.""" + billingRefundsTableName: StringFilter + """Filter by the object’s `billingSubscriptionsTableId` field.""" billingSubscriptionsTableId: UUIDFilter @@ -1256,6 +1276,12 @@ input BillingProviderModuleFilter { """Filter by the object’s `id` field.""" id: UUIDFilter + """Filter by the object’s `listPendingUsageSyncFunction` field.""" + listPendingUsageSyncFunction: StringFilter + + """Filter by the object’s `markUsageSyncedFunction` field.""" + markUsageSyncedFunction: StringFilter + """Negates the expression.""" not: BillingProviderModuleFilter @@ -1283,11 +1309,17 @@ input BillingProviderModuleFilter { """Filter by the object’s `provider` field.""" provider: StringFilter + """Filter by the object’s `recordRefundFunction` field.""" + recordRefundFunction: StringFilter + """Filter by the object’s `schemaId` field.""" schemaId: UUIDFilter """Filter by the object’s `subscriptionsTableId` field.""" subscriptionsTableId: UUIDFilter + + """Filter by the object’s `upsertInvoiceFunction` field.""" + upsertInvoiceFunction: StringFilter } """An input for mutations affecting `BillingProviderModule`""" @@ -1295,16 +1327,22 @@ input BillingProviderModuleInput { apiName: String billingCustomersTableId: UUID billingCustomersTableName: String + billingInvoicesTableId: UUID + billingInvoicesTableName: String billingPricesTableId: UUID billingPricesTableName: String billingProductsTableId: UUID billingProductsTableName: String + billingRefundsTableId: UUID + billingRefundsTableName: String billingSubscriptionsTableId: UUID billingSubscriptionsTableName: String billingWebhookEventsTableId: UUID billingWebhookEventsTableName: String databaseId: UUID! id: UUID + listPendingUsageSyncFunction: String + markUsageSyncedFunction: String prefix: String pricesTableId: UUID privateApiName: String @@ -1312,8 +1350,10 @@ input BillingProviderModuleInput { processBillingEventFunction: String productsTableId: UUID provider: String + recordRefundFunction: String schemaId: UUID subscriptionsTableId: UUID + upsertInvoiceFunction: String } """Methods to use when ordering `BillingProviderModule`.""" @@ -1324,6 +1364,10 @@ enum BillingProviderModuleOrderBy { BILLING_CUSTOMERS_TABLE_ID_DESC BILLING_CUSTOMERS_TABLE_NAME_ASC BILLING_CUSTOMERS_TABLE_NAME_DESC + BILLING_INVOICES_TABLE_ID_ASC + BILLING_INVOICES_TABLE_ID_DESC + BILLING_INVOICES_TABLE_NAME_ASC + BILLING_INVOICES_TABLE_NAME_DESC BILLING_PRICES_TABLE_ID_ASC BILLING_PRICES_TABLE_ID_DESC BILLING_PRICES_TABLE_NAME_ASC @@ -1332,6 +1376,10 @@ enum BillingProviderModuleOrderBy { BILLING_PRODUCTS_TABLE_ID_DESC BILLING_PRODUCTS_TABLE_NAME_ASC BILLING_PRODUCTS_TABLE_NAME_DESC + BILLING_REFUNDS_TABLE_ID_ASC + BILLING_REFUNDS_TABLE_ID_DESC + BILLING_REFUNDS_TABLE_NAME_ASC + BILLING_REFUNDS_TABLE_NAME_DESC BILLING_SUBSCRIPTIONS_TABLE_ID_ASC BILLING_SUBSCRIPTIONS_TABLE_ID_DESC BILLING_SUBSCRIPTIONS_TABLE_NAME_ASC @@ -1344,6 +1392,10 @@ enum BillingProviderModuleOrderBy { DATABASE_ID_DESC ID_ASC ID_DESC + LIST_PENDING_USAGE_SYNC_FUNCTION_ASC + LIST_PENDING_USAGE_SYNC_FUNCTION_DESC + MARK_USAGE_SYNCED_FUNCTION_ASC + MARK_USAGE_SYNCED_FUNCTION_DESC NATURAL PREFIX_ASC PREFIX_DESC @@ -1361,10 +1413,14 @@ enum BillingProviderModuleOrderBy { PRODUCTS_TABLE_ID_DESC PROVIDER_ASC PROVIDER_DESC + RECORD_REFUND_FUNCTION_ASC + RECORD_REFUND_FUNCTION_DESC SCHEMA_ID_ASC SCHEMA_ID_DESC SUBSCRIPTIONS_TABLE_ID_ASC SUBSCRIPTIONS_TABLE_ID_DESC + UPSERT_INVOICE_FUNCTION_ASC + UPSERT_INVOICE_FUNCTION_DESC } """ @@ -1374,16 +1430,22 @@ input BillingProviderModulePatch { apiName: String billingCustomersTableId: UUID billingCustomersTableName: String + billingInvoicesTableId: UUID + billingInvoicesTableName: String billingPricesTableId: UUID billingPricesTableName: String billingProductsTableId: UUID billingProductsTableName: String + billingRefundsTableId: UUID + billingRefundsTableName: String billingSubscriptionsTableId: UUID billingSubscriptionsTableName: String billingWebhookEventsTableId: UUID billingWebhookEventsTableName: String databaseId: UUID id: UUID + listPendingUsageSyncFunction: String + markUsageSyncedFunction: String prefix: String pricesTableId: UUID privateApiName: String @@ -1391,8 +1453,10 @@ input BillingProviderModulePatch { processBillingEventFunction: String productsTableId: UUID provider: String + recordRefundFunction: String schemaId: UUID subscriptionsTableId: UUID + upsertInvoiceFunction: String } """ @@ -2608,6 +2672,8 @@ type CatalogModule { ): AppModuleConnection! appsTableId: UUID! appsTableName: String! + bindingsTableId: UUID! + bindingsTableName: String! bucketsTableId: UUID! bucketsTableName: String! databaseId: UUID! @@ -2791,6 +2857,12 @@ input CatalogModuleFilter { """Filter by the object’s `appsTableName` field.""" appsTableName: StringFilter + """Filter by the object’s `bindingsTableId` field.""" + bindingsTableId: UUIDFilter + + """Filter by the object’s `bindingsTableName` field.""" + bindingsTableName: StringFilter + """Filter by the object’s `bucketsTableId` field.""" bucketsTableId: UUIDFilter @@ -2925,6 +2997,8 @@ input CatalogModuleInput { apisTableName: String appsTableId: UUID appsTableName: String + bindingsTableId: UUID + bindingsTableName: String bucketsTableId: UUID bucketsTableName: String databaseId: UUID! @@ -2973,6 +3047,10 @@ enum CatalogModuleOrderBy { APPS_TABLE_ID_DESC APPS_TABLE_NAME_ASC APPS_TABLE_NAME_DESC + BINDINGS_TABLE_ID_ASC + BINDINGS_TABLE_ID_DESC + BINDINGS_TABLE_NAME_ASC + BINDINGS_TABLE_NAME_DESC BUCKETS_TABLE_ID_ASC BUCKETS_TABLE_ID_DESC BUCKETS_TABLE_NAME_ASC @@ -3055,6 +3133,8 @@ input CatalogModulePatch { apisTableName: String appsTableId: UUID appsTableName: String + bindingsTableId: UUID + bindingsTableName: String bucketsTableId: UUID bucketsTableName: String databaseId: UUID @@ -5834,6 +5914,41 @@ type CreateRouteModulePayload { ): RouteModuleEdge } +"""All input for the create `ScopeTypesModule` mutation.""" +input CreateScopeTypesModuleInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + + """The `ScopeTypesModule` to be created by this mutation.""" + scopeTypesModule: ScopeTypesModuleInput! +} + +"""The output of our create `ScopeTypesModule` mutation.""" +type CreateScopeTypesModulePayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """The `ScopeTypesModule` that was created by this mutation.""" + scopeTypesModule: ScopeTypesModule + + """An edge for our `ScopeTypesModule`. May be used by Relay 1.""" + scopeTypesModuleEdge( + """The method to use when ordering `ScopeTypesModule`.""" + orderBy: [ScopeTypesModuleOrderBy!]! = [PRIMARY_KEY_ASC] + ): ScopeTypesModuleEdge +} + """All input for the create `SecureTableProvision` mutation.""" input CreateSecureTableProvisionInput { """ @@ -6184,6 +6299,41 @@ type CreateUserSettingsModulePayload { ): UserSettingsModuleEdge } +"""All input for the create `UserSettingsSecurityModule` mutation.""" +input CreateUserSettingsSecurityModuleInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + + """The `UserSettingsSecurityModule` to be created by this mutation.""" + userSettingsSecurityModule: UserSettingsSecurityModuleInput! +} + +"""The output of our create `UserSettingsSecurityModule` mutation.""" +type CreateUserSettingsSecurityModulePayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """The `UserSettingsSecurityModule` that was created by this mutation.""" + userSettingsSecurityModule: UserSettingsSecurityModule + + """An edge for our `UserSettingsSecurityModule`. May be used by Relay 1.""" + userSettingsSecurityModuleEdge( + """The method to use when ordering `UserSettingsSecurityModule`.""" + orderBy: [UserSettingsSecurityModuleOrderBy!]! = [PRIMARY_KEY_ASC] + ): UserSettingsSecurityModuleEdge +} + """All input for the create `UserStateModule` mutation.""" input CreateUserStateModuleInput { """ @@ -10298,6 +10448,39 @@ type DeleteRouteModulePayload { ): RouteModuleEdge } +"""All input for the `deleteScopeTypesModule` mutation.""" +input DeleteScopeTypesModuleInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + id: UUID! +} + +"""The output of our delete `ScopeTypesModule` mutation.""" +type DeleteScopeTypesModulePayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """The `ScopeTypesModule` that was deleted by this mutation.""" + scopeTypesModule: ScopeTypesModule + + """An edge for our `ScopeTypesModule`. May be used by Relay 1.""" + scopeTypesModuleEdge( + """The method to use when ordering `ScopeTypesModule`.""" + orderBy: [ScopeTypesModuleOrderBy!]! = [PRIMARY_KEY_ASC] + ): ScopeTypesModuleEdge +} + """All input for the `deleteSecureTableProvision` mutation.""" input DeleteSecureTableProvisionInput { """ @@ -10630,6 +10813,39 @@ type DeleteUserSettingsModulePayload { ): UserSettingsModuleEdge } +"""All input for the `deleteUserSettingsSecurityModule` mutation.""" +input DeleteUserSettingsSecurityModuleInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + id: UUID! +} + +"""The output of our delete `UserSettingsSecurityModule` mutation.""" +type DeleteUserSettingsSecurityModulePayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """The `UserSettingsSecurityModule` that was deleted by this mutation.""" + userSettingsSecurityModule: UserSettingsSecurityModule + + """An edge for our `UserSettingsSecurityModule`. May be used by Relay 1.""" + userSettingsSecurityModuleEdge( + """The method to use when ordering `UserSettingsSecurityModule`.""" + orderBy: [UserSettingsSecurityModuleOrderBy!]! = [PRIMARY_KEY_ASC] + ): UserSettingsSecurityModuleEdge +} + """All input for the `deleteUserStateModule` mutation.""" input DeleteUserStateModuleInput { """ @@ -11781,7 +11997,7 @@ type EntityTypeProvision { """ Single jsonb object describing the full security setup to apply to the entity table. - Uses the same vocabulary as metaschema_modules_public.provision_table() and blueprint tables[] + Uses the same vocabulary as metaschema_modules_private.provision_table() and blueprint tables[] entries, so an entity table is configured the same way an ordinary blueprint table is. Defaults to NULL; when non-NULL, the five default policies are implicitly replaced by table_provision.policies[] (is_visible becomes a no-op on this path). @@ -12233,7 +12449,7 @@ input EntityTypeProvisionInput { """ Single jsonb object describing the full security setup to apply to the entity table. - Uses the same vocabulary as metaschema_modules_public.provision_table() and blueprint tables[] + Uses the same vocabulary as metaschema_modules_private.provision_table() and blueprint tables[] entries, so an entity table is configured the same way an ordinary blueprint table is. Defaults to NULL; when non-NULL, the five default policies are implicitly replaced by table_provision.policies[] (is_visible becomes a no-op on this path). @@ -12613,7 +12829,7 @@ input EntityTypeProvisionPatch { """ Single jsonb object describing the full security setup to apply to the entity table. - Uses the same vocabulary as metaschema_modules_public.provision_table() and blueprint tables[] + Uses the same vocabulary as metaschema_modules_private.provision_table() and blueprint tables[] entries, so an entity table is configured the same way an ordinary blueprint table is. Defaults to NULL; when non-NULL, the five default policies are implicitly replaced by table_provision.policies[] (is_visible becomes a no-op on this path). @@ -18893,6 +19109,14 @@ type Mutation { input: CreateRouteModuleInput! ): CreateRouteModulePayload + """Creates a single `ScopeTypesModule`.""" + createScopeTypesModule( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateScopeTypesModuleInput! + ): CreateScopeTypesModulePayload + """Creates a single `SecureTableProvision`.""" createSecureTableProvision( """ @@ -18973,6 +19197,14 @@ type Mutation { input: CreateUserSettingsModuleInput! ): CreateUserSettingsModulePayload + """Creates a single `UserSettingsSecurityModule`.""" + createUserSettingsSecurityModule( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateUserSettingsSecurityModuleInput! + ): CreateUserSettingsSecurityModulePayload + """Creates a single `UserStateModule`.""" createUserStateModule( """ @@ -19501,6 +19733,14 @@ type Mutation { input: DeleteRouteModuleInput! ): DeleteRouteModulePayload + """Deletes a single `ScopeTypesModule` using a unique key.""" + deleteScopeTypesModule( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteScopeTypesModuleInput! + ): DeleteScopeTypesModulePayload + """Deletes a single `SecureTableProvision` using a unique key.""" deleteSecureTableProvision( """ @@ -19581,6 +19821,14 @@ type Mutation { input: DeleteUserSettingsModuleInput! ): DeleteUserSettingsModulePayload + """Deletes a single `UserSettingsSecurityModule` using a unique key.""" + deleteUserSettingsSecurityModule( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteUserSettingsSecurityModuleInput! + ): DeleteUserSettingsSecurityModulePayload + """Deletes a single `UserStateModule` using a unique key.""" deleteUserStateModule( """ @@ -19634,76 +19882,6 @@ type Mutation { input: ProvisionBucketInput! ): ProvisionBucketPayload - """ - Creates a check constraint on a table from a $type + data blueprint definition. Supports: CheckOneOf (enum validation via = ANY(ARRAY[...])), CheckGreaterThan (single-column > value or cross-column), CheckLessThan (single-column < value or cross-column), CheckNotEqual (cross-column inequality). Builds AST expressions via ast_helpers and inserts into metaschema_public.check_constraint. Graceful: skips if a constraint with the same name already exists. - """ - provisionCheckConstraint( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: ProvisionCheckConstraintInput! - ): ProvisionCheckConstraintPayload - - """ - 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. - """ - provisionFullTextSearch( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: ProvisionFullTextSearchInput! - ): ProvisionFullTextSearchPayload - - """ - 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. - """ - provisionIndex( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: ProvisionIndexInput! - ): ProvisionIndexPayload - - """ - 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). - """ - provisionRelation( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: ProvisionRelationInput! - ): ProvisionRelationPayload - - """ - Idempotent provisioner for metaschema_public.spatial_relation. Inserts a row declaring a spatial predicate between two geometry/geography columns (owner and target). Called from construct_blueprint when a relation entry has $type=RelationSpatial. Graceful: re-running with the same (source_table_id, name) returns the existing id without modifying the row. Operator whitelist and st_dwithin ↔ param_name pairing are enforced by the spatial_relation table CHECKs. Both fields must already exist — this is a metadata-only insert. - """ - provisionSpatialRelation( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: ProvisionSpatialRelationInput! - ): ProvisionSpatialRelationPayload - - """ - Composable table provisioning: creates or finds a table, then creates fields (so Data* modules can reference them), applies N nodes (Data* modules), 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). - """ - provisionTable( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: ProvisionTableInput! - ): ProvisionTablePayload - - """ - 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. - """ - provisionUniqueConstraint( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: ProvisionUniqueConstraintInput! - ): ProvisionUniqueConstraintPayload - """Updates a single `AgentModule` using a unique key and a patch.""" updateAgentModule( """ @@ -20224,6 +20402,14 @@ type Mutation { input: UpdateRouteModuleInput! ): UpdateRouteModulePayload + """Updates a single `ScopeTypesModule` using a unique key and a patch.""" + updateScopeTypesModule( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateScopeTypesModuleInput! + ): UpdateScopeTypesModulePayload + """ Updates a single `SecureTableProvision` using a unique key and a patch. """ @@ -20310,6 +20496,16 @@ type Mutation { input: UpdateUserSettingsModuleInput! ): UpdateUserSettingsModulePayload + """ + Updates a single `UserSettingsSecurityModule` using a unique key and a patch. + """ + updateUserSettingsSecurityModule( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateUserSettingsSecurityModuleInput! + ): UpdateUserSettingsSecurityModulePayload + """Updates a single `UserStateModule` using a unique key and a patch.""" updateUserStateModule( """ @@ -22316,272 +22512,41 @@ type ProvisionBucketPayload { success: Boolean! } -"""All input for the `provisionCheckConstraint` mutation.""" -input ProvisionCheckConstraintInput { +"""The root query type which gives access points into the data universe.""" +type Query { """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. + Metadata about the database schema, including tables, fields, indexes, and constraints. Useful for code generation tools. """ - clientMutationId: String - databaseId: UUID - definition: JSON - tableId: UUID -} + _meta: MetaSchema -"""The output of our `provisionCheckConstraint` mutation.""" -type ProvisionCheckConstraintPayload { - """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String + """Reads and enables pagination through a set of `AgentModule`.""" + agentModules( + """Read all values in the set after (below) this cursor.""" + after: Cursor - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query -} + """Read all values in the set before (above) this cursor.""" + before: Cursor -"""All input for the `provisionFullTextSearch` mutation.""" -input ProvisionFullTextSearchInput { - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - databaseId: UUID - definition: JSON - tableId: UUID -} + """Only read the first `n` values of the set.""" + first: Int -"""The output of our `provisionFullTextSearch` mutation.""" -type ProvisionFullTextSearchPayload { - """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String + """Only read the last `n` values of the set.""" + last: Int - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - result: UUID -} + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int -"""All input for the `provisionIndex` mutation.""" -input ProvisionIndexInput { - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - databaseId: UUID - definition: JSON - tableId: UUID -} + """The method to use when ordering `AgentModule`.""" + orderBy: [AgentModuleOrderBy!] = [PRIMARY_KEY_ASC] -"""The output of our `provisionIndex` mutation.""" -type ProvisionIndexPayload { - """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - result: UUID -} - -"""All input for the `provisionRelation` mutation.""" -input ProvisionRelationInput { - apiRequired: Boolean - - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - createIndex: Boolean - databaseId: UUID - deleteAction: String - exposeInApi: Boolean - fieldName: String - grants: JSON - isRequired: Boolean - junctionSchemaId: UUID - junctionTableId: UUID - junctionTableName: String - nodes: JSON - policies: JSON - relationType: String - sourceFieldName: String - sourceTableId: UUID - targetFieldName: String - targetTableId: UUID - useCompositeKey: Boolean -} - -"""The output of our `provisionRelation` mutation.""" -type ProvisionRelationPayload { - """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - result: [ProvisionRelationRecord] -} - -type ProvisionRelationRecord { - outFieldId: UUID - outJunctionTableId: UUID - outSourceFieldId: UUID - outTargetFieldId: UUID -} - -"""All input for the `provisionSpatialRelation` mutation.""" -input ProvisionSpatialRelationInput { - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - databaseId: UUID - name: String - operator: String - paramName: String - sourceFieldId: UUID - sourceTableId: UUID - targetFieldId: UUID - targetTableId: UUID -} - -"""The output of our `provisionSpatialRelation` mutation.""" -type ProvisionSpatialRelationPayload { - """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - result: UUID -} - -"""All input for the `provisionTable` mutation.""" -input ProvisionTableInput { - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - databaseId: UUID - description: String - fields: JSON - fullTextSearches: JSON - grants: JSON - indexes: JSON - nodes: JSON - policies: JSON - schemaId: UUID - tableId: UUID - tableName: String - uniqueConstraints: JSON - useRls: Boolean -} - -"""The output of our `provisionTable` mutation.""" -type ProvisionTablePayload { - """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - result: [ProvisionTableRecord] -} - -type ProvisionTableRecord { - outFields: [UUID] - outTableId: UUID -} - -"""All input for the `provisionUniqueConstraint` mutation.""" -input ProvisionUniqueConstraintInput { - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - databaseId: UUID - definition: JSON - tableId: UUID -} - -"""The output of our `provisionUniqueConstraint` mutation.""" -type ProvisionUniqueConstraintPayload { - """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query -} - -"""The root query type which gives access points into the data universe.""" -type Query { - """ - Metadata about the database schema, including tables, fields, indexes, and constraints. Useful for code generation tools. - """ - _meta: MetaSchema - - """Reads and enables pagination through a set of `AgentModule`.""" - agentModules( - """Read all values in the set after (below) this cursor.""" - after: Cursor - - """Read all values in the set before (above) this cursor.""" - before: Cursor - - """Only read the first `n` values of the set.""" - first: Int - - """Only read the last `n` values of the set.""" - last: Int - - """ - Skip the first `n` values from our `after` cursor, an alternative to cursor - based pagination. May not be used with `last`. - """ - offset: Int - - """The method to use when ordering `AgentModule`.""" - orderBy: [AgentModuleOrderBy!] = [PRIMARY_KEY_ASC] - - """ - A filter to be used in determining which values should be returned by the collection. - """ - where: AgentModuleFilter - ): AgentModuleConnection + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: AgentModuleFilter + ): AgentModuleConnection """Reads and enables pagination through a set of `ApiSurfaceModule`.""" apiSurfaceModules( @@ -24254,16 +24219,6 @@ type Query { where: RelationProvisionFilter ): RelationProvisionConnection - """ - Resolves a field_name within a given table_id to a field_id. Throws if no match is found. Used by construct_blueprint to translate user-authored field names (e.g. "location") into field UUIDs for downstream provisioning procedures. table_id must already be resolved (via resolve_blueprint_table) before calling this. - """ - resolveBlueprintField(databaseId: UUID, fieldName: String, tableId: UUID): UUID - - """ - Resolves a table_name (with optional schema_name) to a table_id. Resolution order: (1) if schema_name provided, exact lookup via metaschema_public.schema.name + metaschema_public.table; (2) check local table_map (tables created in current blueprint); (3) search metaschema_public.table by name across all schemas; (4) if multiple matches, throw ambiguous error asking for schema_name; (5) if no match, throw not-found error. - """ - resolveBlueprintTable(databaseId: UUID, defaultSchemaId: UUID, schemaName: String, tableMap: JSON, tableName: String): UUID - """Reads and enables pagination through a set of `ResourceModule`.""" resourceModules( """Read all values in the set after (below) this cursor.""" @@ -24351,6 +24306,35 @@ type Query { where: RouteModuleFilter ): RouteModuleConnection + """Reads and enables pagination through a set of `ScopeTypesModule`.""" + scopeTypesModules( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """Only read the first `n` values of the set.""" + first: Int + + """Only read the last `n` values of the set.""" + last: Int + + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int + + """The method to use when ordering `ScopeTypesModule`.""" + orderBy: [ScopeTypesModuleOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: ScopeTypesModuleFilter + ): ScopeTypesModuleConnection + """Reads and enables pagination through a set of `SecureTableProvision`.""" secureTableProvisions( """Read all values in the set after (below) this cursor.""" @@ -24641,6 +24625,37 @@ type Query { where: UserSettingsModuleFilter ): UserSettingsModuleConnection + """ + Reads and enables pagination through a set of `UserSettingsSecurityModule`. + """ + userSettingsSecurityModules( + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """Only read the first `n` values of the set.""" + first: Int + + """Only read the last `n` values of the set.""" + last: Int + + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int + + """The method to use when ordering `UserSettingsSecurityModule`.""" + orderBy: [UserSettingsSecurityModuleOrderBy!] = [PRIMARY_KEY_ASC] + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: UserSettingsSecurityModuleFilter + ): UserSettingsSecurityModuleConnection + """Reads and enables pagination through a set of `UserStateModule`.""" userStateModules( """Read all values in the set after (below) this cursor.""" @@ -26568,11 +26583,13 @@ input RlsModulePatch { type RouteModule { apiName: String + appLinksFunctionName: String """Reads a single `CatalogModule` that is related to this `RouteModule`.""" catalogModule: CatalogModule catalogModuleId: UUID databaseId: UUID! + deepLinkFunctionName: String defaultPermissions: [String] """Reads a single `DomainModule` that is related to this `RouteModule`.""" @@ -26635,6 +26652,9 @@ input RouteModuleFilter { """Filter by the object’s `apiName` field.""" apiName: StringFilter + """Filter by the object’s `appLinksFunctionName` field.""" + appLinksFunctionName: StringFilter + """Filter by the object’s `catalogModule` relation.""" catalogModule: CatalogModuleFilter @@ -26647,6 +26667,9 @@ input RouteModuleFilter { """Filter by the object’s `databaseId` field.""" databaseId: UUIDFilter + """Filter by the object’s `deepLinkFunctionName` field.""" + deepLinkFunctionName: StringFilter + """Filter by the object’s `defaultPermissions` field.""" defaultPermissions: StringListFilter @@ -26726,8 +26749,10 @@ input RouteModuleFilter { """An input for mutations affecting `RouteModule`""" input RouteModuleInput { apiName: String + appLinksFunctionName: String catalogModuleId: UUID databaseId: UUID! + deepLinkFunctionName: String defaultPermissions: [String] domainModuleId: UUID entityField: String @@ -26755,10 +26780,14 @@ input RouteModuleInput { enum RouteModuleOrderBy { API_NAME_ASC API_NAME_DESC + APP_LINKS_FUNCTION_NAME_ASC + APP_LINKS_FUNCTION_NAME_DESC CATALOG_MODULE_ID_ASC CATALOG_MODULE_ID_DESC DATABASE_ID_ASC DATABASE_ID_DESC + DEEP_LINK_FUNCTION_NAME_ASC + DEEP_LINK_FUNCTION_NAME_DESC DEFAULT_PERMISSIONS_ASC DEFAULT_PERMISSIONS_DESC DOMAIN_MODULE_ID_ASC @@ -26811,8 +26840,10 @@ Represents an update to a `RouteModule`. Fields that are set will be updated. """ input RouteModulePatch { apiName: String + appLinksFunctionName: String catalogModuleId: UUID databaseId: UUID + deepLinkFunctionName: String defaultPermissions: [String] domainModuleId: UUID entityField: String @@ -26836,6 +26867,108 @@ input RouteModulePatch { scope: String } +type ScopeTypesModule { + databaseId: UUID! + id: UUID! + privateSchemaName: String + schemaId: UUID! + scopeTypesTableId: UUID! +} + +"""A connection to a list of `ScopeTypesModule` values.""" +type ScopeTypesModuleConnection { + """ + A list of edges which contains the `ScopeTypesModule` and cursor to aid in pagination. + """ + edges: [ScopeTypesModuleEdge]! + + """A list of `ScopeTypesModule` objects.""" + nodes: [ScopeTypesModule]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """ + The count of *all* `ScopeTypesModule` you could get from the connection. + """ + totalCount: Int! +} + +"""A `ScopeTypesModule` edge in the connection.""" +type ScopeTypesModuleEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `ScopeTypesModule` at the end of the edge.""" + node: ScopeTypesModule +} + +""" +A filter to be used against `ScopeTypesModule` object types. All fields are combined with a logical ‘and.’ +""" +input ScopeTypesModuleFilter { + """Checks for all expressions in this list.""" + and: [ScopeTypesModuleFilter!] + + """Filter by the object’s `databaseId` field.""" + databaseId: UUIDFilter + + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Negates the expression.""" + not: ScopeTypesModuleFilter + + """Checks for any expressions in this list.""" + or: [ScopeTypesModuleFilter!] + + """Filter by the object’s `privateSchemaName` field.""" + privateSchemaName: StringFilter + + """Filter by the object’s `schemaId` field.""" + schemaId: UUIDFilter + + """Filter by the object’s `scopeTypesTableId` field.""" + scopeTypesTableId: UUIDFilter +} + +"""An input for mutations affecting `ScopeTypesModule`""" +input ScopeTypesModuleInput { + databaseId: UUID! + id: UUID + privateSchemaName: String + schemaId: UUID + scopeTypesTableId: UUID +} + +"""Methods to use when ordering `ScopeTypesModule`.""" +enum ScopeTypesModuleOrderBy { + DATABASE_ID_ASC + DATABASE_ID_DESC + ID_ASC + ID_DESC + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + PRIVATE_SCHEMA_NAME_ASC + PRIVATE_SCHEMA_NAME_DESC + SCHEMA_ID_ASC + SCHEMA_ID_DESC + SCOPE_TYPES_TABLE_ID_ASC + SCOPE_TYPES_TABLE_ID_DESC +} + +""" +Represents an update to a `ScopeTypesModule`. Fields that are set will be updated. +""" +input ScopeTypesModulePatch { + databaseId: UUID + id: UUID + privateSchemaName: String + schemaId: UUID + scopeTypesTableId: UUID +} + """ Provisions security, fields, grants, and policies onto a table. Each row can independently: (1) create fields via nodes[] array (supporting multiple Data* modules per row), (2) grant privileges via grants[] array (supporting per-role privilege targeting), (3) create RLS policies via policies[] array (supporting multiple Authz* policies per row). Multiple rows can target the same table to compose different concerns. All three concerns are optional and independent. """ @@ -31271,6 +31404,44 @@ type UpdateRouteModulePayload { ): RouteModuleEdge } +"""All input for the `updateScopeTypesModule` mutation.""" +input UpdateScopeTypesModuleInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + id: UUID! + + """ + An object where the defined keys will be set on the `ScopeTypesModule` being updated. + """ + scopeTypesModulePatch: ScopeTypesModulePatch! +} + +"""The output of our update `ScopeTypesModule` mutation.""" +type UpdateScopeTypesModulePayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """The `ScopeTypesModule` that was updated by this mutation.""" + scopeTypesModule: ScopeTypesModule + + """An edge for our `ScopeTypesModule`. May be used by Relay 1.""" + scopeTypesModuleEdge( + """The method to use when ordering `ScopeTypesModule`.""" + orderBy: [ScopeTypesModuleOrderBy!]! = [PRIMARY_KEY_ASC] + ): ScopeTypesModuleEdge +} + """All input for the `updateSecureTableProvision` mutation.""" input UpdateSecureTableProvisionInput { """ @@ -31653,6 +31824,44 @@ type UpdateUserSettingsModulePayload { ): UserSettingsModuleEdge } +"""All input for the `updateUserSettingsSecurityModule` mutation.""" +input UpdateUserSettingsSecurityModuleInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + id: UUID! + + """ + An object where the defined keys will be set on the `UserSettingsSecurityModule` being updated. + """ + userSettingsSecurityModulePatch: UserSettingsSecurityModulePatch! +} + +"""The output of our update `UserSettingsSecurityModule` mutation.""" +type UpdateUserSettingsSecurityModulePayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """The `UserSettingsSecurityModule` that was updated by this mutation.""" + userSettingsSecurityModule: UserSettingsSecurityModule + + """An edge for our `UserSettingsSecurityModule`. May be used by Relay 1.""" + userSettingsSecurityModuleEdge( + """The method to use when ordering `UserSettingsSecurityModule`.""" + orderBy: [UserSettingsSecurityModuleOrderBy!]! = [PRIMARY_KEY_ASC] + ): UserSettingsSecurityModuleEdge +} + """All input for the `updateUserStateModule` mutation.""" input UpdateUserStateModuleInput { """ @@ -32368,6 +32577,124 @@ input UserSettingsModulePatch { tableName: String } +type UserSettingsSecurityModule { + apiName: String + databaseId: UUID! + id: UUID! + ownerTableId: UUID! + schemaId: UUID! + tableId: UUID! + tableName: String! +} + +"""A connection to a list of `UserSettingsSecurityModule` values.""" +type UserSettingsSecurityModuleConnection { + """ + A list of edges which contains the `UserSettingsSecurityModule` and cursor to aid in pagination. + """ + edges: [UserSettingsSecurityModuleEdge]! + + """A list of `UserSettingsSecurityModule` objects.""" + nodes: [UserSettingsSecurityModule]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """ + The count of *all* `UserSettingsSecurityModule` you could get from the connection. + """ + totalCount: Int! +} + +"""A `UserSettingsSecurityModule` edge in the connection.""" +type UserSettingsSecurityModuleEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `UserSettingsSecurityModule` at the end of the edge.""" + node: UserSettingsSecurityModule +} + +""" +A filter to be used against `UserSettingsSecurityModule` object types. All fields are combined with a logical ‘and.’ +""" +input UserSettingsSecurityModuleFilter { + """Checks for all expressions in this list.""" + and: [UserSettingsSecurityModuleFilter!] + + """Filter by the object’s `apiName` field.""" + apiName: StringFilter + + """Filter by the object’s `databaseId` field.""" + databaseId: UUIDFilter + + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Negates the expression.""" + not: UserSettingsSecurityModuleFilter + + """Checks for any expressions in this list.""" + or: [UserSettingsSecurityModuleFilter!] + + """Filter by the object’s `ownerTableId` field.""" + ownerTableId: UUIDFilter + + """Filter by the object’s `schemaId` field.""" + schemaId: UUIDFilter + + """Filter by the object’s `tableId` field.""" + tableId: UUIDFilter + + """Filter by the object’s `tableName` field.""" + tableName: StringFilter +} + +"""An input for mutations affecting `UserSettingsSecurityModule`""" +input UserSettingsSecurityModuleInput { + apiName: String + databaseId: UUID! + id: UUID + ownerTableId: UUID + schemaId: UUID + tableId: UUID + tableName: String +} + +"""Methods to use when ordering `UserSettingsSecurityModule`.""" +enum UserSettingsSecurityModuleOrderBy { + API_NAME_ASC + API_NAME_DESC + DATABASE_ID_ASC + DATABASE_ID_DESC + ID_ASC + ID_DESC + NATURAL + OWNER_TABLE_ID_ASC + OWNER_TABLE_ID_DESC + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + SCHEMA_ID_ASC + SCHEMA_ID_DESC + TABLE_ID_ASC + TABLE_ID_DESC + TABLE_NAME_ASC + TABLE_NAME_DESC +} + +""" +Represents an update to a `UserSettingsSecurityModule`. Fields that are set will be updated. +""" +input UserSettingsSecurityModulePatch { + apiName: String + databaseId: UUID + id: UUID + ownerTableId: UUID + schemaId: UUID + tableId: UUID + tableName: String +} + type UserStateModule { databaseId: UUID! entityField: String diff --git a/sdk/constructive-sdk/schemas/objects.graphql b/sdk/constructive-sdk/schemas/objects.graphql index 6984ef2d31..2858c435c8 100644 --- a/sdk/constructive-sdk/schemas/objects.graphql +++ b/sdk/constructive-sdk/schemas/objects.graphql @@ -613,6 +613,36 @@ type InsertNodeAtPathPayload { result: UUID } +"""All input for the `insertNodesAtPaths` mutation.""" +input InsertNodesAtPathsInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + datas: [JSON] + kidsList: JSON + ktreeList: JSON + paths: JSON + root: UUID + sId: UUID +} + +"""The output of our `insertNodesAtPaths` mutation.""" +type InsertNodesAtPathsPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + result: UUID +} + """ Represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). """ @@ -1061,6 +1091,12 @@ type Mutation { """ input: InsertNodeAtPathInput! ): InsertNodeAtPathPayload + insertNodesAtPaths( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: InsertNodesAtPathsInput! + ): InsertNodesAtPathsPayload """ Provision an S3 bucket for a logical bucket in the database. @@ -1074,12 +1110,24 @@ type Mutation { """ input: ProvisionBucketInput! ): ProvisionBucketPayload + setAndCommit( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: SetAndCommitInput! + ): SetAndCommitPayload setDataAtPath( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. """ input: SetDataAtPathInput! ): SetDataAtPathPayload + setManyAndCommit( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: SetManyAndCommitInput! + ): SetManyAndCommitPayload """Updates a single `Commit` using a unique key and a patch.""" updateCommit( @@ -1572,6 +1620,44 @@ input RefPatch { storeId: UUID } +"""All input for the `setAndCommit` mutation.""" +input SetAndCommitInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + data: JSON + kids: [UUID] + ktree: [String] + message: String + path: [String] + refname: String + sId: UUID + storeId: UUID +} + +"""The output of our `setAndCommit` mutation.""" +type SetAndCommitPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """An edge for our `Commit`. May be used by Relay 1.""" + commitEdge( + """The method to use when ordering `Commit`.""" + orderBy: [CommitOrderBy!]! = [PRIMARY_KEY_ASC] + ): CommitEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + result: Commit +} + """All input for the `setDataAtPath` mutation.""" input SetDataAtPathInput { """ @@ -1600,6 +1686,41 @@ type SetDataAtPathPayload { result: UUID } +"""All input for the `setManyAndCommit` mutation.""" +input SetManyAndCommitInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + entries: JSON + message: String + refname: String + sId: UUID + storeId: UUID +} + +"""The output of our `setManyAndCommit` mutation.""" +type SetManyAndCommitPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """An edge for our `Commit`. May be used by Relay 1.""" + commitEdge( + """The method to use when ordering `Commit`.""" + orderBy: [CommitOrderBy!]! = [PRIMARY_KEY_ASC] + ): CommitEdge + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + result: Commit +} + """ Named stores — one per version-controlled tree (e.g. one graph, one definition set) """ diff --git a/sdk/constructive-sdk/src/api/orm/README.md b/sdk/constructive-sdk/src/api/orm/README.md index 485932a4b7..327d694398 100644 --- a/sdk/constructive-sdk/src/api/orm/README.md +++ b/sdk/constructive-sdk/src/api/orm/README.md @@ -21,9 +21,9 @@ const db = createClient({ | Model | Operations | |-------|------------| +| `api` | findMany, findOne, create, update, delete | | `apiSchema` | findMany, findOne, create, update, delete | | `apiSetting` | findMany, findOne, create, update, delete | -| `apis` | findMany, findOne, create, update, delete | | `astMigration` | findMany, findOne, create, update, delete | | `checkConstraint` | findMany, findOne, create, update, delete | | `compositeType` | findMany, findOne, create, update, delete | @@ -53,9 +53,9 @@ const db = createClient({ | `nodeTypeRegistry` | findMany, findOne, create, update, delete | | `page` | findMany, findOne, create, update, delete | | `partition` | findMany, findOne, create, update, delete | +| `platformApi` | findMany, findOne, create, update, delete | | `platformApiSchema` | findMany, findOne, create, update, delete | | `platformApiSetting` | findMany, findOne, create, update, delete | -| `platformApis` | findMany, findOne, create, update, delete | | `platformCorsSetting` | findMany, findOne, create, update, delete | | `platformDomain` | findMany, findOne, create, update, delete | | `platformDomainEvent` | findMany, findOne, create, update, delete | @@ -104,6 +104,44 @@ const db = createClient({ ## Table Operations +### `db.api` + +CRUD operations for Api records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `anonRole` | String | Yes | +| `config` | JSON | Yes | +| `createdAt` | Datetime | No | +| `databaseId` | UUID | Yes | +| `dbname` | String | Yes | +| `id` | UUID | No | +| `isPublished` | Boolean | Yes | +| `name` | String | Yes | +| `roleName` | String | Yes | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all api records +const items = await db.api.findMany({ select: { anonRole: true, config: true, createdAt: true, databaseId: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.api.findOne({ id: '', select: { anonRole: true, config: true, createdAt: true, databaseId: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }).execute(); + +// Create +const created = await db.api.create({ data: { anonRole: '', config: '', databaseId: '', dbname: '', isPublished: '', name: '', roleName: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.api.update({ where: { id: '' }, data: { anonRole: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.api.delete({ where: { id: '' } }).execute(); +``` + ### `db.apiSchema` CRUD operations for ApiSchema records. @@ -185,44 +223,6 @@ const updated = await db.apiSetting.update({ where: { id: '' }, data: { ap const deleted = await db.apiSetting.delete({ where: { id: '' } }).execute(); ``` -### `db.apis` - -CRUD operations for Apis records. - -**Fields:** - -| Field | Type | Editable | -|-------|------|----------| -| `anonRole` | String | Yes | -| `config` | JSON | Yes | -| `createdAt` | Datetime | No | -| `databaseId` | UUID | Yes | -| `dbname` | String | Yes | -| `id` | UUID | No | -| `isPublished` | Boolean | Yes | -| `name` | String | Yes | -| `roleName` | String | Yes | -| `updatedAt` | Datetime | No | - -**Operations:** - -```typescript -// List all apis records -const items = await db.apis.findMany({ select: { anonRole: true, config: true, createdAt: true, databaseId: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }).execute(); - -// Get one by id -const item = await db.apis.findOne({ id: '', select: { anonRole: true, config: true, createdAt: true, databaseId: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }).execute(); - -// Create -const created = await db.apis.create({ data: { anonRole: '', config: '', databaseId: '', dbname: '', isPublished: '', name: '', roleName: '' }, select: { id: true } }).execute(); - -// Update -const updated = await db.apis.update({ where: { id: '' }, data: { anonRole: '' }, select: { id: true } }).execute(); - -// Delete -const deleted = await db.apis.delete({ where: { id: '' } }).execute(); -``` - ### `db.astMigration` CRUD operations for AstMigration records. @@ -1394,6 +1394,43 @@ const updated = await db.partition.update({ where: { id: '' }, data: { dat const deleted = await db.partition.delete({ where: { id: '' } }).execute(); ``` +### `db.platformApi` + +CRUD operations for PlatformApi records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `anonRole` | String | Yes | +| `config` | JSON | Yes | +| `createdAt` | Datetime | No | +| `dbname` | String | Yes | +| `id` | UUID | No | +| `isPublished` | Boolean | Yes | +| `name` | String | Yes | +| `roleName` | String | Yes | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all platformApi records +const items = await db.platformApi.findMany({ select: { anonRole: true, config: true, createdAt: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.platformApi.findOne({ id: '', select: { anonRole: true, config: true, createdAt: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }).execute(); + +// Create +const created = await db.platformApi.create({ data: { anonRole: '', config: '', dbname: '', isPublished: '', name: '', roleName: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.platformApi.update({ where: { id: '' }, data: { anonRole: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.platformApi.delete({ where: { id: '' } }).execute(); +``` + ### `db.platformApiSchema` CRUD operations for PlatformApiSchema records. @@ -1473,43 +1510,6 @@ const updated = await db.platformApiSetting.update({ where: { id: '' }, da const deleted = await db.platformApiSetting.delete({ where: { id: '' } }).execute(); ``` -### `db.platformApis` - -CRUD operations for PlatformApis records. - -**Fields:** - -| Field | Type | Editable | -|-------|------|----------| -| `anonRole` | String | Yes | -| `config` | JSON | Yes | -| `createdAt` | Datetime | No | -| `dbname` | String | Yes | -| `id` | UUID | No | -| `isPublished` | Boolean | Yes | -| `name` | String | Yes | -| `roleName` | String | Yes | -| `updatedAt` | Datetime | No | - -**Operations:** - -```typescript -// List all platformApis records -const items = await db.platformApis.findMany({ select: { anonRole: true, config: true, createdAt: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }).execute(); - -// Get one by id -const item = await db.platformApis.findOne({ id: '', select: { anonRole: true, config: true, createdAt: true, dbname: true, id: true, isPublished: true, name: true, roleName: true, updatedAt: true } }).execute(); - -// Create -const created = await db.platformApis.create({ data: { anonRole: '', config: '', dbname: '', isPublished: '', name: '', roleName: '' }, select: { id: true } }).execute(); - -// Update -const updated = await db.platformApis.update({ where: { id: '' }, data: { anonRole: '' }, select: { id: true } }).execute(); - -// Delete -const deleted = await db.platformApis.delete({ where: { id: '' } }).execute(); -``` - ### `db.platformCorsSetting` CRUD operations for PlatformCorsSetting records. diff --git a/sdk/constructive-sdk/src/api/orm/index.ts b/sdk/constructive-sdk/src/api/orm/index.ts index 98c5108b79..a030658a98 100644 --- a/sdk/constructive-sdk/src/api/orm/index.ts +++ b/sdk/constructive-sdk/src/api/orm/index.ts @@ -5,9 +5,9 @@ */ import { OrmClient } from './client'; import type { OrmClientConfig } from './client'; +import { ApiModel } from './models/api'; import { ApiSchemaModel } from './models/apiSchema'; import { ApiSettingModel } from './models/apiSetting'; -import { ApisModel } from './models/apis'; import { AstMigrationModel } from './models/astMigration'; import { CheckConstraintModel } from './models/checkConstraint'; import { CompositeTypeModel } from './models/compositeType'; @@ -37,9 +37,9 @@ import { ManagedDomainModel } from './models/managedDomain'; import { NodeTypeRegistryModel } from './models/nodeTypeRegistry'; import { PageModel } from './models/page'; import { PartitionModel } from './models/partition'; +import { PlatformApiModel } from './models/platformApi'; import { PlatformApiSchemaModel } from './models/platformApiSchema'; import { PlatformApiSettingModel } from './models/platformApiSetting'; -import { PlatformApisModel } from './models/platformApis'; import { PlatformCorsSettingModel } from './models/platformCorsSetting'; import { PlatformDomainModel } from './models/platformDomain'; import { PlatformDomainEventModel } from './models/platformDomainEvent'; @@ -120,9 +120,9 @@ export { createMutationOperations } from './mutation'; export function createClient(config: OrmClientConfig) { const client = new OrmClient(config); return { + api: new ApiModel(client), apiSchema: new ApiSchemaModel(client), apiSetting: new ApiSettingModel(client), - apis: new ApisModel(client), astMigration: new AstMigrationModel(client), checkConstraint: new CheckConstraintModel(client), compositeType: new CompositeTypeModel(client), @@ -152,9 +152,9 @@ export function createClient(config: OrmClientConfig) { nodeTypeRegistry: new NodeTypeRegistryModel(client), page: new PageModel(client), partition: new PartitionModel(client), + platformApi: new PlatformApiModel(client), platformApiSchema: new PlatformApiSchemaModel(client), platformApiSetting: new PlatformApiSettingModel(client), - platformApis: new PlatformApisModel(client), platformCorsSetting: new PlatformCorsSettingModel(client), platformDomain: new PlatformDomainModel(client), platformDomainEvent: new PlatformDomainEventModel(client), diff --git a/sdk/constructive-sdk/src/api/orm/input-types.ts b/sdk/constructive-sdk/src/api/orm/input-types.ts index 2347f17ca6..380adaea86 100644 --- a/sdk/constructive-sdk/src/api/orm/input-types.ts +++ b/sdk/constructive-sdk/src/api/orm/input-types.ts @@ -235,8 +235,28 @@ export type ApiExposureLevel = 'EXPOSABLE' | 'INTERNAL_ONLY' | 'NEVER_EXPOSE'; export type ObjectCategory = 'APP' | 'AUTH' | 'CORE' | 'MEMBERSHIPS' | 'MODULE' | 'PERMISSIONS'; // ============ Custom Scalar Types ============ export type ConstructiveInternalTypeImage = unknown; -/** Join table linking API surfaces to the metaschema schemas they expose */ +/** API surfaces exposed by this scope; publication makes a surface bindable from other scopes */ // ============ Entity Types ============ +export interface Api { + /** Anonymous role the API executes as */ + anonRole?: string | null; + /** Module-specific configuration for this API surface */ + config?: Record | null; + createdAt?: string | null; + /** Database that owns this resource (database-scoped isolation) */ + databaseId?: string | null; + /** Database this API surface serves */ + dbname?: string | null; + id: string; + /** Whether other scopes may see and route to this API surface */ + isPublished?: boolean | null; + /** Owner-local API surface name */ + name?: string | null; + /** Authenticated role the API executes as */ + roleName?: string | null; + updatedAt?: string | null; +} +/** Join table linking API surfaces to the metaschema schemas they expose */ export interface ApiSchema { /** API surface that exposes this schema */ apiId?: string | null; @@ -286,26 +306,6 @@ export interface ApiSetting { statementTimeoutMs?: string | null; updatedAt?: string | null; } -/** API surfaces exposed by this scope; publication makes a surface bindable from other scopes */ -export interface Apis { - /** Anonymous role the API executes as */ - anonRole?: string | null; - /** Module-specific configuration for this API surface */ - config?: Record | null; - createdAt?: string | null; - /** Database that owns this resource (database-scoped isolation) */ - databaseId?: string | null; - /** Database this API surface serves */ - dbname?: string | null; - id: string; - /** Whether other scopes may see and route to this API surface */ - isPublished?: boolean | null; - /** Owner-local API surface name */ - name?: string | null; - /** Authenticated role the API executes as */ - roleName?: string | null; - updatedAt?: string | null; -} export interface AstMigration { actionId?: string | null; actionName?: string | null; @@ -821,6 +821,24 @@ export interface Partition { tableId?: string | null; updatedAt?: string | null; } +/** API surfaces exposed by this scope; publication makes a surface bindable from other scopes */ +export interface PlatformApi { + /** Anonymous role the API executes as */ + anonRole?: string | null; + /** Module-specific configuration for this API surface */ + config?: Record | null; + createdAt?: string | null; + /** Database this API surface serves */ + dbname?: string | null; + id: string; + /** Whether other scopes may see and route to this API surface */ + isPublished?: boolean | null; + /** Owner-local API surface name */ + name?: string | null; + /** Authenticated role the API executes as */ + roleName?: string | null; + updatedAt?: string | null; +} /** Join table linking API surfaces to the metaschema schemas they expose */ export interface PlatformApiSchema { /** API surface that exposes this schema */ @@ -867,24 +885,6 @@ export interface PlatformApiSetting { statementTimeoutMs?: string | null; updatedAt?: string | null; } -/** API surfaces exposed by this scope; publication makes a surface bindable from other scopes */ -export interface PlatformApis { - /** Anonymous role the API executes as */ - anonRole?: string | null; - /** Module-specific configuration for this API surface */ - config?: Record | null; - createdAt?: string | null; - /** Database this API surface serves */ - dbname?: string | null; - id: string; - /** Whether other scopes may see and route to this API surface */ - isPublished?: boolean | null; - /** Owner-local API surface name */ - name?: string | null; - /** Authenticated role the API executes as */ - roleName?: string | null; - updatedAt?: string | null; -} /** Scope-wide and per-API CORS origin configuration; NULL api_id means scope-wide default */ export interface PlatformCorsSetting { /** Array of allowed CORS origins (e.g. https://example.com) */ @@ -1736,17 +1736,17 @@ export interface PageInfo { endCursor?: string | null; } // ============ Entity Relation Types ============ +export interface ApiRelations { + apiSetting?: ApiSetting | null; + apiSchemas?: ConnectionResult; + corsSettings?: ConnectionResult; +} export interface ApiSchemaRelations { - api?: Apis | null; + api?: Api | null; schema?: Schema | null; } export interface ApiSettingRelations { - api?: Apis | null; -} -export interface ApisRelations { - apiSettingByApiId?: ApiSetting | null; - apiSchemasByApiId?: ConnectionResult; - corsSettingsByApiId?: ConnectionResult; + api?: Api | null; } export interface AstMigrationRelations {} export interface CheckConstraintRelations { @@ -1758,7 +1758,7 @@ export interface CompositeTypeRelations { schema?: Schema | null; } export interface CorsSettingRelations { - api?: Apis | null; + api?: Api | null; } export interface DatabaseRelations { checkConstraints?: ConnectionResult; @@ -1896,20 +1896,20 @@ export interface PartitionRelations { partitionKey?: Field | null; table?: Table | null; } +export interface PlatformApiRelations { + platformApiSettingByApiId?: PlatformApiSetting | null; + platformCorsSettingByApiId?: PlatformCorsSetting | null; + platformApiSchemasByApiId?: ConnectionResult; +} export interface PlatformApiSchemaRelations { - api?: PlatformApis | null; + api?: PlatformApi | null; schema?: Schema | null; } export interface PlatformApiSettingRelations { - api?: PlatformApis | null; -} -export interface PlatformApisRelations { - platformApiSettingByApiId?: PlatformApiSetting | null; - platformCorsSettingByApiId?: PlatformCorsSetting | null; - platformApiSchemasByApiId?: ConnectionResult; + api?: PlatformApi | null; } export interface PlatformCorsSettingRelations { - api?: PlatformApis | null; + api?: PlatformApi | null; } export interface PlatformDomainRelations { platformDomainEventsByDomainId?: ConnectionResult; @@ -2139,9 +2139,9 @@ export interface WebauthnSettingRelations { userField?: Field | null; } // ============ Entity Types With Relations ============ +export type ApiWithRelations = Api & ApiRelations; export type ApiSchemaWithRelations = ApiSchema & ApiSchemaRelations; export type ApiSettingWithRelations = ApiSetting & ApiSettingRelations; -export type ApisWithRelations = Apis & ApisRelations; export type AstMigrationWithRelations = AstMigration & AstMigrationRelations; export type CheckConstraintWithRelations = CheckConstraint & CheckConstraintRelations; export type CompositeTypeWithRelations = CompositeType & CompositeTypeRelations; @@ -2173,9 +2173,9 @@ export type ManagedDomainWithRelations = ManagedDomain & ManagedDomainRelations; export type NodeTypeRegistryWithRelations = NodeTypeRegistry & NodeTypeRegistryRelations; export type PageWithRelations = Page & PageRelations; export type PartitionWithRelations = Partition & PartitionRelations; +export type PlatformApiWithRelations = PlatformApi & PlatformApiRelations; export type PlatformApiSchemaWithRelations = PlatformApiSchema & PlatformApiSchemaRelations; export type PlatformApiSettingWithRelations = PlatformApiSetting & PlatformApiSettingRelations; -export type PlatformApisWithRelations = PlatformApis & PlatformApisRelations; export type PlatformCorsSettingWithRelations = PlatformCorsSetting & PlatformCorsSettingRelations; export type PlatformDomainWithRelations = PlatformDomain & PlatformDomainRelations; export type PlatformDomainEventWithRelations = PlatformDomainEvent & PlatformDomainEventRelations; @@ -2230,6 +2230,33 @@ export type ViewRuleWithRelations = ViewRule & ViewRuleRelations; export type ViewTableWithRelations = ViewTable & ViewTableRelations; export type WebauthnSettingWithRelations = WebauthnSetting & WebauthnSettingRelations; // ============ Entity Select Types ============ +export type ApiSelect = { + anonRole?: boolean; + config?: boolean; + createdAt?: boolean; + databaseId?: boolean; + dbname?: boolean; + id?: boolean; + isPublished?: boolean; + name?: boolean; + roleName?: boolean; + updatedAt?: boolean; + apiSetting?: { + select: ApiSettingSelect; + }; + apiSchemas?: { + select: ApiSchemaSelect; + first?: number; + filter?: ApiSchemaFilter; + orderBy?: ApiSchemaOrderBy[]; + }; + corsSettings?: { + select: CorsSettingSelect; + first?: number; + filter?: CorsSettingFilter; + orderBy?: CorsSettingOrderBy[]; + }; +}; export type ApiSchemaSelect = { apiId?: boolean; createdAt?: boolean; @@ -2238,7 +2265,7 @@ export type ApiSchemaSelect = { schemaId?: boolean; updatedAt?: boolean; api?: { - select: ApisSelect; + select: ApiSelect; }; schema?: { select: SchemaSelect; @@ -2265,34 +2292,7 @@ export type ApiSettingSelect = { statementTimeoutMs?: boolean; updatedAt?: boolean; api?: { - select: ApisSelect; - }; -}; -export type ApisSelect = { - anonRole?: boolean; - config?: boolean; - createdAt?: boolean; - databaseId?: boolean; - dbname?: boolean; - id?: boolean; - isPublished?: boolean; - name?: boolean; - roleName?: boolean; - updatedAt?: boolean; - apiSettingByApiId?: { - select: ApiSettingSelect; - }; - apiSchemasByApiId?: { - select: ApiSchemaSelect; - first?: number; - filter?: ApiSchemaFilter; - orderBy?: ApiSchemaOrderBy[]; - }; - corsSettingsByApiId?: { - select: CorsSettingSelect; - first?: number; - filter?: CorsSettingFilter; - orderBy?: CorsSettingOrderBy[]; + select: ApiSelect; }; }; export type AstMigrationSelect = { @@ -2358,7 +2358,7 @@ export type CorsSettingSelect = { id?: boolean; updatedAt?: boolean; api?: { - select: ApisSelect; + select: ApiSelect; }; }; export type DatabaseSelect = { @@ -3135,6 +3135,29 @@ export type PartitionSelect = { select: TableSelect; }; }; +export type PlatformApiSelect = { + anonRole?: boolean; + config?: boolean; + createdAt?: boolean; + dbname?: boolean; + id?: boolean; + isPublished?: boolean; + name?: boolean; + roleName?: boolean; + updatedAt?: boolean; + platformApiSettingByApiId?: { + select: PlatformApiSettingSelect; + }; + platformCorsSettingByApiId?: { + select: PlatformCorsSettingSelect; + }; + platformApiSchemasByApiId?: { + select: PlatformApiSchemaSelect; + first?: number; + filter?: PlatformApiSchemaFilter; + orderBy?: PlatformApiSchemaOrderBy[]; + }; +}; export type PlatformApiSchemaSelect = { apiId?: boolean; createdAt?: boolean; @@ -3142,7 +3165,7 @@ export type PlatformApiSchemaSelect = { schemaId?: boolean; updatedAt?: boolean; api?: { - select: PlatformApisSelect; + select: PlatformApiSelect; }; schema?: { select: SchemaSelect; @@ -3168,30 +3191,7 @@ export type PlatformApiSettingSelect = { statementTimeoutMs?: boolean; updatedAt?: boolean; api?: { - select: PlatformApisSelect; - }; -}; -export type PlatformApisSelect = { - anonRole?: boolean; - config?: boolean; - createdAt?: boolean; - dbname?: boolean; - id?: boolean; - isPublished?: boolean; - name?: boolean; - roleName?: boolean; - updatedAt?: boolean; - platformApiSettingByApiId?: { - select: PlatformApiSettingSelect; - }; - platformCorsSettingByApiId?: { - select: PlatformCorsSettingSelect; - }; - platformApiSchemasByApiId?: { - select: PlatformApiSchemaSelect; - first?: number; - filter?: PlatformApiSchemaFilter; - orderBy?: PlatformApiSchemaOrderBy[]; + select: PlatformApiSelect; }; }; export type PlatformCorsSettingSelect = { @@ -3201,7 +3201,7 @@ export type PlatformCorsSettingSelect = { id?: boolean; updatedAt?: boolean; api?: { - select: PlatformApisSelect; + select: PlatformApiSelect; }; }; export type PlatformDomainSelect = { @@ -4365,11 +4365,51 @@ export type WebauthnSettingSelect = { }; }; // ============ Table Filter Types ============ +export interface ApiFilter { + /** Checks for all expressions in this list. */ + and?: ApiFilter[]; + /** Filter by the object’s `anonRole` field. */ + anonRole?: StringFilter; + /** Filter by the object’s `apiSchemas` relation. */ + apiSchemas?: ApiToManyApiSchemaFilter; + /** `apiSchemas` exist. */ + apiSchemasExist?: boolean; + /** Filter by the object’s `apiSetting` relation. */ + apiSetting?: ApiSettingFilter; + /** A related `apiSetting` exists. */ + apiSettingExists?: boolean; + /** Filter by the object’s `config` field. */ + config?: JSONFilter; + /** Filter by the object’s `corsSettings` relation. */ + corsSettings?: ApiToManyCorsSettingFilter; + /** `corsSettings` exist. */ + corsSettingsExist?: boolean; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `dbname` field. */ + dbname?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isPublished` field. */ + isPublished?: BooleanFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: ApiFilter; + /** Checks for any expressions in this list. */ + or?: ApiFilter[]; + /** Filter by the object’s `roleName` field. */ + roleName?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} export interface ApiSchemaFilter { /** Checks for all expressions in this list. */ and?: ApiSchemaFilter[]; /** Filter by the object’s `api` relation. */ - api?: ApisFilter; + api?: ApiFilter; /** Filter by the object’s `apiId` field. */ apiId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ @@ -4393,7 +4433,7 @@ export interface ApiSettingFilter { /** Checks for all expressions in this list. */ and?: ApiSettingFilter[]; /** Filter by the object’s `api` relation. */ - api?: ApisFilter; + api?: ApiFilter; /** Filter by the object’s `apiId` field. */ apiId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ @@ -4437,46 +4477,6 @@ export interface ApiSettingFilter { /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } -export interface ApisFilter { - /** Checks for all expressions in this list. */ - and?: ApisFilter[]; - /** Filter by the object’s `anonRole` field. */ - anonRole?: StringFilter; - /** Filter by the object’s `apiSchemasByApiId` relation. */ - apiSchemasByApiId?: ApisToManyApiSchemaFilter; - /** `apiSchemasByApiId` exist. */ - apiSchemasByApiIdExist?: boolean; - /** Filter by the object’s `apiSettingByApiId` relation. */ - apiSettingByApiId?: ApiSettingFilter; - /** A related `apiSettingByApiId` exists. */ - apiSettingByApiIdExists?: boolean; - /** Filter by the object’s `config` field. */ - config?: JSONFilter; - /** Filter by the object’s `corsSettingsByApiId` relation. */ - corsSettingsByApiId?: ApisToManyCorsSettingFilter; - /** `corsSettingsByApiId` exist. */ - corsSettingsByApiIdExist?: boolean; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `databaseId` field. */ - databaseId?: UUIDFilter; - /** Filter by the object’s `dbname` field. */ - dbname?: StringFilter; - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `isPublished` field. */ - isPublished?: BooleanFilter; - /** Filter by the object’s `name` field. */ - name?: StringFilter; - /** Negates the expression. */ - not?: ApisFilter; - /** Checks for any expressions in this list. */ - or?: ApisFilter[]; - /** Filter by the object’s `roleName` field. */ - roleName?: StringFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; -} export interface AstMigrationFilter { /** Filter by the object’s `actionId` field. */ actionId?: UUIDFilter; @@ -4589,7 +4589,7 @@ export interface CorsSettingFilter { /** Checks for all expressions in this list. */ and?: CorsSettingFilter[]; /** Filter by the object’s `api` relation. */ - api?: ApisFilter; + api?: ApiFilter; /** A related `api` exists. */ apiExists?: boolean; /** Filter by the object’s `apiId` field. */ @@ -5727,11 +5727,49 @@ export interface PartitionFilter { /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } +export interface PlatformApiFilter { + /** Checks for all expressions in this list. */ + and?: PlatformApiFilter[]; + /** Filter by the object’s `anonRole` field. */ + anonRole?: StringFilter; + /** Filter by the object’s `config` field. */ + config?: JSONFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `dbname` field. */ + dbname?: StringFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `isPublished` field. */ + isPublished?: BooleanFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Negates the expression. */ + not?: PlatformApiFilter; + /** Checks for any expressions in this list. */ + or?: PlatformApiFilter[]; + /** Filter by the object’s `platformApiSchemasByApiId` relation. */ + platformApiSchemasByApiId?: PlatformApiToManyPlatformApiSchemaFilter; + /** `platformApiSchemasByApiId` exist. */ + platformApiSchemasByApiIdExist?: boolean; + /** Filter by the object’s `platformApiSettingByApiId` relation. */ + platformApiSettingByApiId?: PlatformApiSettingFilter; + /** A related `platformApiSettingByApiId` exists. */ + platformApiSettingByApiIdExists?: boolean; + /** Filter by the object’s `platformCorsSettingByApiId` relation. */ + platformCorsSettingByApiId?: PlatformCorsSettingFilter; + /** A related `platformCorsSettingByApiId` exists. */ + platformCorsSettingByApiIdExists?: boolean; + /** Filter by the object’s `roleName` field. */ + roleName?: StringFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; +} export interface PlatformApiSchemaFilter { /** Checks for all expressions in this list. */ and?: PlatformApiSchemaFilter[]; /** Filter by the object’s `api` relation. */ - api?: PlatformApisFilter; + api?: PlatformApiFilter; /** Filter by the object’s `apiId` field. */ apiId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ @@ -5753,7 +5791,7 @@ export interface PlatformApiSettingFilter { /** Checks for all expressions in this list. */ and?: PlatformApiSettingFilter[]; /** Filter by the object’s `api` relation. */ - api?: PlatformApisFilter; + api?: PlatformApiFilter; /** Filter by the object’s `apiId` field. */ apiId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ @@ -5795,51 +5833,13 @@ export interface PlatformApiSettingFilter { /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } -export interface PlatformApisFilter { - /** Checks for all expressions in this list. */ - and?: PlatformApisFilter[]; - /** Filter by the object’s `anonRole` field. */ - anonRole?: StringFilter; - /** Filter by the object’s `config` field. */ - config?: JSONFilter; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `dbname` field. */ - dbname?: StringFilter; - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `isPublished` field. */ - isPublished?: BooleanFilter; - /** Filter by the object’s `name` field. */ - name?: StringFilter; - /** Negates the expression. */ - not?: PlatformApisFilter; - /** Checks for any expressions in this list. */ - or?: PlatformApisFilter[]; - /** Filter by the object’s `platformApiSchemasByApiId` relation. */ - platformApiSchemasByApiId?: PlatformApisToManyPlatformApiSchemaFilter; - /** `platformApiSchemasByApiId` exist. */ - platformApiSchemasByApiIdExist?: boolean; - /** Filter by the object’s `platformApiSettingByApiId` relation. */ - platformApiSettingByApiId?: PlatformApiSettingFilter; - /** A related `platformApiSettingByApiId` exists. */ - platformApiSettingByApiIdExists?: boolean; - /** Filter by the object’s `platformCorsSettingByApiId` relation. */ - platformCorsSettingByApiId?: PlatformCorsSettingFilter; - /** A related `platformCorsSettingByApiId` exists. */ - platformCorsSettingByApiIdExists?: boolean; - /** Filter by the object’s `roleName` field. */ - roleName?: StringFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; -} export interface PlatformCorsSettingFilter { /** Filter by the object’s `allowedOrigins` field. */ allowedOrigins?: StringListFilter; /** Checks for all expressions in this list. */ and?: PlatformCorsSettingFilter[]; /** Filter by the object’s `api` relation. */ - api?: PlatformApisFilter; + api?: PlatformApiFilter; /** A related `api` exists. */ apiExists?: boolean; /** Filter by the object’s `apiId` field. */ @@ -7642,6 +7642,30 @@ export interface WebauthnSettingFilter { userFieldId?: UUIDFilter; } // ============ OrderBy Types ============ +export type ApiOrderBy = + | 'ANON_ROLE_ASC' + | 'ANON_ROLE_DESC' + | 'CONFIG_ASC' + | 'CONFIG_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'DBNAME_ASC' + | 'DBNAME_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IS_PUBLISHED_ASC' + | 'IS_PUBLISHED_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ROLE_NAME_ASC' + | 'ROLE_NAME_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; export type ApiSchemaOrderBy = | 'API_ID_ASC' | 'API_ID_DESC' @@ -7700,30 +7724,6 @@ export type ApiSettingOrderBy = | 'STATEMENT_TIMEOUT_MS_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; -export type ApisOrderBy = - | 'ANON_ROLE_ASC' - | 'ANON_ROLE_DESC' - | 'CONFIG_ASC' - | 'CONFIG_DESC' - | 'CREATED_AT_ASC' - | 'CREATED_AT_DESC' - | 'DATABASE_ID_ASC' - | 'DATABASE_ID_DESC' - | 'DBNAME_ASC' - | 'DBNAME_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'IS_PUBLISHED_ASC' - | 'IS_PUBLISHED_DESC' - | 'NAME_ASC' - | 'NAME_DESC' - | 'NATURAL' - | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC' - | 'ROLE_NAME_ASC' - | 'ROLE_NAME_DESC' - | 'UPDATED_AT_ASC' - | 'UPDATED_AT_DESC'; export type AstMigrationOrderBy = | 'ACTION_ID_ASC' | 'ACTION_ID_DESC' @@ -8556,6 +8556,28 @@ export type PartitionOrderBy = | 'TABLE_ID_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; +export type PlatformApiOrderBy = + | 'ANON_ROLE_ASC' + | 'ANON_ROLE_DESC' + | 'CONFIG_ASC' + | 'CONFIG_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'DBNAME_ASC' + | 'DBNAME_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'IS_PUBLISHED_ASC' + | 'IS_PUBLISHED_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ROLE_NAME_ASC' + | 'ROLE_NAME_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; export type PlatformApiSchemaOrderBy = | 'API_ID_ASC' | 'API_ID_DESC' @@ -8610,28 +8632,6 @@ export type PlatformApiSettingOrderBy = | 'STATEMENT_TIMEOUT_MS_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; -export type PlatformApisOrderBy = - | 'ANON_ROLE_ASC' - | 'ANON_ROLE_DESC' - | 'CONFIG_ASC' - | 'CONFIG_DESC' - | 'CREATED_AT_ASC' - | 'CREATED_AT_DESC' - | 'DBNAME_ASC' - | 'DBNAME_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'IS_PUBLISHED_ASC' - | 'IS_PUBLISHED_DESC' - | 'NAME_ASC' - | 'NAME_DESC' - | 'NATURAL' - | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC' - | 'ROLE_NAME_ASC' - | 'ROLE_NAME_DESC' - | 'UPDATED_AT_ASC' - | 'UPDATED_AT_DESC'; export type PlatformCorsSettingOrderBy = | 'ALLOWED_ORIGINS_ASC' | 'ALLOWED_ORIGINS_DESC' @@ -9801,6 +9801,36 @@ export type WebauthnSettingOrderBy = | 'USER_FIELD_ID_ASC' | 'USER_FIELD_ID_DESC'; // ============ CRUD Input Types ============ +export interface CreateApiInput { + clientMutationId?: string; + api: { + anonRole?: string; + config?: Record; + databaseId: string; + dbname?: string; + isPublished?: boolean; + name: string; + roleName?: string; + }; +} +export interface ApiPatch { + anonRole?: string | null; + config?: Record | null; + databaseId?: string | null; + dbname?: string | null; + isPublished?: boolean | null; + name?: string | null; + roleName?: string | null; +} +export interface UpdateApiInput { + clientMutationId?: string; + id: string; + apiPatch: ApiPatch; +} +export interface DeleteApiInput { + clientMutationId?: string; + id: string; +} export interface CreateApiSchemaInput { clientMutationId?: string; apiSchema: { @@ -9871,36 +9901,6 @@ export interface DeleteApiSettingInput { clientMutationId?: string; id: string; } -export interface CreateApisInput { - clientMutationId?: string; - apis: { - anonRole?: string; - config?: Record; - databaseId: string; - dbname?: string; - isPublished?: boolean; - name: string; - roleName?: string; - }; -} -export interface ApisPatch { - anonRole?: string | null; - config?: Record | null; - databaseId?: string | null; - dbname?: string | null; - isPublished?: boolean | null; - name?: string | null; - roleName?: string | null; -} -export interface UpdateApisInput { - clientMutationId?: string; - id: string; - apisPatch: ApisPatch; -} -export interface DeleteApisInput { - clientMutationId?: string; - id: string; -} export interface CreateAstMigrationInput { clientMutationId?: string; astMigration: { @@ -10939,6 +10939,34 @@ export interface DeletePartitionInput { clientMutationId?: string; id: string; } +export interface CreatePlatformApiInput { + clientMutationId?: string; + platformApi: { + anonRole?: string; + config?: Record; + dbname?: string; + isPublished?: boolean; + name: string; + roleName?: string; + }; +} +export interface PlatformApiPatch { + anonRole?: string | null; + config?: Record | null; + dbname?: string | null; + isPublished?: boolean | null; + name?: string | null; + roleName?: string | null; +} +export interface UpdatePlatformApiInput { + clientMutationId?: string; + id: string; + platformApiPatch: PlatformApiPatch; +} +export interface DeletePlatformApiInput { + clientMutationId?: string; + id: string; +} export interface CreatePlatformApiSchemaInput { clientMutationId?: string; platformApiSchema: { @@ -11005,34 +11033,6 @@ export interface DeletePlatformApiSettingInput { clientMutationId?: string; id: string; } -export interface CreatePlatformApisInput { - clientMutationId?: string; - platformApis: { - anonRole?: string; - config?: Record; - dbname?: string; - isPublished?: boolean; - name: string; - roleName?: string; - }; -} -export interface PlatformApisPatch { - anonRole?: string | null; - config?: Record | null; - dbname?: string | null; - isPublished?: boolean | null; - name?: string | null; - roleName?: string | null; -} -export interface UpdatePlatformApisInput { - clientMutationId?: string; - id: string; - platformApisPatch: PlatformApisPatch; -} -export interface DeletePlatformApisInput { - clientMutationId?: string; - id: string; -} export interface CreatePlatformCorsSettingInput { clientMutationId?: string; platformCorsSetting: { @@ -12503,9 +12503,9 @@ export interface DeleteWebauthnSettingInput { } // ============ Connection Fields Map ============ export const connectionFieldsMap = { - Apis: { - apiSchemasByApiId: 'ApiSchema', - corsSettingsByApiId: 'CorsSetting', + Api: { + apiSchemas: 'ApiSchema', + corsSettings: 'CorsSetting', }, Database: { checkConstraints: 'CheckConstraint', @@ -12564,7 +12564,7 @@ export const connectionFieldsMap = { domainEvents: 'DomainEvent', domainVerifications: 'DomainVerification', }, - PlatformApis: { + PlatformApi: { platformApiSchemasByApiId: 'PlatformApiSchema', }, PlatformDomain: { @@ -12713,7 +12713,7 @@ export interface SitesProvisionStaticSiteInput { siteConfig?: Record; } /** A filter to be used against many `ApiSchema` object types. All fields are combined with a logical ‘and.’ */ -export interface ApisToManyApiSchemaFilter { +export interface ApiToManyApiSchemaFilter { /** Filters to entities where every related entity matches. */ every?: ApiSchemaFilter; /** Filters to entities where no related entity matches. */ @@ -12722,7 +12722,7 @@ export interface ApisToManyApiSchemaFilter { some?: ApiSchemaFilter; } /** A filter to be used against many `CorsSetting` object types. All fields are combined with a logical ‘and.’ */ -export interface ApisToManyCorsSettingFilter { +export interface ApiToManyCorsSettingFilter { /** Filters to entities where every related entity matches. */ every?: CorsSettingFilter; /** Filters to entities where no related entity matches. */ @@ -13161,7 +13161,7 @@ export interface ManagedDomainToManyDomainVerificationFilter { some?: DomainVerificationFilter; } /** A filter to be used against many `PlatformApiSchema` object types. All fields are combined with a logical ‘and.’ */ -export interface PlatformApisToManyPlatformApiSchemaFilter { +export interface PlatformApiToManyPlatformApiSchemaFilter { /** Filters to entities where every related entity matches. */ every?: PlatformApiSchemaFilter; /** Filters to entities where no related entity matches. */ @@ -13670,6 +13670,26 @@ export interface ViewToManyViewTableFilter { /** Filters to entities where at least one related entity matches. */ some?: ViewTableFilter; } +/** An input for mutations affecting `Api` */ +export interface ApiInput { + /** Anonymous role the API executes as */ + anonRole?: string; + /** Module-specific configuration for this API surface */ + config?: Record; + createdAt?: string; + /** Database that owns this resource (database-scoped isolation) */ + databaseId: string; + /** Database this API surface serves */ + dbname?: string; + id?: string; + /** Whether other scopes may see and route to this API surface */ + isPublished?: boolean; + /** Owner-local API surface name */ + name: string; + /** Authenticated role the API executes as */ + roleName?: string; + updatedAt?: string; +} /** An input for mutations affecting `ApiSchema` */ export interface ApiSchemaInput { /** API surface that exposes this schema */ @@ -13720,26 +13740,6 @@ export interface ApiSettingInput { statementTimeoutMs?: string; updatedAt?: string; } -/** An input for mutations affecting `Apis` */ -export interface ApisInput { - /** Anonymous role the API executes as */ - anonRole?: string; - /** Module-specific configuration for this API surface */ - config?: Record; - createdAt?: string; - /** Database that owns this resource (database-scoped isolation) */ - databaseId: string; - /** Database this API surface serves */ - dbname?: string; - id?: string; - /** Whether other scopes may see and route to this API surface */ - isPublished?: boolean; - /** Owner-local API surface name */ - name: string; - /** Authenticated role the API executes as */ - roleName?: string; - updatedAt?: string; -} /** An input for mutations affecting `CheckConstraint` */ export interface CheckConstraintInput { category?: ObjectCategory; @@ -14259,6 +14259,24 @@ export interface PartitionInput { tableId: string; updatedAt?: string; } +/** An input for mutations affecting `PlatformApi` */ +export interface PlatformApiInput { + /** Anonymous role the API executes as */ + anonRole?: string; + /** Module-specific configuration for this API surface */ + config?: Record; + createdAt?: string; + /** Database this API surface serves */ + dbname?: string; + id?: string; + /** Whether other scopes may see and route to this API surface */ + isPublished?: boolean; + /** Owner-local API surface name */ + name: string; + /** Authenticated role the API executes as */ + roleName?: string; + updatedAt?: string; +} /** An input for mutations affecting `PlatformApiSchema` */ export interface PlatformApiSchemaInput { /** API surface that exposes this schema */ @@ -14305,24 +14323,6 @@ export interface PlatformApiSettingInput { statementTimeoutMs?: string; updatedAt?: string; } -/** An input for mutations affecting `PlatformApis` */ -export interface PlatformApisInput { - /** Anonymous role the API executes as */ - anonRole?: string; - /** Module-specific configuration for this API surface */ - config?: Record; - createdAt?: string; - /** Database this API surface serves */ - dbname?: string; - id?: string; - /** Whether other scopes may see and route to this API surface */ - isPublished?: boolean; - /** Owner-local API surface name */ - name: string; - /** Authenticated role the API executes as */ - roleName?: string; - updatedAt?: string; -} /** An input for mutations affecting `PlatformCorsSetting` */ export interface PlatformCorsSettingInput { /** Array of allowed CORS origins (e.g. https://example.com) */ @@ -15166,7 +15166,7 @@ export interface ApiSchemaFilter { /** Checks for all expressions in this list. */ and?: ApiSchemaFilter[]; /** Filter by the object’s `api` relation. */ - api?: ApisFilter; + api?: ApiFilter; /** Filter by the object’s `apiId` field. */ apiId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ @@ -15193,7 +15193,7 @@ export interface CorsSettingFilter { /** Checks for all expressions in this list. */ and?: CorsSettingFilter[]; /** Filter by the object’s `api` relation. */ - api?: ApisFilter; + api?: ApiFilter; /** A related `api` exists. */ apiExists?: boolean; /** Filter by the object’s `apiId` field. */ @@ -16852,7 +16852,7 @@ export interface PlatformApiSchemaFilter { /** Checks for all expressions in this list. */ and?: PlatformApiSchemaFilter[]; /** Filter by the object’s `api` relation. */ - api?: PlatformApisFilter; + api?: PlatformApiFilter; /** Filter by the object’s `apiId` field. */ apiId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ @@ -17302,26 +17302,26 @@ export interface SiteThemeFilter { /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; } -/** A filter to be used against `Apis` object types. All fields are combined with a logical ‘and.’ */ -export interface ApisFilter { +/** A filter to be used against `Api` object types. All fields are combined with a logical ‘and.’ */ +export interface ApiFilter { /** Checks for all expressions in this list. */ - and?: ApisFilter[]; + and?: ApiFilter[]; /** Filter by the object’s `anonRole` field. */ anonRole?: StringFilter; - /** Filter by the object’s `apiSchemasByApiId` relation. */ - apiSchemasByApiId?: ApisToManyApiSchemaFilter; - /** `apiSchemasByApiId` exist. */ - apiSchemasByApiIdExist?: boolean; - /** Filter by the object’s `apiSettingByApiId` relation. */ - apiSettingByApiId?: ApiSettingFilter; - /** A related `apiSettingByApiId` exists. */ - apiSettingByApiIdExists?: boolean; + /** Filter by the object’s `apiSchemas` relation. */ + apiSchemas?: ApiToManyApiSchemaFilter; + /** `apiSchemas` exist. */ + apiSchemasExist?: boolean; + /** Filter by the object’s `apiSetting` relation. */ + apiSetting?: ApiSettingFilter; + /** A related `apiSetting` exists. */ + apiSettingExists?: boolean; /** Filter by the object’s `config` field. */ config?: JSONFilter; - /** Filter by the object’s `corsSettingsByApiId` relation. */ - corsSettingsByApiId?: ApisToManyCorsSettingFilter; - /** `corsSettingsByApiId` exist. */ - corsSettingsByApiIdExist?: boolean; + /** Filter by the object’s `corsSettings` relation. */ + corsSettings?: ApiToManyCorsSettingFilter; + /** `corsSettings` exist. */ + corsSettingsExist?: boolean; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; /** Filter by the object’s `databaseId` field. */ @@ -17335,9 +17335,9 @@ export interface ApisFilter { /** Filter by the object’s `name` field. */ name?: StringFilter; /** Negates the expression. */ - not?: ApisFilter; + not?: ApiFilter; /** Checks for any expressions in this list. */ - or?: ApisFilter[]; + or?: ApiFilter[]; /** Filter by the object’s `roleName` field. */ roleName?: StringFilter; /** Filter by the object’s `updatedAt` field. */ @@ -17917,10 +17917,10 @@ export interface ManagedDomainFilter { /** Filter by the object’s `verifiedAt` field. */ verifiedAt?: DatetimeFilter; } -/** A filter to be used against `PlatformApis` object types. All fields are combined with a logical ‘and.’ */ -export interface PlatformApisFilter { +/** A filter to be used against `PlatformApi` object types. All fields are combined with a logical ‘and.’ */ +export interface PlatformApiFilter { /** Checks for all expressions in this list. */ - and?: PlatformApisFilter[]; + and?: PlatformApiFilter[]; /** Filter by the object’s `anonRole` field. */ anonRole?: StringFilter; /** Filter by the object’s `config` field. */ @@ -17936,11 +17936,11 @@ export interface PlatformApisFilter { /** Filter by the object’s `name` field. */ name?: StringFilter; /** Negates the expression. */ - not?: PlatformApisFilter; + not?: PlatformApiFilter; /** Checks for any expressions in this list. */ - or?: PlatformApisFilter[]; + or?: PlatformApiFilter[]; /** Filter by the object’s `platformApiSchemasByApiId` relation. */ - platformApiSchemasByApiId?: PlatformApisToManyPlatformApiSchemaFilter; + platformApiSchemasByApiId?: PlatformApiToManyPlatformApiSchemaFilter; /** `platformApiSchemasByApiId` exist. */ platformApiSchemasByApiIdExist?: boolean; /** Filter by the object’s `platformApiSettingByApiId` relation. */ @@ -18179,7 +18179,7 @@ export interface ApiSettingFilter { /** Checks for all expressions in this list. */ and?: ApiSettingFilter[]; /** Filter by the object’s `api` relation. */ - api?: ApisFilter; + api?: ApiFilter; /** Filter by the object’s `apiId` field. */ apiId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ @@ -18228,7 +18228,7 @@ export interface PlatformApiSettingFilter { /** Checks for all expressions in this list. */ and?: PlatformApiSettingFilter[]; /** Filter by the object’s `api` relation. */ - api?: PlatformApisFilter; + api?: PlatformApiFilter; /** Filter by the object’s `apiId` field. */ apiId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ @@ -18277,7 +18277,7 @@ export interface PlatformCorsSettingFilter { /** Checks for all expressions in this list. */ and?: PlatformCorsSettingFilter[]; /** Filter by the object’s `api` relation. */ - api?: PlatformApisFilter; + api?: PlatformApiFilter; /** A related `api` exists. */ apiExists?: boolean; /** Filter by the object’s `apiId` field. */ @@ -18627,6 +18627,51 @@ export type SitesProvisionStaticSitePayloadSelect = { select: PlatformRouteSelect; }; }; +export interface CreateApiPayload { + /** The `Api` that was created by this mutation. */ + api?: Api | null; + apiEdge?: ApiEdge | null; + clientMutationId?: string | null; +} +export type CreateApiPayloadSelect = { + api?: { + select: ApiSelect; + }; + apiEdge?: { + select: ApiEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface UpdateApiPayload { + /** The `Api` that was updated by this mutation. */ + api?: Api | null; + apiEdge?: ApiEdge | null; + clientMutationId?: string | null; +} +export type UpdateApiPayloadSelect = { + api?: { + select: ApiSelect; + }; + apiEdge?: { + select: ApiEdgeSelect; + }; + clientMutationId?: boolean; +}; +export interface DeleteApiPayload { + /** The `Api` that was deleted by this mutation. */ + api?: Api | null; + apiEdge?: ApiEdge | null; + clientMutationId?: string | null; +} +export type DeleteApiPayloadSelect = { + api?: { + select: ApiSelect; + }; + apiEdge?: { + select: ApiEdgeSelect; + }; + clientMutationId?: boolean; +}; export interface CreateApiSchemaPayload { /** The `ApiSchema` that was created by this mutation. */ apiSchema?: ApiSchema | null; @@ -18717,51 +18762,6 @@ export type DeleteApiSettingPayloadSelect = { }; clientMutationId?: boolean; }; -export interface CreateApisPayload { - /** The `Apis` that was created by this mutation. */ - apis?: Apis | null; - apisEdge?: ApisEdge | null; - clientMutationId?: string | null; -} -export type CreateApisPayloadSelect = { - apis?: { - select: ApisSelect; - }; - apisEdge?: { - select: ApisEdgeSelect; - }; - clientMutationId?: boolean; -}; -export interface UpdateApisPayload { - /** The `Apis` that was updated by this mutation. */ - apis?: Apis | null; - apisEdge?: ApisEdge | null; - clientMutationId?: string | null; -} -export type UpdateApisPayloadSelect = { - apis?: { - select: ApisSelect; - }; - apisEdge?: { - select: ApisEdgeSelect; - }; - clientMutationId?: boolean; -}; -export interface DeleteApisPayload { - /** The `Apis` that was deleted by this mutation. */ - apis?: Apis | null; - apisEdge?: ApisEdge | null; - clientMutationId?: string | null; -} -export type DeleteApisPayloadSelect = { - apis?: { - select: ApisSelect; - }; - apisEdge?: { - select: ApisEdgeSelect; - }; - clientMutationId?: boolean; -}; export interface CreateCheckConstraintPayload { /** The `CheckConstraint` that was created by this mutation. */ checkConstraint?: CheckConstraint | null; @@ -20022,6 +20022,51 @@ export type DeletePartitionPayloadSelect = { select: PartitionEdgeSelect; }; }; +export interface CreatePlatformApiPayload { + clientMutationId?: string | null; + /** The `PlatformApi` that was created by this mutation. */ + platformApi?: PlatformApi | null; + platformApiEdge?: PlatformApiEdge | null; +} +export type CreatePlatformApiPayloadSelect = { + clientMutationId?: boolean; + platformApi?: { + select: PlatformApiSelect; + }; + platformApiEdge?: { + select: PlatformApiEdgeSelect; + }; +}; +export interface UpdatePlatformApiPayload { + clientMutationId?: string | null; + /** The `PlatformApi` that was updated by this mutation. */ + platformApi?: PlatformApi | null; + platformApiEdge?: PlatformApiEdge | null; +} +export type UpdatePlatformApiPayloadSelect = { + clientMutationId?: boolean; + platformApi?: { + select: PlatformApiSelect; + }; + platformApiEdge?: { + select: PlatformApiEdgeSelect; + }; +}; +export interface DeletePlatformApiPayload { + clientMutationId?: string | null; + /** The `PlatformApi` that was deleted by this mutation. */ + platformApi?: PlatformApi | null; + platformApiEdge?: PlatformApiEdge | null; +} +export type DeletePlatformApiPayloadSelect = { + clientMutationId?: boolean; + platformApi?: { + select: PlatformApiSelect; + }; + platformApiEdge?: { + select: PlatformApiEdgeSelect; + }; +}; export interface CreatePlatformApiSchemaPayload { clientMutationId?: string | null; /** The `PlatformApiSchema` that was created by this mutation. */ @@ -20112,51 +20157,6 @@ export type DeletePlatformApiSettingPayloadSelect = { select: PlatformApiSettingEdgeSelect; }; }; -export interface CreatePlatformApisPayload { - clientMutationId?: string | null; - /** The `PlatformApis` that was created by this mutation. */ - platformApis?: PlatformApis | null; - platformApisEdge?: PlatformApisEdge | null; -} -export type CreatePlatformApisPayloadSelect = { - clientMutationId?: boolean; - platformApis?: { - select: PlatformApisSelect; - }; - platformApisEdge?: { - select: PlatformApisEdgeSelect; - }; -}; -export interface UpdatePlatformApisPayload { - clientMutationId?: string | null; - /** The `PlatformApis` that was updated by this mutation. */ - platformApis?: PlatformApis | null; - platformApisEdge?: PlatformApisEdge | null; -} -export type UpdatePlatformApisPayloadSelect = { - clientMutationId?: boolean; - platformApis?: { - select: PlatformApisSelect; - }; - platformApisEdge?: { - select: PlatformApisEdgeSelect; - }; -}; -export interface DeletePlatformApisPayload { - clientMutationId?: string | null; - /** The `PlatformApis` that was deleted by this mutation. */ - platformApis?: PlatformApis | null; - platformApisEdge?: PlatformApisEdge | null; -} -export type DeletePlatformApisPayloadSelect = { - clientMutationId?: boolean; - platformApis?: { - select: PlatformApisSelect; - }; - platformApisEdge?: { - select: PlatformApisEdgeSelect; - }; -}; export interface CreatePlatformCorsSettingPayload { clientMutationId?: string | null; /** The `PlatformCorsSetting` that was created by this mutation. */ @@ -22262,6 +22262,18 @@ export type DatabaseProvisionModuleSelect = { subdomain?: boolean; updatedAt?: boolean; }; +/** A `Api` edge in the connection. */ +export interface ApiEdge { + cursor?: string | null; + /** The `Api` at the end of the edge. */ + node?: Api | null; +} +export type ApiEdgeSelect = { + cursor?: boolean; + node?: { + select: ApiSelect; + }; +}; /** A `ApiSchema` edge in the connection. */ export interface ApiSchemaEdge { cursor?: string | null; @@ -22286,18 +22298,6 @@ export type ApiSettingEdgeSelect = { select: ApiSettingSelect; }; }; -/** A `Apis` edge in the connection. */ -export interface ApisEdge { - cursor?: string | null; - /** The `Apis` at the end of the edge. */ - node?: Apis | null; -} -export type ApisEdgeSelect = { - cursor?: boolean; - node?: { - select: ApisSelect; - }; -}; /** A `CheckConstraint` edge in the connection. */ export interface CheckConstraintEdge { cursor?: string | null; @@ -22622,6 +22622,18 @@ export type PartitionEdgeSelect = { select: PartitionSelect; }; }; +/** A `PlatformApi` edge in the connection. */ +export interface PlatformApiEdge { + cursor?: string | null; + /** The `PlatformApi` at the end of the edge. */ + node?: PlatformApi | null; +} +export type PlatformApiEdgeSelect = { + cursor?: boolean; + node?: { + select: PlatformApiSelect; + }; +}; /** A `PlatformApiSchema` edge in the connection. */ export interface PlatformApiSchemaEdge { cursor?: string | null; @@ -22646,18 +22658,6 @@ export type PlatformApiSettingEdgeSelect = { select: PlatformApiSettingSelect; }; }; -/** A `PlatformApis` edge in the connection. */ -export interface PlatformApisEdge { - cursor?: string | null; - /** The `PlatformApis` at the end of the edge. */ - node?: PlatformApis | null; -} -export type PlatformApisEdgeSelect = { - cursor?: boolean; - node?: { - select: PlatformApisSelect; - }; -}; /** A `PlatformCorsSetting` edge in the connection. */ export interface PlatformCorsSettingEdge { cursor?: string | null; diff --git a/sdk/constructive-cli/src/api/orm/models/apis.ts b/sdk/constructive-sdk/src/api/orm/models/api.ts similarity index 60% rename from sdk/constructive-cli/src/api/orm/models/apis.ts rename to sdk/constructive-sdk/src/api/orm/models/api.ts index a62444db0f..4d60695731 100644 --- a/sdk/constructive-cli/src/api/orm/models/apis.ts +++ b/sdk/constructive-sdk/src/api/orm/models/api.ts @@ -1,5 +1,5 @@ /** - * Apis model for ORM client + * Api model for ORM client * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -24,28 +24,28 @@ import type { StrictSelect, } from '../select-types'; import type { - Apis, - ApisWithRelations, - ApisSelect, - ApisFilter, - ApisOrderBy, - CreateApisInput, - UpdateApisInput, - ApisPatch, + Api, + ApiWithRelations, + ApiSelect, + ApiFilter, + ApiOrderBy, + CreateApiInput, + UpdateApiInput, + ApiPatch, } from '../input-types'; import { connectionFieldsMap } from '../input-types'; -export class ApisModel { +export class ApiModel { constructor(private client: OrmClient) {} - findMany( - args: FindManyArgs & { + findMany( + args: FindManyArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - apises: ConnectionResult>; + apis: ConnectionResult>; }> { const { document, variables } = buildFindManyDocument( - 'Apis', - 'apises', + 'Api', + 'apis', args.select, { where: args?.where, @@ -56,65 +56,65 @@ export class ApisModel { before: args?.before, offset: args?.offset, }, - 'ApisFilter', - 'ApisOrderBy', + 'ApiFilter', + 'ApiOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'Apis', - fieldName: 'apises', + operationName: 'Api', + fieldName: 'apis', document, variables, }); } - findFirst( - args: FindFirstArgs & { + findFirst( + args: FindFirstArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - apis: InferSelectResult | null; + api: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( - 'Apis', - 'apises', + 'Api', + 'apis', args.select, { where: args?.where, orderBy: args?.orderBy as string[] | undefined, }, - 'ApisFilter', - 'ApisOrderBy', + 'ApiFilter', + 'ApiOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'Apis', - fieldName: 'apis', + operationName: 'Api', + fieldName: 'api', document, variables, transform: (data: { - apises?: { - nodes?: InferSelectResult[]; + apis?: { + nodes?: InferSelectResult[]; }; }) => ({ - apis: data.apises?.nodes?.[0] ?? null, + api: data.apis?.nodes?.[0] ?? null, }), }); } - findOne( + findOne( args: { id: string; select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - apis: InferSelectResult | null; + api: InferSelectResult | null; }> { const { document, variables } = buildFindManyDocument( - 'Apis', - 'apises', + 'Api', + 'apis', args.select, { where: { @@ -124,91 +124,91 @@ export class ApisModel { }, first: 1, }, - 'ApisFilter', - 'ApisOrderBy', + 'ApiFilter', + 'ApiOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'Apis', - fieldName: 'apis', + operationName: 'Api', + fieldName: 'api', document, variables, transform: (data: { - apises?: { - nodes?: InferSelectResult[]; + apis?: { + nodes?: InferSelectResult[]; }; }) => ({ - apis: data.apises?.nodes?.[0] ?? null, + api: data.apis?.nodes?.[0] ?? null, }), }); } - create( - args: CreateArgs & { + create( + args: CreateArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - createApis: { - apis: InferSelectResult; + createApi: { + api: InferSelectResult; }; }> { const { document, variables } = buildCreateDocument( - 'Apis', - 'createApis', - 'apis', + 'Api', + 'createApi', + 'api', args.select, args.data, - 'CreateApisInput', + 'CreateApiInput', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'Apis', - fieldName: 'createApis', + operationName: 'Api', + fieldName: 'createApi', document, variables, }); } - update( + update( args: UpdateArgs< S, { id: string; }, - ApisPatch + ApiPatch > & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - updateApis: { - apis: InferSelectResult; + updateApi: { + api: InferSelectResult; }; }> { const { document, variables } = buildUpdateByPkDocument( - 'Apis', - 'updateApis', - 'apis', + 'Api', + 'updateApi', + 'api', args.select, args.where.id, args.data, - 'UpdateApisInput', + 'UpdateApiInput', 'id', - 'apisPatch', + 'apiPatch', connectionFieldsMap, undefined ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'Apis', - fieldName: 'updateApis', + operationName: 'Api', + fieldName: 'updateApi', document, variables, }); } - delete( + delete( args: DeleteArgs< { id: string; @@ -216,28 +216,28 @@ export class ApisModel { S > & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - deleteApis: { - apis: InferSelectResult; + deleteApi: { + api: InferSelectResult; }; }> { const { document, variables } = buildDeleteByPkDocument( - 'Apis', - 'deleteApis', - 'apis', + 'Api', + 'deleteApi', + 'api', { id: args.where.id, }, - 'DeleteApisInput', + 'DeleteApiInput', args.select, connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'Apis', - fieldName: 'deleteApis', + operationName: 'Api', + fieldName: 'deleteApi', document, variables, }); diff --git a/sdk/constructive-sdk/src/api/orm/models/index.ts b/sdk/constructive-sdk/src/api/orm/models/index.ts index a947c4f65f..3a52daef02 100644 --- a/sdk/constructive-sdk/src/api/orm/models/index.ts +++ b/sdk/constructive-sdk/src/api/orm/models/index.ts @@ -3,9 +3,9 @@ * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ +export { ApiModel } from './api'; export { ApiSchemaModel } from './apiSchema'; export { ApiSettingModel } from './apiSetting'; -export { ApisModel } from './apis'; export { AstMigrationModel } from './astMigration'; export { CheckConstraintModel } from './checkConstraint'; export { CompositeTypeModel } from './compositeType'; @@ -35,9 +35,9 @@ export { ManagedDomainModel } from './managedDomain'; export { NodeTypeRegistryModel } from './nodeTypeRegistry'; export { PageModel } from './page'; export { PartitionModel } from './partition'; +export { PlatformApiModel } from './platformApi'; export { PlatformApiSchemaModel } from './platformApiSchema'; export { PlatformApiSettingModel } from './platformApiSetting'; -export { PlatformApisModel } from './platformApis'; export { PlatformCorsSettingModel } from './platformCorsSetting'; export { PlatformDomainModel } from './platformDomain'; export { PlatformDomainEventModel } from './platformDomainEvent'; diff --git a/sdk/constructive-cli/src/api/orm/models/platformApis.ts b/sdk/constructive-sdk/src/api/orm/models/platformApi.ts similarity index 54% rename from sdk/constructive-cli/src/api/orm/models/platformApis.ts rename to sdk/constructive-sdk/src/api/orm/models/platformApi.ts index 43cd25c9d2..3eee59e6c8 100644 --- a/sdk/constructive-cli/src/api/orm/models/platformApis.ts +++ b/sdk/constructive-sdk/src/api/orm/models/platformApi.ts @@ -1,5 +1,5 @@ /** - * PlatformApis model for ORM client + * PlatformApi model for ORM client * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -24,28 +24,28 @@ import type { StrictSelect, } from '../select-types'; import type { - PlatformApis, - PlatformApisWithRelations, - PlatformApisSelect, - PlatformApisFilter, - PlatformApisOrderBy, - CreatePlatformApisInput, - UpdatePlatformApisInput, - PlatformApisPatch, + PlatformApi, + PlatformApiWithRelations, + PlatformApiSelect, + PlatformApiFilter, + PlatformApiOrderBy, + CreatePlatformApiInput, + UpdatePlatformApiInput, + PlatformApiPatch, } from '../input-types'; import { connectionFieldsMap } from '../input-types'; -export class PlatformApisModel { +export class PlatformApiModel { constructor(private client: OrmClient) {} - findMany( - args: FindManyArgs & { + findMany( + args: FindManyArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - platformApises: ConnectionResult>; + platformApis: ConnectionResult>; }> { const { document, variables } = buildFindManyDocument( - 'PlatformApis', - 'platformApises', + 'PlatformApi', + 'platformApis', args.select, { where: args?.where, @@ -56,65 +56,65 @@ export class PlatformApisModel { before: args?.before, offset: args?.offset, }, - 'PlatformApisFilter', - 'PlatformApisOrderBy', + 'PlatformApiFilter', + 'PlatformApiOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'PlatformApis', - fieldName: 'platformApises', + operationName: 'PlatformApi', + fieldName: 'platformApis', document, variables, }); } - findFirst( - args: FindFirstArgs & { + findFirst( + args: FindFirstArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - platformApis: InferSelectResult | null; + platformApi: InferSelectResult | null; }> { const { document, variables } = buildFindFirstDocument( - 'PlatformApis', - 'platformApises', + 'PlatformApi', + 'platformApis', args.select, { where: args?.where, orderBy: args?.orderBy as string[] | undefined, }, - 'PlatformApisFilter', - 'PlatformApisOrderBy', + 'PlatformApiFilter', + 'PlatformApiOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'PlatformApis', - fieldName: 'platformApis', + operationName: 'PlatformApi', + fieldName: 'platformApi', document, variables, transform: (data: { - platformApises?: { - nodes?: InferSelectResult[]; + platformApis?: { + nodes?: InferSelectResult[]; }; }) => ({ - platformApis: data.platformApises?.nodes?.[0] ?? null, + platformApi: data.platformApis?.nodes?.[0] ?? null, }), }); } - findOne( + findOne( args: { id: string; select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - platformApis: InferSelectResult | null; + platformApi: InferSelectResult | null; }> { const { document, variables } = buildFindManyDocument( - 'PlatformApis', - 'platformApises', + 'PlatformApi', + 'platformApis', args.select, { where: { @@ -124,91 +124,91 @@ export class PlatformApisModel { }, first: 1, }, - 'PlatformApisFilter', - 'PlatformApisOrderBy', + 'PlatformApiFilter', + 'PlatformApiOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'PlatformApis', - fieldName: 'platformApis', + operationName: 'PlatformApi', + fieldName: 'platformApi', document, variables, transform: (data: { - platformApises?: { - nodes?: InferSelectResult[]; + platformApis?: { + nodes?: InferSelectResult[]; }; }) => ({ - platformApis: data.platformApises?.nodes?.[0] ?? null, + platformApi: data.platformApis?.nodes?.[0] ?? null, }), }); } - create( - args: CreateArgs & { + create( + args: CreateArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - createPlatformApis: { - platformApis: InferSelectResult; + createPlatformApi: { + platformApi: InferSelectResult; }; }> { const { document, variables } = buildCreateDocument( - 'PlatformApis', - 'createPlatformApis', - 'platformApis', + 'PlatformApi', + 'createPlatformApi', + 'platformApi', args.select, args.data, - 'CreatePlatformApisInput', + 'CreatePlatformApiInput', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'PlatformApis', - fieldName: 'createPlatformApis', + operationName: 'PlatformApi', + fieldName: 'createPlatformApi', document, variables, }); } - update( + update( args: UpdateArgs< S, { id: string; }, - PlatformApisPatch + PlatformApiPatch > & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - updatePlatformApis: { - platformApis: InferSelectResult; + updatePlatformApi: { + platformApi: InferSelectResult; }; }> { const { document, variables } = buildUpdateByPkDocument( - 'PlatformApis', - 'updatePlatformApis', - 'platformApis', + 'PlatformApi', + 'updatePlatformApi', + 'platformApi', args.select, args.where.id, args.data, - 'UpdatePlatformApisInput', + 'UpdatePlatformApiInput', 'id', - 'platformApisPatch', + 'platformApiPatch', connectionFieldsMap, undefined ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'PlatformApis', - fieldName: 'updatePlatformApis', + operationName: 'PlatformApi', + fieldName: 'updatePlatformApi', document, variables, }); } - delete( + delete( args: DeleteArgs< { id: string; @@ -216,28 +216,28 @@ export class PlatformApisModel { S > & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - deletePlatformApis: { - platformApis: InferSelectResult; + deletePlatformApi: { + platformApi: InferSelectResult; }; }> { const { document, variables } = buildDeleteByPkDocument( - 'PlatformApis', - 'deletePlatformApis', - 'platformApis', + 'PlatformApi', + 'deletePlatformApi', + 'platformApi', { id: args.where.id, }, - 'DeletePlatformApisInput', + 'DeletePlatformApiInput', args.select, connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'PlatformApis', - fieldName: 'deletePlatformApis', + operationName: 'PlatformApi', + fieldName: 'deletePlatformApi', document, variables, }); diff --git a/sdk/constructive-sdk/src/compute/README.md b/sdk/constructive-sdk/src/compute/README.md index 7842a63936..c6c00e46b3 100644 --- a/sdk/constructive-sdk/src/compute/README.md +++ b/sdk/constructive-sdk/src/compute/README.md @@ -10,7 +10,7 @@ - **Tables:** 69 - **Custom queries:** 1 -- **Custom mutations:** 28 +- **Custom mutations:** 37 **Generators:** ORM diff --git a/sdk/constructive-sdk/src/compute/orm/README.md b/sdk/constructive-sdk/src/compute/orm/README.md index d1a03c4e98..78b236e1d8 100644 --- a/sdk/constructive-sdk/src/compute/orm/README.md +++ b/sdk/constructive-sdk/src/compute/orm/README.md @@ -245,6 +245,7 @@ CRUD operations for FunctionDefinition records. | `requiredBuckets` | String | Yes | | `requiredConfigs` | ResourceRequirement | Yes | | `requiredModels` | String | Yes | +| `requiredModules` | String | Yes | | `requiredSecrets` | ResourceRequirement | Yes | | `resources` | JSON | Yes | | `runtime` | String | Yes | @@ -261,13 +262,13 @@ CRUD operations for FunctionDefinition records. ```typescript // List all functionDefinition records -const items = await db.functionDefinition.findMany({ select: { accessChannels: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, databaseId: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }).execute(); +const items = await db.functionDefinition.findMany({ select: { accessChannels: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, databaseId: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredModules: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }).execute(); // Get one by id -const item = await db.functionDefinition.findOne({ id: '', select: { accessChannels: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, databaseId: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }).execute(); +const item = await db.functionDefinition.findOne({ id: '', select: { accessChannels: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, databaseId: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredModules: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }).execute(); // Create -const created = await db.functionDefinition.create({ data: { accessChannels: '', category: '', concurrency: '', cpuLimitMillicores: '', cpuRequestMillicores: '', databaseId: '', description: '', fnCategory: '', functionColumns: '', graphId: '', icon: '', image: '', inputs: '', integrations: '', isPublished: '', maxAttempts: '', memoryLimitBytes: '', memoryRequestBytes: '', moduleTable: '', name: '', outputs: '', payloadArgs: '', priority: '', props: '', protected: '', publishedAt: '', queueName: '', requiredBuckets: '', requiredConfigs: '', requiredModels: '', requiredSecrets: '', resources: '', runtime: '', scaleMax: '', scaleMin: '', targetFunction: '', targetSchema: '', taskIdentifier: '', timeoutSeconds: '', volatile: '' }, select: { id: true } }).execute(); +const created = await db.functionDefinition.create({ data: { accessChannels: '', category: '', concurrency: '', cpuLimitMillicores: '', cpuRequestMillicores: '', databaseId: '', description: '', fnCategory: '', functionColumns: '', graphId: '', icon: '', image: '', inputs: '', integrations: '', isPublished: '', maxAttempts: '', memoryLimitBytes: '', memoryRequestBytes: '', moduleTable: '', name: '', outputs: '', payloadArgs: '', priority: '', props: '', protected: '', publishedAt: '', queueName: '', requiredBuckets: '', requiredConfigs: '', requiredModels: '', requiredModules: '', requiredSecrets: '', resources: '', runtime: '', scaleMax: '', scaleMin: '', targetFunction: '', targetSchema: '', taskIdentifier: '', timeoutSeconds: '', volatile: '' }, select: { id: true } }).execute(); // Update const updated = await db.functionDefinition.update({ where: { id: '' }, data: { accessChannels: '' }, select: { id: true } }).execute(); @@ -297,6 +298,7 @@ CRUD operations for FunctionDeployment records. | `lastError` | String | Yes | | `lastErrorAt` | Datetime | Yes | | `namespaceId` | UUID | Yes | +| `realm` | String | Yes | | `resources` | JSON | Yes | | `revision` | Int | Yes | | `scaleMax` | Int | Yes | @@ -311,13 +313,13 @@ CRUD operations for FunctionDeployment records. ```typescript // List all functionDeployment records -const items = await db.functionDeployment.findMany({ select: { annotations: true, concurrency: true, createdAt: true, databaseId: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }).execute(); +const items = await db.functionDeployment.findMany({ select: { annotations: true, concurrency: true, createdAt: true, databaseId: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, realm: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.functionDeployment.findOne({ id: '', select: { annotations: true, concurrency: true, createdAt: true, databaseId: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }).execute(); +const item = await db.functionDeployment.findOne({ id: '', select: { annotations: true, concurrency: true, createdAt: true, databaseId: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, realm: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }).execute(); // Create -const created = await db.functionDeployment.create({ data: { annotations: '', concurrency: '', databaseId: '', errorCount: '', handlerName: '', image: '', imageVersion: '', labels: '', lastError: '', lastErrorAt: '', namespaceId: '', resources: '', revision: '', scaleMax: '', scaleMin: '', serviceName: '', serviceUrl: '', status: '', timeoutSeconds: '' }, select: { id: true } }).execute(); +const created = await db.functionDeployment.create({ data: { annotations: '', concurrency: '', databaseId: '', errorCount: '', handlerName: '', image: '', imageVersion: '', labels: '', lastError: '', lastErrorAt: '', namespaceId: '', realm: '', resources: '', revision: '', scaleMax: '', scaleMin: '', serviceName: '', serviceUrl: '', status: '', timeoutSeconds: '' }, select: { id: true } }).execute(); // Update const updated = await db.functionDeployment.update({ where: { id: '' }, data: { annotations: '' }, select: { id: true } }).execute(); @@ -1227,6 +1229,7 @@ CRUD operations for PlatformFunctionDefinition records. | `requiredBuckets` | String | Yes | | `requiredConfigs` | ResourceRequirement | Yes | | `requiredModels` | String | Yes | +| `requiredModules` | String | Yes | | `requiredSecrets` | ResourceRequirement | Yes | | `resources` | JSON | Yes | | `runtime` | String | Yes | @@ -1244,13 +1247,13 @@ CRUD operations for PlatformFunctionDefinition records. ```typescript // List all platformFunctionDefinition records -const items = await db.platformFunctionDefinition.findMany({ select: { accessChannels: true, billable: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, system: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }).execute(); +const items = await db.platformFunctionDefinition.findMany({ select: { accessChannels: true, billable: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredModules: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, system: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }).execute(); // Get one by id -const item = await db.platformFunctionDefinition.findOne({ id: '', select: { accessChannels: true, billable: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, system: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }).execute(); +const item = await db.platformFunctionDefinition.findOne({ id: '', select: { accessChannels: true, billable: true, category: true, concurrency: true, cpuLimitMillicores: true, cpuRequestMillicores: true, createdAt: true, description: true, fnCategory: true, functionColumns: true, graphId: true, icon: true, id: true, image: true, inputs: true, integrations: true, isPublished: true, maxAttempts: true, memoryLimitBytes: true, memoryRequestBytes: true, moduleTable: true, name: true, outputs: true, payloadArgs: true, priority: true, props: true, protected: true, publishedAt: true, queueName: true, requiredBuckets: true, requiredConfigs: true, requiredModels: true, requiredModules: true, requiredSecrets: true, resources: true, runtime: true, scaleMax: true, scaleMin: true, system: true, targetFunction: true, targetSchema: true, taskIdentifier: true, timeoutSeconds: true, updatedAt: true, volatile: true } }).execute(); // Create -const created = await db.platformFunctionDefinition.create({ data: { accessChannels: '', billable: '', category: '', concurrency: '', cpuLimitMillicores: '', cpuRequestMillicores: '', description: '', fnCategory: '', functionColumns: '', graphId: '', icon: '', image: '', inputs: '', integrations: '', isPublished: '', maxAttempts: '', memoryLimitBytes: '', memoryRequestBytes: '', moduleTable: '', name: '', outputs: '', payloadArgs: '', priority: '', props: '', protected: '', publishedAt: '', queueName: '', requiredBuckets: '', requiredConfigs: '', requiredModels: '', requiredSecrets: '', resources: '', runtime: '', scaleMax: '', scaleMin: '', system: '', targetFunction: '', targetSchema: '', taskIdentifier: '', timeoutSeconds: '', volatile: '' }, select: { id: true } }).execute(); +const created = await db.platformFunctionDefinition.create({ data: { accessChannels: '', billable: '', category: '', concurrency: '', cpuLimitMillicores: '', cpuRequestMillicores: '', description: '', fnCategory: '', functionColumns: '', graphId: '', icon: '', image: '', inputs: '', integrations: '', isPublished: '', maxAttempts: '', memoryLimitBytes: '', memoryRequestBytes: '', moduleTable: '', name: '', outputs: '', payloadArgs: '', priority: '', props: '', protected: '', publishedAt: '', queueName: '', requiredBuckets: '', requiredConfigs: '', requiredModels: '', requiredModules: '', requiredSecrets: '', resources: '', runtime: '', scaleMax: '', scaleMin: '', system: '', targetFunction: '', targetSchema: '', taskIdentifier: '', timeoutSeconds: '', volatile: '' }, select: { id: true } }).execute(); // Update const updated = await db.platformFunctionDefinition.update({ where: { id: '' }, data: { accessChannels: '' }, select: { id: true } }).execute(); @@ -1279,6 +1282,7 @@ CRUD operations for PlatformFunctionDeployment records. | `lastError` | String | Yes | | `lastErrorAt` | Datetime | Yes | | `namespaceId` | UUID | Yes | +| `realm` | String | Yes | | `resources` | JSON | Yes | | `revision` | Int | Yes | | `scaleMax` | Int | Yes | @@ -1293,13 +1297,13 @@ CRUD operations for PlatformFunctionDeployment records. ```typescript // List all platformFunctionDeployment records -const items = await db.platformFunctionDeployment.findMany({ select: { annotations: true, concurrency: true, createdAt: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }).execute(); +const items = await db.platformFunctionDeployment.findMany({ select: { annotations: true, concurrency: true, createdAt: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, realm: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }).execute(); // Get one by id -const item = await db.platformFunctionDeployment.findOne({ id: '', select: { annotations: true, concurrency: true, createdAt: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }).execute(); +const item = await db.platformFunctionDeployment.findOne({ id: '', select: { annotations: true, concurrency: true, createdAt: true, errorCount: true, handlerName: true, id: true, image: true, imageVersion: true, labels: true, lastError: true, lastErrorAt: true, namespaceId: true, realm: true, resources: true, revision: true, scaleMax: true, scaleMin: true, serviceName: true, serviceUrl: true, status: true, timeoutSeconds: true, updatedAt: true } }).execute(); // Create -const created = await db.platformFunctionDeployment.create({ data: { annotations: '', concurrency: '', errorCount: '', handlerName: '', image: '', imageVersion: '', labels: '', lastError: '', lastErrorAt: '', namespaceId: '', resources: '', revision: '', scaleMax: '', scaleMin: '', serviceName: '', serviceUrl: '', status: '', timeoutSeconds: '' }, select: { id: true } }).execute(); +const created = await db.platformFunctionDeployment.create({ data: { annotations: '', concurrency: '', errorCount: '', handlerName: '', image: '', imageVersion: '', labels: '', lastError: '', lastErrorAt: '', namespaceId: '', realm: '', resources: '', revision: '', scaleMax: '', scaleMin: '', serviceName: '', serviceUrl: '', status: '', timeoutSeconds: '' }, select: { id: true } }).execute(); // Update const updated = await db.platformFunctionDeployment.update({ where: { id: '' }, data: { annotations: '' }, select: { id: true } }).execute(); @@ -3053,6 +3057,36 @@ infraInsertNodeAtPath const result = await db.mutation.infraInsertNodeAtPath({ input: '' }).execute(); ``` +### `db.mutation.infraInsertNodesAtPaths` + +infraInsertNodesAtPaths + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | InfraInsertNodesAtPathsInput (required) | + +```typescript +const result = await db.mutation.infraInsertNodesAtPaths({ input: '' }).execute(); +``` + +### `db.mutation.infraSetAndCommit` + +infraSetAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | InfraSetAndCommitInput (required) | + +```typescript +const result = await db.mutation.infraSetAndCommit({ input: '' }).execute(); +``` + ### `db.mutation.infraSetDataAtPath` infraSetDataAtPath @@ -3068,6 +3102,21 @@ infraSetDataAtPath const result = await db.mutation.infraSetDataAtPath({ input: { data: '', path: '', root: '', sId: '' } }).execute(); ``` +### `db.mutation.infraSetManyAndCommit` + +infraSetManyAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | InfraSetManyAndCommitInput (required) | + +```typescript +const result = await db.mutation.infraSetManyAndCommit({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }).execute(); +``` + ### `db.mutation.initEmptyRepo` initEmptyRepo @@ -3098,6 +3147,21 @@ insertNodeAtPath const result = await db.mutation.insertNodeAtPath({ input: '' }).execute(); ``` +### `db.mutation.insertNodesAtPaths` + +insertNodesAtPaths + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | InsertNodesAtPathsInput (required) | + +```typescript +const result = await db.mutation.insertNodesAtPaths({ input: '' }).execute(); +``` + ### `db.mutation.platformInfraInitEmptyRepo` platformInfraInitEmptyRepo @@ -3128,6 +3192,36 @@ platformInfraInsertNodeAtPath const result = await db.mutation.platformInfraInsertNodeAtPath({ input: '' }).execute(); ``` +### `db.mutation.platformInfraInsertNodesAtPaths` + +platformInfraInsertNodesAtPaths + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | PlatformInfraInsertNodesAtPathsInput (required) | + +```typescript +const result = await db.mutation.platformInfraInsertNodesAtPaths({ input: '' }).execute(); +``` + +### `db.mutation.platformInfraSetAndCommit` + +platformInfraSetAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | PlatformInfraSetAndCommitInput (required) | + +```typescript +const result = await db.mutation.platformInfraSetAndCommit({ input: '' }).execute(); +``` + ### `db.mutation.platformInfraSetDataAtPath` platformInfraSetDataAtPath @@ -3143,6 +3237,21 @@ platformInfraSetDataAtPath const result = await db.mutation.platformInfraSetDataAtPath({ input: { data: '', path: '', root: '', sId: '' } }).execute(); ``` +### `db.mutation.platformInfraSetManyAndCommit` + +platformInfraSetManyAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | PlatformInfraSetManyAndCommitInput (required) | + +```typescript +const result = await db.mutation.platformInfraSetManyAndCommit({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }).execute(); +``` + ### `db.mutation.platformResourceInstallationsInstall` platformResourceInstallationsInstall @@ -3296,6 +3405,21 @@ saveGraph const result = await db.mutation.saveGraph({ input: { graphId: '', message: '', rootHash: '' } }).execute(); ``` +### `db.mutation.setAndCommit` + +setAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | SetAndCommitInput (required) | + +```typescript +const result = await db.mutation.setAndCommit({ input: '' }).execute(); +``` + ### `db.mutation.setDataAtPath` setDataAtPath @@ -3311,6 +3435,21 @@ setDataAtPath const result = await db.mutation.setDataAtPath({ input: { data: '', path: '', root: '', sId: '' } }).execute(); ``` +### `db.mutation.setManyAndCommit` + +setManyAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | SetManyAndCommitInput (required) | + +```typescript +const result = await db.mutation.setManyAndCommit({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }).execute(); +``` + ### `db.mutation.startExecution` startExecution diff --git a/sdk/constructive-sdk/src/compute/orm/input-types.ts b/sdk/constructive-sdk/src/compute/orm/input-types.ts index a132305584..df0c4af565 100644 --- a/sdk/constructive-sdk/src/compute/orm/input-types.ts +++ b/sdk/constructive-sdk/src/compute/orm/input-types.ts @@ -296,7 +296,7 @@ export interface FunctionCapabilityBinding { } /** Function definitions — registered cloud functions with routing, queue, and retry configuration */ export interface FunctionDefinition { - /** Invocation channels this function may be exposed through (api, graph, cron, sync, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. */ + /** Invocation channels this function may be exposed through (api, graph, cron, sync, page, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. */ accessChannels?: string[] | null; /** Function task category (e.g. email, embed, chunk, custom) */ category?: string | null; @@ -352,12 +352,14 @@ export interface FunctionDefinition { publishedAt?: string | null; /** Job queue name for serialization (e.g. email, ai, default) */ queueName?: string | null; - /** Bucket keys this function needs (e.g. uploads, exports). Empty = no bucket requirements. */ + /** Bucket keys this function needs (e.g. uploads, exports). Tenant-agnostic: each key is resolved per invocation against the tenant's buckets by {tags, type}, or by an explicit capability binding row. Empty = no bucket requirements. */ requiredBuckets?: string[] | null; /** Embedded config requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. */ requiredConfigs?: ResourceRequirement[] | null; /** Inference model whitelist (e.g. gpt-4o, claude-3). Empty = no model requirements. */ requiredModels?: string[] | null; + /** Modules whose api surfaces this function calls, e.g. notifications_module. Suffix . to name which surface when a module's schemas are attached to several (permissions_module.admin), and @ to pin the registration when a module is registered at more than one scope (limits_module@org) — usually unnecessary, since resolution walks the execution's scope chain. A value that is not a module name is read as an api name. Resolved per invocation; empty = no api requirements. */ + requiredModules?: string[] | null; /** Embedded secret requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. */ requiredSecrets?: ResourceRequirement[] | null; /** Container resource requests and limits: {requests: {memory, cpu}, limits: {memory, cpu}} */ @@ -406,6 +408,8 @@ export interface FunctionDeployment { lastErrorAt?: string | null; /** Target namespace for this deployment (maps to a K8s namespace) */ namespaceId?: string | null; + /** Config/secret realm this deployment resolves required keys against. Per key, the realm-specific atom wins over the NULL-realm default. NULL = the default lane (or a runtime-query worker that fetches per-item realms on demand). */ + realm?: string | null; /** K8s resource spec override: {"requests":{"cpu":"100m","memory":"128Mi"},"limits":{...}} */ resources?: Record | null; /** Deployment revision number (incremented on each redeployment) */ @@ -911,7 +915,7 @@ export interface PlatformFunctionCapabilityBinding { } /** Function definitions — registered cloud functions with routing, queue, and retry configuration */ export interface PlatformFunctionDefinition { - /** Invocation channels this function may be exposed through (api, graph, cron, sync, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. */ + /** Invocation channels this function may be exposed through (api, graph, cron, sync, page, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. */ accessChannels?: string[] | null; /** Whether executions are metered through the invocation ledger and billing quota gate */ billable?: boolean | null; @@ -967,12 +971,14 @@ export interface PlatformFunctionDefinition { publishedAt?: string | null; /** Job queue name for serialization (e.g. email, ai, default) */ queueName?: string | null; - /** Bucket keys this function needs (e.g. uploads, exports). Empty = no bucket requirements. */ + /** Bucket keys this function needs (e.g. uploads, exports). Tenant-agnostic: each key is resolved per invocation against the tenant's buckets by {tags, type}, or by an explicit capability binding row. Empty = no bucket requirements. */ requiredBuckets?: string[] | null; /** Embedded config requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. */ requiredConfigs?: ResourceRequirement[] | null; /** Inference model whitelist (e.g. gpt-4o, claude-3). Empty = no model requirements. */ requiredModels?: string[] | null; + /** Modules whose api surfaces this function calls, e.g. notifications_module. Suffix . to name which surface when a module's schemas are attached to several (permissions_module.admin), and @ to pin the registration when a module is registered at more than one scope (limits_module@org) — usually unnecessary, since resolution walks the execution's scope chain. A value that is not a module name is read as an api name. Resolved per invocation; empty = no api requirements. */ + requiredModules?: string[] | null; /** Embedded secret requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. */ requiredSecrets?: ResourceRequirement[] | null; /** Container resource requests and limits: {requests: {memory, cpu}, limits: {memory, cpu}} */ @@ -1021,6 +1027,8 @@ export interface PlatformFunctionDeployment { lastErrorAt?: string | null; /** Target namespace for this deployment (maps to a K8s namespace) */ namespaceId?: string | null; + /** Config/secret realm this deployment resolves required keys against. Per key, the realm-specific atom wins over the NULL-realm default. NULL = the default lane (or a runtime-query worker that fetches per-item realms on demand). */ + realm?: string | null; /** K8s resource spec override: {"requests":{"cpu":"100m","memory":"128Mi"},"limits":{...}} */ resources?: Record | null; /** Deployment revision number (incremented on each redeployment) */ @@ -2284,6 +2292,7 @@ export type FunctionDefinitionSelect = { requiredBuckets?: boolean; requiredConfigs?: boolean; requiredModels?: boolean; + requiredModules?: boolean; requiredSecrets?: boolean; resources?: boolean; runtime?: boolean; @@ -2328,6 +2337,7 @@ export type FunctionDeploymentSelect = { lastError?: boolean; lastErrorAt?: boolean; namespaceId?: boolean; + realm?: boolean; resources?: boolean; revision?: boolean; scaleMax?: boolean; @@ -2697,6 +2707,7 @@ export type PlatformFunctionDefinitionSelect = { requiredBuckets?: boolean; requiredConfigs?: boolean; requiredModels?: boolean; + requiredModules?: boolean; requiredSecrets?: boolean; resources?: boolean; runtime?: boolean; @@ -2744,6 +2755,7 @@ export type PlatformFunctionDeploymentSelect = { lastError?: boolean; lastErrorAt?: boolean; namespaceId?: boolean; + realm?: boolean; resources?: boolean; revision?: boolean; scaleMax?: boolean; @@ -3639,6 +3651,8 @@ export interface FunctionDefinitionFilter { requiredBuckets?: StringListFilter; /** Filter by the object’s `requiredModels` field. */ requiredModels?: StringListFilter; + /** Filter by the object’s `requiredModules` field. */ + requiredModules?: StringListFilter; /** Filter by the object’s `resources` field. */ resources?: JSONFilter; /** Filter by the object’s `runtime` field. */ @@ -3699,6 +3713,8 @@ export interface FunctionDeploymentFilter { not?: FunctionDeploymentFilter; /** Checks for any expressions in this list. */ or?: FunctionDeploymentFilter[]; + /** Filter by the object’s `realm` field. */ + realm?: StringFilter; /** Filter by the object’s `resources` field. */ resources?: JSONFilter; /** Filter by the object’s `revision` field. */ @@ -4451,6 +4467,8 @@ export interface PlatformFunctionDefinitionFilter { requiredBuckets?: StringListFilter; /** Filter by the object’s `requiredModels` field. */ requiredModels?: StringListFilter; + /** Filter by the object’s `requiredModules` field. */ + requiredModules?: StringListFilter; /** Filter by the object’s `resources` field. */ resources?: JSONFilter; /** Filter by the object’s `runtime` field. */ @@ -4507,6 +4525,8 @@ export interface PlatformFunctionDeploymentFilter { not?: PlatformFunctionDeploymentFilter; /** Checks for any expressions in this list. */ or?: PlatformFunctionDeploymentFilter[]; + /** Filter by the object’s `realm` field. */ + realm?: StringFilter; /** Filter by the object’s `resources` field. */ resources?: JSONFilter; /** Filter by the object’s `revision` field. */ @@ -6048,6 +6068,8 @@ export type FunctionDefinitionOrderBy = | 'REQUIRED_CONFIGS_DESC' | 'REQUIRED_MODELS_ASC' | 'REQUIRED_MODELS_DESC' + | 'REQUIRED_MODULES_ASC' + | 'REQUIRED_MODULES_DESC' | 'REQUIRED_SECRETS_ASC' | 'REQUIRED_SECRETS_DESC' | 'RESOURCES_ASC' @@ -6100,6 +6122,8 @@ export type FunctionDeploymentOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' + | 'REALM_ASC' + | 'REALM_DESC' | 'RESOURCES_ASC' | 'RESOURCES_DESC' | 'REVISION_ASC' @@ -6712,6 +6736,8 @@ export type PlatformFunctionDefinitionOrderBy = | 'REQUIRED_CONFIGS_DESC' | 'REQUIRED_MODELS_ASC' | 'REQUIRED_MODELS_DESC' + | 'REQUIRED_MODULES_ASC' + | 'REQUIRED_MODULES_DESC' | 'REQUIRED_SECRETS_ASC' | 'REQUIRED_SECRETS_DESC' | 'RESOURCES_ASC' @@ -6764,6 +6790,8 @@ export type PlatformFunctionDeploymentOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' + | 'REALM_ASC' + | 'REALM_DESC' | 'RESOURCES_ASC' | 'RESOURCES_DESC' | 'REVISION_ASC' @@ -8036,6 +8064,7 @@ export interface CreateFunctionDefinitionInput { requiredBuckets?: string[]; requiredConfigs?: ResourceRequirementInput[]; requiredModels?: string[]; + requiredModules?: string[]; requiredSecrets?: ResourceRequirementInput[]; resources?: Record; runtime?: string; @@ -8074,6 +8103,7 @@ export interface FunctionDefinitionPatch { requiredBuckets?: string[] | null; requiredConfigs?: ResourceRequirementInput[] | null; requiredModels?: string[] | null; + requiredModules?: string[] | null; requiredSecrets?: ResourceRequirementInput[] | null; resources?: Record | null; runtime?: string | null; @@ -8107,6 +8137,7 @@ export interface CreateFunctionDeploymentInput { lastError?: string; lastErrorAt?: string; namespaceId: string; + realm?: string; resources?: Record; revision?: number; scaleMax?: number; @@ -8129,6 +8160,7 @@ export interface FunctionDeploymentPatch { lastError?: string | null; lastErrorAt?: string | null; namespaceId?: string | null; + realm?: string | null; resources?: Record | null; revision?: number | null; scaleMax?: number | null; @@ -8895,6 +8927,7 @@ export interface CreatePlatformFunctionDefinitionInput { requiredBuckets?: string[]; requiredConfigs?: ResourceRequirementInput[]; requiredModels?: string[]; + requiredModules?: string[]; requiredSecrets?: ResourceRequirementInput[]; resources?: Record; runtime?: string; @@ -8934,6 +8967,7 @@ export interface PlatformFunctionDefinitionPatch { requiredBuckets?: string[] | null; requiredConfigs?: ResourceRequirementInput[] | null; requiredModels?: string[] | null; + requiredModules?: string[] | null; requiredSecrets?: ResourceRequirementInput[] | null; resources?: Record | null; runtime?: string | null; @@ -8967,6 +9001,7 @@ export interface CreatePlatformFunctionDeploymentInput { lastError?: string; lastErrorAt?: string; namespaceId: string; + realm?: string; resources?: Record; revision?: number; scaleMax?: number; @@ -8988,6 +9023,7 @@ export interface PlatformFunctionDeploymentPatch { lastError?: string | null; lastErrorAt?: string | null; namespaceId?: string | null; + realm?: string | null; resources?: Record | null; revision?: number | null; scaleMax?: number | null; @@ -10613,6 +10649,26 @@ export interface InfraInsertNodeAtPathInput { root?: string; sId?: string; } +export interface InfraInsertNodesAtPathsInput { + clientMutationId?: string; + datas?: Record[]; + kidsList?: Record; + ktreeList?: Record; + paths?: Record; + root?: string; + sId?: string; +} +export interface InfraSetAndCommitInput { + clientMutationId?: string; + data?: Record; + kids?: string[]; + ktree?: string[]; + message?: string; + path?: string[]; + refname?: string; + sId?: string; + storeId?: string; +} export interface InfraSetDataAtPathInput { clientMutationId?: string; data?: Record; @@ -10620,6 +10676,14 @@ export interface InfraSetDataAtPathInput { root?: string; sId?: string; } +export interface InfraSetManyAndCommitInput { + clientMutationId?: string; + entries?: Record; + message?: string; + refname?: string; + sId?: string; + storeId?: string; +} export interface InitEmptyRepoInput { clientMutationId?: string; sId?: string; @@ -10634,6 +10698,15 @@ export interface InsertNodeAtPathInput { root?: string; sId?: string; } +export interface InsertNodesAtPathsInput { + clientMutationId?: string; + datas?: Record[]; + kidsList?: Record; + ktreeList?: Record; + paths?: Record; + root?: string; + sId?: string; +} export interface PlatformInfraInitEmptyRepoInput { clientMutationId?: string; sId?: string; @@ -10648,6 +10721,26 @@ export interface PlatformInfraInsertNodeAtPathInput { root?: string; sId?: string; } +export interface PlatformInfraInsertNodesAtPathsInput { + clientMutationId?: string; + datas?: Record[]; + kidsList?: Record; + ktreeList?: Record; + paths?: Record; + root?: string; + sId?: string; +} +export interface PlatformInfraSetAndCommitInput { + clientMutationId?: string; + data?: Record; + kids?: string[]; + ktree?: string[]; + message?: string; + path?: string[]; + refname?: string; + sId?: string; + storeId?: string; +} export interface PlatformInfraSetDataAtPathInput { clientMutationId?: string; data?: Record; @@ -10655,6 +10748,14 @@ export interface PlatformInfraSetDataAtPathInput { root?: string; sId?: string; } +export interface PlatformInfraSetManyAndCommitInput { + clientMutationId?: string; + entries?: Record; + message?: string; + refname?: string; + sId?: string; + storeId?: string; +} export interface PlatformResourceInstallationsInstallInput { clientMutationId?: string; definitionIds?: string[]; @@ -10714,6 +10815,17 @@ export interface SaveGraphInput { message?: string; rootHash?: string; } +export interface SetAndCommitInput { + clientMutationId?: string; + data?: Record; + kids?: string[]; + ktree?: string[]; + message?: string; + path?: string[]; + refname?: string; + sId?: string; + storeId?: string; +} export interface SetDataAtPathInput { clientMutationId?: string; data?: Record; @@ -10721,6 +10833,14 @@ export interface SetDataAtPathInput { root?: string; sId?: string; } +export interface SetManyAndCommitInput { + clientMutationId?: string; + entries?: Record; + message?: string; + refname?: string; + sId?: string; + storeId?: string; +} export interface StartExecutionInput { clientMutationId?: string; graphId?: string; @@ -11128,7 +11248,7 @@ export interface FunctionCapabilityBindingInput { } /** An input for mutations affecting `FunctionDefinition` */ export interface FunctionDefinitionInput { - /** Invocation channels this function may be exposed through (api, graph, cron, sync, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. */ + /** Invocation channels this function may be exposed through (api, graph, cron, sync, page, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. */ accessChannels?: string[]; /** Function task category (e.g. email, embed, chunk, custom) */ category: string; @@ -11176,12 +11296,14 @@ export interface FunctionDefinitionInput { publishedAt?: string; /** Job queue name for serialization (e.g. email, ai, default) */ queueName?: string; - /** Bucket keys this function needs (e.g. uploads, exports). Empty = no bucket requirements. */ + /** Bucket keys this function needs (e.g. uploads, exports). Tenant-agnostic: each key is resolved per invocation against the tenant's buckets by {tags, type}, or by an explicit capability binding row. Empty = no bucket requirements. */ requiredBuckets?: string[]; /** Embedded config requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. */ requiredConfigs?: ResourceRequirementInput[]; /** Inference model whitelist (e.g. gpt-4o, claude-3). Empty = no model requirements. */ requiredModels?: string[]; + /** Modules whose api surfaces this function calls, e.g. notifications_module. Suffix . to name which surface when a module's schemas are attached to several (permissions_module.admin), and @ to pin the registration when a module is registered at more than one scope (limits_module@org) — usually unnecessary, since resolution walks the execution's scope chain. A value that is not a module name is read as an api name. Resolved per invocation; empty = no api requirements. */ + requiredModules?: string[]; /** Embedded secret requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. */ requiredSecrets?: ResourceRequirementInput[]; /** Container resource requests and limits: {requests: {memory, cpu}, limits: {memory, cpu}} */ @@ -11234,6 +11356,8 @@ export interface FunctionDeploymentInput { lastErrorAt?: string; /** Target namespace for this deployment (maps to a K8s namespace) */ namespaceId: string; + /** Config/secret realm this deployment resolves required keys against. Per key, the realm-specific atom wins over the NULL-realm default. NULL = the default lane (or a runtime-query worker that fetches per-item realms on demand). */ + realm?: string; /** K8s resource spec override: {"requests":{"cpu":"100m","memory":"128Mi"},"limits":{...}} */ resources?: Record; /** Deployment revision number (incremented on each redeployment) */ @@ -11704,7 +11828,7 @@ export interface PlatformFunctionCapabilityBindingInput { } /** An input for mutations affecting `PlatformFunctionDefinition` */ export interface PlatformFunctionDefinitionInput { - /** Invocation channels this function may be exposed through (api, graph, cron, sync, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. */ + /** Invocation channels this function may be exposed through (api, graph, cron, sync, page, webhook). Internal worker dispatch is implicit and never listed. Default [] = worker only. */ accessChannels?: string[]; /** Whether executions are metered through the invocation ledger and billing quota gate */ billable?: boolean; @@ -11752,12 +11876,14 @@ export interface PlatformFunctionDefinitionInput { publishedAt?: string; /** Job queue name for serialization (e.g. email, ai, default) */ queueName?: string; - /** Bucket keys this function needs (e.g. uploads, exports). Empty = no bucket requirements. */ + /** Bucket keys this function needs (e.g. uploads, exports). Tenant-agnostic: each key is resolved per invocation against the tenant's buckets by {tags, type}, or by an explicit capability binding row. Empty = no bucket requirements. */ requiredBuckets?: string[]; /** Embedded config requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. */ requiredConfigs?: ResourceRequirementInput[]; /** Inference model whitelist (e.g. gpt-4o, claude-3). Empty = no model requirements. */ requiredModels?: string[]; + /** Modules whose api surfaces this function calls, e.g. notifications_module. Suffix . to name which surface when a module's schemas are attached to several (permissions_module.admin), and @ to pin the registration when a module is registered at more than one scope (limits_module@org) — usually unnecessary, since resolution walks the execution's scope chain. A value that is not a module name is read as an api name. Resolved per invocation; empty = no api requirements. */ + requiredModules?: string[]; /** Embedded secret requirements: array of (name, required, provider) tuples. provider is the integration slug this requirement belongs to, if any. */ requiredSecrets?: ResourceRequirementInput[]; /** Container resource requests and limits: {requests: {memory, cpu}, limits: {memory, cpu}} */ @@ -11804,6 +11930,8 @@ export interface PlatformFunctionDeploymentInput { lastErrorAt?: string; /** Target namespace for this deployment (maps to a K8s namespace) */ namespaceId: string; + /** Config/secret realm this deployment resolves required keys against. Per key, the realm-specific atom wins over the NULL-realm default. NULL = the default lane (or a runtime-query worker that fetches per-item realms on demand). */ + realm?: string; /** K8s resource spec override: {"requests":{"cpu":"100m","memory":"128Mi"},"limits":{...}} */ resources?: Record; /** Deployment revision number (incremented on each redeployment) */ @@ -12841,6 +12969,8 @@ export interface PlatformFunctionDefinitionFilter { requiredBuckets?: StringListFilter; /** Filter by the object’s `requiredModels` field. */ requiredModels?: StringListFilter; + /** Filter by the object’s `requiredModules` field. */ + requiredModules?: StringListFilter; /** Filter by the object’s `resources` field. */ resources?: JSONFilter; /** Filter by the object’s `runtime` field. */ @@ -12900,6 +13030,8 @@ export interface FunctionDeploymentFilter { not?: FunctionDeploymentFilter; /** Checks for any expressions in this list. */ or?: FunctionDeploymentFilter[]; + /** Filter by the object’s `realm` field. */ + realm?: StringFilter; /** Filter by the object’s `resources` field. */ resources?: JSONFilter; /** Filter by the object’s `revision` field. */ @@ -13282,6 +13414,8 @@ export interface PlatformFunctionDeploymentFilter { not?: PlatformFunctionDeploymentFilter; /** Checks for any expressions in this list. */ or?: PlatformFunctionDeploymentFilter[]; + /** Filter by the object’s `realm` field. */ + realm?: StringFilter; /** Filter by the object’s `resources` field. */ resources?: JSONFilter; /** Filter by the object’s `revision` field. */ @@ -13882,6 +14016,8 @@ export interface FunctionDefinitionFilter { requiredBuckets?: StringListFilter; /** Filter by the object’s `requiredModels` field. */ requiredModels?: StringListFilter; + /** Filter by the object’s `requiredModules` field. */ + requiredModules?: StringListFilter; /** Filter by the object’s `resources` field. */ resources?: JSONFilter; /** Filter by the object’s `runtime` field. */ @@ -14189,6 +14325,28 @@ export type InfraInsertNodeAtPathPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface InfraInsertNodesAtPathsPayload { + clientMutationId?: string | null; + result?: string | null; +} +export type InfraInsertNodesAtPathsPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; +export interface InfraSetAndCommitPayload { + clientMutationId?: string | null; + infraCommitEdge?: InfraCommitEdge | null; + result?: InfraCommit | null; +} +export type InfraSetAndCommitPayloadSelect = { + clientMutationId?: boolean; + infraCommitEdge?: { + select: InfraCommitEdgeSelect; + }; + result?: { + select: InfraCommitSelect; + }; +}; export interface InfraSetDataAtPathPayload { clientMutationId?: string | null; result?: string | null; @@ -14197,6 +14355,20 @@ export type InfraSetDataAtPathPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface InfraSetManyAndCommitPayload { + clientMutationId?: string | null; + infraCommitEdge?: InfraCommitEdge | null; + result?: InfraCommit | null; +} +export type InfraSetManyAndCommitPayloadSelect = { + clientMutationId?: boolean; + infraCommitEdge?: { + select: InfraCommitEdgeSelect; + }; + result?: { + select: InfraCommitSelect; + }; +}; export interface InitEmptyRepoPayload { clientMutationId?: string | null; } @@ -14211,6 +14383,14 @@ export type InsertNodeAtPathPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface InsertNodesAtPathsPayload { + clientMutationId?: string | null; + result?: string | null; +} +export type InsertNodesAtPathsPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; export interface PlatformInfraInitEmptyRepoPayload { clientMutationId?: string | null; } @@ -14225,6 +14405,28 @@ export type PlatformInfraInsertNodeAtPathPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface PlatformInfraInsertNodesAtPathsPayload { + clientMutationId?: string | null; + result?: string | null; +} +export type PlatformInfraInsertNodesAtPathsPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; +export interface PlatformInfraSetAndCommitPayload { + clientMutationId?: string | null; + platformInfraCommitEdge?: PlatformInfraCommitEdge | null; + result?: PlatformInfraCommit | null; +} +export type PlatformInfraSetAndCommitPayloadSelect = { + clientMutationId?: boolean; + platformInfraCommitEdge?: { + select: PlatformInfraCommitEdgeSelect; + }; + result?: { + select: PlatformInfraCommitSelect; + }; +}; export interface PlatformInfraSetDataAtPathPayload { clientMutationId?: string | null; result?: string | null; @@ -14233,6 +14435,20 @@ export type PlatformInfraSetDataAtPathPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface PlatformInfraSetManyAndCommitPayload { + clientMutationId?: string | null; + platformInfraCommitEdge?: PlatformInfraCommitEdge | null; + result?: PlatformInfraCommit | null; +} +export type PlatformInfraSetManyAndCommitPayloadSelect = { + clientMutationId?: boolean; + platformInfraCommitEdge?: { + select: PlatformInfraCommitEdgeSelect; + }; + result?: { + select: PlatformInfraCommitSelect; + }; +}; export interface PlatformResourceInstallationsInstallPayload { clientMutationId?: string | null; result?: string | null; @@ -14315,6 +14531,20 @@ export type SaveGraphPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface SetAndCommitPayload { + clientMutationId?: string | null; + functionGraphCommitEdge?: FunctionGraphCommitEdge | null; + result?: FunctionGraphCommit | null; +} +export type SetAndCommitPayloadSelect = { + clientMutationId?: boolean; + functionGraphCommitEdge?: { + select: FunctionGraphCommitEdgeSelect; + }; + result?: { + select: FunctionGraphCommitSelect; + }; +}; export interface SetDataAtPathPayload { clientMutationId?: string | null; result?: string | null; @@ -14323,6 +14553,20 @@ export type SetDataAtPathPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface SetManyAndCommitPayload { + clientMutationId?: string | null; + functionGraphCommitEdge?: FunctionGraphCommitEdge | null; + result?: FunctionGraphCommit | null; +} +export type SetManyAndCommitPayloadSelect = { + clientMutationId?: boolean; + functionGraphCommitEdge?: { + select: FunctionGraphCommitEdgeSelect; + }; + result?: { + select: FunctionGraphCommitSelect; + }; +}; export interface StartExecutionPayload { clientMutationId?: string | null; result?: string | null; @@ -16852,6 +17096,42 @@ export type DeleteWebhookEventPayloadSelect = { select: WebhookEventEdgeSelect; }; }; +/** A `InfraCommit` edge in the connection. */ +export interface InfraCommitEdge { + cursor?: string | null; + /** The `InfraCommit` at the end of the edge. */ + node?: InfraCommit | null; +} +export type InfraCommitEdgeSelect = { + cursor?: boolean; + node?: { + select: InfraCommitSelect; + }; +}; +/** A `PlatformInfraCommit` edge in the connection. */ +export interface PlatformInfraCommitEdge { + cursor?: string | null; + /** The `PlatformInfraCommit` at the end of the edge. */ + node?: PlatformInfraCommit | null; +} +export type PlatformInfraCommitEdgeSelect = { + cursor?: boolean; + node?: { + select: PlatformInfraCommitSelect; + }; +}; +/** A `FunctionGraphCommit` edge in the connection. */ +export interface FunctionGraphCommitEdge { + cursor?: string | null; + /** The `FunctionGraphCommit` at the end of the edge. */ + node?: FunctionGraphCommit | null; +} +export type FunctionGraphCommitEdgeSelect = { + cursor?: boolean; + node?: { + select: FunctionGraphCommitSelect; + }; +}; /** A `DbPreset` edge in the connection. */ export interface DbPresetEdge { cursor?: string | null; @@ -16936,18 +17216,6 @@ export type FunctionExecutionLogEdgeSelect = { select: FunctionExecutionLogSelect; }; }; -/** A `FunctionGraphCommit` edge in the connection. */ -export interface FunctionGraphCommitEdge { - cursor?: string | null; - /** The `FunctionGraphCommit` at the end of the edge. */ - node?: FunctionGraphCommit | null; -} -export type FunctionGraphCommitEdgeSelect = { - cursor?: boolean; - node?: { - select: FunctionGraphCommitSelect; - }; -}; /** A `FunctionGraph` edge in the connection. */ export interface FunctionGraphEdge { cursor?: string | null; @@ -17056,18 +17324,6 @@ export type FunctionInvocationEdgeSelect = { select: FunctionInvocationSelect; }; }; -/** A `InfraCommit` edge in the connection. */ -export interface InfraCommitEdge { - cursor?: string | null; - /** The `InfraCommit` at the end of the edge. */ - node?: InfraCommit | null; -} -export type InfraCommitEdgeSelect = { - cursor?: boolean; - node?: { - select: InfraCommitSelect; - }; -}; /** A `InfraObject` edge in the connection. */ export interface InfraObjectEdge { cursor?: string | null; @@ -17236,18 +17492,6 @@ export type PlatformFunctionInvocationEdgeSelect = { select: PlatformFunctionInvocationSelect; }; }; -/** A `PlatformInfraCommit` edge in the connection. */ -export interface PlatformInfraCommitEdge { - cursor?: string | null; - /** The `PlatformInfraCommit` at the end of the edge. */ - node?: PlatformInfraCommit | null; -} -export type PlatformInfraCommitEdgeSelect = { - cursor?: boolean; - node?: { - select: PlatformInfraCommitSelect; - }; -}; /** A `PlatformInfraObject` edge in the connection. */ export interface PlatformInfraObjectEdge { cursor?: string | null; diff --git a/sdk/constructive-sdk/src/compute/orm/mutation/index.ts b/sdk/constructive-sdk/src/compute/orm/mutation/index.ts index c5bc975047..948d1e8903 100644 --- a/sdk/constructive-sdk/src/compute/orm/mutation/index.ts +++ b/sdk/constructive-sdk/src/compute/orm/mutation/index.ts @@ -16,12 +16,19 @@ import type { ImportGraphJsonInput, InfraInitEmptyRepoInput, InfraInsertNodeAtPathInput, + InfraInsertNodesAtPathsInput, + InfraSetAndCommitInput, InfraSetDataAtPathInput, + InfraSetManyAndCommitInput, InitEmptyRepoInput, InsertNodeAtPathInput, + InsertNodesAtPathsInput, PlatformInfraInitEmptyRepoInput, PlatformInfraInsertNodeAtPathInput, + PlatformInfraInsertNodesAtPathsInput, + PlatformInfraSetAndCommitInput, PlatformInfraSetDataAtPathInput, + PlatformInfraSetManyAndCommitInput, PlatformResourceInstallationsInstallInput, PlatformResourceInstallationsRollbackInput, PlatformResourceInstallationsUninstallInput, @@ -32,7 +39,9 @@ import type { ResourceInstallationsUninstallInput, ResourceInstallationsUpgradeInput, SaveGraphInput, + SetAndCommitInput, SetDataAtPathInput, + SetManyAndCommitInput, StartExecutionInput, ValidateFunctionGraphInput, AddEdgePayload, @@ -44,12 +53,19 @@ import type { ImportGraphJsonPayload, InfraInitEmptyRepoPayload, InfraInsertNodeAtPathPayload, + InfraInsertNodesAtPathsPayload, + InfraSetAndCommitPayload, InfraSetDataAtPathPayload, + InfraSetManyAndCommitPayload, InitEmptyRepoPayload, InsertNodeAtPathPayload, + InsertNodesAtPathsPayload, PlatformInfraInitEmptyRepoPayload, PlatformInfraInsertNodeAtPathPayload, + PlatformInfraInsertNodesAtPathsPayload, + PlatformInfraSetAndCommitPayload, PlatformInfraSetDataAtPathPayload, + PlatformInfraSetManyAndCommitPayload, PlatformResourceInstallationsInstallPayload, PlatformResourceInstallationsRollbackPayload, PlatformResourceInstallationsUninstallPayload, @@ -60,7 +76,9 @@ import type { ResourceInstallationsUninstallPayload, ResourceInstallationsUpgradePayload, SaveGraphPayload, + SetAndCommitPayload, SetDataAtPathPayload, + SetManyAndCommitPayload, StartExecutionPayload, ValidateFunctionGraphPayload, AddEdgePayloadSelect, @@ -72,12 +90,19 @@ import type { ImportGraphJsonPayloadSelect, InfraInitEmptyRepoPayloadSelect, InfraInsertNodeAtPathPayloadSelect, + InfraInsertNodesAtPathsPayloadSelect, + InfraSetAndCommitPayloadSelect, InfraSetDataAtPathPayloadSelect, + InfraSetManyAndCommitPayloadSelect, InitEmptyRepoPayloadSelect, InsertNodeAtPathPayloadSelect, + InsertNodesAtPathsPayloadSelect, PlatformInfraInitEmptyRepoPayloadSelect, PlatformInfraInsertNodeAtPathPayloadSelect, + PlatformInfraInsertNodesAtPathsPayloadSelect, + PlatformInfraSetAndCommitPayloadSelect, PlatformInfraSetDataAtPathPayloadSelect, + PlatformInfraSetManyAndCommitPayloadSelect, PlatformResourceInstallationsInstallPayloadSelect, PlatformResourceInstallationsRollbackPayloadSelect, PlatformResourceInstallationsUninstallPayloadSelect, @@ -88,7 +113,9 @@ import type { ResourceInstallationsUninstallPayloadSelect, ResourceInstallationsUpgradePayloadSelect, SaveGraphPayloadSelect, + SetAndCommitPayloadSelect, SetDataAtPathPayloadSelect, + SetManyAndCommitPayloadSelect, StartExecutionPayloadSelect, ValidateFunctionGraphPayloadSelect, } from '../input-types'; @@ -120,24 +147,45 @@ export interface InfraInitEmptyRepoVariables { export interface InfraInsertNodeAtPathVariables { input: InfraInsertNodeAtPathInput; } +export interface InfraInsertNodesAtPathsVariables { + input: InfraInsertNodesAtPathsInput; +} +export interface InfraSetAndCommitVariables { + input: InfraSetAndCommitInput; +} export interface InfraSetDataAtPathVariables { input: InfraSetDataAtPathInput; } +export interface InfraSetManyAndCommitVariables { + input: InfraSetManyAndCommitInput; +} export interface InitEmptyRepoVariables { input: InitEmptyRepoInput; } export interface InsertNodeAtPathVariables { input: InsertNodeAtPathInput; } +export interface InsertNodesAtPathsVariables { + input: InsertNodesAtPathsInput; +} export interface PlatformInfraInitEmptyRepoVariables { input: PlatformInfraInitEmptyRepoInput; } export interface PlatformInfraInsertNodeAtPathVariables { input: PlatformInfraInsertNodeAtPathInput; } +export interface PlatformInfraInsertNodesAtPathsVariables { + input: PlatformInfraInsertNodesAtPathsInput; +} +export interface PlatformInfraSetAndCommitVariables { + input: PlatformInfraSetAndCommitInput; +} export interface PlatformInfraSetDataAtPathVariables { input: PlatformInfraSetDataAtPathInput; } +export interface PlatformInfraSetManyAndCommitVariables { + input: PlatformInfraSetManyAndCommitInput; +} export interface PlatformResourceInstallationsInstallVariables { input: PlatformResourceInstallationsInstallInput; } @@ -175,9 +223,15 @@ export interface ResourceInstallationsUpgradeVariables { export interface SaveGraphVariables { input: SaveGraphInput; } +export interface SetAndCommitVariables { + input: SetAndCommitInput; +} export interface SetDataAtPathVariables { input: SetDataAtPathInput; } +export interface SetManyAndCommitVariables { + input: SetManyAndCommitInput; +} export interface StartExecutionVariables { input: StartExecutionInput; } @@ -447,6 +501,64 @@ export function createMutationOperations(client: OrmClient) { 'InfraInsertNodeAtPathPayload' ), }), + infraInsertNodesAtPaths: ( + args: InfraInsertNodesAtPathsVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + infraInsertNodesAtPaths: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'InfraInsertNodesAtPaths', + fieldName: 'infraInsertNodesAtPaths', + ...buildCustomDocument( + 'mutation', + 'InfraInsertNodesAtPaths', + 'infraInsertNodesAtPaths', + options.select, + args, + [ + { + name: 'input', + type: 'InfraInsertNodesAtPathsInput!', + }, + ], + connectionFieldsMap, + 'InfraInsertNodesAtPathsPayload' + ), + }), + infraSetAndCommit: ( + args: InfraSetAndCommitVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + infraSetAndCommit: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'InfraSetAndCommit', + fieldName: 'infraSetAndCommit', + ...buildCustomDocument( + 'mutation', + 'InfraSetAndCommit', + 'infraSetAndCommit', + options.select, + args, + [ + { + name: 'input', + type: 'InfraSetAndCommitInput!', + }, + ], + connectionFieldsMap, + 'InfraSetAndCommitPayload' + ), + }), infraSetDataAtPath: ( args: InfraSetDataAtPathVariables, options: { @@ -476,6 +588,35 @@ export function createMutationOperations(client: OrmClient) { 'InfraSetDataAtPathPayload' ), }), + infraSetManyAndCommit: ( + args: InfraSetManyAndCommitVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + infraSetManyAndCommit: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'InfraSetManyAndCommit', + fieldName: 'infraSetManyAndCommit', + ...buildCustomDocument( + 'mutation', + 'InfraSetManyAndCommit', + 'infraSetManyAndCommit', + options.select, + args, + [ + { + name: 'input', + type: 'InfraSetManyAndCommitInput!', + }, + ], + connectionFieldsMap, + 'InfraSetManyAndCommitPayload' + ), + }), initEmptyRepo: ( args: InitEmptyRepoVariables, options: { @@ -534,6 +675,35 @@ export function createMutationOperations(client: OrmClient) { 'InsertNodeAtPathPayload' ), }), + insertNodesAtPaths: ( + args: InsertNodesAtPathsVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + insertNodesAtPaths: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'InsertNodesAtPaths', + fieldName: 'insertNodesAtPaths', + ...buildCustomDocument( + 'mutation', + 'InsertNodesAtPaths', + 'insertNodesAtPaths', + options.select, + args, + [ + { + name: 'input', + type: 'InsertNodesAtPathsInput!', + }, + ], + connectionFieldsMap, + 'InsertNodesAtPathsPayload' + ), + }), platformInfraInitEmptyRepo: ( args: PlatformInfraInitEmptyRepoVariables, options: { @@ -595,6 +765,67 @@ export function createMutationOperations(client: OrmClient) { 'PlatformInfraInsertNodeAtPathPayload' ), }), + platformInfraInsertNodesAtPaths: ( + args: PlatformInfraInsertNodesAtPathsVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + platformInfraInsertNodesAtPaths: InferSelectResult< + PlatformInfraInsertNodesAtPathsPayload, + S + > | null; + }>({ + client, + operation: 'mutation', + operationName: 'PlatformInfraInsertNodesAtPaths', + fieldName: 'platformInfraInsertNodesAtPaths', + ...buildCustomDocument( + 'mutation', + 'PlatformInfraInsertNodesAtPaths', + 'platformInfraInsertNodesAtPaths', + options.select, + args, + [ + { + name: 'input', + type: 'PlatformInfraInsertNodesAtPathsInput!', + }, + ], + connectionFieldsMap, + 'PlatformInfraInsertNodesAtPathsPayload' + ), + }), + platformInfraSetAndCommit: ( + args: PlatformInfraSetAndCommitVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + platformInfraSetAndCommit: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'PlatformInfraSetAndCommit', + fieldName: 'platformInfraSetAndCommit', + ...buildCustomDocument( + 'mutation', + 'PlatformInfraSetAndCommit', + 'platformInfraSetAndCommit', + options.select, + args, + [ + { + name: 'input', + type: 'PlatformInfraSetAndCommitInput!', + }, + ], + connectionFieldsMap, + 'PlatformInfraSetAndCommitPayload' + ), + }), platformInfraSetDataAtPath: ( args: PlatformInfraSetDataAtPathVariables, options: { @@ -624,6 +855,38 @@ export function createMutationOperations(client: OrmClient) { 'PlatformInfraSetDataAtPathPayload' ), }), + platformInfraSetManyAndCommit: ( + args: PlatformInfraSetManyAndCommitVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + platformInfraSetManyAndCommit: InferSelectResult< + PlatformInfraSetManyAndCommitPayload, + S + > | null; + }>({ + client, + operation: 'mutation', + operationName: 'PlatformInfraSetManyAndCommit', + fieldName: 'platformInfraSetManyAndCommit', + ...buildCustomDocument( + 'mutation', + 'PlatformInfraSetManyAndCommit', + 'platformInfraSetManyAndCommit', + options.select, + args, + [ + { + name: 'input', + type: 'PlatformInfraSetManyAndCommitInput!', + }, + ], + connectionFieldsMap, + 'PlatformInfraSetManyAndCommitPayload' + ), + }), platformResourceInstallationsInstall: < S extends PlatformResourceInstallationsInstallPayloadSelect, >( @@ -946,6 +1209,35 @@ export function createMutationOperations(client: OrmClient) { 'SaveGraphPayload' ), }), + setAndCommit: ( + args: SetAndCommitVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + setAndCommit: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'SetAndCommit', + fieldName: 'setAndCommit', + ...buildCustomDocument( + 'mutation', + 'SetAndCommit', + 'setAndCommit', + options.select, + args, + [ + { + name: 'input', + type: 'SetAndCommitInput!', + }, + ], + connectionFieldsMap, + 'SetAndCommitPayload' + ), + }), setDataAtPath: ( args: SetDataAtPathVariables, options: { @@ -975,6 +1267,35 @@ export function createMutationOperations(client: OrmClient) { 'SetDataAtPathPayload' ), }), + setManyAndCommit: ( + args: SetManyAndCommitVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + setManyAndCommit: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'SetManyAndCommit', + fieldName: 'setManyAndCommit', + ...buildCustomDocument( + 'mutation', + 'SetManyAndCommit', + 'setManyAndCommit', + options.select, + args, + [ + { + name: 'input', + type: 'SetManyAndCommitInput!', + }, + ], + connectionFieldsMap, + 'SetManyAndCommitPayload' + ), + }), startExecution: ( args: StartExecutionVariables, options: { diff --git a/sdk/constructive-sdk/src/infra/README.md b/sdk/constructive-sdk/src/infra/README.md index e87478fa2a..1cb44c0c3c 100644 --- a/sdk/constructive-sdk/src/infra/README.md +++ b/sdk/constructive-sdk/src/infra/README.md @@ -10,7 +10,7 @@ - **Tables:** 10 - **Custom queries:** 0 -- **Custom mutations:** 4 +- **Custom mutations:** 7 **Generators:** ORM diff --git a/sdk/constructive-sdk/src/infra/orm/README.md b/sdk/constructive-sdk/src/infra/orm/README.md index e303005e2f..e94077638d 100644 --- a/sdk/constructive-sdk/src/infra/orm/README.md +++ b/sdk/constructive-sdk/src/infra/orm/README.md @@ -424,6 +424,36 @@ platformInfraInsertNodeAtPath const result = await db.mutation.platformInfraInsertNodeAtPath({ input: '' }).execute(); ``` +### `db.mutation.platformInfraInsertNodesAtPaths` + +platformInfraInsertNodesAtPaths + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | PlatformInfraInsertNodesAtPathsInput (required) | + +```typescript +const result = await db.mutation.platformInfraInsertNodesAtPaths({ input: '' }).execute(); +``` + +### `db.mutation.platformInfraSetAndCommit` + +platformInfraSetAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | PlatformInfraSetAndCommitInput (required) | + +```typescript +const result = await db.mutation.platformInfraSetAndCommit({ input: '' }).execute(); +``` + ### `db.mutation.platformInfraSetDataAtPath` platformInfraSetDataAtPath @@ -439,6 +469,21 @@ platformInfraSetDataAtPath const result = await db.mutation.platformInfraSetDataAtPath({ input: { data: '', path: '', root: '', sId: '' } }).execute(); ``` +### `db.mutation.platformInfraSetManyAndCommit` + +platformInfraSetManyAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | PlatformInfraSetManyAndCommitInput (required) | + +```typescript +const result = await db.mutation.platformInfraSetManyAndCommit({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }).execute(); +``` + ### `db.mutation.provisionBucket` Provision an S3 bucket for a logical bucket in the database. diff --git a/sdk/constructive-sdk/src/infra/orm/input-types.ts b/sdk/constructive-sdk/src/infra/orm/input-types.ts index 23e81e113d..0c0a58a8a6 100644 --- a/sdk/constructive-sdk/src/infra/orm/input-types.ts +++ b/sdk/constructive-sdk/src/infra/orm/input-types.ts @@ -1268,6 +1268,26 @@ export interface PlatformInfraInsertNodeAtPathInput { root?: string; sId?: string; } +export interface PlatformInfraInsertNodesAtPathsInput { + clientMutationId?: string; + datas?: Record[]; + kidsList?: Record; + ktreeList?: Record; + paths?: Record; + root?: string; + sId?: string; +} +export interface PlatformInfraSetAndCommitInput { + clientMutationId?: string; + data?: Record; + kids?: string[]; + ktree?: string[]; + message?: string; + path?: string[]; + refname?: string; + sId?: string; + storeId?: string; +} export interface PlatformInfraSetDataAtPathInput { clientMutationId?: string; data?: Record; @@ -1275,6 +1295,14 @@ export interface PlatformInfraSetDataAtPathInput { root?: string; sId?: string; } +export interface PlatformInfraSetManyAndCommitInput { + clientMutationId?: string; + entries?: Record; + message?: string; + refname?: string; + sId?: string; + storeId?: string; +} export interface ProvisionBucketInput { /** The logical bucket key (e.g., "public", "private") */ bucketKey: string; @@ -1472,6 +1500,28 @@ export type PlatformInfraInsertNodeAtPathPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface PlatformInfraInsertNodesAtPathsPayload { + clientMutationId?: string | null; + result?: string | null; +} +export type PlatformInfraInsertNodesAtPathsPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; +export interface PlatformInfraSetAndCommitPayload { + clientMutationId?: string | null; + platformInfraCommitEdge?: PlatformInfraCommitEdge | null; + result?: PlatformInfraCommit | null; +} +export type PlatformInfraSetAndCommitPayloadSelect = { + clientMutationId?: boolean; + platformInfraCommitEdge?: { + select: PlatformInfraCommitEdgeSelect; + }; + result?: { + select: PlatformInfraCommitSelect; + }; +}; export interface PlatformInfraSetDataAtPathPayload { clientMutationId?: string | null; result?: string | null; @@ -1480,6 +1530,20 @@ export type PlatformInfraSetDataAtPathPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface PlatformInfraSetManyAndCommitPayload { + clientMutationId?: string | null; + platformInfraCommitEdge?: PlatformInfraCommitEdge | null; + result?: PlatformInfraCommit | null; +} +export type PlatformInfraSetManyAndCommitPayloadSelect = { + clientMutationId?: boolean; + platformInfraCommitEdge?: { + select: PlatformInfraCommitEdgeSelect; + }; + result?: { + select: PlatformInfraCommitSelect; + }; +}; export interface ProvisionBucketPayload { /** The access type applied */ accessType: string; @@ -1907,6 +1971,18 @@ export type DeletePlatformNamespaceEventPayloadSelect = { select: PlatformNamespaceEventEdgeSelect; }; }; +/** A `PlatformInfraCommit` edge in the connection. */ +export interface PlatformInfraCommitEdge { + cursor?: string | null; + /** The `PlatformInfraCommit` at the end of the edge. */ + node?: PlatformInfraCommit | null; +} +export type PlatformInfraCommitEdgeSelect = { + cursor?: boolean; + node?: { + select: PlatformInfraCommitSelect; + }; +}; /** A `DbPreset` edge in the connection. */ export interface DbPresetEdge { cursor?: string | null; @@ -1943,18 +2019,6 @@ export type NamespaceEventEdgeSelect = { select: NamespaceEventSelect; }; }; -/** A `PlatformInfraCommit` edge in the connection. */ -export interface PlatformInfraCommitEdge { - cursor?: string | null; - /** The `PlatformInfraCommit` at the end of the edge. */ - node?: PlatformInfraCommit | null; -} -export type PlatformInfraCommitEdgeSelect = { - cursor?: boolean; - node?: { - select: PlatformInfraCommitSelect; - }; -}; /** A `PlatformInfraObject` edge in the connection. */ export interface PlatformInfraObjectEdge { cursor?: string | null; diff --git a/sdk/constructive-sdk/src/infra/orm/mutation/index.ts b/sdk/constructive-sdk/src/infra/orm/mutation/index.ts index f266633531..04353e5b5c 100644 --- a/sdk/constructive-sdk/src/infra/orm/mutation/index.ts +++ b/sdk/constructive-sdk/src/infra/orm/mutation/index.ts @@ -9,15 +9,24 @@ import type { InferSelectResult, StrictSelect } from '../select-types'; import type { PlatformInfraInitEmptyRepoInput, PlatformInfraInsertNodeAtPathInput, + PlatformInfraInsertNodesAtPathsInput, + PlatformInfraSetAndCommitInput, PlatformInfraSetDataAtPathInput, + PlatformInfraSetManyAndCommitInput, ProvisionBucketInput, PlatformInfraInitEmptyRepoPayload, PlatformInfraInsertNodeAtPathPayload, + PlatformInfraInsertNodesAtPathsPayload, + PlatformInfraSetAndCommitPayload, PlatformInfraSetDataAtPathPayload, + PlatformInfraSetManyAndCommitPayload, ProvisionBucketPayload, PlatformInfraInitEmptyRepoPayloadSelect, PlatformInfraInsertNodeAtPathPayloadSelect, + PlatformInfraInsertNodesAtPathsPayloadSelect, + PlatformInfraSetAndCommitPayloadSelect, PlatformInfraSetDataAtPathPayloadSelect, + PlatformInfraSetManyAndCommitPayloadSelect, ProvisionBucketPayloadSelect, } from '../input-types'; import { connectionFieldsMap } from '../input-types'; @@ -27,9 +36,18 @@ export interface PlatformInfraInitEmptyRepoVariables { export interface PlatformInfraInsertNodeAtPathVariables { input: PlatformInfraInsertNodeAtPathInput; } +export interface PlatformInfraInsertNodesAtPathsVariables { + input: PlatformInfraInsertNodesAtPathsInput; +} +export interface PlatformInfraSetAndCommitVariables { + input: PlatformInfraSetAndCommitInput; +} export interface PlatformInfraSetDataAtPathVariables { input: PlatformInfraSetDataAtPathInput; } +export interface PlatformInfraSetManyAndCommitVariables { + input: PlatformInfraSetManyAndCommitInput; +} /** * Variables for provisionBucket * Provision an S3 bucket for a logical bucket in the database. @@ -103,6 +121,67 @@ export function createMutationOperations(client: OrmClient) { 'PlatformInfraInsertNodeAtPathPayload' ), }), + platformInfraInsertNodesAtPaths: ( + args: PlatformInfraInsertNodesAtPathsVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + platformInfraInsertNodesAtPaths: InferSelectResult< + PlatformInfraInsertNodesAtPathsPayload, + S + > | null; + }>({ + client, + operation: 'mutation', + operationName: 'PlatformInfraInsertNodesAtPaths', + fieldName: 'platformInfraInsertNodesAtPaths', + ...buildCustomDocument( + 'mutation', + 'PlatformInfraInsertNodesAtPaths', + 'platformInfraInsertNodesAtPaths', + options.select, + args, + [ + { + name: 'input', + type: 'PlatformInfraInsertNodesAtPathsInput!', + }, + ], + connectionFieldsMap, + 'PlatformInfraInsertNodesAtPathsPayload' + ), + }), + platformInfraSetAndCommit: ( + args: PlatformInfraSetAndCommitVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + platformInfraSetAndCommit: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'PlatformInfraSetAndCommit', + fieldName: 'platformInfraSetAndCommit', + ...buildCustomDocument( + 'mutation', + 'PlatformInfraSetAndCommit', + 'platformInfraSetAndCommit', + options.select, + args, + [ + { + name: 'input', + type: 'PlatformInfraSetAndCommitInput!', + }, + ], + connectionFieldsMap, + 'PlatformInfraSetAndCommitPayload' + ), + }), platformInfraSetDataAtPath: ( args: PlatformInfraSetDataAtPathVariables, options: { @@ -132,6 +211,38 @@ export function createMutationOperations(client: OrmClient) { 'PlatformInfraSetDataAtPathPayload' ), }), + platformInfraSetManyAndCommit: ( + args: PlatformInfraSetManyAndCommitVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + platformInfraSetManyAndCommit: InferSelectResult< + PlatformInfraSetManyAndCommitPayload, + S + > | null; + }>({ + client, + operation: 'mutation', + operationName: 'PlatformInfraSetManyAndCommit', + fieldName: 'platformInfraSetManyAndCommit', + ...buildCustomDocument( + 'mutation', + 'PlatformInfraSetManyAndCommit', + 'platformInfraSetManyAndCommit', + options.select, + args, + [ + { + name: 'input', + type: 'PlatformInfraSetManyAndCommitInput!', + }, + ], + connectionFieldsMap, + 'PlatformInfraSetManyAndCommitPayload' + ), + }), provisionBucket: ( args: ProvisionBucketVariables, options: { diff --git a/sdk/constructive-sdk/src/modules/README.md b/sdk/constructive-sdk/src/modules/README.md index efb8e061fd..8650e5d2cf 100644 --- a/sdk/constructive-sdk/src/modules/README.md +++ b/sdk/constructive-sdk/src/modules/README.md @@ -8,9 +8,9 @@ ## Overview -- **Tables:** 76 -- **Custom queries:** 2 -- **Custom mutations:** 10 +- **Tables:** 78 +- **Custom queries:** 0 +- **Custom mutations:** 3 **Generators:** ORM diff --git a/sdk/constructive-sdk/src/modules/orm/README.md b/sdk/constructive-sdk/src/modules/orm/README.md index 7982fe489a..7348b2a287 100644 --- a/sdk/constructive-sdk/src/modules/orm/README.md +++ b/sdk/constructive-sdk/src/modules/orm/README.md @@ -82,6 +82,7 @@ const db = createClient({ | `resourceModule` | findMany, findOne, create, update, delete | | `rlsModule` | findMany, findOne, create, update, delete | | `routeModule` | findMany, findOne, create, update, delete | +| `scopeTypesModule` | findMany, findOne, create, update, delete | | `secureTableProvision` | findMany, findOne, create, update, delete | | `sessionSecretsModule` | findMany, findOne, create, update, delete | | `sessionsModule` | findMany, findOne, create, update, delete | @@ -92,6 +93,7 @@ const db = createClient({ | `userAuthModule` | findMany, findOne, create, update, delete | | `userCredentialsModule` | findMany, findOne, create, update, delete | | `userSettingsModule` | findMany, findOne, create, update, delete | +| `userSettingsSecurityModule` | findMany, findOne, create, update, delete | | `userStateModule` | findMany, findOne, create, update, delete | | `usersModule` | findMany, findOne, create, update, delete | | `webauthnAuthModule` | findMany, findOne, create, update, delete | @@ -329,16 +331,22 @@ CRUD operations for BillingProviderModule records. | `apiName` | String | Yes | | `billingCustomersTableId` | UUID | Yes | | `billingCustomersTableName` | String | Yes | +| `billingInvoicesTableId` | UUID | Yes | +| `billingInvoicesTableName` | String | Yes | | `billingPricesTableId` | UUID | Yes | | `billingPricesTableName` | String | Yes | | `billingProductsTableId` | UUID | Yes | | `billingProductsTableName` | String | Yes | +| `billingRefundsTableId` | UUID | Yes | +| `billingRefundsTableName` | String | Yes | | `billingSubscriptionsTableId` | UUID | Yes | | `billingSubscriptionsTableName` | String | Yes | | `billingWebhookEventsTableId` | UUID | Yes | | `billingWebhookEventsTableName` | String | Yes | | `databaseId` | UUID | Yes | | `id` | UUID | No | +| `listPendingUsageSyncFunction` | String | Yes | +| `markUsageSyncedFunction` | String | Yes | | `prefix` | String | Yes | | `pricesTableId` | UUID | Yes | | `privateApiName` | String | Yes | @@ -346,20 +354,22 @@ CRUD operations for BillingProviderModule records. | `processBillingEventFunction` | String | Yes | | `productsTableId` | UUID | Yes | | `provider` | String | Yes | +| `recordRefundFunction` | String | Yes | | `schemaId` | UUID | Yes | | `subscriptionsTableId` | UUID | Yes | +| `upsertInvoiceFunction` | String | Yes | **Operations:** ```typescript // List all billingProviderModule records -const items = await db.billingProviderModule.findMany({ select: { apiName: true, billingCustomersTableId: true, billingCustomersTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, databaseId: true, id: true, prefix: true, pricesTableId: true, privateApiName: true, privateSchemaId: true, processBillingEventFunction: true, productsTableId: true, provider: true, schemaId: true, subscriptionsTableId: true } }).execute(); +const items = await db.billingProviderModule.findMany({ select: { apiName: true, billingCustomersTableId: true, billingCustomersTableName: true, billingInvoicesTableId: true, billingInvoicesTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, billingRefundsTableId: true, billingRefundsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, databaseId: true, id: true, listPendingUsageSyncFunction: true, markUsageSyncedFunction: true, prefix: true, pricesTableId: true, privateApiName: true, privateSchemaId: true, processBillingEventFunction: true, productsTableId: true, provider: true, recordRefundFunction: true, schemaId: true, subscriptionsTableId: true, upsertInvoiceFunction: true } }).execute(); // Get one by id -const item = await db.billingProviderModule.findOne({ id: '', select: { apiName: true, billingCustomersTableId: true, billingCustomersTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, databaseId: true, id: true, prefix: true, pricesTableId: true, privateApiName: true, privateSchemaId: true, processBillingEventFunction: true, productsTableId: true, provider: true, schemaId: true, subscriptionsTableId: true } }).execute(); +const item = await db.billingProviderModule.findOne({ id: '', select: { apiName: true, billingCustomersTableId: true, billingCustomersTableName: true, billingInvoicesTableId: true, billingInvoicesTableName: true, billingPricesTableId: true, billingPricesTableName: true, billingProductsTableId: true, billingProductsTableName: true, billingRefundsTableId: true, billingRefundsTableName: true, billingSubscriptionsTableId: true, billingSubscriptionsTableName: true, billingWebhookEventsTableId: true, billingWebhookEventsTableName: true, databaseId: true, id: true, listPendingUsageSyncFunction: true, markUsageSyncedFunction: true, prefix: true, pricesTableId: true, privateApiName: true, privateSchemaId: true, processBillingEventFunction: true, productsTableId: true, provider: true, recordRefundFunction: true, schemaId: true, subscriptionsTableId: true, upsertInvoiceFunction: true } }).execute(); // Create -const created = await db.billingProviderModule.create({ data: { apiName: '', billingCustomersTableId: '', billingCustomersTableName: '', billingPricesTableId: '', billingPricesTableName: '', billingProductsTableId: '', billingProductsTableName: '', billingSubscriptionsTableId: '', billingSubscriptionsTableName: '', billingWebhookEventsTableId: '', billingWebhookEventsTableName: '', databaseId: '', prefix: '', pricesTableId: '', privateApiName: '', privateSchemaId: '', processBillingEventFunction: '', productsTableId: '', provider: '', schemaId: '', subscriptionsTableId: '' }, select: { id: true } }).execute(); +const created = await db.billingProviderModule.create({ data: { apiName: '', billingCustomersTableId: '', billingCustomersTableName: '', billingInvoicesTableId: '', billingInvoicesTableName: '', billingPricesTableId: '', billingPricesTableName: '', billingProductsTableId: '', billingProductsTableName: '', billingRefundsTableId: '', billingRefundsTableName: '', billingSubscriptionsTableId: '', billingSubscriptionsTableName: '', billingWebhookEventsTableId: '', billingWebhookEventsTableName: '', databaseId: '', listPendingUsageSyncFunction: '', markUsageSyncedFunction: '', prefix: '', pricesTableId: '', privateApiName: '', privateSchemaId: '', processBillingEventFunction: '', productsTableId: '', provider: '', recordRefundFunction: '', schemaId: '', subscriptionsTableId: '', upsertInvoiceFunction: '' }, select: { id: true } }).execute(); // Update const updated = await db.billingProviderModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -508,6 +518,8 @@ CRUD operations for CatalogModule records. | `apisTableName` | String | Yes | | `appsTableId` | UUID | Yes | | `appsTableName` | String | Yes | +| `bindingsTableId` | UUID | Yes | +| `bindingsTableName` | String | Yes | | `bucketsTableId` | UUID | Yes | | `bucketsTableName` | String | Yes | | `databaseId` | UUID | Yes | @@ -547,13 +559,13 @@ CRUD operations for CatalogModule records. ```typescript // List all catalogModule records -const items = await db.catalogModule.findMany({ select: { apiName: true, apisTableId: true, apisTableName: true, appsTableId: true, appsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultPermissions: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } }).execute(); +const items = await db.catalogModule.findMany({ select: { apiName: true, apisTableId: true, apisTableName: true, appsTableId: true, appsTableName: true, bindingsTableId: true, bindingsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultPermissions: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } }).execute(); // Get one by id -const item = await db.catalogModule.findOne({ id: '', select: { apiName: true, apisTableId: true, apisTableName: true, appsTableId: true, appsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultPermissions: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } }).execute(); +const item = await db.catalogModule.findOne({ id: '', select: { apiName: true, apisTableId: true, apisTableName: true, appsTableId: true, appsTableName: true, bindingsTableId: true, bindingsTableName: true, bucketsTableId: true, bucketsTableName: true, databaseId: true, defaultPermissions: true, domainsTableId: true, domainsTableName: true, entityTableId: true, functionsTableId: true, functionsTableName: true, id: true, namespacesTableId: true, namespacesTableName: true, policies: true, privateApiName: true, provisions: true, publicSchemaName: true, resourceDefinitionsTableId: true, resourceDefinitionsTableName: true, resourceInstallationsTableId: true, resourceInstallationsTableName: true, resourcesTableId: true, resourcesTableName: true, schemaId: true, scope: true, sitesAppLinksTableId: true, sitesAppLinksTableName: true, sitesDeepLinksTableId: true, sitesDeepLinksTableName: true, sitesErrorPagesTableId: true, sitesErrorPagesTableName: true, sitesTableId: true, sitesTableName: true, sitesWebConfigTableId: true, sitesWebConfigTableName: true } }).execute(); // Create -const created = await db.catalogModule.create({ data: { apiName: '', apisTableId: '', apisTableName: '', appsTableId: '', appsTableName: '', bucketsTableId: '', bucketsTableName: '', databaseId: '', defaultPermissions: '', domainsTableId: '', domainsTableName: '', entityTableId: '', functionsTableId: '', functionsTableName: '', namespacesTableId: '', namespacesTableName: '', policies: '', privateApiName: '', provisions: '', publicSchemaName: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourcesTableId: '', resourcesTableName: '', schemaId: '', scope: '', sitesAppLinksTableId: '', sitesAppLinksTableName: '', sitesDeepLinksTableId: '', sitesDeepLinksTableName: '', sitesErrorPagesTableId: '', sitesErrorPagesTableName: '', sitesTableId: '', sitesTableName: '', sitesWebConfigTableId: '', sitesWebConfigTableName: '' }, select: { id: true } }).execute(); +const created = await db.catalogModule.create({ data: { apiName: '', apisTableId: '', apisTableName: '', appsTableId: '', appsTableName: '', bindingsTableId: '', bindingsTableName: '', bucketsTableId: '', bucketsTableName: '', databaseId: '', defaultPermissions: '', domainsTableId: '', domainsTableName: '', entityTableId: '', functionsTableId: '', functionsTableName: '', namespacesTableId: '', namespacesTableName: '', policies: '', privateApiName: '', provisions: '', publicSchemaName: '', resourceDefinitionsTableId: '', resourceDefinitionsTableName: '', resourceInstallationsTableId: '', resourceInstallationsTableName: '', resourcesTableId: '', resourcesTableName: '', schemaId: '', scope: '', sitesAppLinksTableId: '', sitesAppLinksTableName: '', sitesDeepLinksTableId: '', sitesDeepLinksTableName: '', sitesErrorPagesTableId: '', sitesErrorPagesTableName: '', sitesTableId: '', sitesTableName: '', sitesWebConfigTableId: '', sitesWebConfigTableName: '' }, select: { id: true } }).execute(); // Update const updated = await db.catalogModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -2947,8 +2959,10 @@ CRUD operations for RouteModule records. | Field | Type | Editable | |-------|------|----------| | `apiName` | String | Yes | +| `appLinksFunctionName` | String | Yes | | `catalogModuleId` | UUID | Yes | | `databaseId` | UUID | Yes | +| `deepLinkFunctionName` | String | Yes | | `defaultPermissions` | String | Yes | | `domainModuleId` | UUID | Yes | | `entityField` | String | Yes | @@ -2975,13 +2989,13 @@ CRUD operations for RouteModule records. ```typescript // List all routeModule records -const items = await db.routeModule.findMany({ select: { apiName: true, catalogModuleId: true, databaseId: true, defaultPermissions: true, domainModuleId: true, entityField: true, entityTableId: true, hostnameBindingsTableId: true, hostnameBindingsTableName: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, resolverFunctionName: true, routeBindingsTableId: true, routeBindingsTableName: true, routesTableId: true, routesTableName: true, schemaId: true, scope: true } }).execute(); +const items = await db.routeModule.findMany({ select: { apiName: true, appLinksFunctionName: true, catalogModuleId: true, databaseId: true, deepLinkFunctionName: true, defaultPermissions: true, domainModuleId: true, entityField: true, entityTableId: true, hostnameBindingsTableId: true, hostnameBindingsTableName: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, resolverFunctionName: true, routeBindingsTableId: true, routeBindingsTableName: true, routesTableId: true, routesTableName: true, schemaId: true, scope: true } }).execute(); // Get one by id -const item = await db.routeModule.findOne({ id: '', select: { apiName: true, catalogModuleId: true, databaseId: true, defaultPermissions: true, domainModuleId: true, entityField: true, entityTableId: true, hostnameBindingsTableId: true, hostnameBindingsTableName: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, resolverFunctionName: true, routeBindingsTableId: true, routeBindingsTableName: true, routesTableId: true, routesTableName: true, schemaId: true, scope: true } }).execute(); +const item = await db.routeModule.findOne({ id: '', select: { apiName: true, appLinksFunctionName: true, catalogModuleId: true, databaseId: true, deepLinkFunctionName: true, defaultPermissions: true, domainModuleId: true, entityField: true, entityTableId: true, hostnameBindingsTableId: true, hostnameBindingsTableName: true, id: true, policies: true, prefix: true, privateApiName: true, privateSchemaId: true, privateSchemaName: true, provisions: true, publicSchemaName: true, resolverFunctionName: true, routeBindingsTableId: true, routeBindingsTableName: true, routesTableId: true, routesTableName: true, schemaId: true, scope: true } }).execute(); // Create -const created = await db.routeModule.create({ data: { apiName: '', catalogModuleId: '', databaseId: '', defaultPermissions: '', domainModuleId: '', entityField: '', entityTableId: '', hostnameBindingsTableId: '', hostnameBindingsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', resolverFunctionName: '', routeBindingsTableId: '', routeBindingsTableName: '', routesTableId: '', routesTableName: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); +const created = await db.routeModule.create({ data: { apiName: '', appLinksFunctionName: '', catalogModuleId: '', databaseId: '', deepLinkFunctionName: '', defaultPermissions: '', domainModuleId: '', entityField: '', entityTableId: '', hostnameBindingsTableId: '', hostnameBindingsTableName: '', policies: '', prefix: '', privateApiName: '', privateSchemaId: '', privateSchemaName: '', provisions: '', publicSchemaName: '', resolverFunctionName: '', routeBindingsTableId: '', routeBindingsTableName: '', routesTableId: '', routesTableName: '', schemaId: '', scope: '' }, select: { id: true } }).execute(); // Update const updated = await db.routeModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); @@ -2990,6 +3004,39 @@ const updated = await db.routeModule.update({ where: { id: '' }, data: { a const deleted = await db.routeModule.delete({ where: { id: '' } }).execute(); ``` +### `db.scopeTypesModule` + +CRUD operations for ScopeTypesModule records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `databaseId` | UUID | Yes | +| `id` | UUID | No | +| `privateSchemaName` | String | Yes | +| `schemaId` | UUID | Yes | +| `scopeTypesTableId` | UUID | Yes | + +**Operations:** + +```typescript +// List all scopeTypesModule records +const items = await db.scopeTypesModule.findMany({ select: { databaseId: true, id: true, privateSchemaName: true, schemaId: true, scopeTypesTableId: true } }).execute(); + +// Get one by id +const item = await db.scopeTypesModule.findOne({ id: '', select: { databaseId: true, id: true, privateSchemaName: true, schemaId: true, scopeTypesTableId: true } }).execute(); + +// Create +const created = await db.scopeTypesModule.create({ data: { databaseId: '', privateSchemaName: '', schemaId: '', scopeTypesTableId: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.scopeTypesModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.scopeTypesModule.delete({ where: { id: '' } }).execute(); +``` + ### `db.secureTableProvision` CRUD operations for SecureTableProvision records. @@ -3453,6 +3500,41 @@ const updated = await db.userSettingsModule.update({ where: { id: '' }, da const deleted = await db.userSettingsModule.delete({ where: { id: '' } }).execute(); ``` +### `db.userSettingsSecurityModule` + +CRUD operations for UserSettingsSecurityModule records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `apiName` | String | Yes | +| `databaseId` | UUID | Yes | +| `id` | UUID | No | +| `ownerTableId` | UUID | Yes | +| `schemaId` | UUID | Yes | +| `tableId` | UUID | Yes | +| `tableName` | String | Yes | + +**Operations:** + +```typescript +// List all userSettingsSecurityModule records +const items = await db.userSettingsSecurityModule.findMany({ select: { apiName: true, databaseId: true, id: true, ownerTableId: true, schemaId: true, tableId: true, tableName: true } }).execute(); + +// Get one by id +const item = await db.userSettingsSecurityModule.findOne({ id: '', select: { apiName: true, databaseId: true, id: true, ownerTableId: true, schemaId: true, tableId: true, tableName: true } }).execute(); + +// Create +const created = await db.userSettingsSecurityModule.create({ data: { apiName: '', databaseId: '', ownerTableId: '', schemaId: '', tableId: '', tableName: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.userSettingsSecurityModule.update({ where: { id: '' }, data: { apiName: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.userSettingsSecurityModule.delete({ where: { id: '' } }).execute(); +``` + ### `db.userStateModule` CRUD operations for UserStateModule records. @@ -3658,42 +3740,6 @@ const deleted = await db.webhookModule.delete({ where: { id: '' } }).execu ## Custom Operations -### `db.query.resolveBlueprintField` - -Resolves a field_name within a given table_id to a field_id. Throws if no match is found. Used by construct_blueprint to translate user-authored field names (e.g. "location") into field UUIDs for downstream provisioning procedures. table_id must already be resolved (via resolve_blueprint_table) before calling this. - -- **Type:** query -- **Arguments:** - - | Argument | Type | - |----------|------| - | `databaseId` | UUID | - | `fieldName` | String | - | `tableId` | UUID | - -```typescript -const result = await db.query.resolveBlueprintField({ databaseId: '', fieldName: '', tableId: '' }).execute(); -``` - -### `db.query.resolveBlueprintTable` - -Resolves a table_name (with optional schema_name) to a table_id. Resolution order: (1) if schema_name provided, exact lookup via metaschema_public.schema.name + metaschema_public.table; (2) check local table_map (tables created in current blueprint); (3) search metaschema_public.table by name across all schemas; (4) if multiple matches, throw ambiguous error asking for schema_name; (5) if no match, throw not-found error. - -- **Type:** query -- **Arguments:** - - | Argument | Type | - |----------|------| - | `databaseId` | UUID | - | `defaultSchemaId` | UUID | - | `schemaName` | String | - | `tableMap` | JSON | - | `tableName` | String | - -```typescript -const result = await db.query.resolveBlueprintTable({ databaseId: '', defaultSchemaId: '', schemaName: '', tableMap: '', tableName: '' }).execute(); -``` - ### `db.mutation.constructBlueprint` Executes a blueprint definition by delegating to provision_* procedures. Creates a blueprint_construction record to track the attempt. Eight phases: (0) entity_type_provision for each membership_type entry — provisions entity tables, membership modules, and security. When a prefix already exists (e.g., 'org'), the entry extends the existing entity type instead of creating a new one; if a storage[] key is present, it provisions entity-scoped storage for that type. (0.5) scope-based storage: each storage[] entry has an optional scope ('app' or 'org' only). App-scoped storage seeds buckets at migration time. Org-scoped storage resolves the org membership type, creates org_buckets/org_files with owner_id, and seeds buckets per-entity via an AFTER INSERT trigger on the users table. When function_module is installed, a private functions bucket is auto-injected into org-scoped or entity-scoped storage entries. (1) provision_table() for each table with nodes[], fields[], policies[], and grants (table-level indexes/fts/unique_constraints/check_constraints are deferred). After provisioning, optional smart_tags (jsonb object) on the table entry are applied via metaschema.append_table_smart_tags(), and optional smart_tags on individual field entries are applied via metaschema.append_field_smart_tags(). (2) provision_relation() for each relation, (3) provision_index() for top-level + deferred indexes, (4) provision_full_text_search() for top-level + deferred FTS, (5) provision_unique_constraint() for top-level + deferred unique constraints, (6) provision_check_constraint() for top-level + deferred check constraints, (7) seed achievements from definition.achievements[] — resolves events_module by entity_prefix and creates INSERT actions for levels, level_requirements, and achievement_rewards tables. Phase 0 entity tables are added to the table_map so subsequent phases can reference them by name. Table-level entries are deferred to phases 3-6 so they can reference columns created by relations in phase 2. Returns the construction record ID on success, NULL on failure. @@ -3742,111 +3788,6 @@ and lifecycle settings. const result = await db.mutation.provisionBucket({ input: { bucketKey: '', ownerId: '' } }).execute(); ``` -### `db.mutation.provisionCheckConstraint` - -Creates a check constraint on a table from a $type + data blueprint definition. Supports: CheckOneOf (enum validation via = ANY(ARRAY[...])), CheckGreaterThan (single-column > value or cross-column), CheckLessThan (single-column < value or cross-column), CheckNotEqual (cross-column inequality). Builds AST expressions via ast_helpers and inserts into metaschema_public.check_constraint. Graceful: skips if a constraint with the same name already exists. - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | ProvisionCheckConstraintInput (required) | - -```typescript -const result = await db.mutation.provisionCheckConstraint({ input: { databaseId: '', definition: '', tableId: '' } }).execute(); -``` - -### `db.mutation.provisionFullTextSearch` - -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. - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | ProvisionFullTextSearchInput (required) | - -```typescript -const result = await db.mutation.provisionFullTextSearch({ input: { databaseId: '', definition: '', tableId: '' } }).execute(); -``` - -### `db.mutation.provisionIndex` - -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. - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | ProvisionIndexInput (required) | - -```typescript -const result = await db.mutation.provisionIndex({ input: { databaseId: '', definition: '', tableId: '' } }).execute(); -``` - -### `db.mutation.provisionRelation` - -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). - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | ProvisionRelationInput (required) | - -```typescript -const result = await db.mutation.provisionRelation({ input: '' }).execute(); -``` - -### `db.mutation.provisionSpatialRelation` - -Idempotent provisioner for metaschema_public.spatial_relation. Inserts a row declaring a spatial predicate between two geometry/geography columns (owner and target). Called from construct_blueprint when a relation entry has $type=RelationSpatial. Graceful: re-running with the same (source_table_id, name) returns the existing id without modifying the row. Operator whitelist and st_dwithin ↔ param_name pairing are enforced by the spatial_relation table CHECKs. Both fields must already exist — this is a metadata-only insert. - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | ProvisionSpatialRelationInput (required) | - -```typescript -const result = await db.mutation.provisionSpatialRelation({ input: '' }).execute(); -``` - -### `db.mutation.provisionTable` - -Composable table provisioning: creates or finds a table, then creates fields (so Data* modules can reference them), applies N nodes (Data* modules), 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). - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | ProvisionTableInput (required) | - -```typescript -const result = await db.mutation.provisionTable({ input: '' }).execute(); -``` - -### `db.mutation.provisionUniqueConstraint` - -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. - -- **Type:** mutation -- **Arguments:** - - | Argument | Type | - |----------|------| - | `input` | ProvisionUniqueConstraintInput (required) | - -```typescript -const result = await db.mutation.provisionUniqueConstraint({ input: { databaseId: '', definition: '', tableId: '' } }).execute(); -``` - --- Built by the [Constructive](https://constructive.io) team. diff --git a/sdk/constructive-sdk/src/modules/orm/index.ts b/sdk/constructive-sdk/src/modules/orm/index.ts index 0951126688..6b46df1203 100644 --- a/sdk/constructive-sdk/src/modules/orm/index.ts +++ b/sdk/constructive-sdk/src/modules/orm/index.ts @@ -66,6 +66,7 @@ import { RelationProvisionModel } from './models/relationProvision'; import { ResourceModuleModel } from './models/resourceModule'; import { RlsModuleModel } from './models/rlsModule'; import { RouteModuleModel } from './models/routeModule'; +import { ScopeTypesModuleModel } from './models/scopeTypesModule'; import { SecureTableProvisionModel } from './models/secureTableProvision'; import { SessionSecretsModuleModel } from './models/sessionSecretsModule'; import { SessionsModuleModel } from './models/sessionsModule'; @@ -76,19 +77,18 @@ import { TransferLogModuleModel } from './models/transferLogModule'; import { UserAuthModuleModel } from './models/userAuthModule'; import { UserCredentialsModuleModel } from './models/userCredentialsModule'; import { UserSettingsModuleModel } from './models/userSettingsModule'; +import { UserSettingsSecurityModuleModel } from './models/userSettingsSecurityModule'; import { UserStateModuleModel } from './models/userStateModule'; import { UsersModuleModel } from './models/usersModule'; import { WebauthnAuthModuleModel } from './models/webauthnAuthModule'; import { WebauthnCredentialsModuleModel } from './models/webauthnCredentialsModule'; import { WebhookModuleModel } from './models/webhookModule'; -import { createQueryOperations } from './query'; import { createMutationOperations } from './mutation'; export type { OrmClientConfig, QueryResult, GraphQLError, GraphQLAdapter } from './client'; export { GraphQLRequestError, FetchAdapter } from './client'; export { QueryBuilder } from './query-builder'; export * from './select-types'; export * from './models'; -export { createQueryOperations } from './query'; export { createMutationOperations } from './mutation'; /** * Create an ORM client instance @@ -177,6 +177,7 @@ export function createClient(config: OrmClientConfig) { resourceModule: new ResourceModuleModel(client), rlsModule: new RlsModuleModel(client), routeModule: new RouteModuleModel(client), + scopeTypesModule: new ScopeTypesModuleModel(client), secureTableProvision: new SecureTableProvisionModel(client), sessionSecretsModule: new SessionSecretsModuleModel(client), sessionsModule: new SessionsModuleModel(client), @@ -187,12 +188,12 @@ export function createClient(config: OrmClientConfig) { userAuthModule: new UserAuthModuleModel(client), userCredentialsModule: new UserCredentialsModuleModel(client), userSettingsModule: new UserSettingsModuleModel(client), + userSettingsSecurityModule: new UserSettingsSecurityModuleModel(client), userStateModule: new UserStateModuleModel(client), usersModule: new UsersModuleModel(client), webauthnAuthModule: new WebauthnAuthModuleModel(client), webauthnCredentialsModule: new WebauthnCredentialsModuleModel(client), webhookModule: new WebhookModuleModel(client), - query: createQueryOperations(client), mutation: createMutationOperations(client), }; } diff --git a/sdk/constructive-sdk/src/modules/orm/input-types.ts b/sdk/constructive-sdk/src/modules/orm/input-types.ts index ed552e4810..611116f58f 100644 --- a/sdk/constructive-sdk/src/modules/orm/input-types.ts +++ b/sdk/constructive-sdk/src/modules/orm/input-types.ts @@ -349,16 +349,22 @@ export interface BillingProviderModule { apiName?: string | null; billingCustomersTableId?: string | null; billingCustomersTableName?: string | null; + billingInvoicesTableId?: string | null; + billingInvoicesTableName?: string | null; billingPricesTableId?: string | null; billingPricesTableName?: string | null; billingProductsTableId?: string | null; billingProductsTableName?: string | null; + billingRefundsTableId?: string | null; + billingRefundsTableName?: string | null; billingSubscriptionsTableId?: string | null; billingSubscriptionsTableName?: string | null; billingWebhookEventsTableId?: string | null; billingWebhookEventsTableName?: string | null; databaseId?: string | null; id: string; + listPendingUsageSyncFunction?: string | null; + markUsageSyncedFunction?: string | null; prefix?: string | null; pricesTableId?: string | null; privateApiName?: string | null; @@ -366,8 +372,10 @@ export interface BillingProviderModule { processBillingEventFunction?: string | null; productsTableId?: string | null; provider?: string | null; + recordRefundFunction?: string | null; schemaId?: string | null; subscriptionsTableId?: string | null; + upsertInvoiceFunction?: string | null; } /** An owned, editable blueprint scoped to a specific database. Created by copying from a blueprint_template via copy_template_to_blueprint() or built from scratch. The owner can customize the definition at any time. Execute it with construct_blueprint() which creates a separate blueprint_construction record to track the build. */ export interface Blueprint { @@ -470,6 +478,8 @@ export interface CatalogModule { apisTableName?: string | null; appsTableId?: string | null; appsTableName?: string | null; + bindingsTableId?: string | null; + bindingsTableName?: string | null; bucketsTableId?: string | null; bucketsTableName?: string | null; databaseId?: string | null; @@ -1019,7 +1029,7 @@ export interface EntityTypeProvision { tableName?: string | null; /** * Single jsonb object describing the full security setup to apply to the entity table. - * Uses the same vocabulary as metaschema_modules_public.provision_table() and blueprint tables[] + * Uses the same vocabulary as metaschema_modules_private.provision_table() and blueprint tables[] * entries, so an entity table is configured the same way an ordinary blueprint table is. * Defaults to NULL; when non-NULL, the five default policies are implicitly replaced by * table_provision.policies[] (is_visible becomes a no-op on this path). @@ -1937,8 +1947,10 @@ export interface RlsModule { } export interface RouteModule { apiName?: string | null; + appLinksFunctionName?: string | null; catalogModuleId?: string | null; databaseId?: string | null; + deepLinkFunctionName?: string | null; defaultPermissions?: string[] | null; domainModuleId?: string | null; entityField?: string | null; @@ -1961,6 +1973,13 @@ export interface RouteModule { schemaId?: string | null; scope?: string | null; } +export interface ScopeTypesModule { + databaseId?: string | null; + id: string; + privateSchemaName?: string | null; + schemaId?: string | null; + scopeTypesTableId?: string | null; +} /** Provisions security, fields, grants, and policies onto a table. Each row can independently: (1) create fields via nodes[] array (supporting multiple Data* modules per row), (2) grant privileges via grants[] array (supporting per-role privilege targeting), (3) create RLS policies via policies[] array (supporting multiple Authz* policies per row). Multiple rows can target the same table to compose different concerns. All three concerns are optional and independent. */ export interface SecureTableProvision { /** The database this provision belongs to. Required. */ @@ -2183,6 +2202,15 @@ export interface UserSettingsModule { tableId?: string | null; tableName?: string | null; } +export interface UserSettingsSecurityModule { + apiName?: string | null; + databaseId?: string | null; + id: string; + ownerTableId?: string | null; + schemaId?: string | null; + tableId?: string | null; + tableName?: string | null; +} export interface UserStateModule { databaseId?: string | null; entityField?: string | null; @@ -2395,6 +2423,7 @@ export interface RouteModuleRelations { catalogModule?: CatalogModule | null; domainModule?: DomainModule | null; } +export interface ScopeTypesModuleRelations {} export interface SecureTableProvisionRelations {} export interface SessionSecretsModuleRelations {} export interface SessionsModuleRelations {} @@ -2410,6 +2439,7 @@ export interface TransferLogModuleRelations {} export interface UserAuthModuleRelations {} export interface UserCredentialsModuleRelations {} export interface UserSettingsModuleRelations {} +export interface UserSettingsSecurityModuleRelations {} export interface UserStateModuleRelations {} export interface UsersModuleRelations {} export interface WebauthnAuthModuleRelations {} @@ -2498,6 +2528,7 @@ export type RelationProvisionWithRelations = RelationProvision & RelationProvisi export type ResourceModuleWithRelations = ResourceModule & ResourceModuleRelations; export type RlsModuleWithRelations = RlsModule & RlsModuleRelations; export type RouteModuleWithRelations = RouteModule & RouteModuleRelations; +export type ScopeTypesModuleWithRelations = ScopeTypesModule & ScopeTypesModuleRelations; export type SecureTableProvisionWithRelations = SecureTableProvision & SecureTableProvisionRelations; export type SessionSecretsModuleWithRelations = SessionSecretsModule & @@ -2511,6 +2542,8 @@ export type UserAuthModuleWithRelations = UserAuthModule & UserAuthModuleRelatio export type UserCredentialsModuleWithRelations = UserCredentialsModule & UserCredentialsModuleRelations; export type UserSettingsModuleWithRelations = UserSettingsModule & UserSettingsModuleRelations; +export type UserSettingsSecurityModuleWithRelations = UserSettingsSecurityModule & + UserSettingsSecurityModuleRelations; export type UserStateModuleWithRelations = UserStateModule & UserStateModuleRelations; export type UsersModuleWithRelations = UsersModule & UsersModuleRelations; export type WebauthnAuthModuleWithRelations = WebauthnAuthModule & WebauthnAuthModuleRelations; @@ -2642,16 +2675,22 @@ export type BillingProviderModuleSelect = { apiName?: boolean; billingCustomersTableId?: boolean; billingCustomersTableName?: boolean; + billingInvoicesTableId?: boolean; + billingInvoicesTableName?: boolean; billingPricesTableId?: boolean; billingPricesTableName?: boolean; billingProductsTableId?: boolean; billingProductsTableName?: boolean; + billingRefundsTableId?: boolean; + billingRefundsTableName?: boolean; billingSubscriptionsTableId?: boolean; billingSubscriptionsTableName?: boolean; billingWebhookEventsTableId?: boolean; billingWebhookEventsTableName?: boolean; databaseId?: boolean; id?: boolean; + listPendingUsageSyncFunction?: boolean; + markUsageSyncedFunction?: boolean; prefix?: boolean; pricesTableId?: boolean; privateApiName?: boolean; @@ -2659,8 +2698,10 @@ export type BillingProviderModuleSelect = { processBillingEventFunction?: boolean; productsTableId?: boolean; provider?: boolean; + recordRefundFunction?: boolean; schemaId?: boolean; subscriptionsTableId?: boolean; + upsertInvoiceFunction?: boolean; }; export type BlueprintSelect = { createdAt?: boolean; @@ -2744,6 +2785,8 @@ export type CatalogModuleSelect = { apisTableName?: boolean; appsTableId?: boolean; appsTableName?: boolean; + bindingsTableId?: boolean; + bindingsTableName?: boolean; bucketsTableId?: boolean; bucketsTableName?: boolean; databaseId?: boolean; @@ -3990,8 +4033,10 @@ export type RlsModuleSelect = { }; export type RouteModuleSelect = { apiName?: boolean; + appLinksFunctionName?: boolean; catalogModuleId?: boolean; databaseId?: boolean; + deepLinkFunctionName?: boolean; defaultPermissions?: boolean; domainModuleId?: boolean; entityField?: boolean; @@ -4020,6 +4065,13 @@ export type RouteModuleSelect = { select: DomainModuleSelect; }; }; +export type ScopeTypesModuleSelect = { + databaseId?: boolean; + id?: boolean; + privateSchemaName?: boolean; + schemaId?: boolean; + scopeTypesTableId?: boolean; +}; export type SecureTableProvisionSelect = { databaseId?: boolean; fields?: boolean; @@ -4238,6 +4290,15 @@ export type UserSettingsModuleSelect = { tableId?: boolean; tableName?: boolean; }; +export type UserSettingsSecurityModuleSelect = { + apiName?: boolean; + databaseId?: boolean; + id?: boolean; + ownerTableId?: boolean; + schemaId?: boolean; + tableId?: boolean; + tableName?: boolean; +}; export type UserStateModuleSelect = { databaseId?: boolean; entityField?: boolean; @@ -4585,6 +4646,10 @@ export interface BillingProviderModuleFilter { billingCustomersTableId?: UUIDFilter; /** Filter by the object’s `billingCustomersTableName` field. */ billingCustomersTableName?: StringFilter; + /** Filter by the object’s `billingInvoicesTableId` field. */ + billingInvoicesTableId?: UUIDFilter; + /** Filter by the object’s `billingInvoicesTableName` field. */ + billingInvoicesTableName?: StringFilter; /** Filter by the object’s `billingPricesTableId` field. */ billingPricesTableId?: UUIDFilter; /** Filter by the object’s `billingPricesTableName` field. */ @@ -4593,6 +4658,10 @@ export interface BillingProviderModuleFilter { billingProductsTableId?: UUIDFilter; /** Filter by the object’s `billingProductsTableName` field. */ billingProductsTableName?: StringFilter; + /** Filter by the object’s `billingRefundsTableId` field. */ + billingRefundsTableId?: UUIDFilter; + /** Filter by the object’s `billingRefundsTableName` field. */ + billingRefundsTableName?: StringFilter; /** Filter by the object’s `billingSubscriptionsTableId` field. */ billingSubscriptionsTableId?: UUIDFilter; /** Filter by the object’s `billingSubscriptionsTableName` field. */ @@ -4605,6 +4674,10 @@ export interface BillingProviderModuleFilter { databaseId?: UUIDFilter; /** Filter by the object’s `id` field. */ id?: UUIDFilter; + /** Filter by the object’s `listPendingUsageSyncFunction` field. */ + listPendingUsageSyncFunction?: StringFilter; + /** Filter by the object’s `markUsageSyncedFunction` field. */ + markUsageSyncedFunction?: StringFilter; /** Negates the expression. */ not?: BillingProviderModuleFilter; /** Checks for any expressions in this list. */ @@ -4623,10 +4696,14 @@ export interface BillingProviderModuleFilter { productsTableId?: UUIDFilter; /** Filter by the object’s `provider` field. */ provider?: StringFilter; + /** Filter by the object’s `recordRefundFunction` field. */ + recordRefundFunction?: StringFilter; /** Filter by the object’s `schemaId` field. */ schemaId?: UUIDFilter; /** Filter by the object’s `subscriptionsTableId` field. */ subscriptionsTableId?: UUIDFilter; + /** Filter by the object’s `upsertInvoiceFunction` field. */ + upsertInvoiceFunction?: StringFilter; } export interface BlueprintFilter { /** Checks for all expressions in this list. */ @@ -4781,6 +4858,10 @@ export interface CatalogModuleFilter { appsTableId?: UUIDFilter; /** Filter by the object’s `appsTableName` field. */ appsTableName?: StringFilter; + /** Filter by the object’s `bindingsTableId` field. */ + bindingsTableId?: UUIDFilter; + /** Filter by the object’s `bindingsTableName` field. */ + bindingsTableName?: StringFilter; /** Filter by the object’s `bucketsTableId` field. */ bucketsTableId?: UUIDFilter; /** Filter by the object’s `bucketsTableName` field. */ @@ -7279,6 +7360,8 @@ export interface RouteModuleFilter { and?: RouteModuleFilter[]; /** Filter by the object’s `apiName` field. */ apiName?: StringFilter; + /** Filter by the object’s `appLinksFunctionName` field. */ + appLinksFunctionName?: StringFilter; /** Filter by the object’s `catalogModule` relation. */ catalogModule?: CatalogModuleFilter; /** A related `catalogModule` exists. */ @@ -7287,6 +7370,8 @@ export interface RouteModuleFilter { catalogModuleId?: UUIDFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; + /** Filter by the object’s `deepLinkFunctionName` field. */ + deepLinkFunctionName?: StringFilter; /** Filter by the object’s `defaultPermissions` field. */ defaultPermissions?: StringListFilter; /** Filter by the object’s `domainModule` relation. */ @@ -7338,6 +7423,24 @@ export interface RouteModuleFilter { /** Filter by the object’s `scope` field. */ scope?: StringFilter; } +export interface ScopeTypesModuleFilter { + /** Checks for all expressions in this list. */ + and?: ScopeTypesModuleFilter[]; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: ScopeTypesModuleFilter; + /** Checks for any expressions in this list. */ + or?: ScopeTypesModuleFilter[]; + /** Filter by the object’s `privateSchemaName` field. */ + privateSchemaName?: StringFilter; + /** Filter by the object’s `schemaId` field. */ + schemaId?: UUIDFilter; + /** Filter by the object’s `scopeTypesTableId` field. */ + scopeTypesTableId?: UUIDFilter; +} export interface SecureTableProvisionFilter { /** Checks for all expressions in this list. */ and?: SecureTableProvisionFilter[]; @@ -7796,6 +7899,28 @@ export interface UserSettingsModuleFilter { /** Filter by the object’s `tableName` field. */ tableName?: StringFilter; } +export interface UserSettingsSecurityModuleFilter { + /** Checks for all expressions in this list. */ + and?: UserSettingsSecurityModuleFilter[]; + /** Filter by the object’s `apiName` field. */ + apiName?: StringFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Negates the expression. */ + not?: UserSettingsSecurityModuleFilter; + /** Checks for any expressions in this list. */ + or?: UserSettingsSecurityModuleFilter[]; + /** Filter by the object’s `ownerTableId` field. */ + ownerTableId?: UUIDFilter; + /** Filter by the object’s `schemaId` field. */ + schemaId?: UUIDFilter; + /** Filter by the object’s `tableId` field. */ + tableId?: UUIDFilter; + /** Filter by the object’s `tableName` field. */ + tableName?: StringFilter; +} export interface UserStateModuleFilter { /** Checks for all expressions in this list. */ and?: UserStateModuleFilter[]; @@ -8214,6 +8339,10 @@ export type BillingProviderModuleOrderBy = | 'BILLING_CUSTOMERS_TABLE_ID_DESC' | 'BILLING_CUSTOMERS_TABLE_NAME_ASC' | 'BILLING_CUSTOMERS_TABLE_NAME_DESC' + | 'BILLING_INVOICES_TABLE_ID_ASC' + | 'BILLING_INVOICES_TABLE_ID_DESC' + | 'BILLING_INVOICES_TABLE_NAME_ASC' + | 'BILLING_INVOICES_TABLE_NAME_DESC' | 'BILLING_PRICES_TABLE_ID_ASC' | 'BILLING_PRICES_TABLE_ID_DESC' | 'BILLING_PRICES_TABLE_NAME_ASC' @@ -8222,6 +8351,10 @@ export type BillingProviderModuleOrderBy = | 'BILLING_PRODUCTS_TABLE_ID_DESC' | 'BILLING_PRODUCTS_TABLE_NAME_ASC' | 'BILLING_PRODUCTS_TABLE_NAME_DESC' + | 'BILLING_REFUNDS_TABLE_ID_ASC' + | 'BILLING_REFUNDS_TABLE_ID_DESC' + | 'BILLING_REFUNDS_TABLE_NAME_ASC' + | 'BILLING_REFUNDS_TABLE_NAME_DESC' | 'BILLING_SUBSCRIPTIONS_TABLE_ID_ASC' | 'BILLING_SUBSCRIPTIONS_TABLE_ID_DESC' | 'BILLING_SUBSCRIPTIONS_TABLE_NAME_ASC' @@ -8234,6 +8367,10 @@ export type BillingProviderModuleOrderBy = | 'DATABASE_ID_DESC' | 'ID_ASC' | 'ID_DESC' + | 'LIST_PENDING_USAGE_SYNC_FUNCTION_ASC' + | 'LIST_PENDING_USAGE_SYNC_FUNCTION_DESC' + | 'MARK_USAGE_SYNCED_FUNCTION_ASC' + | 'MARK_USAGE_SYNCED_FUNCTION_DESC' | 'NATURAL' | 'PREFIX_ASC' | 'PREFIX_DESC' @@ -8251,10 +8388,14 @@ export type BillingProviderModuleOrderBy = | 'PRODUCTS_TABLE_ID_DESC' | 'PROVIDER_ASC' | 'PROVIDER_DESC' + | 'RECORD_REFUND_FUNCTION_ASC' + | 'RECORD_REFUND_FUNCTION_DESC' | 'SCHEMA_ID_ASC' | 'SCHEMA_ID_DESC' | 'SUBSCRIPTIONS_TABLE_ID_ASC' - | 'SUBSCRIPTIONS_TABLE_ID_DESC'; + | 'SUBSCRIPTIONS_TABLE_ID_DESC' + | 'UPSERT_INVOICE_FUNCTION_ASC' + | 'UPSERT_INVOICE_FUNCTION_DESC'; export type BlueprintOrderBy = | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' @@ -8364,6 +8505,10 @@ export type CatalogModuleOrderBy = | 'APPS_TABLE_ID_DESC' | 'APPS_TABLE_NAME_ASC' | 'APPS_TABLE_NAME_DESC' + | 'BINDINGS_TABLE_ID_ASC' + | 'BINDINGS_TABLE_ID_DESC' + | 'BINDINGS_TABLE_NAME_ASC' + | 'BINDINGS_TABLE_NAME_DESC' | 'BUCKETS_TABLE_ID_ASC' | 'BUCKETS_TABLE_ID_DESC' | 'BUCKETS_TABLE_NAME_ASC' @@ -10538,10 +10683,14 @@ export type RlsModuleOrderBy = export type RouteModuleOrderBy = | 'API_NAME_ASC' | 'API_NAME_DESC' + | 'APP_LINKS_FUNCTION_NAME_ASC' + | 'APP_LINKS_FUNCTION_NAME_DESC' | 'CATALOG_MODULE_ID_ASC' | 'CATALOG_MODULE_ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' + | 'DEEP_LINK_FUNCTION_NAME_ASC' + | 'DEEP_LINK_FUNCTION_NAME_DESC' | 'DEFAULT_PERMISSIONS_ASC' | 'DEFAULT_PERMISSIONS_DESC' | 'DOMAIN_MODULE_ID_ASC' @@ -10587,6 +10736,20 @@ export type RouteModuleOrderBy = | 'SCHEMA_ID_DESC' | 'SCOPE_ASC' | 'SCOPE_DESC'; +export type ScopeTypesModuleOrderBy = + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'PRIVATE_SCHEMA_NAME_ASC' + | 'PRIVATE_SCHEMA_NAME_DESC' + | 'SCHEMA_ID_ASC' + | 'SCHEMA_ID_DESC' + | 'SCOPE_TYPES_TABLE_ID_ASC' + | 'SCOPE_TYPES_TABLE_ID_DESC'; export type SecureTableProvisionOrderBy = | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' @@ -10993,6 +11156,24 @@ export type UserSettingsModuleOrderBy = | 'TABLE_ID_DESC' | 'TABLE_NAME_ASC' | 'TABLE_NAME_DESC'; +export type UserSettingsSecurityModuleOrderBy = + | 'API_NAME_ASC' + | 'API_NAME_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NATURAL' + | 'OWNER_TABLE_ID_ASC' + | 'OWNER_TABLE_ID_DESC' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'SCHEMA_ID_ASC' + | 'SCHEMA_ID_DESC' + | 'TABLE_ID_ASC' + | 'TABLE_ID_DESC' + | 'TABLE_NAME_ASC' + | 'TABLE_NAME_DESC'; export type UserStateModuleOrderBy = | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' @@ -11414,15 +11595,21 @@ export interface CreateBillingProviderModuleInput { apiName?: string; billingCustomersTableId?: string; billingCustomersTableName?: string; + billingInvoicesTableId?: string; + billingInvoicesTableName?: string; billingPricesTableId?: string; billingPricesTableName?: string; billingProductsTableId?: string; billingProductsTableName?: string; + billingRefundsTableId?: string; + billingRefundsTableName?: string; billingSubscriptionsTableId?: string; billingSubscriptionsTableName?: string; billingWebhookEventsTableId?: string; billingWebhookEventsTableName?: string; databaseId: string; + listPendingUsageSyncFunction?: string; + markUsageSyncedFunction?: string; prefix?: string; pricesTableId?: string; privateApiName?: string; @@ -11430,23 +11617,31 @@ export interface CreateBillingProviderModuleInput { processBillingEventFunction?: string; productsTableId?: string; provider?: string; + recordRefundFunction?: string; schemaId?: string; subscriptionsTableId?: string; + upsertInvoiceFunction?: string; }; } export interface BillingProviderModulePatch { apiName?: string | null; billingCustomersTableId?: string | null; billingCustomersTableName?: string | null; + billingInvoicesTableId?: string | null; + billingInvoicesTableName?: string | null; billingPricesTableId?: string | null; billingPricesTableName?: string | null; billingProductsTableId?: string | null; billingProductsTableName?: string | null; + billingRefundsTableId?: string | null; + billingRefundsTableName?: string | null; billingSubscriptionsTableId?: string | null; billingSubscriptionsTableName?: string | null; billingWebhookEventsTableId?: string | null; billingWebhookEventsTableName?: string | null; databaseId?: string | null; + listPendingUsageSyncFunction?: string | null; + markUsageSyncedFunction?: string | null; prefix?: string | null; pricesTableId?: string | null; privateApiName?: string | null; @@ -11454,8 +11649,10 @@ export interface BillingProviderModulePatch { processBillingEventFunction?: string | null; productsTableId?: string | null; provider?: string | null; + recordRefundFunction?: string | null; schemaId?: string | null; subscriptionsTableId?: string | null; + upsertInvoiceFunction?: string | null; } export interface UpdateBillingProviderModuleInput { clientMutationId?: string; @@ -11590,6 +11787,8 @@ export interface CreateCatalogModuleInput { apisTableName?: string; appsTableId?: string; appsTableName?: string; + bindingsTableId?: string; + bindingsTableName?: string; bucketsTableId?: string; bucketsTableName?: string; databaseId: string; @@ -11631,6 +11830,8 @@ export interface CatalogModulePatch { apisTableName?: string | null; appsTableId?: string | null; appsTableName?: string | null; + bindingsTableId?: string | null; + bindingsTableName?: string | null; bucketsTableId?: string | null; bucketsTableName?: string | null; databaseId?: string | null; @@ -14264,8 +14465,10 @@ export interface CreateRouteModuleInput { clientMutationId?: string; routeModule: { apiName?: string; + appLinksFunctionName?: string; catalogModuleId?: string; databaseId: string; + deepLinkFunctionName?: string; defaultPermissions?: string[]; domainModuleId?: string; entityField?: string; @@ -14290,8 +14493,10 @@ export interface CreateRouteModuleInput { } export interface RouteModulePatch { apiName?: string | null; + appLinksFunctionName?: string | null; catalogModuleId?: string | null; databaseId?: string | null; + deepLinkFunctionName?: string | null; defaultPermissions?: string[] | null; domainModuleId?: string | null; entityField?: string | null; @@ -14322,6 +14527,30 @@ export interface DeleteRouteModuleInput { clientMutationId?: string; id: string; } +export interface CreateScopeTypesModuleInput { + clientMutationId?: string; + scopeTypesModule: { + databaseId: string; + privateSchemaName?: string; + schemaId?: string; + scopeTypesTableId?: string; + }; +} +export interface ScopeTypesModulePatch { + databaseId?: string | null; + privateSchemaName?: string | null; + schemaId?: string | null; + scopeTypesTableId?: string | null; +} +export interface UpdateScopeTypesModuleInput { + clientMutationId?: string; + id: string; + scopeTypesModulePatch: ScopeTypesModulePatch; +} +export interface DeleteScopeTypesModuleInput { + clientMutationId?: string; + id: string; +} export interface CreateSecureTableProvisionInput { clientMutationId?: string; secureTableProvision: { @@ -14828,6 +15057,34 @@ export interface DeleteUserSettingsModuleInput { clientMutationId?: string; id: string; } +export interface CreateUserSettingsSecurityModuleInput { + clientMutationId?: string; + userSettingsSecurityModule: { + apiName?: string; + databaseId: string; + ownerTableId?: string; + schemaId?: string; + tableId?: string; + tableName?: string; + }; +} +export interface UserSettingsSecurityModulePatch { + apiName?: string | null; + databaseId?: string | null; + ownerTableId?: string | null; + schemaId?: string | null; + tableId?: string | null; + tableName?: string | null; +} +export interface UpdateUserSettingsSecurityModuleInput { + clientMutationId?: string; + id: string; + userSettingsSecurityModulePatch: UserSettingsSecurityModulePatch; +} +export interface DeleteUserSettingsSecurityModuleInput { + clientMutationId?: string; + id: string; +} export interface CreateUserStateModuleInput { clientMutationId?: string; userStateModule: { @@ -15101,79 +15358,6 @@ export interface ProvisionBucketInput { */ ownerId?: string; } -export interface ProvisionCheckConstraintInput { - clientMutationId?: string; - databaseId?: string; - definition?: Record; - tableId?: string; -} -export interface ProvisionFullTextSearchInput { - clientMutationId?: string; - databaseId?: string; - definition?: Record; - tableId?: string; -} -export interface ProvisionIndexInput { - clientMutationId?: string; - databaseId?: string; - definition?: Record; - tableId?: string; -} -export interface ProvisionRelationInput { - apiRequired?: boolean; - clientMutationId?: string; - createIndex?: boolean; - databaseId?: string; - deleteAction?: string; - exposeInApi?: boolean; - fieldName?: string; - grants?: Record; - isRequired?: boolean; - junctionSchemaId?: string; - junctionTableId?: string; - junctionTableName?: string; - nodes?: Record; - policies?: Record; - relationType?: string; - sourceFieldName?: string; - sourceTableId?: string; - targetFieldName?: string; - targetTableId?: string; - useCompositeKey?: boolean; -} -export interface ProvisionSpatialRelationInput { - clientMutationId?: string; - databaseId?: string; - name?: string; - operator?: string; - paramName?: string; - sourceFieldId?: string; - sourceTableId?: string; - targetFieldId?: string; - targetTableId?: string; -} -export interface ProvisionTableInput { - clientMutationId?: string; - databaseId?: string; - description?: string; - fields?: Record; - fullTextSearches?: Record; - grants?: Record; - indexes?: Record; - nodes?: Record; - policies?: Record; - schemaId?: string; - tableId?: string; - tableName?: string; - uniqueConstraints?: Record; - useRls?: boolean; -} -export interface ProvisionUniqueConstraintInput { - clientMutationId?: string; - databaseId?: string; - definition?: Record; - tableId?: string; -} /** A filter to be used against many `BlueprintConstruction` object types. All fields are combined with a logical ‘and.’ */ export interface BlueprintToManyBlueprintConstructionFilter { /** Filters to entities where every related entity matches. */ @@ -15586,16 +15770,22 @@ export interface BillingProviderModuleInput { apiName?: string; billingCustomersTableId?: string; billingCustomersTableName?: string; + billingInvoicesTableId?: string; + billingInvoicesTableName?: string; billingPricesTableId?: string; billingPricesTableName?: string; billingProductsTableId?: string; billingProductsTableName?: string; + billingRefundsTableId?: string; + billingRefundsTableName?: string; billingSubscriptionsTableId?: string; billingSubscriptionsTableName?: string; billingWebhookEventsTableId?: string; billingWebhookEventsTableName?: string; databaseId: string; id?: string; + listPendingUsageSyncFunction?: string; + markUsageSyncedFunction?: string; prefix?: string; pricesTableId?: string; privateApiName?: string; @@ -15603,8 +15793,10 @@ export interface BillingProviderModuleInput { processBillingEventFunction?: string; productsTableId?: string; provider?: string; + recordRefundFunction?: string; schemaId?: string; subscriptionsTableId?: string; + upsertInvoiceFunction?: string; } /** An input for mutations affecting `Blueprint` */ export interface BlueprintInput { @@ -15708,6 +15900,8 @@ export interface CatalogModuleInput { apisTableName?: string; appsTableId?: string; appsTableName?: string; + bindingsTableId?: string; + bindingsTableName?: string; bucketsTableId?: string; bucketsTableName?: string; databaseId: string; @@ -16280,7 +16474,7 @@ export interface EntityTypeProvisionInput { tableName?: string; /** * Single jsonb object describing the full security setup to apply to the entity table. - * Uses the same vocabulary as metaschema_modules_public.provision_table() and blueprint tables[] + * Uses the same vocabulary as metaschema_modules_private.provision_table() and blueprint tables[] * entries, so an entity table is configured the same way an ordinary blueprint table is. * Defaults to NULL; when non-NULL, the five default policies are implicitly replaced by * table_provision.policies[] (is_visible becomes a no-op on this path). @@ -17201,8 +17395,10 @@ export interface RlsModuleInput { /** An input for mutations affecting `RouteModule` */ export interface RouteModuleInput { apiName?: string; + appLinksFunctionName?: string; catalogModuleId?: string; databaseId: string; + deepLinkFunctionName?: string; defaultPermissions?: string[]; domainModuleId?: string; entityField?: string; @@ -17225,6 +17421,14 @@ export interface RouteModuleInput { schemaId?: string; scope: string; } +/** An input for mutations affecting `ScopeTypesModule` */ +export interface ScopeTypesModuleInput { + databaseId: string; + id?: string; + privateSchemaName?: string; + schemaId?: string; + scopeTypesTableId?: string; +} /** An input for mutations affecting `SecureTableProvision` */ export interface SecureTableProvisionInput { /** The database this provision belongs to. Required. */ @@ -17450,6 +17654,16 @@ export interface UserSettingsModuleInput { tableId?: string; tableName?: string; } +/** An input for mutations affecting `UserSettingsSecurityModule` */ +export interface UserSettingsSecurityModuleInput { + apiName?: string; + databaseId: string; + id?: string; + ownerTableId?: string; + schemaId?: string; + tableId?: string; + tableName?: string; +} /** An input for mutations affecting `UserStateModule` */ export interface UserStateModuleInput { databaseId: string; @@ -17845,6 +18059,8 @@ export interface RouteModuleFilter { and?: RouteModuleFilter[]; /** Filter by the object’s `apiName` field. */ apiName?: StringFilter; + /** Filter by the object’s `appLinksFunctionName` field. */ + appLinksFunctionName?: StringFilter; /** Filter by the object’s `catalogModule` relation. */ catalogModule?: CatalogModuleFilter; /** A related `catalogModule` exists. */ @@ -17853,6 +18069,8 @@ export interface RouteModuleFilter { catalogModuleId?: UUIDFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; + /** Filter by the object’s `deepLinkFunctionName` field. */ + deepLinkFunctionName?: StringFilter; /** Filter by the object’s `defaultPermissions` field. */ defaultPermissions?: StringListFilter; /** Filter by the object’s `domainModule` relation. */ @@ -18725,6 +18943,10 @@ export interface CatalogModuleFilter { appsTableId?: UUIDFilter; /** Filter by the object’s `appsTableName` field. */ appsTableName?: StringFilter; + /** Filter by the object’s `bindingsTableId` field. */ + bindingsTableId?: UUIDFilter; + /** Filter by the object’s `bindingsTableName` field. */ + bindingsTableName?: StringFilter; /** Filter by the object’s `bucketsTableId` field. */ bucketsTableId?: UUIDFilter; /** Filter by the object’s `bucketsTableName` field. */ @@ -19279,62 +19501,6 @@ export type ProvisionBucketPayloadSelect = { provider?: boolean; success?: boolean; }; -export interface ProvisionCheckConstraintPayload { - clientMutationId?: string | null; -} -export type ProvisionCheckConstraintPayloadSelect = { - clientMutationId?: boolean; -}; -export interface ProvisionFullTextSearchPayload { - clientMutationId?: string | null; - result?: string | null; -} -export type ProvisionFullTextSearchPayloadSelect = { - clientMutationId?: boolean; - result?: boolean; -}; -export interface ProvisionIndexPayload { - clientMutationId?: string | null; - result?: string | null; -} -export type ProvisionIndexPayloadSelect = { - clientMutationId?: boolean; - result?: boolean; -}; -export interface ProvisionRelationPayload { - clientMutationId?: string | null; - result?: ProvisionRelationRecord[] | null; -} -export type ProvisionRelationPayloadSelect = { - clientMutationId?: boolean; - result?: { - select: ProvisionRelationRecordSelect; - }; -}; -export interface ProvisionSpatialRelationPayload { - clientMutationId?: string | null; - result?: string | null; -} -export type ProvisionSpatialRelationPayloadSelect = { - clientMutationId?: boolean; - result?: boolean; -}; -export interface ProvisionTablePayload { - clientMutationId?: string | null; - result?: ProvisionTableRecord[] | null; -} -export type ProvisionTablePayloadSelect = { - clientMutationId?: boolean; - result?: { - select: ProvisionTableRecordSelect; - }; -}; -export interface ProvisionUniqueConstraintPayload { - clientMutationId?: string | null; -} -export type ProvisionUniqueConstraintPayloadSelect = { - clientMutationId?: boolean; -}; export interface CreateAgentModulePayload { /** The `AgentModule` that was created by this mutation. */ agentModule?: AgentModule | null; @@ -22080,6 +22246,51 @@ export type DeleteRouteModulePayloadSelect = { select: RouteModuleEdgeSelect; }; }; +export interface CreateScopeTypesModulePayload { + clientMutationId?: string | null; + /** The `ScopeTypesModule` that was created by this mutation. */ + scopeTypesModule?: ScopeTypesModule | null; + scopeTypesModuleEdge?: ScopeTypesModuleEdge | null; +} +export type CreateScopeTypesModulePayloadSelect = { + clientMutationId?: boolean; + scopeTypesModule?: { + select: ScopeTypesModuleSelect; + }; + scopeTypesModuleEdge?: { + select: ScopeTypesModuleEdgeSelect; + }; +}; +export interface UpdateScopeTypesModulePayload { + clientMutationId?: string | null; + /** The `ScopeTypesModule` that was updated by this mutation. */ + scopeTypesModule?: ScopeTypesModule | null; + scopeTypesModuleEdge?: ScopeTypesModuleEdge | null; +} +export type UpdateScopeTypesModulePayloadSelect = { + clientMutationId?: boolean; + scopeTypesModule?: { + select: ScopeTypesModuleSelect; + }; + scopeTypesModuleEdge?: { + select: ScopeTypesModuleEdgeSelect; + }; +}; +export interface DeleteScopeTypesModulePayload { + clientMutationId?: string | null; + /** The `ScopeTypesModule` that was deleted by this mutation. */ + scopeTypesModule?: ScopeTypesModule | null; + scopeTypesModuleEdge?: ScopeTypesModuleEdge | null; +} +export type DeleteScopeTypesModulePayloadSelect = { + clientMutationId?: boolean; + scopeTypesModule?: { + select: ScopeTypesModuleSelect; + }; + scopeTypesModuleEdge?: { + select: ScopeTypesModuleEdgeSelect; + }; +}; export interface CreateSecureTableProvisionPayload { clientMutationId?: string | null; /** The `SecureTableProvision` that was created by this mutation. */ @@ -22530,6 +22741,51 @@ export type DeleteUserSettingsModulePayloadSelect = { select: UserSettingsModuleEdgeSelect; }; }; +export interface CreateUserSettingsSecurityModulePayload { + clientMutationId?: string | null; + /** The `UserSettingsSecurityModule` that was created by this mutation. */ + userSettingsSecurityModule?: UserSettingsSecurityModule | null; + userSettingsSecurityModuleEdge?: UserSettingsSecurityModuleEdge | null; +} +export type CreateUserSettingsSecurityModulePayloadSelect = { + clientMutationId?: boolean; + userSettingsSecurityModule?: { + select: UserSettingsSecurityModuleSelect; + }; + userSettingsSecurityModuleEdge?: { + select: UserSettingsSecurityModuleEdgeSelect; + }; +}; +export interface UpdateUserSettingsSecurityModulePayload { + clientMutationId?: string | null; + /** The `UserSettingsSecurityModule` that was updated by this mutation. */ + userSettingsSecurityModule?: UserSettingsSecurityModule | null; + userSettingsSecurityModuleEdge?: UserSettingsSecurityModuleEdge | null; +} +export type UpdateUserSettingsSecurityModulePayloadSelect = { + clientMutationId?: boolean; + userSettingsSecurityModule?: { + select: UserSettingsSecurityModuleSelect; + }; + userSettingsSecurityModuleEdge?: { + select: UserSettingsSecurityModuleEdgeSelect; + }; +}; +export interface DeleteUserSettingsSecurityModulePayload { + clientMutationId?: string | null; + /** The `UserSettingsSecurityModule` that was deleted by this mutation. */ + userSettingsSecurityModule?: UserSettingsSecurityModule | null; + userSettingsSecurityModuleEdge?: UserSettingsSecurityModuleEdge | null; +} +export type DeleteUserSettingsSecurityModulePayloadSelect = { + clientMutationId?: boolean; + userSettingsSecurityModule?: { + select: UserSettingsSecurityModuleSelect; + }; + userSettingsSecurityModuleEdge?: { + select: UserSettingsSecurityModuleEdgeSelect; + }; +}; export interface CreateUserStateModulePayload { clientMutationId?: string | null; /** The `UserStateModule` that was created by this mutation. */ @@ -22755,26 +23011,6 @@ export type DeleteWebhookModulePayloadSelect = { select: WebhookModuleEdgeSelect; }; }; -export interface ProvisionRelationRecord { - outFieldId?: string | null; - outJunctionTableId?: string | null; - outSourceFieldId?: string | null; - outTargetFieldId?: string | null; -} -export type ProvisionRelationRecordSelect = { - outFieldId?: boolean; - outJunctionTableId?: boolean; - outSourceFieldId?: boolean; - outTargetFieldId?: boolean; -}; -export interface ProvisionTableRecord { - outFields?: string[] | null; - outTableId?: string | null; -} -export type ProvisionTableRecordSelect = { - outFields?: boolean; - outTableId?: boolean; -}; /** A `AgentModule` edge in the connection. */ export interface AgentModuleEdge { cursor?: string | null; @@ -23507,6 +23743,18 @@ export type RouteModuleEdgeSelect = { select: RouteModuleSelect; }; }; +/** A `ScopeTypesModule` edge in the connection. */ +export interface ScopeTypesModuleEdge { + cursor?: string | null; + /** The `ScopeTypesModule` at the end of the edge. */ + node?: ScopeTypesModule | null; +} +export type ScopeTypesModuleEdgeSelect = { + cursor?: boolean; + node?: { + select: ScopeTypesModuleSelect; + }; +}; /** A `SecureTableProvision` edge in the connection. */ export interface SecureTableProvisionEdge { cursor?: string | null; @@ -23627,6 +23875,18 @@ export type UserSettingsModuleEdgeSelect = { select: UserSettingsModuleSelect; }; }; +/** A `UserSettingsSecurityModule` edge in the connection. */ +export interface UserSettingsSecurityModuleEdge { + cursor?: string | null; + /** The `UserSettingsSecurityModule` at the end of the edge. */ + node?: UserSettingsSecurityModule | null; +} +export type UserSettingsSecurityModuleEdgeSelect = { + cursor?: boolean; + node?: { + select: UserSettingsSecurityModuleSelect; + }; +}; /** A `UserStateModule` edge in the connection. */ export interface UserStateModuleEdge { cursor?: string | null; diff --git a/sdk/constructive-sdk/src/modules/orm/models/index.ts b/sdk/constructive-sdk/src/modules/orm/models/index.ts index 55e18104c1..7dcf593d78 100644 --- a/sdk/constructive-sdk/src/modules/orm/models/index.ts +++ b/sdk/constructive-sdk/src/modules/orm/models/index.ts @@ -64,6 +64,7 @@ export { RelationProvisionModel } from './relationProvision'; export { ResourceModuleModel } from './resourceModule'; export { RlsModuleModel } from './rlsModule'; export { RouteModuleModel } from './routeModule'; +export { ScopeTypesModuleModel } from './scopeTypesModule'; export { SecureTableProvisionModel } from './secureTableProvision'; export { SessionSecretsModuleModel } from './sessionSecretsModule'; export { SessionsModuleModel } from './sessionsModule'; @@ -74,6 +75,7 @@ export { TransferLogModuleModel } from './transferLogModule'; export { UserAuthModuleModel } from './userAuthModule'; export { UserCredentialsModuleModel } from './userCredentialsModule'; export { UserSettingsModuleModel } from './userSettingsModule'; +export { UserSettingsSecurityModuleModel } from './userSettingsSecurityModule'; export { UserStateModuleModel } from './userStateModule'; export { UsersModuleModel } from './usersModule'; export { WebauthnAuthModuleModel } from './webauthnAuthModule'; diff --git a/sdk/constructive-sdk/src/modules/orm/models/scopeTypesModule.ts b/sdk/constructive-sdk/src/modules/orm/models/scopeTypesModule.ts new file mode 100644 index 0000000000..1cbd281d05 --- /dev/null +++ b/sdk/constructive-sdk/src/modules/orm/models/scopeTypesModule.ts @@ -0,0 +1,245 @@ +/** + * ScopeTypesModule model for ORM client + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { OrmClient } from '../client'; +import { + QueryBuilder, + buildFindManyDocument, + buildFindFirstDocument, + buildFindOneDocument, + buildCreateDocument, + buildUpdateByPkDocument, + buildDeleteByPkDocument, +} from '../query-builder'; +import type { + ConnectionResult, + FindManyArgs, + FindFirstArgs, + CreateArgs, + UpdateArgs, + DeleteArgs, + InferSelectResult, + StrictSelect, +} from '../select-types'; +import type { + ScopeTypesModule, + ScopeTypesModuleWithRelations, + ScopeTypesModuleSelect, + ScopeTypesModuleFilter, + ScopeTypesModuleOrderBy, + CreateScopeTypesModuleInput, + UpdateScopeTypesModuleInput, + ScopeTypesModulePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class ScopeTypesModuleModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + scopeTypesModules: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'ScopeTypesModule', + 'scopeTypesModules', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + first: args?.first, + last: args?.last, + after: args?.after, + before: args?.before, + offset: args?.offset, + }, + 'ScopeTypesModuleFilter', + 'ScopeTypesModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'ScopeTypesModule', + fieldName: 'scopeTypesModules', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + scopeTypesModule: InferSelectResult | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'ScopeTypesModule', + 'scopeTypesModules', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'ScopeTypesModuleFilter', + 'ScopeTypesModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'ScopeTypesModule', + fieldName: 'scopeTypesModule', + document, + variables, + transform: (data: { + scopeTypesModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + scopeTypesModule: data.scopeTypesModules?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + scopeTypesModule: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'ScopeTypesModule', + 'scopeTypesModules', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'ScopeTypesModuleFilter', + 'ScopeTypesModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'ScopeTypesModule', + fieldName: 'scopeTypesModule', + document, + variables, + transform: (data: { + scopeTypesModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + scopeTypesModule: data.scopeTypesModules?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createScopeTypesModule: { + scopeTypesModule: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'ScopeTypesModule', + 'createScopeTypesModule', + 'scopeTypesModule', + args.select, + args.data, + 'CreateScopeTypesModuleInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'ScopeTypesModule', + fieldName: 'createScopeTypesModule', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + ScopeTypesModulePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateScopeTypesModule: { + scopeTypesModule: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'ScopeTypesModule', + 'updateScopeTypesModule', + 'scopeTypesModule', + args.select, + args.where.id, + args.data, + 'UpdateScopeTypesModuleInput', + 'id', + 'scopeTypesModulePatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'ScopeTypesModule', + fieldName: 'updateScopeTypesModule', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteScopeTypesModule: { + scopeTypesModule: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'ScopeTypesModule', + 'deleteScopeTypesModule', + 'scopeTypesModule', + { + id: args.where.id, + }, + 'DeleteScopeTypesModuleInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'ScopeTypesModule', + fieldName: 'deleteScopeTypesModule', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/modules/orm/models/userSettingsSecurityModule.ts b/sdk/constructive-sdk/src/modules/orm/models/userSettingsSecurityModule.ts new file mode 100644 index 0000000000..13b7c87010 --- /dev/null +++ b/sdk/constructive-sdk/src/modules/orm/models/userSettingsSecurityModule.ts @@ -0,0 +1,253 @@ +/** + * UserSettingsSecurityModule model for ORM client + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { OrmClient } from '../client'; +import { + QueryBuilder, + buildFindManyDocument, + buildFindFirstDocument, + buildFindOneDocument, + buildCreateDocument, + buildUpdateByPkDocument, + buildDeleteByPkDocument, +} from '../query-builder'; +import type { + ConnectionResult, + FindManyArgs, + FindFirstArgs, + CreateArgs, + UpdateArgs, + DeleteArgs, + InferSelectResult, + StrictSelect, +} from '../select-types'; +import type { + UserSettingsSecurityModule, + UserSettingsSecurityModuleWithRelations, + UserSettingsSecurityModuleSelect, + UserSettingsSecurityModuleFilter, + UserSettingsSecurityModuleOrderBy, + CreateUserSettingsSecurityModuleInput, + UpdateUserSettingsSecurityModuleInput, + UserSettingsSecurityModulePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class UserSettingsSecurityModuleModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + userSettingsSecurityModules: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'UserSettingsSecurityModule', + 'userSettingsSecurityModules', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + first: args?.first, + last: args?.last, + after: args?.after, + before: args?.before, + offset: args?.offset, + }, + 'UserSettingsSecurityModuleFilter', + 'UserSettingsSecurityModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'UserSettingsSecurityModule', + fieldName: 'userSettingsSecurityModules', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + userSettingsSecurityModule: InferSelectResult< + UserSettingsSecurityModuleWithRelations, + S + > | null; + }> { + const { document, variables } = buildFindFirstDocument( + 'UserSettingsSecurityModule', + 'userSettingsSecurityModules', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + }, + 'UserSettingsSecurityModuleFilter', + 'UserSettingsSecurityModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'UserSettingsSecurityModule', + fieldName: 'userSettingsSecurityModule', + document, + variables, + transform: (data: { + userSettingsSecurityModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + userSettingsSecurityModule: data.userSettingsSecurityModules?.nodes?.[0] ?? null, + }), + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + userSettingsSecurityModule: InferSelectResult< + UserSettingsSecurityModuleWithRelations, + S + > | null; + }> { + const { document, variables } = buildFindManyDocument( + 'UserSettingsSecurityModule', + 'userSettingsSecurityModules', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'UserSettingsSecurityModuleFilter', + 'UserSettingsSecurityModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'UserSettingsSecurityModule', + fieldName: 'userSettingsSecurityModule', + document, + variables, + transform: (data: { + userSettingsSecurityModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + userSettingsSecurityModule: data.userSettingsSecurityModules?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createUserSettingsSecurityModule: { + userSettingsSecurityModule: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'UserSettingsSecurityModule', + 'createUserSettingsSecurityModule', + 'userSettingsSecurityModule', + args.select, + args.data, + 'CreateUserSettingsSecurityModuleInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'UserSettingsSecurityModule', + fieldName: 'createUserSettingsSecurityModule', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + UserSettingsSecurityModulePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateUserSettingsSecurityModule: { + userSettingsSecurityModule: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'UserSettingsSecurityModule', + 'updateUserSettingsSecurityModule', + 'userSettingsSecurityModule', + args.select, + args.where.id, + args.data, + 'UpdateUserSettingsSecurityModuleInput', + 'id', + 'userSettingsSecurityModulePatch', + connectionFieldsMap, + undefined + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'UserSettingsSecurityModule', + fieldName: 'updateUserSettingsSecurityModule', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteUserSettingsSecurityModule: { + userSettingsSecurityModule: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'UserSettingsSecurityModule', + 'deleteUserSettingsSecurityModule', + 'userSettingsSecurityModule', + { + id: args.where.id, + }, + 'DeleteUserSettingsSecurityModuleInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'UserSettingsSecurityModule', + fieldName: 'deleteUserSettingsSecurityModule', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/modules/orm/mutation/index.ts b/sdk/constructive-sdk/src/modules/orm/mutation/index.ts index 60041efadb..5450eca294 100644 --- a/sdk/constructive-sdk/src/modules/orm/mutation/index.ts +++ b/sdk/constructive-sdk/src/modules/orm/mutation/index.ts @@ -10,33 +10,12 @@ import type { ConstructBlueprintInput, CopyTemplateToBlueprintInput, ProvisionBucketInput, - ProvisionCheckConstraintInput, - ProvisionFullTextSearchInput, - ProvisionIndexInput, - ProvisionRelationInput, - ProvisionSpatialRelationInput, - ProvisionTableInput, - ProvisionUniqueConstraintInput, ConstructBlueprintPayload, CopyTemplateToBlueprintPayload, ProvisionBucketPayload, - ProvisionCheckConstraintPayload, - ProvisionFullTextSearchPayload, - ProvisionIndexPayload, - ProvisionRelationPayload, - ProvisionSpatialRelationPayload, - ProvisionTablePayload, - ProvisionUniqueConstraintPayload, ConstructBlueprintPayloadSelect, CopyTemplateToBlueprintPayloadSelect, ProvisionBucketPayloadSelect, - ProvisionCheckConstraintPayloadSelect, - ProvisionFullTextSearchPayloadSelect, - ProvisionIndexPayloadSelect, - ProvisionRelationPayloadSelect, - ProvisionSpatialRelationPayloadSelect, - ProvisionTablePayloadSelect, - ProvisionUniqueConstraintPayloadSelect, } from '../input-types'; import { connectionFieldsMap } from '../input-types'; /** @@ -63,55 +42,6 @@ and lifecycle settings. export interface ProvisionBucketVariables { input: ProvisionBucketInput; } -/** - * Variables for provisionCheckConstraint - * Creates a check constraint on a table from a $type + data blueprint definition. Supports: CheckOneOf (enum validation via = ANY(ARRAY[...])), CheckGreaterThan (single-column > value or cross-column), CheckLessThan (single-column < value or cross-column), CheckNotEqual (cross-column inequality). Builds AST expressions via ast_helpers and inserts into metaschema_public.check_constraint. Graceful: skips if a constraint with the same name already exists. - */ -export interface ProvisionCheckConstraintVariables { - input: ProvisionCheckConstraintInput; -} -/** - * Variables for provisionFullTextSearch - * 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. - */ -export interface ProvisionFullTextSearchVariables { - input: ProvisionFullTextSearchInput; -} -/** - * Variables for provisionIndex - * 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. - */ -export interface ProvisionIndexVariables { - input: ProvisionIndexInput; -} -/** - * Variables for provisionRelation - * 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). - */ -export interface ProvisionRelationVariables { - input: ProvisionRelationInput; -} -/** - * Variables for provisionSpatialRelation - * Idempotent provisioner for metaschema_public.spatial_relation. Inserts a row declaring a spatial predicate between two geometry/geography columns (owner and target). Called from construct_blueprint when a relation entry has $type=RelationSpatial. Graceful: re-running with the same (source_table_id, name) returns the existing id without modifying the row. Operator whitelist and st_dwithin ↔ param_name pairing are enforced by the spatial_relation table CHECKs. Both fields must already exist — this is a metadata-only insert. - */ -export interface ProvisionSpatialRelationVariables { - input: ProvisionSpatialRelationInput; -} -/** - * Variables for provisionTable - * Composable table provisioning: creates or finds a table, then creates fields (so Data* modules can reference them), applies N nodes (Data* modules), 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). - */ -export interface ProvisionTableVariables { - input: ProvisionTableInput; -} -/** - * Variables for provisionUniqueConstraint - * 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. - */ -export interface ProvisionUniqueConstraintVariables { - input: ProvisionUniqueConstraintInput; -} export function createMutationOperations(client: OrmClient) { return { constructBlueprint: ( @@ -201,208 +131,5 @@ export function createMutationOperations(client: OrmClient) { 'ProvisionBucketPayload' ), }), - provisionCheckConstraint: ( - args: ProvisionCheckConstraintVariables, - options: { - select: S; - } & StrictSelect - ) => - new QueryBuilder<{ - provisionCheckConstraint: InferSelectResult | null; - }>({ - client, - operation: 'mutation', - operationName: 'ProvisionCheckConstraint', - fieldName: 'provisionCheckConstraint', - ...buildCustomDocument( - 'mutation', - 'ProvisionCheckConstraint', - 'provisionCheckConstraint', - options.select, - args, - [ - { - name: 'input', - type: 'ProvisionCheckConstraintInput!', - }, - ], - connectionFieldsMap, - 'ProvisionCheckConstraintPayload' - ), - }), - provisionFullTextSearch: ( - args: ProvisionFullTextSearchVariables, - options: { - select: S; - } & StrictSelect - ) => - new QueryBuilder<{ - provisionFullTextSearch: InferSelectResult | null; - }>({ - client, - operation: 'mutation', - operationName: 'ProvisionFullTextSearch', - fieldName: 'provisionFullTextSearch', - ...buildCustomDocument( - 'mutation', - 'ProvisionFullTextSearch', - 'provisionFullTextSearch', - options.select, - args, - [ - { - name: 'input', - type: 'ProvisionFullTextSearchInput!', - }, - ], - connectionFieldsMap, - 'ProvisionFullTextSearchPayload' - ), - }), - provisionIndex: ( - args: ProvisionIndexVariables, - options: { - select: S; - } & StrictSelect - ) => - new QueryBuilder<{ - provisionIndex: InferSelectResult | null; - }>({ - client, - operation: 'mutation', - operationName: 'ProvisionIndex', - fieldName: 'provisionIndex', - ...buildCustomDocument( - 'mutation', - 'ProvisionIndex', - 'provisionIndex', - options.select, - args, - [ - { - name: 'input', - type: 'ProvisionIndexInput!', - }, - ], - connectionFieldsMap, - 'ProvisionIndexPayload' - ), - }), - provisionRelation: ( - args: ProvisionRelationVariables, - options: { - select: S; - } & StrictSelect - ) => - new QueryBuilder<{ - provisionRelation: InferSelectResult | null; - }>({ - client, - operation: 'mutation', - operationName: 'ProvisionRelation', - fieldName: 'provisionRelation', - ...buildCustomDocument( - 'mutation', - 'ProvisionRelation', - 'provisionRelation', - options.select, - args, - [ - { - name: 'input', - type: 'ProvisionRelationInput!', - }, - ], - connectionFieldsMap, - 'ProvisionRelationPayload' - ), - }), - provisionSpatialRelation: ( - args: ProvisionSpatialRelationVariables, - options: { - select: S; - } & StrictSelect - ) => - new QueryBuilder<{ - provisionSpatialRelation: InferSelectResult | null; - }>({ - client, - operation: 'mutation', - operationName: 'ProvisionSpatialRelation', - fieldName: 'provisionSpatialRelation', - ...buildCustomDocument( - 'mutation', - 'ProvisionSpatialRelation', - 'provisionSpatialRelation', - options.select, - args, - [ - { - name: 'input', - type: 'ProvisionSpatialRelationInput!', - }, - ], - connectionFieldsMap, - 'ProvisionSpatialRelationPayload' - ), - }), - provisionTable: ( - args: ProvisionTableVariables, - options: { - select: S; - } & StrictSelect - ) => - new QueryBuilder<{ - provisionTable: InferSelectResult | null; - }>({ - client, - operation: 'mutation', - operationName: 'ProvisionTable', - fieldName: 'provisionTable', - ...buildCustomDocument( - 'mutation', - 'ProvisionTable', - 'provisionTable', - options.select, - args, - [ - { - name: 'input', - type: 'ProvisionTableInput!', - }, - ], - connectionFieldsMap, - 'ProvisionTablePayload' - ), - }), - provisionUniqueConstraint: ( - args: ProvisionUniqueConstraintVariables, - options: { - select: S; - } & StrictSelect - ) => - new QueryBuilder<{ - provisionUniqueConstraint: InferSelectResult | null; - }>({ - client, - operation: 'mutation', - operationName: 'ProvisionUniqueConstraint', - fieldName: 'provisionUniqueConstraint', - ...buildCustomDocument( - 'mutation', - 'ProvisionUniqueConstraint', - 'provisionUniqueConstraint', - options.select, - args, - [ - { - name: 'input', - type: 'ProvisionUniqueConstraintInput!', - }, - ], - connectionFieldsMap, - 'ProvisionUniqueConstraintPayload' - ), - }), }; } diff --git a/sdk/constructive-sdk/src/modules/orm/query/index.ts b/sdk/constructive-sdk/src/modules/orm/query/index.ts deleted file mode 100644 index 70496d57ba..0000000000 --- a/sdk/constructive-sdk/src/modules/orm/query/index.ts +++ /dev/null @@ -1,115 +0,0 @@ -/** - * Custom query operations - * @generated by @constructive-io/graphql-codegen - * DO NOT EDIT - changes will be overwritten - */ -import { OrmClient } from '../client'; -import { QueryBuilder, buildCustomDocument } from '../query-builder'; -import type { InferSelectResult, StrictSelect } from '../select-types'; -import { connectionFieldsMap } from '../input-types'; -/** - * Variables for resolveBlueprintField - * Resolves a field_name within a given table_id to a field_id. Throws if no match is found. Used by construct_blueprint to translate user-authored field names (e.g. "location") into field UUIDs for downstream provisioning procedures. table_id must already be resolved (via resolve_blueprint_table) before calling this. - */ -export interface ResolveBlueprintFieldVariables { - databaseId?: string; - fieldName?: string; - tableId?: string; -} -/** - * Variables for resolveBlueprintTable - * Resolves a table_name (with optional schema_name) to a table_id. Resolution order: (1) if schema_name provided, exact lookup via metaschema_public.schema.name + metaschema_public.table; (2) check local table_map (tables created in current blueprint); (3) search metaschema_public.table by name across all schemas; (4) if multiple matches, throw ambiguous error asking for schema_name; (5) if no match, throw not-found error. - */ -export interface ResolveBlueprintTableVariables { - databaseId?: string; - defaultSchemaId?: string; - schemaName?: string; - tableMap?: unknown; - tableName?: string; -} -export function createQueryOperations(client: OrmClient) { - return { - resolveBlueprintField: ( - args: ResolveBlueprintFieldVariables, - options?: { - select?: Record; - } - ) => - new QueryBuilder<{ - resolveBlueprintField: string | null; - }>({ - client, - operation: 'query', - operationName: 'ResolveBlueprintField', - fieldName: 'resolveBlueprintField', - ...buildCustomDocument( - 'query', - 'ResolveBlueprintField', - 'resolveBlueprintField', - options?.select, - args, - [ - { - name: 'databaseId', - type: 'UUID', - }, - { - name: 'fieldName', - type: 'String', - }, - { - name: 'tableId', - type: 'UUID', - }, - ], - connectionFieldsMap, - undefined - ), - }), - resolveBlueprintTable: ( - args: ResolveBlueprintTableVariables, - options?: { - select?: Record; - } - ) => - new QueryBuilder<{ - resolveBlueprintTable: string | null; - }>({ - client, - operation: 'query', - operationName: 'ResolveBlueprintTable', - fieldName: 'resolveBlueprintTable', - ...buildCustomDocument( - 'query', - 'ResolveBlueprintTable', - 'resolveBlueprintTable', - options?.select, - args, - [ - { - name: 'databaseId', - type: 'UUID', - }, - { - name: 'defaultSchemaId', - type: 'UUID', - }, - { - name: 'schemaName', - type: 'String', - }, - { - name: 'tableMap', - type: 'JSON', - }, - { - name: 'tableName', - type: 'String', - }, - ], - connectionFieldsMap, - undefined - ), - }), - }; -} diff --git a/sdk/constructive-sdk/src/objects/README.md b/sdk/constructive-sdk/src/objects/README.md index 8c4dfb1d48..e75db077a4 100644 --- a/sdk/constructive-sdk/src/objects/README.md +++ b/sdk/constructive-sdk/src/objects/README.md @@ -10,7 +10,7 @@ - **Tables:** 5 - **Custom queries:** 0 -- **Custom mutations:** 4 +- **Custom mutations:** 7 **Generators:** ORM diff --git a/sdk/constructive-sdk/src/objects/orm/README.md b/sdk/constructive-sdk/src/objects/orm/README.md index 2a09348ad0..e112c19ae0 100644 --- a/sdk/constructive-sdk/src/objects/orm/README.md +++ b/sdk/constructive-sdk/src/objects/orm/README.md @@ -228,6 +228,21 @@ insertNodeAtPath const result = await db.mutation.insertNodeAtPath({ input: '' }).execute(); ``` +### `db.mutation.insertNodesAtPaths` + +insertNodesAtPaths + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | InsertNodesAtPathsInput (required) | + +```typescript +const result = await db.mutation.insertNodesAtPaths({ input: '' }).execute(); +``` + ### `db.mutation.provisionBucket` Provision an S3 bucket for a logical bucket in the database. @@ -246,6 +261,21 @@ and lifecycle settings. const result = await db.mutation.provisionBucket({ input: { bucketKey: '', ownerId: '' } }).execute(); ``` +### `db.mutation.setAndCommit` + +setAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | SetAndCommitInput (required) | + +```typescript +const result = await db.mutation.setAndCommit({ input: '' }).execute(); +``` + ### `db.mutation.setDataAtPath` setDataAtPath @@ -261,6 +291,21 @@ setDataAtPath const result = await db.mutation.setDataAtPath({ input: { data: '', path: '', root: '', sId: '' } }).execute(); ``` +### `db.mutation.setManyAndCommit` + +setManyAndCommit + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | SetManyAndCommitInput (required) | + +```typescript +const result = await db.mutation.setManyAndCommit({ input: { entries: '', message: '', refname: '', sId: '', storeId: '' } }).execute(); +``` + --- Built by the [Constructive](https://constructive.io) team. diff --git a/sdk/constructive-sdk/src/objects/orm/input-types.ts b/sdk/constructive-sdk/src/objects/orm/input-types.ts index bab07456e0..1ca44bc9d7 100644 --- a/sdk/constructive-sdk/src/objects/orm/input-types.ts +++ b/sdk/constructive-sdk/src/objects/orm/input-types.ts @@ -665,6 +665,15 @@ export interface InsertNodeAtPathInput { root?: string; sId?: string; } +export interface InsertNodesAtPathsInput { + clientMutationId?: string; + datas?: Record[]; + kidsList?: Record; + ktreeList?: Record; + paths?: Record; + root?: string; + sId?: string; +} export interface ProvisionBucketInput { /** The logical bucket key (e.g., "public", "private") */ bucketKey: string; @@ -674,6 +683,17 @@ export interface ProvisionBucketInput { */ ownerId?: string; } +export interface SetAndCommitInput { + clientMutationId?: string; + data?: Record; + kids?: string[]; + ktree?: string[]; + message?: string; + path?: string[]; + refname?: string; + sId?: string; + storeId?: string; +} export interface SetDataAtPathInput { clientMutationId?: string; data?: Record; @@ -681,6 +701,14 @@ export interface SetDataAtPathInput { root?: string; sId?: string; } +export interface SetManyAndCommitInput { + clientMutationId?: string; + entries?: Record; + message?: string; + refname?: string; + sId?: string; + storeId?: string; +} /** An input for mutations affecting `Commit` */ export interface CommitInput { /** User who authored the changes */ @@ -758,6 +786,14 @@ export type InsertNodeAtPathPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface InsertNodesAtPathsPayload { + clientMutationId?: string | null; + result?: string | null; +} +export type InsertNodesAtPathsPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; export interface ProvisionBucketPayload { /** The access type applied */ accessType: string; @@ -780,6 +816,20 @@ export type ProvisionBucketPayloadSelect = { provider?: boolean; success?: boolean; }; +export interface SetAndCommitPayload { + clientMutationId?: string | null; + commitEdge?: CommitEdge | null; + result?: Commit | null; +} +export type SetAndCommitPayloadSelect = { + clientMutationId?: boolean; + commitEdge?: { + select: CommitEdgeSelect; + }; + result?: { + select: CommitSelect; + }; +}; export interface SetDataAtPathPayload { clientMutationId?: string | null; result?: string | null; @@ -788,6 +838,20 @@ export type SetDataAtPathPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface SetManyAndCommitPayload { + clientMutationId?: string | null; + commitEdge?: CommitEdge | null; + result?: Commit | null; +} +export type SetManyAndCommitPayloadSelect = { + clientMutationId?: boolean; + commitEdge?: { + select: CommitEdgeSelect; + }; + result?: { + select: CommitSelect; + }; +}; export interface CreateCommitPayload { clientMutationId?: string | null; /** The `Commit` that was created by this mutation. */ diff --git a/sdk/constructive-sdk/src/objects/orm/mutation/index.ts b/sdk/constructive-sdk/src/objects/orm/mutation/index.ts index a0c21cb2bd..7d08bdc42e 100644 --- a/sdk/constructive-sdk/src/objects/orm/mutation/index.ts +++ b/sdk/constructive-sdk/src/objects/orm/mutation/index.ts @@ -9,16 +9,25 @@ import type { InferSelectResult, StrictSelect } from '../select-types'; import type { InitEmptyRepoInput, InsertNodeAtPathInput, + InsertNodesAtPathsInput, ProvisionBucketInput, + SetAndCommitInput, SetDataAtPathInput, + SetManyAndCommitInput, InitEmptyRepoPayload, InsertNodeAtPathPayload, + InsertNodesAtPathsPayload, ProvisionBucketPayload, + SetAndCommitPayload, SetDataAtPathPayload, + SetManyAndCommitPayload, InitEmptyRepoPayloadSelect, InsertNodeAtPathPayloadSelect, + InsertNodesAtPathsPayloadSelect, ProvisionBucketPayloadSelect, + SetAndCommitPayloadSelect, SetDataAtPathPayloadSelect, + SetManyAndCommitPayloadSelect, } from '../input-types'; import { connectionFieldsMap } from '../input-types'; export interface InitEmptyRepoVariables { @@ -27,6 +36,9 @@ export interface InitEmptyRepoVariables { export interface InsertNodeAtPathVariables { input: InsertNodeAtPathInput; } +export interface InsertNodesAtPathsVariables { + input: InsertNodesAtPathsInput; +} /** * Variables for provisionBucket * Provision an S3 bucket for a logical bucket in the database. @@ -37,9 +49,15 @@ and lifecycle settings. export interface ProvisionBucketVariables { input: ProvisionBucketInput; } +export interface SetAndCommitVariables { + input: SetAndCommitInput; +} export interface SetDataAtPathVariables { input: SetDataAtPathInput; } +export interface SetManyAndCommitVariables { + input: SetManyAndCommitInput; +} export function createMutationOperations(client: OrmClient) { return { initEmptyRepo: ( @@ -100,6 +118,35 @@ export function createMutationOperations(client: OrmClient) { 'InsertNodeAtPathPayload' ), }), + insertNodesAtPaths: ( + args: InsertNodesAtPathsVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + insertNodesAtPaths: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'InsertNodesAtPaths', + fieldName: 'insertNodesAtPaths', + ...buildCustomDocument( + 'mutation', + 'InsertNodesAtPaths', + 'insertNodesAtPaths', + options.select, + args, + [ + { + name: 'input', + type: 'InsertNodesAtPathsInput!', + }, + ], + connectionFieldsMap, + 'InsertNodesAtPathsPayload' + ), + }), provisionBucket: ( args: ProvisionBucketVariables, options: { @@ -129,6 +176,35 @@ export function createMutationOperations(client: OrmClient) { 'ProvisionBucketPayload' ), }), + setAndCommit: ( + args: SetAndCommitVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + setAndCommit: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'SetAndCommit', + fieldName: 'setAndCommit', + ...buildCustomDocument( + 'mutation', + 'SetAndCommit', + 'setAndCommit', + options.select, + args, + [ + { + name: 'input', + type: 'SetAndCommitInput!', + }, + ], + connectionFieldsMap, + 'SetAndCommitPayload' + ), + }), setDataAtPath: ( args: SetDataAtPathVariables, options: { @@ -158,5 +234,34 @@ export function createMutationOperations(client: OrmClient) { 'SetDataAtPathPayload' ), }), + setManyAndCommit: ( + args: SetManyAndCommitVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + setManyAndCommit: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'SetManyAndCommit', + fieldName: 'setManyAndCommit', + ...buildCustomDocument( + 'mutation', + 'SetManyAndCommit', + 'setManyAndCommit', + options.select, + args, + [ + { + name: 'input', + type: 'SetManyAndCommitInput!', + }, + ], + connectionFieldsMap, + 'SetManyAndCommitPayload' + ), + }), }; }